/* 美大夫 SVIP专属礼品卡 · 奢侈品牌风设计系统 */
:root {
  --gold: #9F855C;
  --gold-dark: #7A6A4F;
  --gold-deep: #5C4F3A;
  --gold-light: #C4B49A;
  --gold-pale: #E8E0D4;
  --gold-subtle: #F3EEE6;
  --ink: #2A251E;
  --ink-soft: #4A443A;
  --muted: #8C806E;
  --line: #EBE5DC;
  --line-light: #F0EBE3;
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-elevated: #FDFCFA;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow-sm: 0 2px 8px rgba(42,37,30,0.04);
  --shadow: 0 8px 32px rgba(42,37,30,0.08);
  --shadow-lg: 0 20px 60px rgba(42,37,30,0.12);
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* 顶部导航 · 毛玻璃 */
header.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}

header.top .brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

header.top .logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-pale);
  box-shadow: 0 2px 8px rgba(159,133,92,0.12);
}

header.top .title { font-weight: 600; font-size: 16px; letter-spacing: -0.02em; }
header.top .sub { color: var(--muted); font-size: 12px; margin-top: 1px; letter-spacing: 0.02em; }
header.top a.home {
  margin-left: auto;
  color: var(--gold-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  transition: all .2s ease;
}
header.top a.home:hover { border-color: var(--gold-light); color: var(--gold); box-shadow: var(--shadow-sm); }

.wrap { max-width: 980px; margin: 0 auto; padding: 32px 28px 60px; }

/* 页面标题区 */
.page-hero {
  text-align: center;
  padding: 24px 0 32px;
}
.page-hero h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.page-hero p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  font-weight: 400;
}

/* 卡片容器 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.card.translucent {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
}

h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h3 {
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 16px 0 7px;
  font-weight: 500;
}

input, select, textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface-elevated);
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(159,133,92,0.10);
}
textarea { resize: vertical; min-height: 76px; }

/* 发卡领导固定展示 */
.leader-fixed {
  padding: 13px 15px;
  border: 1px solid var(--gold-pale);
  border-radius: var(--radius-sm);
  background: var(--gold-subtle);
  font-size: 15px;
  color: var(--gold-deep);
  font-weight: 500;
}

/* 卡片内部规则展示 */
.rule-box {
  padding: 13px 15px;
  border: 1px dashed var(--gold-pale);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  font-size: 13px;
  color: var(--gold-deep);
  line-height: 1.7;
  min-height: 48px;
}

/* 礼品卡使用规则板块 */
.rule-section {
  background: #A9916D;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 4px 0 20px;
}
.rule-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: 1px;
}
.rule-list {
  margin: 0;
  padding-left: 20px;
  color: #fff;
  font-size: 13px;
  line-height: 1.8;
}
.rule-list li { margin-bottom: 4px; }

/* 按钮 */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border: none;
  padding: 13px 24px;
  border-radius: 100px;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 14px rgba(159,133,92,0.28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(159,133,92,0.34);
  filter: brightness(1.03);
}
button:active, .btn:active { transform: translateY(0); }
button.ghost, .btn.ghost {
  background: #E3DED4;
  color: #9F855C;
  box-shadow: none;
  border: 1px solid #C4B49A;
}
button.ghost:hover, .btn.ghost:hover { background: var(--gold-subtle); border-color: var(--gold-light); }
button.teal { background: linear-gradient(135deg, #0F6E56, #0A5542); box-shadow: 0 4px 14px rgba(15,110,86,0.25); }
button.sm { padding: 8px 14px; font-size: 13px; border-radius: 100px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1 1 240px; }
.hidden { display: none !important; }

/* 提示条 */
.notice {
  background: var(--gold-subtle);
  border: 1px solid var(--gold-pale);
  color: var(--gold-deep);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 22px;
  line-height: 1.6;
}
.err {
  background: #FDF2F2;
  border: 1px solid #F4C5C5;
  color: #9B2C2C;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 22px;
}

/* 礼品卡视觉 · 奢华金（双层描边） */
.giftcard {
  background: linear-gradient(170deg, #BEAB8D 0%, #A58F6D 50%, #897657 100%);
  color: #fff;
  border-radius: 20px;
  padding: 13px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  box-shadow: 0 18px 50px rgba(122,106,79,0.32);
}
.gc-inner {
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
}
.gc-top {
  font-size: 11px;
  color: #5C4F3A;
  letter-spacing: 5px;
}
.gc-line {
  width: 26px;
  height: 1px;
  background: rgba(92,79,58,0.7);
  margin: 16px auto 0;
}
.gc-vip {
  font-size: 21px;
  font-weight: 600;
  margin-top: 16px;
  letter-spacing: 2px;
  font-family: "Didot", "Songti SC", serif;
}
.gc-gift {
  font-size: 27px;
  font-weight: 600;
  margin-top: 16px;
  font-family: "Didot", "Songti SC", serif;
}
.gc-desc {
  font-size: 11px;
  opacity: .85;
  letter-spacing: 1px;
  margin-top: 9px;
}
.gc-divider {
  height: 1px;
  background: rgba(255,255,255,0.35);
  margin: 20px 0;
}
.gc-bless {
  font-size: 12px;
  opacity: .92;
  line-height: 1.8;
}
.gc-sign {
  text-align: right;
  font-size: 14px;
  font-weight: 500;
}
.gc-from {
  margin-top: 16px;
  font-size: 12px;
  opacity: .8;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 12px;
}
.gc-code {
  margin-top: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: 3px;
  display: inline-block;
  font-family: "SF Mono", Menlo, monospace;
}

.code-box {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--gold-subtle);
  border: 1px dashed var(--gold-pale);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gold-deep);
}
.code-box b { color: var(--gold-dark); font-size: 17px; letter-spacing: 1px; font-weight: 600; }

/* 表格 */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th, td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line-light); }
th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }

/* 苹果 Numbers 风格表格 */
.numbers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.numbers-table th {
  background: #F5F5F7;
  color: #6E6E73;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid #E5E5EA;
  white-space: nowrap;
}
.numbers-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #F0F0F2;
  color: #1D1D1F;
  white-space: nowrap;
}
.numbers-table tbody tr:nth-child(even) { background: #FAFAFC; }
.numbers-table tbody tr:hover { background: #F0F5FF; }
.numbers-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-subtle);
  color: var(--gold-dark);
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag.teal { background: #E8F5F1; color: #0F6E56; }
.tag.gray { background: #F2F0EC; color: var(--muted); }
.tag.amber { background: #FDF5E6; color: #8A5D12; }

button.sm { padding: 7px 13px; font-size: 12px; border-radius: 100px; font-weight: 500; }
.sm-input {
  width: 130px;
  padding: 8px 11px;
  font-size: 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
}
.qr { width: 132px; height: 132px; border-radius: 12px; background: #fff; padding: 8px; }
.share-link { font-size: 13px; color: var(--muted); word-break: break-all; line-height: 1.6; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .n { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.kpi .l { font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: 0.03em; text-transform: uppercase; }

/* 导航网格 */
.grid-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.nav-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all .25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-item:hover {
  border-color: var(--gold-pale);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.nav-item:hover::before { opacity: 1; }
.nav-item .t { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.nav-item .d { font-size: 13px; color: var(--muted); line-height: 1.5; }
.nav-item .num {
  position: absolute;
  bottom: 18px; right: 20px;
  font-size: 38px;
  font-weight: 700;
  color: var(--gold-pale);
  opacity: .6;
  line-height: 1;
}

/* 空状态 */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-icon { font-size: 42px; margin-bottom: 12px; opacity: .5; }

/* 步骤提示 */
.step-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

/* 分割 */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 26px 0;
  border: none;
}

/* 板块标题 */
.board-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  margin: 34px 0 18px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.board-title::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--gold);
}

/* 累计发卡横向统计 */
.gift-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.gift-stat-card { background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.gift-stat-card .gtype { font-weight: 600; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.gift-stat-card .gsum { font-size: 12px; color: var(--gold-dark); margin-bottom: 12px; }
.gift-stat-item { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-light); font-size: 13px; color: var(--ink-soft); }
.gift-stat-item:last-child { border-bottom: none; }
.gift-stat-item b { color: var(--gold-dark); font-weight: 600; }

/* 数据统计表 统计总数条 */
.total-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #F5F5F7;
  border-radius: 12px;
}
.tb-item { font-size: 13px; color: #6E6E73; }
.tb-item b { color: #1D1D1F; font-weight: 600; margin-left: 4px; }

/* 响应式 */
@media (max-width: 640px) {
  .wrap { padding: 22px 18px 48px; }
  .page-hero h1 { font-size: 26px; }
  .card { padding: 22px; }
  header.top { padding: 12px 18px; }
  .kpi .n { font-size: 28px; }
}
