:root {
  --bg0: #f4f6fb;
  --bg1: #eef2f8;
  --bg2: #e8edf5;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --line: rgba(15, 23, 42, 0.06);
  --text: #1e293b;
  --muted: #64748b;
  --ok: #059669;
  --err: #dc2626;
  --warn: #d97706;
  --accent: #4f46e5;
  --accent2: #7c3aed;
  --glow: rgba(79, 70, 229, 0.18);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg0);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 95% 5%, rgba(236, 72, 153, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(56, 189, 248, 0.08), transparent),
    linear-gradient(180deg, #f8fafc, var(--bg0));
}
.wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 28px 20px 56px; }
.wrap.narrow { max-width: 480px; }
.wrap.wide { max-width: 1440px; }

.header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.logo {
  width: 52px; height: 52px; border-radius: 6px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px var(--glow); color: #fff;
}
.logo .ico svg { width: 26px; height: 26px; }
.header h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; color: #0f172a; }
.header .sub { color: var(--muted); font-size: .86rem; margin-top: 2px; }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 4px; font-size: .78rem; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.chip.ok { color: var(--ok); border-color: rgba(5, 150, 105, 0.25); background: #ecfdf5; }
.chip.warn { color: var(--warn); border-color: rgba(217, 119, 6, 0.25); background: #fffbeb; }
.chip .ico svg { width: 14px; height: 14px; }

.toast {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px; padding: 14px 16px; border-radius: 6px;
  font-size: .92rem; animation: slideIn .35s ease;
}
.toast.ok { background: #ecfdf5; border: 1px solid rgba(5, 150, 105, 0.25); color: #065f46; }
.toast.warn { background: #fffbeb; border: 1px solid rgba(217, 119, 6, 0.25); color: #92400e; }
.toast.err { background: #fef2f2; border: 1px solid rgba(220, 38, 38, 0.2); color: #991b1b; }
.toast-ico { flex-shrink: 0; margin-top: 1px; }
.toast.ok .toast-ico { color: var(--ok); }
.toast.warn .toast-ico { color: var(--warn); }
.toast.err .toast-ico { color: var(--err); }
.toast-ico svg { width: 20px; height: 20px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px;
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(5, 1fr); } }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
  padding: 16px 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(99, 102, 241, 0.25); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }
.stat-card .label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .num { font-size: 1.65rem; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card.c1 .num { color: #2563eb; }
.stat-card.c2 .num { color: #059669; }
.stat-card.c3 .num { color: #d97706; }
.stat-card.c4 .num { color: #7c3aed; }
.stat-card.c5 .num { color: #db2777; }

.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
  padding: 20px; margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.section-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .ico svg { width: 16px; height: 16px; }

.form-grid {
  display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(4, 1fr); align-items: end; } }
.voucher-gen-grid {
  display: grid; gap: 12px; grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}
@media (min-width: 720px) {
  .voucher-gen-grid {
    grid-template-columns: 140px 120px minmax(200px, 1fr);
    align-items: end;
  }
  .voucher-gen-grid .span-note { grid-column: auto; }
}
.field label { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.field input, .field select {
  width: 100%; border-radius: 4px; border: 1px solid #cbd5e1;
  background: #fff; color: var(--text); padding: 10px 12px; font-size: .9rem;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.field.span2, .field.span-note { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 4px; padding: 11px 16px;
  font-size: .86rem; font-weight: 700; cursor: pointer; color: #fff;
  transition: transform .15s, opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: linear-gradient(135deg, #6366f1, #7c3aed); box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28); }
.btn-secondary { background: #fff; border: 1px solid #cbd5e1; color: #334155; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-warn { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.btn-danger { background: #fef2f2; border: 1px solid rgba(220, 38, 38, 0.25); color: #b91c1c; }
.btn-sm { padding: 6px 10px; font-size: .75rem; border-radius: 4px; }
.btn-block { width: 100%; padding: 14px; font-size: 1rem; }
.btn-ico svg { width: 16px; height: 16px; display: block; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.table-wrap { overflow-x: auto; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.data th {
  text-align: left; padding: 12px 14px; background: #f8fafc;
  color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line);
}
table.data td { padding: 12px 14px; border-top: 1px solid var(--line); }
table.data tr:hover td { background: #f8fafc; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 4px; font-size: .72rem; font-weight: 700;
}
.badge.idle { background: #ecfdf5; color: #047857; border: 1px solid rgba(5, 150, 105, 0.2); }
.badge.in_use { background: #eff6ff; color: #1d4ed8; border: 1px solid rgba(37, 99, 235, 0.2); }
.badge.granted { background: #fffbeb; color: #b45309; border: 1px solid rgba(217, 119, 6, 0.2); }
.badge.licensed { background: #f5f3ff; color: #6d28d9; border: 1px solid rgba(124, 58, 237, 0.2); }
.badge.disabled, .badge.missing { background: #fef2f2; color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.15); }
.badge.active { background: #ecfdf5; color: #047857; }
.badge.ended { background: #f1f5f9; color: #475569; }
.badge.failed { background: #fef2f2; color: #b91c1c; }
.badge.unused { background: #f5f3ff; color: #6d28d9; }
.badge.redeemed { background: #e0f2fe; color: #0369a1; }

/* 客户领取页 */
.redeem-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.redeem-page .wrap.narrow {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.redeem-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.redeem-brand-logo {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 6px 20px var(--glow);
}
.redeem-brand-logo .ico svg { width: 22px; height: 22px; }
.redeem-brand-text { font-size: .88rem; font-weight: 700; color: var(--muted); }

.redeem-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
  flex: 1;
}
.redeem-card.centered { text-align: center; }

.redeem-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 10px;
  color: #0f172a;
  line-height: 1.3;
}
.redeem-card .lead {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 20px;
  line-height: 1.65;
}

.redeem-duration {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.redeem-duration-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.redeem-duration-icon .ico svg { width: 22px; height: 22px; }
.redeem-duration-body { flex: 1; min-width: 0; }
.redeem-duration-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #4338ca;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.redeem-duration-label {
  font-size: .82rem;
  color: #6366f1;
  font-weight: 600;
  margin-top: 2px;
}

.redeem-features {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.redeem-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  font-size: .84rem;
  color: #475569;
}
.redeem-feature .ico {
  color: #6366f1;
  flex-shrink: 0;
}
.redeem-feature .ico svg { width: 18px; height: 18px; }

.phone-field { margin-bottom: 18px; }
.phone-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}
.phone-field label .ico svg { width: 16px; height: 16px; color: var(--muted); }
.phone-input {
  width: 100%;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: var(--text);
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.phone-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: normal;
  font-size: 16px;
}
.phone-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.redeem-submit {
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  transition: transform .15s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}
.redeem-submit:active { transform: scale(.98); }
.redeem-submit .btn-ico svg { width: 20px; height: 20px; }

.redeem-tips {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.redeem-tips-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.redeem-tip {
  display: flex;
  gap: 8px;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 8px;
}
.redeem-tip:last-child { margin-bottom: 0; }
.redeem-tip-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 兼容旧类名 */
.hero-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}
.hero-card h1 { font-size: 1.4rem; margin-bottom: 8px; color: #0f172a; }
.hero-card .lead { color: var(--muted); font-size: .92rem; margin-bottom: 18px; line-height: 1.6; }
.duration-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 12px; margin-bottom: 18px;
  background: #eef2ff; border: 1px solid rgba(99, 102, 241, 0.25);
  color: #4338ca; font-weight: 700;
}
.duration-pill .ico svg { width: 18px; height: 18px; }
.hint { margin-top: 16px; font-size: .8rem; color: var(--muted); line-height: 1.65; }

.redeem-status-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
}
.redeem-status-icon.ok {
  background: #ecfdf5; border: 2px solid rgba(5, 150, 105, 0.35); color: var(--ok);
}
.redeem-status-icon.err {
  background: #fef2f2; border: 2px solid rgba(220, 38, 38, 0.25); color: var(--err);
}
.redeem-status-icon .ico svg { width: 34px; height: 34px; }

.success-ring {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  background: #ecfdf5; border: 2px solid rgba(5, 150, 105, 0.35); color: var(--ok);
}
.success-ring .ico svg { width: 30px; height: 30px; }

.redeem-info-grid {
  margin: 20px 0;
  display: grid;
  gap: 8px;
}
.redeem-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: .9rem;
}
.redeem-info-item span:first-child { color: var(--muted); font-size: .82rem; }
.redeem-info-item strong {
  color: var(--text);
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.redeem-steps {
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.redeem-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: .88rem;
  color: #475569;
  line-height: 1.5;
  text-align: left;
}
.redeem-step-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.redeem-step strong { color: var(--text); }

.redeem-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s;
}
.redeem-cta:active { transform: scale(.98); }
.redeem-cta .btn-ico svg { width: 20px; height: 20px; }

.info-list { margin: 18px 0; display: grid; gap: 10px; }
.info-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line);
  font-size: .9rem;
}
.info-row span:first-child { color: var(--muted); }
.steps { margin: 18px 0 0 20px; color: var(--muted); font-size: .9rem; line-height: 1.8; }
.steps strong { color: var(--text); }

@media (min-width: 480px) {
  .redeem-page { padding-top: 40px; }
  .redeem-card { padding: 32px 28px; }
  .redeem-card h1 { font-size: 1.65rem; }
}

.login-card {
  width: 100%; max-width: 400px; margin: 60px auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
}
.login-card .logo { margin: 0 auto 18px; }
.login-card h2 { text-align: center; font-size: 1.25rem; margin-bottom: 6px; color: #0f172a; }
.login-card .sub { text-align: center; color: var(--muted); font-size: .86rem; margin-bottom: 22px; }

.link-box {
  width: 100%; min-height: 50vh; margin-top: 16px;
  border-radius: 14px; border: 1px solid var(--line); background: #f8fafc;
  padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .78rem; color: #2563eb; line-height: 1.7; resize: vertical;
}

.ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
a.link { color: #2563eb; text-decoration: none; }
a.link:hover { text-decoration: underline; }
a.link-mono { color: #2563eb; text-decoration: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
a.link-mono:hover { text-decoration: underline; }

.admin-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.admin-tabs .tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 4px; font-size: .86rem; font-weight: 600;
  color: var(--muted); text-decoration: none;
  background: transparent; border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
  white-space: nowrap;
}
.admin-tabs .tab .ico svg { width: 16px; height: 16px; }
.admin-tabs .tab:hover {
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.2);
  background: #f8fafc;
}
.admin-tabs .tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}
@media (max-width: 720px) {
  .admin-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 14px;
    padding: 6px 8px;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .tab { flex-shrink: 0; padding: 8px 12px; font-size: .82rem; }
}
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.panel-head .section-title { margin-bottom: 0; }
.toolbar-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px;
}
.toolbar-row .grow { flex: 1; min-width: 160px; }
.toolbar-row input, .toolbar-row select {
  border-radius: 10px; border: 1px solid #cbd5e1;
  background: #fff; color: var(--text); padding: 9px 12px; font-size: .86rem;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips a {
  padding: 6px 12px; border-radius: 4px; font-size: .76rem; font-weight: 600;
  text-decoration: none; color: var(--muted);
  background: #fff; border: 1px solid var(--border);
}
.filter-chips a.active, .filter-chips a:hover {
  color: #4338ca; border-color: rgba(99, 102, 241, 0.35);
  background: #eef2ff;
}

.countdown {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: .86rem;
  color: #2563eb; white-space: nowrap;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 8px;
}
.countdown.warn {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.countdown.danger {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.3);
  animation: pulse 1.2s ease infinite;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.08);
}
.countdown.done { color: var(--muted); background: #f1f5f9; border: 1px solid var(--line); }
.countdown-inline { font-variant-numeric: tabular-nums; font-weight: 800; margin-left: 4px; }

/* 临近到期订单行高亮 */
table.data tr.row-warn td { background: #fffbeb !important; }
table.data tr.row-danger td { background: #fef2f2 !important; }
table.data tr.row-danger td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}
table.data tr.row-done td { background: #f8fafc !important; }

.chip.reclaim {
  cursor: help;
}
.chip.reclaim .countdown-inline { color: inherit; }

.mini-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px;
}
@media (min-width: 720px) { .mini-stats { grid-template-columns: repeat(4, 1fr); } }
.mini-stat {
  padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.mini-stat .k { font-size: .72rem; color: var(--muted); font-weight: 600; }
.mini-stat .v { font-size: 1.25rem; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; color: #0f172a; }

.settings-wrap .header { justify-content: center; text-align: center; }
.settings-wrap .header .logo { margin: 0; }
.settings-wrap .header-actions { margin-left: 0; justify-content: center; width: 100%; }

.settings-center {
  max-width: 440px;
  margin: 0 auto;
}
.settings-panel {
  padding: 28px 26px;
}
.settings-panel .section-title {
  justify-content: center;
  font-size: .82rem;
  margin-bottom: 20px;
}
.settings-panel .section-title .ico svg { width: 18px; height: 18px; }
.settings-panel .hint {
  text-align: center;
  margin-top: 16px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
}
.settings-grid .field input { max-width: 100%; }
.settings-grid .field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: .9rem;
}
.settings-grid .field input:disabled {
  background: #f1f5f9;
  color: var(--muted);
  cursor: not-allowed;
}
.settings-grid .btn-primary {
  width: 100%;
  padding: 13px;
  font-size: .95rem;
  margin-top: 4px;
}

.login-modes {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
@media (min-width: 900px) {
  .login-modes { grid-template-columns: repeat(3, 1fr); }
}
.login-mode-card .settings-grid { max-width: 100%; }
.login-mode-highlight {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.08);
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--muted);
  cursor: pointer;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: stretch;
}
.btn-row .btn {
  flex: 1 1 0;
  min-width: 120px;
  height: 42px;
}

.token-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.token-cell .link-mono { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-state {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.empty-state .ico { color: var(--accent); margin-bottom: 10px; }
.empty-state .ico svg { width: 36px; height: 36px; }

@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.55; } }
