/* ============================================================
   VICVIK - 经销商授权查询页 (Dealer Authorization)
   依赖: common.css (变量) + cms.css (分页/空状态)
============================================================ */

/* ---------- 全局重置 (与 styles.css/channel.css/news.css 保持一致) ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { line-height: 1.7; }
a { text-decoration: none; color: inherit; }

/* ---------- 基础布局 ---------- */
.container { max-width: 1260px; margin: 0 auto; padding: 0 40px; }
.section { padding: 80px 0 100px; }

/* ---------- 导航高亮: 与全站其他栏目选中状态一致 (金色文字 + 金色下划线) ---------- */
body[data-page="dealerauth"] .nav-links a[data-nav="dealer-auth"],
body[data-page="dealerauth"] .mobile-menu a[data-nav="dealer-auth"] {
  color: var(--gold) !important;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
body[data-page="dealerauth"] .nav-links a[data-nav="dealer-auth"]::after,
body[data-page="dealerauth"] .mobile-menu a[data-nav="dealer-auth"]::after {
  width: 100% !important;
  background: var(--gold) !important;
}

/* ---------- 非经销商授权页: 强制经销商授权链接保持默认黑色样式, 避免继承下划线 ---------- */
.nav-links a[data-nav="dealer-auth"],
.mobile-menu a[data-nav="dealer-auth"] {
  color: var(--black) !important;
  text-decoration: none !important;
  border-bottom: none !important;
}
.nav-links a[data-nav="dealer-auth"]::after,
.mobile-menu a[data-nav="dealer-auth"]::after {
  width: 0 !important;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 48vh;
  display: flex;
  align-items: center;
  background: var(--black);
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 70% 50%, rgba(201,169,110,0.08) 0%, transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(201,169,110,0.03) 80px);
}
.hero-inner {
  max-width: 1260px;
  margin: 0 auto;
  width: 100%;
  padding: 80px 40px 60px;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-badge::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
}
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.hero-title span { color: var(--gold); }
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.68);
  max-width: 560px;
  line-height: 1.8;
  margin: 0;
}

/* ---------- 筛选 + 搜索区 ---------- */
.da-filter-section {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 72px;
  z-index: 90;
}
.da-filter-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.da-filter-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.da-filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-mute);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.da-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.da-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: var(--bg-warm);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--trans);
  user-select: none;
  text-decoration: none;
}
.da-tag:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(201,169,110,0.06);
}
.da-tag.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

/* 搜索框 */
.da-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.da-search-input {
  width: 260px;
  padding: 9px 16px 9px 38px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-body);
  background: var(--bg-warm) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7570' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") 12px center no-repeat;
  outline: none;
  transition: all var(--trans);
}
.da-search-input::placeholder { color: var(--text-mute); }
.da-search-input:focus {
  border-color: var(--gold);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.1);
}
.da-search-count {
  font-size: 13px;
  color: var(--text-mute);
  white-space: nowrap;
}
.da-search-count strong { color: var(--text-body); font-weight: 700; }

/* ---------- 表格区 ---------- */
.da-section {
  background: linear-gradient(180deg, #fbfaf7 0%, #f4efe6 100%);
  padding: 60px 0 100px;
}
.da-table-wrap {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 40px;
}
.da-table-card {
  background: var(--white);
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(14,14,12,0.06);
}
.da-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.da-table thead tr {
  background: var(--black);
}
.da-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.82);
  text-transform: uppercase;
  white-space: nowrap;
}
.da-table thead th.da-th-code { width: 180px; }
.da-table thead th.da-th-city { width: 100px; }
.da-table thead th.da-th-region { width: 90px; }

.da-table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background var(--trans);
}
.da-table tbody tr:last-child { border-bottom: none; }
.da-table tbody tr:hover {
  background: rgba(201,169,110,0.04);
}

.da-table tbody td {
  padding: 14px 16px;
  color: var(--text-body);
  vertical-align: middle;
}
.da-table tbody td.da-td-company {
  font-weight: 600;
  color: var(--black);
  font-size: 15px;
}
.da-table tbody td.da-td-code {
  text-align: center;
}
.da-table tbody td.da-td-code .da-code-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(201,169,110,0.1);
  color: var(--gold-dark);
  font-family: 'Outfit', 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.da-table tbody td.da-td-city {
  text-align: center;
}
.da-table tbody td.da-td-city .da-info-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,0.04);
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
}
.da-table tbody td.da-td-region { text-align: center; }
.da-table tbody td.da-td-region .da-region-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(201,169,110,0.08));
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(201,169,110,0.25);
}

/* ---------- 无结果提示 ---------- */
.da-no-result {
  display: none;
  padding: 48px 20px;
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
}
.da-no-result.show { display: block; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .da-filter-inner {
    padding: 20px;
    gap: 20px;
  }
  .da-filter-group {
    flex-basis: 100%;
  }
  .da-search-box {
    flex-basis: 100%;
  }
  .da-search-input {
    width: 100%;
    flex: 1;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0 72px; }

  .hero { min-height: 40vh; }
  .hero-inner { padding: 60px 16px 48px; }

  .da-filter-section { top: 64px; }
  .da-filter-inner { padding: 16px; }

  .da-section { padding: 40px 0 72px; }
  .da-table-wrap { padding: 0 16px; }
  .da-table-card { border-radius: 16px; }

  /* 表格转卡片 */
  .da-table thead { display: none; }
  .da-table, .da-table tbody, .da-table tr, .da-table td { display: block; width: 100%; }

  /* 每条记录 = 一张独立卡片 */
  .da-table tbody tr {
    background: #fff;
    border: 1px solid rgba(201,169,110,0.3);
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(14,14,12,0.06);
  }
  .da-table tbody tr:hover { box-shadow: 0 6px 20px rgba(14,14,12,0.1); }

  /* 公司名: 卡片头部, 带金色底色 */
  .da-table tbody td.da-td-company {
    background: linear-gradient(135deg, rgba(201,169,110,0.12), rgba(201,169,110,0.05));
    border-bottom: 1px solid rgba(201,169,110,0.2);
    padding: 14px 16px 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    display: block;
    text-align: left;
  }
  .da-table tbody td.da-td-company::before { display: none; }

  /* 编号/城市/地区: 卡片内容区, 左标签右值 */
  .da-table tbody td.da-td-code,
  .da-table tbody td.da-td-city,
  .da-table tbody td.da-td-region {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    text-align: right;
  }
  .da-table tbody td.da-td-region { border-bottom: none; }
  .da-table tbody td.da-td-code::before,
  .da-table tbody td.da-td-city::before,
  .da-table tbody td.da-td-region::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mute);
    letter-spacing: 0.5px;
    text-align: left;
    flex-shrink: 0;
  }
  .da-table tbody td.da-td-code .da-code-chip,
  .da-table tbody td.da-td-city .da-info-chip,
  .da-table tbody td.da-td-region .da-region-badge {
    margin-left: 12px;
  }
}
