/* Plus Care — Dark Premium Glass UI */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Outfit:wght@500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg-0: #05070f;
  --bg-1: #0a0f1c;
  --ink: #f1f5f9;
  --ink-soft: #e2e8f0;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --glass: rgba(15, 23, 42, 0.55);
  --glass-strong: rgba(15, 23, 42, 0.72);
  --glass-soft: rgba(30, 41, 59, 0.45);
  --glass-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #2dd4bf;
  --accent-2: #818cf8;
  --accent-3: #38bdf8;
  --accent-dark: #5eead4;
  --danger: #fb7185;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 20px;
  --radius-sm: 14px;
  --blur: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --font: "DM Sans", "Segoe UI", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "DM Sans", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
}
body.glass-app {
  background:
    radial-gradient(ellipse 1000px 560px at 8% -10%, rgba(99, 102, 241, 0.38), transparent 55%),
    radial-gradient(ellipse 800px 520px at 95% 5%, rgba(45, 212, 191, 0.22), transparent 50%),
    radial-gradient(ellipse 700px 480px at 50% 110%, rgba(56, 189, 248, 0.14), transparent 50%),
    radial-gradient(ellipse 500px 360px at 70% 40%, rgba(168, 85, 247, 0.12), transparent 45%),
    linear-gradient(165deg, #05070f 0%, #0b1220 42%, #0a1628 100%);
  position: relative;
}
.glass-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"),
    radial-gradient(circle at 25% 20%, rgba(255,255,255,0.05), transparent 40%),
    radial-gradient(circle at 80% 75%, rgba(45,212,191,0.06), transparent 35%);
}
.glass-app > .site-header,
.glass-app > .admin-main,
.glass-app > main,
.glass-app > footer { position: relative; z-index: 1; }

/* Glass surfaces */
.glass-card,
.glass-nav,
.workspace.glass-card,
.login-form.glass-card,
.admin-page .table-wrap,
.admin-page .insight-card,
.admin-page .panel-card,
.admin-page .score-legend,
.admin-page .stat,
.admin-page .quality-channel-card,
.admin-page .risk-user-card,
.admin-page .channel-stat-card,
.admin-page .alert-item,
.admin-page .channel-stats {
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.72)) !important;
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
  color: var(--ink) !important;
}
.glass-nav {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.55)) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35) !important;
}
.glass-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.65));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Header */
.site-header {
  height: 72px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2dd4bf 0%, #6366f1 55%, #38bdf8 100%);
  color: #041016;
  border-radius: 14px;
  font-weight: 800;
  font-family: var(--display);
  box-shadow: 0 10px 30px rgba(45, 212, 191, 0.28), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand strong, .brand small { display: block; }
.brand strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.icon-button {
  width: 42px; height: 42px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  color: var(--ink);
  font-size: 18px;
  transition: transform .15s, background .15s, border-color .15s;
}
.icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.header-actions { display: flex; gap: 10px; align-items: center; }
.text-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.text-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.glass-nav .secondary-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.glass-nav .secondary-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero */
.intro-band {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 36px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: end;
}
.eyebrow, .step-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(45, 212, 191, 0.45);
}
h1, h2, h3, p { letter-spacing: -0.02em; }
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.08;
  font-weight: 750;
  color: #f8fafc;
  text-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.lead {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 450;
}
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-chip {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.flow {
  list-style: none;
  padding: 18px;
  margin: 0;
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.7));
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.flow li {
  min-height: 70px;
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.flow li:last-child { border-bottom: 0; }
.flow li > span {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(99, 102, 241, 0.95));
  color: #041016;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.22);
}
.flow strong, .flow small { display: block; }
.flow strong { font-size: 14px; color: #f8fafc; }
.flow small { color: var(--muted); margin-top: 4px; font-size: 12px; }

/* Workspace / forms */
.workspace {
  max-width: 1200px;
  margin: 0 auto 56px;
  border-radius: 28px;
  overflow: hidden;
}
.tab-bar {
  height: 64px;
  display: flex;
  padding: 0 28px;
  gap: 8px;
  align-items: flex-end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}
.tab {
  position: relative;
  border: 0;
  padding: 0 16px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
  transition: color .15s;
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: #fff; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.55);
}
.tab-panel { padding: 34px 40px 40px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.section-heading h2, .login-form h2, .dialog-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f8fafc;
}
.section-heading > p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.required-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.18);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.field.wide { grid-column: 1 / -1; }
.field > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}
.field b { color: var(--danger); }
.field-tip {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 500;
  line-height: 1.5;
}

/* Verify pills */
.verify-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 750;
  border: 1px solid transparent;
}
.verify-pill.v-pending { background: rgba(56,189,248,.12); color: #7dd3fc; border-color: rgba(56,189,248,.28); }
.verify-pill.v-pass { background: rgba(52,211,153,.12); color: #6ee7b7; border-color: rgba(52,211,153,.28); }
.verify-pill.v-reject { background: rgba(148,163,184,.12); color: #cbd5e1; border-color: rgba(148,163,184,.25); }
.verify-pill.v-warn { background: rgba(251,191,36,.12); color: #fcd34d; border-color: rgba(251,191,36,.28); }
.verify-pill.v-unknown { background: rgba(251,113,133,.12); color: #fda4af; border-color: rgba(251,113,133,.28); }
.verify-summary { color: #94a3b8 !important; }
.verify-box {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.verify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.verify-actions .secondary-button {
  min-height: 34px;
  font-size: 12px;
  padding: 0 10px;
}

/* Account issue choice cards */
.issue-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.issue-option {
  display: block;
  cursor: pointer;
  margin: 0;
}
.issue-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.issue-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 5px;
  align-content: center;
  min-height: 88px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(2, 6, 23, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
  color: var(--ink-soft);
}
.issue-card em {
  font-style: normal;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  border: 1px solid rgba(45, 212, 191, 0.25);
  grid-row: 1 / 3;
  align-self: center;
}
.issue-card strong {
  font-size: 15px;
  font-weight: 750;
  color: #f8fafc;
}
.issue-card small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  font-weight: 500;
}
.issue-option:hover .issue-card {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(15, 23, 42, 0.65);
  transform: translateY(-1px);
}
.issue-option input:checked + .issue-card {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(145deg, rgba(15, 78, 70, 0.45), rgba(30, 27, 75, 0.4));
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.25), 0 12px 28px rgba(45, 212, 191, 0.12);
}
.issue-option input:checked + .issue-card em {
  background: linear-gradient(135deg, #2dd4bf, #6366f1);
  color: #041016;
  border-color: transparent;
}
.issue-option input:focus-visible + .issue-card {
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}
@media (max-width: 780px) {
  .issue-options { grid-template-columns: 1fr; }
}
.field input, .field select, .field textarea,
.search-box, #status-filter, #preference-filter, #stability-filter, #order-duration-filter, #channel-filter, #risk-tag-filter {
  width: 100%;
  border: 1px solid var(--line-strong) !important;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45) !important;
  color: var(--ink) !important;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.field input, .field select { min-height: 50px; padding: 0 15px; }
.field textarea { resize: vertical; min-height: 90px; padding: 13px 15px; line-height: 1.6; }
.account-credential-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.22);
}
.account-credential-fields label { min-width: 0; }
.account-credential-fields label > small {
  display: block;
  margin: 0 0 6px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 650;
}
.account-credential-fields input,
.account-credential-fields textarea { width: 100%; }
@media (max-width: 780px) {
  .account-credential-fields { grid-template-columns: 1fr; }
}
.field select option { background: #0f172a; color: #e2e8f0; }
.field select option:disabled { color: #64748b; }
.field input:focus, .field select:focus, .field textarea:focus,
.search-box:focus-within, #status-filter:focus, #preference-filter:focus,
#stability-filter:focus, #order-duration-filter:focus, #channel-filter:focus, #risk-tag-filter:focus {
  border-color: rgba(45, 212, 191, 0.55) !important;
  background: rgba(2, 6, 23, 0.65) !important;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.12), inset 0 1px 0 rgba(255,255,255,0.04);
}
::placeholder { color: #64748b; font-weight: 450; }
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  font-weight: 500;
}
.consent input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; margin-top: 2px; }
.form-actions {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.form-actions p { margin: 0; color: var(--muted-2); font-size: 12px; max-width: 420px; line-height: 1.55; }
.primary-button, .secondary-button {
  min-height: 46px;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.primary-button {
  border: 0;
  background: linear-gradient(135deg, #2dd4bf 0%, #22d3ee 40%, #818cf8 100%);
  color: #041016;
  box-shadow: 0 12px 32px rgba(45, 212, 191, 0.25), inset 0 1px 0 rgba(255,255,255,0.35);
}
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(45, 212, 191, 0.35);
}
.primary-button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.secondary-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-soft);
  backdrop-filter: blur(8px);
}
.secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.message { min-height: 20px; margin: 14px 0 0; color: var(--danger); font-size: 13px; font-weight: 600; }
.message.success, .message.warn { color: var(--accent); }
.success-result {
  margin-top: 24px;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(45, 212, 191, 0.22);
}
.success-icon {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2dd4bf, #6366f1);
  color: #041016;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(45, 212, 191, 0.3);
}
.success-result p, .success-result h3, .success-result small { margin: 0; display: block; }
.success-result p { color: var(--accent); font-size: 12px; font-weight: 700; }
.success-result h3 { margin: 4px 0; font-size: 22px; font-family: var(--display); color: #fff; }
.success-result small { color: var(--muted); }
.success-result .secondary-button { margin-left: auto; }
.query-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; }
.claim-result { margin-top: 26px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 24px; }
.need-info-callout {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  font-size: 14px;
  font-weight: 600;
}
.supplement-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(125, 211, 252, 0.22);
}
.supplement-banner strong {
  display: block;
  margin-bottom: 8px;
  color: #7dd3fc;
  font-size: 16px;
}
.supplement-banner p { margin: 0 0 8px; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.supplement-tip { color: var(--ink) !important; }
.supplement-form { margin-top: 14px; }
.supplement-unable-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}
.supplement-unable-box > strong { display: block; color: #fbbf24; font-size: 15px; }
.supplement-unable-box > p { margin: 7px 0 12px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.warranty-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.10), rgba(248, 113, 113, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.32);
}
.warranty-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.warranty-head strong { color: #fcd34d; font-size: 16px; }
.warranty-head > span {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fcd34d;
  font-size: 12px;
  font-weight: 600;
}
.warranty-text { margin: 10px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.warranty-current { margin: 12px 0 0; color: var(--ink); font-size: 14px; }
.warranty-current b { color: #fcd34d; }
.warranty-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.preference-change-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(45, 212, 191, 0.24);
}
.preference-change-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.preference-change-head strong { color: #5eead4; font-size: 16px; }
.preference-change-head p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.preference-change-head > span {
  flex: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
  border: 1px solid rgba(45, 212, 191, 0.24);
  font-size: 11px;
  font-weight: 700;
}
.preference-change-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.preference-save-button { min-height: 44px; white-space: nowrap; }
.preference-change-form .message { grid-column: 1 / -1; margin-top: 0; }
.issue-options.compact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 720px) {
  .issue-options.compact { grid-template-columns: 1fr; }
  .preference-change-head { flex-direction: column; }
  .preference-change-form { grid-template-columns: 1fr; }
  .preference-save-button { width: 100%; }
}
.message.ok { color: #5eead4; }
.result-service-note {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border-left: 3px solid var(--accent);
  background: rgba(45, 212, 191, 0.08);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.claim-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid var(--line);
}
.status-pill[data-status="delivered"],
.status-pill[data-status="closed"],
.status-pill[data-status="approved"] {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.status-pill[data-status="rejected"] {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.25);
}
.result-grid, .detail-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 20px;
}
.result-item, .detail-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid var(--line);
}
.result-item small, .detail-item small {
  color: var(--muted-2);
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.result-item strong, .detail-item strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  color: var(--ink-soft);
}
.detail-item.wide { grid-column: 1 / -1; }
.delivery-box {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 78, 70, 0.55));
  color: white;
  border-radius: 18px;
  border: 1px solid rgba(45, 212, 191, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.delivery-box h3 { margin: 0 0 14px; font-family: var(--display); }
.delivery-row {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.delivery-row span { color: #99f6e4; font-size: 12px; }
.delivery-row code { overflow-wrap: anywhere; white-space: pre-wrap; color: #e2e8f0; }
.delivery-row button {
  color: white;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 650;
}
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  justify-content: space-between;
  color: rgba(148, 163, 184, 0.65);
  font-size: 12px;
}

/* Admin */
.admin-main { max-width: 1320px; margin: 0 auto; padding: 36px 24px 70px; }
.login-view {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 64px;
  align-items: center;
}
.login-copy h1 { color: #f8fafc; font-size: clamp(34px, 4vw, 48px); }
.login-copy .lead { color: var(--muted); }
.login-form {
  padding: 32px;
  display: grid;
  gap: 18px;
  border-radius: 24px;
}
.login-form .message { margin: 0; }
.dashboard-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 8px;
}
.dashboard-title h1 {
  font-size: clamp(32px, 4vw, 44px);
  color: #f8fafc;
  font-family: var(--display);
}
.dashboard-title .eyebrow { color: #a5b4fc; }
.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
#refresh-time { color: var(--muted); font-size: 12px; margin: 0; font-weight: 600; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 22px 0 16px;
  background: transparent !important;
  border: 0 !important;
}
.stat {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 18px;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.45);
}
.stat small {
  display: block;
  color: var(--muted) !important;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
}
.stat strong {
  font-size: 28px;
  font-family: var(--display);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: #f8fafc !important;
}

/* Tabs */
.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.tab-sep {
  align-self: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  padding: 0 2px 0 6px;
}
.view-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  transition: transform .12s, background .12s, box-shadow .12s, color .12s, border-color .12s;
}
.view-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
  transform: translateY(-1px);
}
.view-tab.active {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.95), rgba(99, 102, 241, 0.95));
  border-color: transparent;
  color: #041016;
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.22);
}

/* Panels */
.panel-block { margin-top: 4px; }
.score-legend {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: 18px !important;
  border: 1px solid rgba(45, 212, 191, 0.18) !important;
  background: linear-gradient(145deg, rgba(15, 78, 70, 0.28), rgba(30, 27, 75, 0.35)) !important;
}
.score-legend h3 { margin: 0 0 8px; font-size: 14px; font-family: var(--display); color: #f8fafc !important; }
.score-legend p, .score-legend ul { margin: 0 0 8px; color: var(--muted) !important; font-size: 13px; line-height: 1.65; }
.score-legend ul { padding-left: 1.15rem; }
.score-legend .legend-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.insight-card, .panel-card {
  border-radius: 18px;
  padding: 16px 16px 14px;
}
.insight-card small, .panel-card h3 {
  color: var(--muted) !important;
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
}
.panel-card h3 {
  font-family: var(--display);
  font-size: 14px;
  color: var(--ink-soft) !important;
}
.insight-card strong {
  font-size: 1.6rem;
  display: block;
  color: #f8fafc !important;
  margin-bottom: 4px;
  font-family: var(--display);
}
.insight-card span {
  color: var(--muted) !important;
  font-size: 0.8rem;
  line-height: 1.45;
  display: block;
}
.insights-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.worker-control-card {
  margin-bottom: 12px;
}
.worker-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.worker-control-head h3 { margin-bottom: 4px; }
.worker-control-head small { color: var(--muted); font-size: 12px; }
.worker-control-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.worker-control-actions .secondary-button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 12px;
}
.worker-control-actions .secondary-button:disabled {
  opacity: .5;
  cursor: wait;
  transform: none;
}
.worker-health {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.worker-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(2,6,23,.28);
  border-radius: 8px;
}
.worker-dot {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 0 3px rgba(251,113,133,.12);
}
.worker-row[data-online="1"] .worker-dot {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52,211,153,.12);
}
.worker-meta { min-width: 0; }
.worker-meta strong,
.worker-meta small { display: block; }
.worker-meta strong { color: var(--ink-soft); font-size: 13px; margin-bottom: 3px; }
.worker-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.worker-control-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.worker-control-message[data-state="success"] { color: #6ee7b7; }
.worker-control-message[data-state="failed"] { color: #fda4af; }
.worker-control-message[data-state="active"] { color: #7dd3fc; }
@media (max-width: 780px) {
  .worker-control-head { align-items: flex-start; flex-direction: column; }
  .worker-control-actions { width: 100%; }
  .worker-control-actions .secondary-button { flex: 1; }
  .worker-health { grid-template-columns: 1fr; }
}
.daily-chart {
  position: relative;
  min-height: 200px;
  padding: 4px 4px 0;
}
.daily-chart-inner {
  position: relative;
  min-height: 180px;
}
.daily-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 180px;
  padding: 0 4px;
  position: relative;
  z-index: 1;
}
.daily-trend-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 22px; /* 避开顶部数字 */
  height: 140px;
  width: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}
.trend-poly {
  stroke: rgba(125, 211, 252, 0.85);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}
.trend-dot {
  fill: #7dd3fc;
  stroke: rgba(15, 23, 42, 0.9);
  stroke-width: 1.2;
}
.trend-dot.peak { fill: #fbbf24; }
.day-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.day-bar .bar-track {
  width: 100%;
  max-width: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.05);
  box-sizing: border-box;
}
.day-bar .bar {
  width: 70%;
  min-width: 10px;
  max-width: 28px;
  background: linear-gradient(180deg, #5eead4, #6366f1);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 8px 18px rgba(45, 212, 191, 0.28);
  transition: height 0.25s ease;
}
.day-bar.is-peak .bar {
  background: linear-gradient(180deg, #fde68a, #f59e0b 40%, #6366f1);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}
.day-bar.is-today .day-label { color: #7dd3fc; font-weight: 700; }
.day-bar .day-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  min-height: 1em;
}
.day-bar.is-peak .day-val { color: #fbbf24; }
.day-bar .day-label { font-size: 0.72rem; color: var(--muted); }
.daily-chart-caption {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
}
/* Alerts / risk */
.alert-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.35), rgba(69, 26, 3, 0.45));
  color: #fde68a;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.alert-list { display: flex; flex-direction: column; gap: 0.55rem; }
.alert-item { border-radius: 14px; padding: 12px 14px; }
.alert-item[data-level="critical"] {
  border-color: rgba(251, 113, 133, 0.3) !important;
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.35), rgba(15, 23, 42, 0.7)) !important;
}
.alert-item[data-level="warning"] {
  border-color: rgba(251, 191, 36, 0.28) !important;
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.3), rgba(15, 23, 42, 0.7)) !important;
}
.alert-item strong { display: block; margin-bottom: 0.2rem; color: #f8fafc !important; }
.alert-item span, .alert-item small {
  display: block;
  color: var(--muted) !important;
  font-size: 0.84rem;
  line-height: 1.5;
}
.risk-user-list { display: flex; flex-direction: column; gap: 0.55rem; max-height: 460px; overflow: auto; }
.risk-user-card { border-radius: 14px; padding: 12px 14px; }
.risk-user-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; margin-bottom: 0.3rem; }
.risk-user-head strong { color: #f8fafc; font-size: 14px; }
.risk-user-card small { display: block; color: var(--muted) !important; margin-bottom: 4px; }
.risk-user-card p { margin: 0.35rem 0 0.55rem; color: var(--ink-soft) !important; font-size: 0.88rem; line-height: 1.5; }
.user-risk-pill, .user-rt-pill, .risk-pill, .stability-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.74rem;
  border: 1px solid transparent;
  font-weight: 750;
  white-space: nowrap;
}
.user-rt-pill[data-user-rt="available"] {
  background: rgba(45, 212, 191, 0.16);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.3);
}
.user-rt-pill[data-user-rt="unavailable"] {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.28);
}
.user-rt-pill[data-user-rt="none"] {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.22);
}
.user-profile-button {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.38);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.user-profile-button:hover,
.user-profile-button:focus-visible {
  border-color: rgba(56, 189, 248, 0.52);
  background: rgba(14, 116, 144, 0.12);
  outline: none;
}
.user-profile-heading {
  display: flex;
  width: 100%;
  justify-content: space-between;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 750;
}
.user-profile-heading > span { color: #7dd3fc; }
.user-profile-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.user-profile-button > small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-profile-dialog { width: min(560px, calc(100vw - 24px)); }
.profile-auto-summary {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}
.user-risk-pill[data-tag="high_risk"] {
  background: rgba(251, 113, 133, 0.14);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.28);
}
.user-risk-pill[data-tag="watch"] {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.28);
}
.user-risk-pill[data-tag="normal"] {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.28);
}
.user-risk-pill .score-num { font-weight: 800; }
.risk-pill {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.22);
}
.risk-pill[data-flag="short_life"] {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.25);
}
.risk-pill[data-flag="refund_done"] {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.stability-pill[data-stability="unstable"] {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.25);
}
.stability-pill[data-stability="stable"] {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.stability-pill[data-stability="alive_pending"] {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.25);
}
.stability-pill[data-stability="dead_stable"] {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.25);
}
.stability-pill[data-stability="unknown"],
.stability-pill[data-stability=""] {
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.2);
}
.life-status-line {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}
.life-status-line > small {
  display: inline;
  margin: 0;
  color: var(--muted-2);
  line-height: 1.2;
  white-space: nowrap;
}
.life-status-line > .stability-pill,
.life-status-line > .user-risk-pill,
.life-status-line > .user-rt-pill {
  justify-self: start;
  max-width: 100%;
  white-space: nowrap;
}
.risk-row { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.suggestion-box {
  margin-bottom: 0.85rem;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.35), rgba(30, 27, 75, 0.4));
}
.suggestion-box small { color: #7dd3fc; display: block; margin-bottom: 0.25rem; font-weight: 800; }
.suggestion-box strong { color: #e0f2fe; font-size: 0.92rem; line-height: 1.5; }
.row-refund { background: rgba(129, 140, 248, 0.08); }
.row-high-risk { box-shadow: inset 3px 0 0 #fb7185; }
.refund-tag {
  display: inline-flex;
  margin-bottom: 0.25rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.15);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 750;
  border: 1px solid rgba(129, 140, 248, 0.25);
}
.store-user-line { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.store-user-line code {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.copy-mini {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 700;
}
.suggest-cell { max-width: 280px; font-size: 0.84rem; color: var(--muted); line-height: 1.45; }
.inline-alerts { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.55rem; }
.alert-chip {
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.35);
}
.alert-chip[data-level="critical"] {
  border-color: rgba(251, 113, 133, 0.3);
  color: #fda4af;
  background: rgba(127, 29, 29, 0.35);
}
.muted { color: var(--muted) !important; }
.field-hint { font-size: 0.8rem; color: var(--muted-2); margin: 0.4rem 0 0.2rem; }

/* Tables */
.table-wrap {
  border-radius: 18px;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; min-width: 920px; }
.claims-table { min-width: 1280px; table-layout: fixed; }
.claims-table .col-check { width: 40px; }
.claims-table .col-request { width: 180px; }
.claims-table .col-customer { width: 235px; }
.claims-table .col-channel { width: 245px; }
.claims-table .col-rt { width: 130px; }
.claims-table .col-preference { width: 155px; }
.claims-table .col-created { width: 105px; }
.claims-table .col-status { width: 82px; }
.claims-table .col-actions { width: 76px; }
th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}
th {
  color: var(--muted);
  background: rgba(2, 6, 23, 0.35);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
td { font-size: 13px; color: var(--ink-soft); }
.claims-table th,
.claims-table td { vertical-align: top; overflow-wrap: anywhere; }
.claims-table .check-col { padding-left: 12px; padding-right: 8px; text-align: center; }
.channel-cell > strong { display: block; color: var(--ink); margin-bottom: 6px; }
td small { display: block; margin-top: 4px; color: var(--muted-2); }
.order-expiry[data-state="active"] { color: var(--ok); }
.order-expiry[data-state="expired"] { color: var(--danger); }
.order-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}
.order-meta-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.order-meta-tag.balance {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(251, 191, 36, 0.11);
  color: #fcd34d;
}
.table-action {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  border-radius: 10px;
  padding: 7px 11px;
  font-weight: 750;
  transition: transform .12s, background .12s, border-color .12s;
}
.table-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.table-action.danger {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.35);
}
.table-action.danger:hover {
  background: rgba(251, 113, 133, 0.15);
}
.actions-cell { padding-left: 8px; padding-right: 8px; }
.table-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 6px;
}
.table-actions .table-action { width: 100%; padding-left: 6px; padding-right: 6px; }
.action-dialog { width: min(520px, calc(100vw - 28px)); }
.password-dialog { width: min(460px, calc(100vw - 28px)); }
.password-dialog .field { margin-top: 14px; }
.claim-action-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.action-choice {
  width: 100%;
  min-height: 72px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--ink-soft);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.action-choice:hover:not(:disabled) {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(15, 78, 70, 0.28);
}
.action-choice strong { display: block; color: var(--ink); font-size: 14px; }
.action-choice small { display: block; margin-top: 5px; color: var(--muted-2); line-height: 1.45; }
.action-choice:disabled { opacity: .42; cursor: not-allowed; }
#claim-action-message.is-error { color: var(--danger); }
.empty-state { padding: 52px 20px; text-align: center; color: var(--muted); font-weight: 600; }

/* Quality */
.quality-channel-list { display: flex; flex-direction: column; gap: 14px; }
.quality-channel-card { padding: 16px 18px; border-radius: 18px; }
.quality-channel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.quality-channel-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #f8fafc;
  font-family: var(--display);
}
.quality-channel-head small { color: var(--muted); line-height: 1.45; }
.quality-table { border-radius: 14px; overflow: hidden; }
.quality-table table { min-width: 640px; }
.quality-tag {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}
.quality-tag.ok {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.28);
}
.quality-tag.bad {
  background: rgba(251, 113, 133, 0.12);
  color: #fda4af;
  border: 1px solid rgba(251, 113, 133, 0.28);
}
.quality-tag.candidate {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
}
code.acct {
  font-size: 12px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.45);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.channel-stats {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
}
.channel-stats-title {
  font-size: 0.9rem;
  color: #f8fafc;
  font-weight: 800;
  margin-bottom: 0.65rem;
}
.channel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem;
}
.channel-stat-card {
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
}
.channel-stat-card strong { display: block; margin-bottom: 0.3rem; color: #f8fafc !important; }
.channel-stat-card small { display: block; color: var(--muted) !important; line-height: 1.45; }

/* Dialog */
dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(28px) saturate(1.35);
}
dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}
dialog form { padding: 28px; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; }
.dialog-header .icon-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  font-size: 22px;
}
dialog hr { margin: 22px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.notice-dialog { width: min(620px, calc(100% - 32px)); }
.welcome-dialog { width: min(560px, calc(100% - 32px)); }
.maintenance-dialog { width: min(600px, calc(100% - 32px)); }
.maintenance-body { margin-top: 8px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.maintenance-body p { margin: 0 0 12px; }
.maintenance-body strong { color: #fcd34d; }
.maintenance-highlight {
  padding: 14px 16px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 14px;
  background: rgba(146, 64, 14, 0.22);
  color: #fde68a;
}
.maintenance-note { color: var(--muted); font-size: 13px; }
.welcome-body { margin-top: 8px; }
.welcome-highlight {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(125, 211, 252, 0.28);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
}
.welcome-highlight strong { color: #7dd3fc; font-weight: 700; }
.welcome-points {
  margin: 0;
  padding: 0 0 0 1.15em;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.7;
}
.welcome-points li { margin: 0.35em 0; }
.inventory-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 960px) {
  .inventory-layout { grid-template-columns: 1fr; }
}
.inventory-import textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.inv-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.inv-status[data-st="available"] { background: rgba(45, 212, 191, 0.16); color: #5eead4; }
.inv-status[data-st="used"] { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; }
.inv-status[data-st="disabled"] { background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.inventory-verify { margin-top: 7px; }
.row-actions .inv-verify:disabled { opacity: .65; cursor: wait; }
.inv-status[data-st="reserved"] { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.rt-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}
.rt-pill[data-rt="rt_available"] { background: rgba(45, 212, 191, 0.18); color: #5eead4; }
.rt-pill[data-rt="rt_unavailable"] { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.rt-pill[data-rt="rt_watching"] { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.rt-pill[data-rt="rt_failed"] { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.rt-pill[data-rt="rt_take_queued"],
.rt-pill[data-rt="rt_take_running"] { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.rt-pill[data-rt="rt_take_failed"] { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.rt-pill[data-rt="rt_taken"] { background: rgba(34, 211, 238, 0.18); color: #67e8f9; }
.rt-summary { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; max-width: 160px; }
.notice-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.notice-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.notice-list li span {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2dd4bf, #6366f1);
  color: #041016;
  font-size: 11px;
  font-weight: 800;
}
.notice-list p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }

/* Toolbar / search */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.toolbar select { min-width: 9rem; min-height: 44px; padding: 0 12px; border-radius: 12px; }
.claims-result-count {
  margin: 10px 2px 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.batch-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px 18px;
  margin: 12px 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
}
.batch-actions > strong {
  min-width: 88px;
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
}
.batch-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.batch-action-buttons .secondary-button {
  min-height: 38px;
  padding: 0 13px;
}
.batch-action-buttons .icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.batch-actions .message {
  grid-column: 2;
  min-height: 0;
  margin: 0;
}
.batch-password-dialog { width: min(680px, calc(100% - 32px)); }
.batch-password-list {
  display: grid;
  gap: 8px;
  max-height: min(55vh, 520px);
  margin-top: 18px;
  padding-right: 4px;
  overflow-y: auto;
}
.batch-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}
.batch-password-row span { min-width: 0; }
.batch-password-row strong { display: block; color: var(--ink); font-size: 13px; }
.batch-password-row small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-password-row input { width: 100%; min-width: 0; }
.rt-artifact-dialog { width: min(720px, calc(100% - 32px)); }
.rt-artifact-meta {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  margin: 18px 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}
.rt-artifact-meta span { color: var(--muted); font-size: 12px; }
.rt-artifact-meta strong { overflow-wrap: anywhere; color: var(--ink); font-size: 13px; }
.rt-token-output {
  width: 100%;
  max-height: 260px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.search-box {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  min-width: min(280px, 100%);
  flex: 1;
  border-radius: 12px !important;
}
.search-box input {
  width: 100%;
  border: 0 !important;
  background: transparent !important;
  outline: 0;
  color: var(--ink) !important;
  box-shadow: none !important;
}

/* Responsive */
@media (max-width: 980px) {
  .intro-band, .login-view { grid-template-columns: 1fr; gap: 28px; }
  .intro-band { padding-top: 36px; min-height: auto; }
  h1 { font-size: 36px; }
  .tab-panel { padding: 26px 20px 30px; }
  .form-grid, .query-form, .result-grid, .detail-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .primary-button { width: 100%; }
  .dashboard-title { flex-direction: column; align-items: flex-start; }
  .flow { order: -1; }
}
@media (max-width: 640px) {
  .site-header { height: 64px; }
  .brand small { display: none; }
  footer { flex-direction: column; gap: 8px; }
  .view-tabs { padding: 8px; }
  .view-tab { font-size: 12px; padding: 0.42rem 0.75rem; }
  .batch-actions { grid-template-columns: 1fr; align-items: stretch; }
  .batch-actions .message { grid-column: 1; }
  .batch-action-buttons .secondary-button { flex: 1 1 calc(50% - 8px); }
  .batch-password-row { grid-template-columns: 1fr; gap: 8px; }
  .batch-password-row small { white-space: normal; overflow-wrap: anywhere; }
  .batch-password-dialog form { padding: 20px 16px; }
}


/* locked autofill fields */
.field input.is-locked,
.field textarea.is-locked {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.35);
  color: inherit;
  cursor: default;
}
.link-button {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #0f766e;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.link-button.hidden { display: none; }
.link-button:hover { color: #115e59; }
.sub2api-line {
  display: block;
  margin-top: 6px;
}
