/* ═══════════════════════════════════════════════════
   寻源作战台 — Fast-Fashion E-Commerce Design System
   ═══════════════════════════════════════════════════ */

:root {
  /* Palette — warm fashion tones on dark base */
  --bg:      #0b0b12;
  --bg-2:    #121219;
  --surface: rgba(255, 255, 255, 0.035);
  --glass:   rgba(255, 255, 255, 0.06);
  --line:    rgba(255, 255, 255, 0.08);
  --text:    #f4f4f8;
  --text-2:  #dddde4;
  --muted:   #8b8fa3;

  --coral:   #f0a819;
  --peach:   #f5c04a;
  --violet:  #c9920e;
  --lavender:#f5d06a;
  --mint:    #6ee7b7;
  --gold:    #f0a819;
  --rose:    #fb7185;
  --sky:     #7dd3fc;

  --accent:  linear-gradient(135deg, #e89b0e, #f5c04a);
  --accent-2:linear-gradient(135deg, #d4a216, #f0c850);
  --shadow:  0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --radius:  16px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:cubic-bezier(0, 0, 0.2, 1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "SF Pro Display", "Helvetica Neue", "Noto Sans SC", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background: url("/bg.jpg") center / cover no-repeat fixed;
}

body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(11, 11, 18, .72) 0%,
    rgba(11, 11, 18, .6) 40%,
    rgba(11, 11, 18, .78) 100%
  );
}

/* ─── Ambient background ─── */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.025;
  background-image: 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)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 25% 0%, rgba(240,168,25,.08), transparent),
    radial-gradient(ellipse 60% 40% at 75% 15%, rgba(240,168,25,.05), transparent);
}

/* ─── Page Shell ─── */
.page-shell {
  width: min(1400px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 20px 0;
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ─── Top Bar ─── */
.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0 4px;
  animation: fadeIn .5s var(--ease) both;
}

.brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* ─── Hero Banner ─── */
.hero-banner {
  text-align: center;
  padding: 14px 24px 18px;
  animation: fadeInUp .65s var(--ease) .08s both;
}

h1 {
  font-size: clamp(34px, 4.8vw, 58px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 auto 14px;
  max-width: 640px;
  color: var(--coral);
}

h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }

.hero-desc {
  max-width: none; margin: 0 auto;
  color: rgba(255,255,255,.65); font-size: 16px; line-height: 1.75;
  white-space: nowrap;
}

.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }

.hero-pills span {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.5);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: all .25s var(--ease);
}

.hero-pills span:hover {
  background: rgba(240,168,25,.08);
  border-color: rgba(240,168,25,.25);
  color: #fff;
}

/* ─── Glass Card Base ─── */
.glow-card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  background: rgba(18, 18, 28, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #eee;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .35s var(--ease);
}

.glow-card::before { display: none; }

.glow-card:hover {
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 8px 36px rgba(0,0,0,.4);
}

/* ─── Command Layout (3-col) ─── */
.command-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  animation: fadeInUp .65s var(--ease) .2s both;
}

/* ─── Side Panels ─── */
.agent-panel, .flow-panel { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.hero-center { display: flex; flex-direction: column; height: 100%; }
.hero-center .mission-panel { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.eyebrow {
  font-size: 18px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  padding-left: 14px;
}

.eyebrow::before {
  content: "";
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 2px;
  background: var(--accent);
}

.agent-list, .flow-list { display: grid; gap: 6px; }

.agent-card, .flow-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid transparent;
  cursor: default;
}

.agent-step, .flow-step {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--radius-xs);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  color: var(--coral);
  background: none;
  letter-spacing: 0.03em;
}

.agent-name, .flow-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; color: var(--coral); }
.agent-desc, .flow-desc { color: rgba(255,255,255,.6); font-size: 15px; line-height: 1.55; }

/* ─── Mission Panel (Form) ─── */
.mission-panel { padding: 18px; }

.panel-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative; z-index: 1;
}

.dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(240,168,25,.4);
}

.upload-form { display: flex; flex-direction: column; gap: 12px; }

.dropzone { display: block; cursor: pointer; }
.dropzone input { display: none; }

.dropzone-inner {
  border: 1.5px dashed rgba(240,168,25,.25);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 4px;
  background: linear-gradient(180deg, rgba(240,168,25,.03), rgba(167,139,250,.02));
  transition: all .3s var(--ease);
}

.dropzone:hover .dropzone-inner, .dropzone:focus-within .dropzone-inner {
  border-color: rgba(240,168,25,.5);
  background: linear-gradient(180deg, rgba(240,168,25,.07), rgba(167,139,250,.04));
  transform: scale(1.005);
}

.dropzone-icon { width: 40px; height: 40px; color: var(--coral); opacity: .65; margin-bottom: 2px; }
.dropzone-title { font-size: 16px; font-weight: 700; color: #fff; }
.dropzone-subtitle { color: rgba(255,255,255,.65); font-size: 13px; }

.template-download {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  color: var(--coral); font-size: 13px; font-weight: 600;
  text-decoration: none;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(240,168,25,.25);
  background: rgba(240,168,25,.06);
  transition: all .2s var(--ease);
}

.template-download:hover {
  background: rgba(240,168,25,.14);
  border-color: rgba(240,168,25,.4);
}

.verify-strip { display: flex; flex-wrap: wrap; gap: 6px; }

.verify-chip {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--mint); letter-spacing: 0.02em;
  background: rgba(110,231,183,.08);
  border: 1px solid rgba(110,231,183,.15);
}

.job-badge {
  padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--gold);
  background: rgba(251,191,36,.08);
  border: 1px solid rgba(251,191,36,.2);
}

.chip, .mini-stat {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 4px 10px; border-radius: 999px;
  color: rgba(255,255,255,.55); font-size: 12px; font-weight: 600;
}

.compact .chip { padding: 3px 8px; font-size: 11px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

label { display: flex; flex-direction: column; gap: 5px; }
label span, .label { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.55); letter-spacing: 0.01em; }

input[type="number"], input[type="text"] {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text); font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input[type="number"]:hover, input[type="text"]:hover {
  border-color: rgba(255,255,255,.15);
}

input[type="number"]:focus, input[type="text"]:focus {
  border-color: rgba(240,168,25,.4);
  box-shadow: 0 0 0 3px rgba(240,168,25,.08);
  background: rgba(255,255,255,.06);
}

.primary-btn {
  position: relative; overflow: hidden;
  border: 0; border-radius: var(--radius);
  padding: 14px 24px;
  color: #1a1000; font-size: 16px; font-weight: 800;
  background: linear-gradient(135deg, #e89b0e 0%, #f5c04a 100%);
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(240,168,25,.25);
  transition: transform .2s var(--ease), box-shadow .2s;
  letter-spacing: 0.04em;
}

.primary-btn::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.15) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
}

.primary-btn:hover:not(:disabled)::after { transform: translateX(120%); }

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 36px rgba(240,168,25,.35);
}

.primary-btn:active:not(:disabled) { transform: translateY(0) scale(0.99); }
.primary-btn:disabled { opacity: .5; cursor: wait; }

.muted, .helper-text, .progress-label { color: rgba(255,255,255,.65); line-height: 1.6; }
.helper-text { font-size: 13px; }

.hidden { display: none !important; }

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: rgba(255,255,255,.6);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all .2s var(--ease);
  backdrop-filter: blur(12px);
}

.back-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(240,168,25,.3);
  color: var(--coral);
}

/* ─── Status Section ─── */
.status-section { margin-top: 0; padding-top: 14px; animation: fadeInUp .5s var(--ease) both; }
.results-section { animation: fadeInUp .5s var(--ease) both; }

.section-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; gap: 12px;
}

.status-grid { display: grid; grid-template-columns: 300px 1fr; gap: 12px; }

.progress-card, .preview-card, .markdown-card,
.current-brief-card, .insight-panel { padding: 16px; }

.item-sidebar {
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tier-panel {
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.progress-card { display: flex; align-items: center; gap: 20px; min-height: 100px; }

.progress-ring-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 8; }
.ring-bg { stroke: rgba(255,255,255,.05); }
.ring-fg { stroke: url(#ringGrad) var(--coral); stroke-linecap: round; stroke-dasharray: 301.59; stroke-dashoffset: 301.59; transition: stroke-dashoffset .5s var(--ease); }
.ring-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.progress-value { font-size: 20px; font-weight: 800; color: #fff; }
.progress-info { flex: 1; min-width: 0; overflow: hidden; }
.stage-text { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.preview-box { min-height: 80px; white-space: pre-wrap; line-height: 1.7; font-size: 14px; color: rgba(255,255,255,.65); }

/* ─── Results — Cockpit Dashboard ─── */

.results-section {
  max-width: 100%;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 4px 0 0 !important;
}

/* KPI Overview Strip */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.overview-card, .planned-item, .supplier-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: rgba(18, 18, 28, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #eee;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  transition: all .25s var(--ease);
}

.overview-card {
  padding: 14px 16px;
  position: relative; overflow: hidden;
  border-top: 2px solid rgba(240,168,25,.4);
}

.overview-card:nth-child(2) { border-top-color: rgba(110,231,183,.4); }
.overview-card:nth-child(3) { border-top-color: rgba(240,168,25,.5); }
.overview-card:nth-child(4) { border-top-color: rgba(125,211,252,.45); }
.overview-card:nth-child(5) { border-top-color: rgba(251,113,133,.4); }

.overview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  border-color: rgba(255,255,255,.15);
}

.overview-label {
  color: rgba(255,255,255,.35); font-size: 12px;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}

.overview-value {
  font-size: 36px; font-weight: 800; margin-top: 6px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.overview-sub { color: rgba(255,255,255,.35); margin-top: 6px; font-size: 14px; line-height: 1.45; }

.results-section .panel-header { font-size: 16px !important; font-weight: 800; color: #fff; }

/* Deck 2-Column Cockpit Layout — fills remaining viewport */
.deck-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.deck-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.sidebar-stats {
  display: flex; gap: 16px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 14px; color: rgba(255,255,255,.65);
  flex-shrink: 0;
}

.sidebar-stats strong {
  color: var(--coral); font-weight: 800; font-size: 20px;
  margin-left: 4px;
}

.planned-strip.vertical {
  display: grid; gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  position: relative;
}

/* Planned Items — Compact Navigation */
.planned-item {
  padding: 10px 12px; cursor: pointer;
  position: relative; overflow: hidden;
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
}

.planned-item::after { display: none; }

.planned-item:hover {
  background: rgba(255,255,255,.05);
  border-left-color: rgba(255,255,255,.25);
}

.planned-item.active {
  border-left-color: var(--coral);
  background: linear-gradient(90deg, rgba(240,168,25,.1), rgba(255,255,255,.03));
}

.planned-top, .supplier-head-row, .brief-title-row, .insight-head, .plan-bottom {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
}

.theme { font-size: 15px; font-weight: 700; color: #fff; }
.plan-tag {
  flex-shrink: 0; font-size: 12px; font-weight: 600;
  color: var(--brand, #e89a0c); background: rgba(232,154,12,.1);
  padding: 2px 8px; border-radius: 6px; white-space: nowrap;
}
.small-gap { margin: 4px 0 6px; font-size: 16px; }
.reasons { color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.5; }

/* Quality Status Indicators */
.quality-badge {
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap; letter-spacing: 0.02em;
  position: relative;
  padding-left: 22px;
}

.quality-badge::before {
  content: "";
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 999px;
}

.quality-strong { background: rgba(110,231,183,.08); color: var(--mint); border: 1px solid rgba(110,231,183,.2); }
.quality-strong::before { background: var(--mint); box-shadow: 0 0 8px rgba(110,231,183,.6); }
.quality-weak { background: rgba(251,191,36,.06); color: var(--gold); border: 1px solid rgba(251,191,36,.18); }
.quality-weak::before { background: var(--gold); box-shadow: 0 0 8px rgba(251,191,36,.5); }
.quality-blocked { background: rgba(125,211,252,.08); color: var(--sky); border: 1px solid rgba(125,211,252,.2); }
.quality-blocked::before { background: var(--sky); box-shadow: 0 0 8px rgba(125,211,252,.5); }
.quality-empty { background: rgba(251,113,133,.06); color: var(--rose); border: 1px solid rgba(251,113,133,.18); }
.quality-empty::before { background: var(--rose); box-shadow: 0 0 8px rgba(251,113,133,.5); }

.result-warning {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: rgba(125,211,252,.08);
  border: 1px solid rgba(125,211,252,.18);
}

.result-warning-title {
  color: var(--sky);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-warning-desc {
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  font-size: 14px;
  line-height: 1.6;
}

.result-warning-meta {
  margin-top: 6px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
}

/* Brief Card — Data Panel */
.current-brief-card .result-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.current-brief-card .result-meta { color: rgba(255,255,255,.65); line-height: 1.6; margin-top: 4px; font-size: 14px; }

.brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px; margin-top: 10px;
}

.brief-cell {
  padding: 8px 10px; border-radius: var(--radius-xs);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-left: 2px solid rgba(240,168,25,.4);
  transition: border-color .2s;
}

.brief-cell:hover { border-color: rgba(255,255,255,.12); border-left-color: var(--coral); }
.brief-cell.full { grid-column: 1 / -1; }
.brief-cell .value { margin-top: 4px; color: rgba(255,255,255,.75); line-height: 1.55; font-size: 15px; }
.brief-cell .value.emphasis { font-size: 18px; font-weight: 700; color: var(--coral); }

/* Tier Tabs — Cockpit Toggles */
.tier-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-shrink: 0; }

.tier-tab {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.5);
  border-radius: var(--radius-xs);
  padding: 10px 16px;
  display: flex; gap: 8px; align-items: center;
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: all .2s var(--ease);
  flex: 1;
  justify-content: center;
}

.tier-tab.active {
  border-color: rgba(240,168,25,.4);
  background: rgba(240,168,25,.1);
  box-shadow: inset 0 -2px 0 var(--coral);
  color: #fff;
}

.tier-tab:hover:not(.active) { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.tier-tab strong { color: var(--coral); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

/* Supplier Grid — Data Cards */
.supplier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}

.supplier-card { overflow: visible; cursor: pointer; }

.supplier-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.supplier-card.active {
  border-color: rgba(240,168,25,.4);
  box-shadow: 0 0 0 1px rgba(240,168,25,.2), 0 8px 32px rgba(0,0,0,.35);
}

.supplier-image { display: none; }

.supplier-radar-wrap {
  display: grid; place-items: center;
  padding: 24px 16px 12px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow: visible;
}

.supplier-radar-wrap .radar-svg { max-width: 200px; }

.supplier-body { padding: 14px 16px; }
.supplier-name { font-size: 16px; font-weight: 700; color: #fff; }
.supplier-price-score { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.score-badge {
  padding: 3px 10px; border-radius: var(--radius-xs);
  background: rgba(240,168,25,.12); color: var(--coral);
  font-size: 14px; font-weight: 800;
  border: 1px solid rgba(240,168,25,.25);
  font-variant-numeric: tabular-nums;
}

.score-badge.large {
  font-size: 20px; padding: 5px 14px;
  background: rgba(240,168,25,.15);
}

.supplier-judgement, .insight-judgement {
  margin-top: 8px; line-height: 1.55; font-weight: 500; color: var(--coral); font-size: 14px;
}

.reason-block, .risk-block, .insight-summary { margin-top: 12px; }

.reason-title {
  color: rgba(255,255,255,.65); font-size: 14px;
  letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.reasons-list { margin: 0; padding-left: 16px; color: var(--mint); font-size: 14px; line-height: 1.6; }
.risk-text { color: #ff8a95; font-size: 14px; line-height: 1.6; }

.supplier-links { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

.supplier-links a {
  color: var(--coral); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--radius-xs);
  background: rgba(240,168,25,.06); border: 1px solid rgba(240,168,25,.2);
  transition: all .2s;
}

.supplier-links a:hover { background: rgba(240,168,25,.14); border-color: rgba(240,168,25,.35); }

.empty-state {
  padding: 24px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03); color: rgba(255,255,255,.35);
  text-align: center; font-size: 14px;
  border: 1px dashed rgba(255,255,255,.1);
}

.empty-state.blocked {
  background: rgba(125,211,252,.05);
  color: rgba(125,211,252,.9);
  border-color: rgba(125,211,252,.18);
}

/* Insight Panel — Analysis Pane */
.insight-body { min-height: 380px; }

.radar-wrap { margin: 16px 0; display: grid; place-items: center; overflow: visible; }
.radar-svg { width: 100%; max-width: 220px; height: auto; overflow: visible; }
.radar-grid-level { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1; }
.radar-axis { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.radar-value { fill: rgba(240,168,25,.15); stroke: var(--coral); stroke-width: 2.5; }
.radar-label { fill: rgba(255,255,255,.6); font-size: 21px; text-anchor: middle; dominant-baseline: middle; }

.markdown-card { margin-top: 10px; }
.markdown-pre { white-space: pre-wrap; color: rgba(255,255,255,.6); line-height: 1.65; font-size: 14px; max-height: 300px; overflow: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }

/* ─── Scroll Fade Hints ─── */
.scroll-container {
  position: relative;
}

.scroll-container::after {
  content: "";
  position: sticky;
  bottom: 0; left: 0; right: 0;
  display: block;
  height: 32px;
  background: linear-gradient(to top, rgba(18,18,28,.95), transparent);
  pointer-events: none;
  z-index: 2;
  margin-top: -32px;
}

.scroll-container.at-bottom::after { opacity: 0; }

/* ─── Supplier Pagination Nav ─── */
.supplier-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 6px;
}

.supplier-nav-info {
  font-size: 11px; color: rgba(255,255,255,.35);
  font-variant-numeric: tabular-nums;
}

.supplier-nav-btns {
  display: flex; gap: 4px;
}

.supplier-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .15s var(--ease);
  font-size: 0;
}

.supplier-nav-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(240,168,25,.3);
  color: var(--coral);
}

.supplier-nav-btn:disabled {
  opacity: .25; cursor: default;
  background: transparent;
  border-color: rgba(255,255,255,.06);
}

.supplier-nav-btn svg { width: 14px; height: 14px; }

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.85); }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.2); }

/* ─── Selection ─── */
::selection { background: rgba(240,168,25,.25); color: #fff; }

/* ─── Responsive ─── */
@media (max-width: 1380px) {
  .command-layout { grid-template-columns: 1fr 1fr; }
  .deck-layout { grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .command-layout { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-center { grid-column: 1 / -1; order: -1; }
  .deck-layout { grid-template-columns: 1fr; height: auto; }
  .results-section { height: auto; overflow: auto; }
  .item-sidebar { order: -1; max-height: 280px; }
  .planned-strip.vertical { max-height: 200px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 768px) {
  .page-shell { width: min(100vw - 20px, 1400px); }
  .command-layout { grid-template-columns: 1fr; }
  .hero-center { order: -1; }
  .hero-banner { padding: 16px 8px 20px; }
  h1 { font-size: 24px; }
  h2 { font-size: 16px; }
  .status-grid { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .brief-grid, .form-grid { grid-template-columns: 1fr; }
  .glow-card { border-radius: 12px; }
  .section-title-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .overview-grid { grid-template-columns: 1fr; }
  .hero-pills { justify-content: flex-start; }
  .top-bar { padding: 10px 0 6px; }
  .hero-banner { padding: 12px 0 16px; }
  .mission-panel { padding: 14px; }
  .supplier-grid { grid-template-columns: 1fr; }
}

/* Cookie status & modal */
.cookie-status { margin: 8px 0; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cookie-ok { color: #4ade80; }
.cookie-ok::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; margin-right: 4px; }
.cookie-missing { color: #f87171; }
.cookie-missing::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f87171; margin-right: 4px; }
.cookie-date { color: rgba(255,255,255,0.4); font-size: 12px; }
.cookie-edit-btn { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); padding: 2px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.cookie-edit-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.cookie-clear-btn { background: transparent; border: 1px solid rgba(248,113,113,0.3); color: #f87171; padding: 2px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-left: 4px; }
.cookie-clear-btn:hover { background: rgba(248,113,113,0.12); }

.modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.modal-content { position: relative; width: 90%; max-width: 520px; padding: 20px; }

/* ══════════ Toast Notification ══════════ */
.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: 12px;
  background: #fff; color: #1a1a2e;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  border-left: 4px solid var(--brand, #e89a0c);
  font-size: 14px; font-weight: 500; line-height: 1.4;
  pointer-events: auto;
  animation: toastIn .4s cubic-bezier(.22,1,.36,1) forwards;
  max-width: 380px;
}
.toast.toast-out {
  animation: toastOut .3s ease forwards;
}
.toast-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.toast-success .toast-icon { background: rgba(5,150,105,.1); color: #059669; }
.toast-error .toast-icon { background: rgba(225,29,72,.1); color: #e11d48; }
.toast-info .toast-icon { background: rgba(232,154,12,.1); color: #e89a0c; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; margin-bottom: 2px; }
.toast-desc { font-size: 13px; color: rgba(0,0,0,.5); }
.toast-close {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: rgba(0,0,0,.25); font-size: 18px; padding: 0 0 0 8px; line-height: 1;
  transition: color .2s;
}
.toast-close:hover { color: rgba(0,0,0,.6); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(.9); }
}

/* ══════════ File Selected State ══════════ */
.file-info {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 14px; border-radius: 8px;
  background: rgba(232,154,12,.08); border: 1px solid rgba(232,154,12,.2);
  color: #e89a0c; font-size: 13px; font-weight: 600;
}
.file-info svg { flex-shrink: 0; color: #e89a0c; }
.file-info span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-clear {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: rgba(232,154,12,.5); font-size: 18px; line-height: 1;
  padding: 0; transition: color .2s;
}
.file-clear:hover { color: #e89a0c; }
.dropzone.has-file { border-color: rgba(232,154,12,.4); background: rgba(232,154,12,.03); }

/* ══════════ Portal Entry Cards ══════════ */
.portal-section {
  max-width: 960px;
  margin: 36px auto 0;
  padding: 0 20px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.portal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(240,168,25,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.portal-card:hover {
  border-color: rgba(240,168,25,0.4);
  background: rgba(255,255,255,0.07);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(240,168,25,0.12);
}

.portal-card:hover::before { opacity: 1; }

.portal-card:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.portal-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240,168,25,0.12);
  color: #f0a819;
  position: relative;
  z-index: 1;
}

.portal-icon svg { width: 22px; height: 22px; }

.portal-icon--recruit {
  background: rgba(125,211,252,0.12);
  color: #7dd3fc;
}

.portal-icon--audit {
  background: rgba(110,231,183,0.12);
  color: #6ee7b7;
}

.portal-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.portal-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.portal-desc {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.3s var(--ease);
  position: relative;
  z-index: 1;
}

.portal-card:hover .portal-arrow {
  opacity: 1;
  transform: translateX(0);
  color: #f0a819;
}

.portal-card:hover .portal-title { color: #f0a819; }
.portal-card:nth-child(2):hover .portal-title { color: #7dd3fc; }
.portal-card:nth-child(3):hover .portal-title { color: #6ee7b7; }
.portal-card:nth-child(2):hover .portal-arrow { color: #7dd3fc; }
.portal-card:nth-child(3):hover .portal-arrow { color: #6ee7b7; }
.portal-card:nth-child(2):hover { border-color: rgba(125,211,252,0.4); box-shadow: 0 8px 32px rgba(125,211,252,0.1); }
.portal-card:nth-child(3):hover { border-color: rgba(110,231,183,0.4); box-shadow: 0 8px 32px rgba(110,231,183,0.1); }
.portal-card:nth-child(2)::before { background: linear-gradient(135deg, rgba(125,211,252,0.08), transparent 60%); }
.portal-card:nth-child(3)::before { background: linear-gradient(135deg, rgba(110,231,183,0.08), transparent 60%); }

@media (max-width: 700px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
