:root {
  --bg: #080b10;
  --surface: #0d1219;
  --surface-raised: #111821;
  --surface-soft: #151d27;
  --line: rgba(255, 255, 255, .085);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f5f7f7;
  --muted: #8f9aa8;
  --subtle: #5f6a77;
  --accent: #8fffc7;
  --accent-strong: #43e69c;
  --accent-soft: rgba(90, 242, 172, .11);
  --blue: #78a9ff;
  --amber: #f4c66a;
  --rose: #ff8295;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
  --sans: Inter, "SF Pro Display", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 4%, rgba(53, 181, 129, .12), transparent 25rem),
    radial-gradient(circle at 7% 38%, rgba(65, 104, 174, .08), transparent 28rem),
    var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .33;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
button, input, select { font: inherit; }
button, select { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
kbd {
  min-width: 22px;
  padding: 3px 6px;
  color: var(--subtle);
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 10px/1 var(--sans);
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--accent);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 16, .78);
  backdrop-filter: blur(22px) saturate(145%);
}
.topbar-inner {
  width: min(1540px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(111, 255, 194, .14), rgba(111, 255, 194, .03));
  border: 1px solid rgba(143, 255, 199, .24);
  border-radius: 12px;
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 10px 28px rgba(0, 0, 0, .22);
}
.brand-mark svg { width: 34px; height: 34px; }
.brand-mark circle { opacity: .42; }
.brand-mark .brand-dot { fill: currentColor; opacity: 1; stroke: none; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 15px; letter-spacing: -.025em; }
.brand-copy small { margin-top: 3px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.topbar-center { display: flex; gap: 7px; }
.context-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: #c9d0d6;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
}
.context-pill.context-muted { color: var(--muted); background: transparent; }
.flag { color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.sync-state { display: flex; align-items: center; gap: 9px; }
.sync-state > span:last-child { display: grid; gap: 2px; }
.sync-state strong { color: #cbd2d6; font-size: 11px; font-weight: 600; }
.sync-state small { color: var(--subtle); font-size: 9px; }
.pulse { position: relative; width: 7px; height: 7px; background: var(--accent-strong); border-radius: 50%; box-shadow: 0 0 12px rgba(67, 230, 156, .7); }
.pulse::after { position: absolute; inset: -4px; content: ""; border: 1px solid rgba(67, 230, 156, .24); border-radius: inherit; animation: pulse 2.4s ease-out infinite; }
.icon-button {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dfe4e6;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.icon-button svg { width: 16px; height: 16px; }
.icon-button span { font-size: 11px; font-weight: 650; }
.icon-button:hover { background: rgba(255, 255, 255, .075); border-color: rgba(143, 255, 199, .32); }
.icon-button:active { transform: translateY(1px); }
.icon-button.loading svg { animation: spin .8s linear infinite; }

.shell { width: min(1540px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  min-height: 195px;
  padding: 34px 0 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}
.hero-copy { max-width: 850px; }
.eyebrow, .section-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 20px; height: 1px; background: currentColor; box-shadow: 0 0 10px currentColor; }
h1 {
  margin: 0;
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 540;
  line-height: .99;
  letter-spacing: -.06em;
}
h1 em { color: #798590; font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.subtitle { max-width: 720px; margin: 20px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.hero-card {
  width: min(100%, 355px);
  padding: 21px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  background: linear-gradient(145deg, rgba(25, 38, 43, .78), rgba(13, 18, 25, .86));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .04);
}
.hero-card-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(143, 255, 199, .16); border-radius: 12px; }
.hero-card-icon svg { width: 21px; height: 21px; }
.hero-card span, .hero-card strong { display: block; }
.hero-card span { margin-top: 1px; color: var(--subtle); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.hero-card strong { margin-top: 5px; font-size: 14px; }
.hero-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric-card {
  position: relative;
  min-height: 158px;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(18, 25, 34, .92), rgba(12, 17, 23, .94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.metric-card::after { position: absolute; right: -48px; bottom: -62px; width: 140px; height: 140px; content: ""; border: 1px solid rgba(255, 255, 255, .035); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255, 255, 255, .012), 0 0 0 46px rgba(255, 255, 255, .008); }
.metric-primary { background: linear-gradient(150deg, rgba(24, 55, 48, .86), rgba(12, 22, 23, .96)); border-color: rgba(116, 248, 187, .18); }
.metric-head, .metric-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.metric-head > span { color: #aab3bc; font-size: 11px; font-weight: 580; }
.metric-head i { color: #46515d; font-size: 9px; font-style: normal; letter-spacing: .12em; }
.metric-card > strong { display: block; margin: 24px 0 21px; font-size: 38px; font-weight: 560; letter-spacing: -.05em; line-height: .85; }
.metric-foot { position: relative; z-index: 1; justify-content: flex-start; }
.metric-foot small { color: var(--subtle); font-size: 9px; }
.trend { padding: 5px 8px; color: var(--blue); background: rgba(120, 169, 255, .09); border-radius: 6px; font-size: 9px; font-weight: 700; }
.trend-good { color: var(--accent); background: var(--accent-soft); }
.trend-warn { color: var(--amber); background: rgba(244, 198, 106, .09); }

.decision-banner {
  margin: 16px 0 12px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(120deg, rgba(67, 230, 156, .12), rgba(13, 24, 23, .8));
  border: 1px solid rgba(143, 255, 199, .22);
  border-radius: var(--radius-lg);
}
.decision-icon { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: #082017; background: var(--accent); border-radius: 50%; font-size: 19px; font-weight: 800; }
.decision-banner.attention { background: linear-gradient(120deg, rgba(255, 130, 149, .12), rgba(28, 17, 22, .8)); border-color: rgba(255, 130, 149, .25); }
.decision-banner.attention .decision-icon { color: #2b0d13; background: var(--rose); }
.decision-banner.attention p { color: var(--rose); }
.decision-banner.complete { background: linear-gradient(120deg, rgba(120, 169, 255, .12), rgba(13, 20, 30, .8)); border-color: rgba(120, 169, 255, .25); }
.decision-banner.complete .decision-icon { color: #0b172b; background: var(--blue); }
.decision-banner.complete p { color: var(--blue); }
.decision-banner p { margin: 0 0 4px; color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.decision-banner h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.decision-banner div > span { display: block; margin-top: 5px; color: #a4b2ac; font-size: 12px; line-height: 1.5; }

.journey {
  margin: 16px 0 12px;
  padding: 26px 28px 28px;
  background: linear-gradient(145deg, rgba(17, 25, 32, .94), rgba(11, 17, 23, .92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.journey-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.journey-heading h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.025em; }
.journey-heading > p { max-width: 560px; margin: 0; color: #b2bcc1; font-size: 13px; line-height: 1.55; text-align: right; }
.journey-steps { margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; list-style: none; }
.journey-steps li {
  position: relative;
  min-height: 104px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  color: #67737f;
  background: rgba(255, 255, 255, .018);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.journey-steps li > span { width: 25px; height: 25px; display: grid; place-items: center; color: #76828c; background: rgba(255, 255, 255, .035); border-radius: 50%; font-size: 10px; font-weight: 750; }
.journey-steps li div { min-width: 0; display: grid; gap: 7px; }
.journey-steps strong { color: #99a4ad; font-size: 12px; font-weight: 650; }
.journey-steps small { color: inherit; font-size: 10px; line-height: 1.45; }
.journey-steps li.done { color: #79a994; background: rgba(67, 230, 156, .045); border-color: rgba(143, 255, 199, .12); }
.journey-steps li.done > span { color: #092017; background: var(--accent); }
.journey-steps li.done > span::after { content: "✓"; }
.journey-steps li.done > span { font-size: 0; }
.journey-steps li.done strong { color: #d8e6df; }
.journey-steps li.current { color: #c4b07c; background: rgba(244, 198, 106, .06); border-color: rgba(244, 198, 106, .22); }
.journey-steps li.current > span { color: #241d0c; background: var(--amber); box-shadow: 0 0 18px rgba(244, 198, 106, .18); }
.journey-steps li.current strong { color: #f0dfb4; }
.journey-steps li.waiting { opacity: .7; }

.insight-bar {
  margin: 12px 0 24px;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(220px, 1fr) minmax(190px, .55fr);
  align-items: center;
  gap: 24px;
  background: rgba(14, 20, 27, .74);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.insight-copy { display: flex; align-items: center; gap: 11px; }
.insight-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 9px; }
.insight-icon svg { width: 17px; height: 17px; }
.insight-copy div, .insight-meta { display: grid; gap: 3px; }
.insight-copy span:not(.insight-icon), .insight-meta span { color: var(--subtle); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.insight-copy strong, .insight-meta strong { color: #d7dcdf; font-size: 11px; font-weight: 600; }
.insight-meta { justify-self: end; text-align: right; }
progress { width: 100%; height: 5px; overflow: hidden; appearance: none; background: rgba(255, 255, 255, .05); border: 0; border-radius: 999px; }
progress::-webkit-progress-bar { background: rgba(255, 255, 255, .05); border-radius: 999px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 999px; box-shadow: 0 0 14px rgba(67, 230, 156, .32); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); border-radius: 999px; }

.workspace { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.panel { background: rgba(13, 18, 25, .88); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .025); overflow: hidden; }
.panel-heading { padding: 26px 28px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-kicker { margin-bottom: 9px; color: #6f7c89; }
.panel h2 { margin: 0; font-size: 24px; font-weight: 570; letter-spacing: -.035em; }
.section-description { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.search { width: min(100%, 240px); height: 42px; padding: 0 10px 0 12px; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; transition: border-color .2s, background .2s; }
.search:focus-within { background: rgba(255, 255, 255, .045); border-color: rgba(143, 255, 199, .35); }
.search svg { width: 15px; height: 15px; flex: 0 0 auto; color: #687582; }
.search input { min-width: 0; flex: 1; color: var(--text); background: transparent; border: 0; outline: 0; font-size: 11px; }
.search input::placeholder { color: #56616d; }
.list-toolbar { min-height: 60px; padding: 11px 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { padding: 7px 9px; color: #7f8a96; background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 10px; transition: .18s ease; }
.filter-chip span { min-width: 18px; margin-left: 4px; padding: 2px 5px; display: inline-block; background: rgba(255, 255, 255, .04); border-radius: 5px; color: #62707d; font-size: 8px; }
.filter-chip:hover { color: #cbd2d7; background: rgba(255, 255, 255, .025); }
.filter-chip.active { color: var(--accent); background: var(--accent-soft); border-color: rgba(143, 255, 199, .1); }
.filter-chip.active span { color: var(--accent); background: rgba(143, 255, 199, .08); }
.sort-control select { max-width: 125px; padding: 7px 25px 7px 8px; color: var(--muted); background: var(--surface) no-repeat; border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 9px; cursor: pointer; }
.batch-table-head, .batch-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) 105px 100px minmax(120px, .75fr); align-items: center; gap: 18px; }
.batch-table-head { min-height: 38px; padding: 0 28px; color: #4f5b67; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.batch-list { min-height: 320px; max-height: 690px; overflow: auto; overscroll-behavior: contain; }
.batch-list::-webkit-scrollbar, .candidate-list::-webkit-scrollbar { width: 6px; }
.batch-list::-webkit-scrollbar-thumb, .candidate-list::-webkit-scrollbar-thumb { background: #2a343e; border-radius: 999px; }
.batch-row { position: relative; width: 100%; min-height: 86px; padding: 16px 28px; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; transition: background .18s, box-shadow .18s; }
.batch-row:last-child { border-bottom: 0; }
.batch-row:hover { background: rgba(255, 255, 255, .026); }
.batch-row.active { background: linear-gradient(90deg, rgba(92, 235, 171, .085), rgba(92, 235, 171, .018)); box-shadow: inset 3px 0 var(--accent-strong); }
.batch-row:focus-visible { z-index: 2; outline: 2px solid var(--accent); outline-offset: -3px; }
.batch-name { min-width: 0; }
.batch-name strong, .batch-name small { display: block; }
.batch-name strong { overflow: hidden; font-size: 12px; font-weight: 610; text-overflow: ellipsis; white-space: nowrap; }
.batch-name small { margin-top: 6px; color: #56626e; font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; }
.status { width: fit-content; padding: 6px 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); background: rgba(120, 169, 255, .08); border: 1px solid rgba(120, 169, 255, .12); border-radius: 7px; font-size: 9px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.status::before { width: 5px; height: 5px; content: ""; background: currentColor; border-radius: 50%; box-shadow: 0 0 7px currentColor; }
.status.success { color: var(--accent); background: var(--accent-soft); border-color: rgba(143, 255, 199, .12); }
.status.warn { color: var(--amber); background: rgba(244, 198, 106, .075); border-color: rgba(244, 198, 106, .13); }
.status.error { color: var(--rose); background: rgba(255, 130, 149, .075); border-color: rgba(255, 130, 149, .13); }
.datum span, .progress-cell > span { display: block; color: #56626e; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.datum strong { display: block; margin-top: 5px; color: #c3cbd0; font-size: 11px; font-weight: 580; }
.progress-cell { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.progress-cell progress { grid-column: 1; height: 4px; }
.progress-cell strong { grid-column: 2; grid-row: 1; color: #aeb7bd; font-size: 10px; font-weight: 560; }
.progress-cell span { grid-column: 1 / -1; }

.detail-panel { position: static; min-height: 520px; }
.empty-state { min-height: 638px; padding: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.radar-visual { position: relative; width: 118px; height: 118px; margin-bottom: 28px; border: 1px solid rgba(143, 255, 199, .18); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 18px, rgba(143, 255, 199, .075) 19px 20px); box-shadow: inset 0 0 34px rgba(67, 230, 156, .045), 0 0 50px rgba(67, 230, 156, .04); }
.radar-visual::before, .radar-visual::after { position: absolute; content: ""; background: rgba(143, 255, 199, .09); }
.radar-visual::before { top: 50%; left: 8px; right: 8px; height: 1px; }
.radar-visual::after { top: 8px; bottom: 8px; left: 50%; width: 1px; }
.radar-visual span { position: absolute; left: 50%; top: 50%; width: 49px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); transform-origin: left; transform: rotate(-42deg); box-shadow: 0 0 12px var(--accent); }
.radar-visual i, .radar-visual b { position: absolute; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.radar-visual i { left: 30px; top: 31px; }
.radar-visual b { right: 25px; bottom: 35px; opacity: .62; }
.empty-kicker { margin-bottom: 10px; color: var(--accent); font-size: 8px; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.empty-state h2 { font-size: 22px; }
.empty-state p { max-width: 340px; margin: 14px 0 22px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.empty-hint { display: flex; align-items: center; gap: 5px; color: var(--subtle); font-size: 9px; }
.empty-hint span { margin-left: 4px; }
.detail-header { padding: 26px 26px 22px; border-bottom: 1px solid var(--line); }
.detail-header-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.detail-header h2 { margin-top: 15px; overflow-wrap: anywhere; font-size: 22px; }
.detail-meta { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.detail-actions { display: flex; gap: 6px; }
.detail-action { width: 32px; height: 32px; display: grid; place-items: center; color: #76828d; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.detail-action:hover { color: var(--accent); border-color: rgba(143, 255, 199, .25); }
.detail-action svg { width: 14px; height: 14px; }
.detail-progress { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: center; }
.detail-progress progress { grid-column: 1; }
.detail-progress strong { grid-column: 2; grid-row: 1; color: var(--accent); font-size: 10px; }
.detail-progress span { grid-column: 1 / -1; color: var(--subtle); font-size: 9px; }
.detail-costs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.detail-costs div { min-width: 0; padding: 17px 19px; border-right: 1px solid var(--line); }
.detail-costs div:last-child { border-right: 0; }
.detail-costs span, .detail-costs strong { display: block; }
.detail-costs span { color: #77838d; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.detail-costs strong { margin-top: 7px; overflow: hidden; color: #d1d7da; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.detail-facts { margin: 10px 14px 0; overflow: hidden; background: rgba(255, 255, 255, .014); border: 1px solid var(--line); border-radius: 10px; }
.detail-facts > summary { min-height: 42px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; color: #8f9ba4; cursor: pointer; list-style: none; font-size: 10px; }
.detail-facts > summary::-webkit-details-marker { display: none; }
.detail-facts > summary::after { content: "+"; color: var(--accent); font-size: 16px; }
.detail-facts[open] > summary::after { content: "−"; }
.detail-facts .detail-costs { border-top: 1px solid var(--line); border-bottom: 0; }
.stage-banner { margin: 14px 14px 0; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, rgba(143, 255, 199, .075), rgba(67, 230, 156, .025)); border: 1px solid rgba(143, 255, 199, .14); border-radius: 12px; }
.stage-copy { min-width: 0; }
.stage-copy > span, .stage-copy > strong { display: block; }
.stage-kicker { margin-bottom: 6px; color: var(--accent); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.stage-copy > strong { color: #dce5e2; font-size: 14px; font-weight: 650; }
.stage-copy p { max-width: 530px; margin: 7px 0 0; color: #8e9a94; font-size: 11px; line-height: 1.55; }
.stage-action-wrap { flex: 0 0 auto; display: grid; justify-items: end; gap: 7px; }
.stage-action-wrap small { color: #68756f; font-size: 7px; }
.stage-action { padding: 8px 10px; color: #092017; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; font-size: 8px; font-weight: 750; }
.stage-action:hover { background: #aaffd2; }
.candidate-toolbar { padding: 22px 20px 14px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.candidate-guidance { margin: 14px 14px 0; padding: 14px 16px; display: grid; gap: 4px; color: #c7b782; background: rgba(244, 198, 106, .055); border: 1px solid rgba(244, 198, 106, .14); border-radius: 10px; }
.candidate-guidance strong { font-size: 12px; }
.candidate-guidance span { color: #9d9479; font-size: 10px; line-height: 1.5; }
.candidate-guidance.final { color: var(--accent); background: var(--accent-soft); border-color: rgba(143, 255, 199, .14); }
.candidate-guidance.final span { color: #8eaa9d; }
.candidate-heading { min-width: 0; }
.candidate-toolbar h3 { margin: 0; font-size: 15px; font-weight: 650; }
.candidate-toolbar h3 span { margin-left: 6px; color: var(--subtle); font-size: 10px; font-weight: 500; }
.candidate-heading p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.candidate-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.candidate-toolbar select { min-height: 34px; padding: 6px 28px 6px 9px; color: #aab4bb; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 10px; }
.candidate-list { padding: 0 14px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.candidate { margin: 0; padding: 18px; background: rgba(255, 255, 255, .018); border: 1px solid rgba(255, 255, 255, .055); border-radius: 12px; transition: background .18s, border-color .18s; }
.candidate:hover { background: rgba(255, 255, 255, .028); border-color: rgba(255, 255, 255, .09); }
.candidate-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.candidate-title { min-width: 0; }
.candidate-title h4 { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 650; }
.candidate-meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.candidate-meta .plain-meta { color: #7c8993; font-size: 10px; }
.candidate-meta .provisional { color: var(--amber); }
.candidate-volume { margin-top: 14px; padding: 10px 12px; color: #8e9ca6; background: rgba(143, 255, 199, .035); border: 1px solid rgba(143, 255, 199, .10); border-radius: 8px; }
.candidate-market-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.market-metric { min-width: 0; padding-right: 10px; display: grid; align-content: start; gap: 4px; border-right: 1px solid rgba(255, 255, 255, .065); }
.market-metric:last-of-type { padding-right: 0; border-right: 0; }
.market-metric > span, .market-metric small, .market-source, .market-method { font-size: 9px; line-height: 1.45; }
.market-metric strong { color: #dce5e2; font-size: 14px; font-weight: 650; }
.market-metric-ratio strong { color: var(--accent); font-size: 18px; }
.market-metric strong.unknown { color: var(--subtle); font-size: 12px; }
.market-source, .market-method { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .055); }
.market-method { padding-top: 0; color: #7b887f; border-top: 0; }
.score-block { min-width: 50px; text-align: right; }
.score-block strong { display: block; color: var(--accent); font-size: 23px; font-weight: 520; letter-spacing: -.04em; }
.score-block span { color: #697681; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.score-block.unknown strong { color: #5e6974; }
.candidate-signals { margin-top: 15px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.signal { min-width: 0; }
.signal-head { margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; color: #82909a; font-size: 10px; }
.signal-head strong { color: #aab3ba; font-weight: 560; }
.signal progress { height: 3px; }
.signal.risk progress::-webkit-progress-value { background: linear-gradient(90deg, var(--amber), var(--rose)); box-shadow: none; }
.signal.risk progress::-moz-progress-bar { background: linear-gradient(90deg, var(--amber), var(--rose)); }
.warning-list { margin: 13px 0 0; padding: 10px 11px; color: #b09a68; background: rgba(244, 198, 106, .045); border: 1px solid rgba(244, 198, 106, .08); border-radius: 8px; font-size: 10px; line-height: 1.55; }
.pending-note { margin: 13px 0 0; padding-top: 10px; color: #8b9992; border-top: 1px solid rgba(255, 255, 255, .05); font-size: 10px; line-height: 1.55; }
.loading, .empty-list, .error-message { min-height: 250px; margin: 0; padding: 62px 28px; display: grid; place-items: center; color: var(--muted); text-align: center; line-height: 1.65; }
.loading::before { width: 25px; height: 25px; margin-bottom: 12px; content: ""; border: 2px solid rgba(143, 255, 199, .16); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.error-message { color: var(--rose); }

.history-disclosure { overflow: hidden; background: rgba(13, 18, 25, .48); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.history-disclosure > summary { min-height: 64px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: #c5cdd1; cursor: pointer; list-style: none; }
.history-disclosure > summary::-webkit-details-marker { display: none; }
.history-disclosure > summary::after { content: "+"; color: var(--accent); font-size: 20px; }
.history-disclosure[open] > summary::after { content: "−"; }
.history-disclosure > summary span { font-size: 13px; font-weight: 650; }
.history-disclosure > summary small { margin-left: auto; color: var(--subtle); font-size: 10px; }
.history-disclosure .panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }

.explainers { margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.explainers article { padding: 22px; display: flex; gap: 16px; background: rgba(13, 18, 25, .62); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.explainer-number { color: #46525e; font-size: 9px; font-weight: 700; }
.explainers h3 { margin: 0; font-size: 11px; font-weight: 620; }
.explainers p { margin: 7px 0 0; color: var(--subtle); font-size: 9px; line-height: 1.6; }
.footer { min-height: 110px; padding: 28px 2px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; color: #4f5b66; font-size: 9px; }
.footer p { margin: 0; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; min-width: 200px; padding: 13px 16px; display: flex; align-items: center; gap: 9px; color: #092017; background: var(--accent); border-radius: 10px; box-shadow: 0 16px 50px rgba(0, 0, 0, .34); font-size: 11px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(20px); transition: opacity .2s, transform .2s; }
.toast svg { width: 15px; height: 15px; stroke-width: 2.2; }
.toast.show { opacity: 1; transform: none; }

.account-menu { min-width: 172px; padding: 7px 10px 7px 8px; display: flex; align-items: center; gap: 9px; color: inherit; background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; text-align: left; }
.account-menu:hover { border-color: rgba(143, 255, 199, .24); background: rgba(255, 255, 255, .04); }
.account-avatar { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; color: #092017; background: linear-gradient(145deg, var(--accent), #59dba0); border-radius: 9px; font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.account-avatar.large { width: 42px; height: 42px; border-radius: 12px; font-size: 11px; }
.account-copy { min-width: 0; display: grid; gap: 2px; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 10px; font-weight: 650; }
.account-copy small { color: var(--subtle); font-size: 8px; }

.account-dialog { width: min(920px, calc(100% - 32px)); max-height: min(860px, calc(100vh - 32px)); padding: 0; color: var(--text); background: #0d1219; border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: 0 36px 120px rgba(0, 0, 0, .65); }
.account-dialog::backdrop { background: rgba(2, 5, 8, .76); backdrop-filter: blur(8px); }
.dialog-head { padding: 24px 26px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 5px 0 0; font-size: 22px; }
.dialog-close { width: 36px; height: 36px; color: var(--muted); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 22px; line-height: 1; }
.current-account-card { margin: 20px 26px 0; padding: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; background: linear-gradient(120deg, rgba(73, 217, 155, .09), rgba(255, 255, 255, .018)); border: 1px solid rgba(143, 255, 199, .11); border-radius: 14px; }
.current-account-card div { min-width: 0; display: grid; gap: 4px; }
.current-account-card strong { font-size: 12px; }
.current-account-card small { color: var(--muted); font-size: 9px; }
.secondary-button, .small-button { color: #bac3c9; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.secondary-button { padding: 9px 12px; font-size: 9px; }
.small-button { padding: 6px 8px; font-size: 8px; }
.danger { color: var(--rose); }
.account-admin { padding: 24px 26px 28px; }
.account-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.account-section-head h3, .account-create h3 { margin: 0; font-size: 13px; }
.account-section-head p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.account-section-head > span { color: var(--subtle); font-size: 9px; }
.account-list { margin: 15px 0 22px; display: grid; gap: 7px; }
.account-row { min-height: 62px; padding: 10px 12px; display: grid; grid-template-columns: auto minmax(140px, 1fr) 130px auto; align-items: center; gap: 12px; background: rgba(255, 255, 255, .018); border: 1px solid var(--line); border-radius: 11px; }
.account-row.inactive { opacity: .58; }
.account-identity { min-width: 0; display: grid; gap: 4px; }
.account-identity strong, .account-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { font-size: 10px; }
.account-identity small { color: var(--subtle); font-size: 8px; }
.account-role-select { padding: 7px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 8px; }
.account-actions { display: flex; gap: 6px; }
.account-create { padding: 18px; background: rgba(255, 255, 255, .018); border: 1px solid var(--line); border-radius: 14px; }
.account-form-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: grid; gap: 7px; }
.field > span { color: var(--muted); font-size: 9px; }
.field input, .field select { width: 100%; min-height: 42px; padding: 0 12px; color: var(--text); background: rgba(255, 255, 255, .025); border: 1px solid var(--line); border-radius: 9px; outline: 0; font-size: 11px; }
.field input:focus, .field select:focus { border-color: rgba(143, 255, 199, .42); box-shadow: 0 0 0 3px rgba(143, 255, 199, .06); }
.form-error { min-height: 17px; margin: 10px 0; color: var(--rose); font-size: 9px; }
.primary-button { width: 100%; min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; color: #082017; background: linear-gradient(120deg, var(--accent), #5cdda4); border: 0; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 750; }
.primary-button.compact { width: auto; min-height: 38px; gap: 24px; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.loading.compact { min-height: 80px; padding: 20px; }

.login-page { overflow-x: hidden; }
.login-shell { width: min(1180px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .62fr); align-items: center; gap: clamp(60px, 9vw, 150px); }
.login-intro { min-height: 640px; padding: 36px 0; display: flex; flex-direction: column; justify-content: space-between; }
.login-brand { align-self: flex-start; }
.login-intro h1 { max-width: 720px; font-size: clamp(48px, 6vw, 84px); }
.login-intro .subtitle { max-width: 560px; }
.login-footnote { margin: 0; color: var(--subtle); font-size: 9px; letter-spacing: .04em; }
.login-card { padding: 30px; background: rgba(14, 20, 27, .92); border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow); }
.login-card-head { margin-bottom: 26px; display: flex; align-items: center; gap: 13px; }
.login-card-head h2 { margin: 5px 0 0; font-size: 24px; }
.login-icon { width: 42px; height: 42px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 12px; }
.login-icon svg { width: 21px; height: 21px; }
.login-card form { display: grid; gap: 15px; }
.login-card .form-error { margin: -2px 0 0; }
.login-help { margin: 20px 0 0; color: var(--subtle); font-size: 9px; line-height: 1.55; }

@keyframes pulse { from { opacity: .75; transform: scale(.65); } to { opacity: 0; transform: scale(1.55); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; }
  .batch-table-head, .batch-row { grid-template-columns: minmax(170px, 1.3fr) 95px minmax(110px, .75fr); }
  .batch-table-head span:nth-child(3), .batch-row .datum-cost { display: none; }
  .journey-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .topbar-center { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .detail-panel { position: static; min-height: 520px; }
  .detail-costs { grid-template-columns: repeat(3, 1fr); }
  .empty-state { min-height: 518px; }
  .insight-bar { grid-template-columns: 1fr 1.2fr; }
  .insight-meta { display: none; }
  .journey-heading { align-items: start; flex-direction: column; gap: 10px; }
  .journey-heading > p { text-align: left; }
  .login-shell { grid-template-columns: 1fr; gap: 0; padding: 48px 0; }
  .login-intro { min-height: auto; padding: 0 0 42px; gap: 42px; }
  .login-footnote { display: none; }
  .login-card { width: min(100%, 480px); }
}

@media (max-width: 680px) {
  .topbar-inner, .shell { width: min(100% - 28px, 1540px); }
  .topbar-inner { min-height: 66px; }
  .brand-copy small, .sync-state, .icon-button span { display: none; }
  .account-menu { min-width: 0; padding: 5px; border: 0; background: transparent; }
  .account-copy { display: none; }
  .icon-button { width: 40px; padding: 0; justify-content: center; }
  .hero { min-height: auto; padding: 50px 0 34px; display: block; }
  h1 { font-size: clamp(40px, 12vw, 60px); }
  .subtitle { font-size: 13px; }
  .hero-card { width: 100%; margin-top: 28px; }
  .journey { padding: 22px 20px; }
  .journey-steps { grid-template-columns: 1fr 1fr; }
  .metrics { gap: 8px; }
  .metric-card { min-height: 158px; padding: 18px; }
  .metric-card > strong { margin: 23px 0 20px; font-size: 34px; }
  .metric-foot { align-items: flex-start; flex-direction: column; gap: 5px; }
  .insight-bar { grid-template-columns: 1fr; gap: 13px; }
  .panel { border-radius: 17px; }
  .panel-heading { padding: 22px 20px 18px; display: block; }
  .search { width: 100%; margin-top: 18px; }
  .list-toolbar { padding: 10px 20px; align-items: flex-start; flex-direction: column; }
  .filter-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .filter-chip { flex: 0 0 auto; }
  .sort-control { display: none; }
  .batch-table-head { display: none; }
  .batch-list { min-height: 0; }
  .batch-row { min-height: 92px; padding: 17px 20px; grid-template-columns: minmax(0, 1fr) 110px; gap: 14px; }
  .batch-row .status-cell, .batch-row .datum-cost { display: none; }
  .detail-header { padding: 23px 20px 20px; }
  .detail-costs div { padding: 15px 12px; }
  .detail-costs strong { font-size: 11px; }
  .stage-banner { align-items: stretch; flex-direction: column; }
  .stage-action-wrap { justify-items: stretch; }
  .stage-action { min-height: 38px; }
  .candidate { margin-inline: 8px; }
  .candidate-list { grid-template-columns: 1fr; }
  .candidate-toolbar { align-items: stretch; flex-direction: column; }
  .candidate-controls { justify-content: stretch; }
  .candidate-controls select { flex: 1; }
  .candidate-signals { grid-template-columns: 1fr; }
  .candidate-market-data { grid-template-columns: 1fr; }
  .market-metric { padding: 0 0 9px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .055); }
  .market-metric:last-of-type { padding-bottom: 0; border-bottom: 0; }
  .explainers { grid-template-columns: 1fr; }
  .footer { align-items: flex-start; flex-direction: column; }
  .toast { right: 14px; bottom: 14px; left: 14px; }
  .account-dialog { width: calc(100% - 16px); max-height: calc(100vh - 16px); border-radius: 16px; }
  .dialog-head, .account-admin { padding: 20px; }
  .current-account-card { margin: 16px 20px 0; grid-template-columns: auto 1fr; }
  .current-account-card .secondary-button { grid-column: 1 / -1; }
  .account-row { grid-template-columns: auto minmax(0, 1fr); }
  .account-role-select, .account-actions { grid-column: 2; }
  .account-form-grid { grid-template-columns: 1fr; }
  .login-shell { width: min(100% - 28px, 480px); }
  .login-intro h1 { font-size: clamp(40px, 12vw, 58px); }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 146px; }
  .detail-costs { grid-template-columns: 1fr 1fr; }
  .detail-costs div:nth-child(2) { border-right: 0; }
  .detail-costs div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .journey-steps { grid-template-columns: 1fr; }
  .candidate-controls { flex-direction: column; }
  .decision-banner { align-items: flex-start; }
  .hero { padding-top: 34px; }
  .candidate-controls select { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
