:root {
  color-scheme: dark;
  --bg: #090c0a;
  --surface: #111411;
  --surface-2: #161a17;
  --surface-3: #1c211d;
  --line: #292f2a;
  --line-soft: #202520;
  --text: #f4f6f2;
  --muted: #919b92;
  --faint: #657067;
  --green: #40e58b;
  --green-deep: #0e5c39;
  --gold: #f2b93f;
  --soil: #c86f3e;
  --red: #f06363;
  --purple: #ad7cf6;
  --blue: #6ba9ff;
  --sidebar: 248px;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -10%, rgba(64, 229, 139, .055), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(64, 229, 139, .35); outline-offset: 2px; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(10, 12, 11, .97);
  box-shadow: 10px 0 30px rgba(0, 0, 0, .14);
}

.brand-block {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 18px 18px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(242, 185, 63, .55);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #29452f, #0b1710 64%);
  box-shadow: 0 0 20px rgba(64, 229, 139, .12);
}

.brand-mark::after {
  position: absolute;
  width: 24px;
  height: 11px;
  content: "";
  transform: rotate(-31deg) translate(9px, -8px);
  border-radius: 100% 0 100% 0;
  background: var(--green);
  opacity: .9;
}

.brand-mark span { z-index: 1; color: #fff4ce; font-family: "Arial Narrow", sans-serif; font-size: 15px; font-weight: 900; letter-spacing: -.04em; }
.brand-mark i { position: absolute; bottom: 8px; width: 22px; height: 3px; transform: rotate(-18deg); border-radius: 2px; background: var(--gold); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1; }
.brand-copy strong { font-family: "Arial Narrow", "Roboto Condensed", sans-serif; font-size: 22px; font-stretch: condensed; font-weight: 900; letter-spacing: .035em; }
.brand-copy small { margin-top: 6px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .16em; }

.demo-ribbon { display: flex; align-items: center; gap: 8px; margin: 12px 14px 4px; padding: 8px 10px; border: 1px solid rgba(242,185,63,.22); border-radius: 9px; background: rgba(242,185,63,.06); color: #d9c996; font-size: 12px; }
.demo-ribbon span { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(242,185,63,.6); }

.nav-list { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 10px; overflow-y: auto; }
.nav-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #a3aba4;
  text-align: left;
  transition: .18s ease;
}
.nav-item:hover { border-color: var(--line); background: var(--surface); color: var(--text); }
.nav-item.is-active { border-color: rgba(64,229,139,.24); background: linear-gradient(90deg, rgba(19,112,66,.8), rgba(17,60,38,.78)); color: #fff; box-shadow: 0 10px 22px rgba(4,67,35,.2); }
.nav-icon { color: #7f8b81; font-size: 17px; text-align: center; }
.nav-item.is-active .nav-icon { color: var(--green); }
.nav-item b { display: grid; min-width: 22px; height: 22px; place-items: center; border-radius: 999px; background: rgba(64,229,139,.12); color: var(--green); font-size: 11px; }
.nav-item b.attention { background: rgba(240,99,99,.15); color: #ff8d8d; }
.sidebar-footer { display: flex; flex-direction: column; padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.sidebar-footer span, .sidebar-footer small { color: var(--faint); font-size: 11px; }
.sidebar-footer strong { margin: 2px 0; font-size: 13px; letter-spacing: .16em; }

.main-stage { min-height: 100vh; margin-left: var(--sidebar); padding-bottom: 34px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 102px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 10, .9);
  backdrop-filter: blur(18px);
}

.title-wrap { display: flex; align-items: center; gap: 12px; min-width: 0; }
.title-wrap h1 { margin: 0; font-family: "Arial Narrow", "Roboto Condensed", sans-serif; font-size: clamp(23px, 2.2vw, 32px); font-weight: 900; letter-spacing: .055em; line-height: 1.02; text-transform: uppercase; }
.eyebrow, .panel-kicker { margin: 0 0 4px; color: var(--gold); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.live-context { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.live-context em { display: inline-flex; align-items: center; gap: 7px; padding: 3px 7px; border: 1px solid rgba(200,111,62,.32); border-radius: 5px; background: rgba(200,111,62,.08); color: #ee986b; font-style: normal; font-weight: 800; letter-spacing: .06em; }
.live-context em i { width: 6px; height: 6px; border-radius: 50%; background: #ef915f; box-shadow: 0 0 8px rgba(239,145,95,.65); }
.menu-button { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

.top-actions { display: flex; align-items: center; gap: 10px; }
.live-pill { display: flex; min-width: 198px; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid rgba(64,229,139,.35); border-radius: 13px; background: rgba(10,81,47,.34); text-align: left; }
.live-pill > i, .live-label i { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(64,229,139,.72); }
.live-pill span { display: flex; flex-direction: column; line-height: 1.18; }
.live-pill strong { color: #e6fff0; font-family: "Arial Narrow", sans-serif; font-size: 14px; letter-spacing: .06em; }
.live-pill small { margin-top: 2px; color: #8ab49b; font-size: 11px; }
.icon-button { position: relative; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 20px; }
.icon-button b { position: absolute; top: -6px; right: -5px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; }
.profile-button { display: flex; min-width: 142px; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.profile-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: linear-gradient(145deg, #2f4937, #17231b); color: var(--green); font-size: 11px; font-weight: 900; }
.profile-button > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; line-height: 1.15; }
.profile-button strong { font-size: 13px; }
.profile-button small { color: var(--muted); font-size: 10px; }
.profile-button i { color: var(--faint); font-style: normal; }

.alert-popover { position: fixed; top: 84px; right: 164px; z-index: 50; width: min(340px, calc(100vw - 28px)); padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #151916; box-shadow: var(--shadow); }
.alert-popover div { display: flex; flex-direction: column; gap: 2px; padding: 11px; border-radius: 9px; }
.alert-popover div + div { border-top: 1px solid var(--line-soft); }
.alert-popover strong { font-size: 13px; }
.alert-popover span { color: var(--muted); font-size: 12px; }

.view-panel { padding: 18px 20px 0; }
.view-panel[hidden] { display: none !important; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.metric-card { position: relative; min-height: 112px; overflow: hidden; padding: 16px 17px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface-2), #111411); }
.metric-card::after { position: absolute; inset: auto -25px -40px auto; width: 100px; height: 80px; content: ""; border-radius: 50%; background: rgba(64,229,139,.035); filter: blur(10px); }
.metric-card > span { display: block; color: var(--muted); font-size: 12px; }
.metric-card > strong { display: block; margin-top: 4px; font-family: "Arial Narrow", sans-serif; font-size: clamp(28px, 2.4vw, 37px); font-weight: 900; letter-spacing: .01em; line-height: 1.08; }
.metric-card > strong.accent { color: var(--green); }
.metric-card > small { color: var(--muted); font-size: 11px; }
.metric-card > small.positive { color: var(--green); }
.metric-progress { height: 5px; margin-top: 9px; overflow: hidden; border-radius: 20px; background: #2b302c; }
.metric-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #a1ffca); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(340px, .95fr); gap: 14px; margin-top: 14px; }
.lower-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-top: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(22,26,23,.98), rgba(16,19,17,.98)); box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.panel-head { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 17px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2 { margin: 0; font-family: "Arial Narrow", sans-serif; font-size: 19px; font-weight: 900; letter-spacing: .025em; }
.compact-head { min-height: 64px; }
.link-button { border: 0; background: transparent; color: var(--gold); font-size: 12px; font-weight: 800; }
.link-button:hover { color: #ffd985; }
.link-button span { font-size: 18px; }
.micro-note { color: var(--muted); font-size: 11px; }

.stage-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.stage-summary div { text-align: center; }
.stage-summary span { display: block; color: #869089; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.stage-summary strong { display: block; margin-top: 2px; font-size: 19px; }
.batch-row { display: grid; width: 100%; grid-template-columns: 115px minmax(170px,1fr) 112px 90px 12px; align-items: center; gap: 10px; min-height: 72px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; transition: background .15s ease; }
.batch-row:last-child { border-bottom: 0; }
.batch-row:hover { background: rgba(255,255,255,.023); }
.batch-id, .batch-product { display: flex; min-width: 0; flex-direction: column; }
.batch-id strong { font-family: "Arial Narrow", sans-serif; font-size: 17px; }
.batch-row small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.batch-product strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.batch-stage { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.batch-row > i { color: var(--faint); font-style: normal; }
.status-chip { display: inline-flex; width: fit-content; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 6px; font-size: 9px; font-weight: 900; letter-spacing: .07em; white-space: nowrap; }
.status-chip.verified { background: rgba(64,229,139,.12); color: var(--green); }
.status-chip.review { background: rgba(242,185,63,.13); color: var(--gold); }
.status-chip.neutral { background: rgba(107,169,255,.12); color: var(--blue); }

.synthia-now { min-width: 0; overflow: hidden; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; }
.live-label i { width: 7px; height: 7px; }
.synthia-orbit { position: relative; display: grid; width: 152px; height: 152px; place-items: center; margin: 18px auto 14px; }
.orbit-ring { position: absolute; inset: 7px; border: 2px solid rgba(64,229,139,.55); border-radius: 50%; border-left-color: transparent; box-shadow: 0 0 22px rgba(64,229,139,.15); animation: rotate 9s linear infinite; }
.ring-two { inset: 0; border-width: 1px; border-color: rgba(64,229,139,.16); border-right-color: rgba(64,229,139,.65); animation-direction: reverse; animation-duration: 14s; }
.product-orb { z-index: 1; display: grid; width: 104px; height: 104px; place-items: center; overflow: hidden; border: 1px solid rgba(64,229,139,.35); border-radius: 50%; background: radial-gradient(circle, #29452f, #0c1510 70%); box-shadow: inset 0 0 20px rgba(0,0,0,.45), 0 0 22px rgba(64,229,139,.17); }
.product-orb img { width: 76px; height: 94px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0,0,0,.42)); }
.pulse-point { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 15px var(--green); }
.point-one { top: 7px; right: 35px; }
.point-two { bottom: 24px; left: 8px; animation: pulse 1.8s ease-in-out infinite; }
.synthia-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 14px; }
.synthia-stat-grid > div { display: grid; grid-template-columns: 35px 28px 1fr; align-items: center; min-height: 62px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.stat-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; font-size: 12px; font-weight: 900; }
.stat-icon.green { background: rgba(64,229,139,.12); color: var(--green); }
.stat-icon.gold { background: rgba(242,185,63,.12); color: var(--gold); }
.stat-icon.purple { background: rgba(173,124,246,.12); color: var(--purple); }
.stat-icon.red { background: rgba(240,99,99,.12); color: var(--red); }
.synthia-stat-grid strong { font-size: 23px; }
.synthia-stat-grid small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.synthia-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }

.primary-button, .secondary-button { min-height: 40px; padding: 0 15px; border-radius: 9px; font-size: 13px; font-weight: 800; }
.primary-button { border: 1px solid #52ed99; background: var(--green); color: #07130c; box-shadow: 0 8px 18px rgba(64,229,139,.12); }
.primary-button:hover { background: #68f1a4; }
.secondary-button { border: 1px solid var(--line); background: var(--surface-3); color: #dfe4df; }
.secondary-button:hover { border-color: #414a42; background: #222822; }
.wide { width: 100%; }

.verification-panel { min-height: 256px; }
.bar-chart { display: flex; height: 180px; align-items: flex-end; gap: 10px; padding: 22px 18px 18px; }
.bar-chart div { position: relative; display: grid; height: 100%; flex: 1; grid-template-rows: 1fr 18px; align-items: end; text-align: center; }
.bar-chart div::before { position: absolute; inset: 0 0 20px; content: ""; border-bottom: 1px solid var(--line-soft); }
.bar-chart i { z-index: 1; display: block; width: min(34px,70%); min-height: 9px; margin: 0 auto; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, rgba(64,229,139,.95), rgba(64,229,139,.28)); }
.bar-chart div.current i { background: linear-gradient(180deg, #ffd56e, #a66c17); box-shadow: 0 0 17px rgba(242,185,63,.16); }
.bar-chart span { color: var(--muted); font-size: 10px; }
.bar-chart b { position: absolute; bottom: calc(var(--h, 50%) + 24px); display: none; }

.activity-list { padding: 8px 14px 12px; }
.activity-list > div { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 9px; min-height: 45px; padding: 7px 2px; border-bottom: 1px solid var(--line-soft); }
.activity-list > div:last-child { border-bottom: 0; }
.event-dot { width: 8px; height: 8px; border-radius: 50%; }
.event-dot.verified { background: var(--green); box-shadow: 0 0 9px rgba(64,229,139,.45); }
.event-dot.synthia { background: var(--purple); }
.event-dot.evidence { background: var(--blue); }
.event-dot.review { background: var(--gold); }
.activity-list p { display: flex; min-width: 0; flex-direction: column; margin: 0; }
.activity-list strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-list small { color: var(--muted); font-size: 10px; }
.activity-list time { color: var(--faint); font-size: 10px; }

.section-toolbar { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.section-toolbar h2 { margin: 0 0 4px; font-family: "Arial Narrow", sans-serif; font-size: 27px; text-transform: uppercase; letter-spacing: .035em; }
.section-toolbar > div > span { color: var(--muted); font-size: 13px; }
.toolbar-actions { display: flex; align-items: center; gap: 9px; }
.search-field { display: flex; min-width: 270px; height: 40px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-field input::placeholder { color: var(--faint); }
.select-control { min-height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); }

.data-panel { overflow: hidden; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); }
.filter-chip { min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; }
.filter-chip.is-active { border-color: rgba(64,229,139,.4); background: rgba(64,229,139,.1); color: var(--green); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
td { padding: 15px; border-bottom: 1px solid var(--line-soft); color: #d5dbd6; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.016); }
.record-count { color: var(--green); }
.record-count.warn, .cell-warning { color: var(--gold); }
.row-action { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-3); color: var(--text); font-size: 11px; }

.passport-grid { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(360px,1.15fr) minmax(280px,.9fr); gap: 14px; }
.passport-card { position: relative; min-height: 330px; padding: 20px; overflow: hidden; border: 1px solid rgba(64,229,139,.28); border-radius: var(--radius); background: radial-gradient(circle at 100% 0, rgba(64,229,139,.13), transparent 45%), linear-gradient(145deg,#17231b,#0f1411); box-shadow: var(--shadow); }
.passport-card::after { position: absolute; top: 44px; right: -25px; width: 150px; height: 150px; content: "TP"; color: rgba(255,255,255,.02); font-family: "Arial Narrow", sans-serif; font-size: 120px; font-weight: 900; }
.passport-top { display: flex; align-items: center; justify-content: space-between; }
.passport-top > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(242,185,63,.5); border-radius: 50%; color: var(--gold); font-weight: 900; }
.passport-top em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .08em; }
.passport-card > p { margin: 27px 0 2px; color: var(--muted); font-size: 11px; }
.passport-card h3 { position: relative; z-index: 1; margin: 0 0 18px; font-family: "Arial Narrow", sans-serif; font-size: 28px; }
.passport-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 0 0 20px; }
.passport-card dl div { display: flex; flex-direction: column; }
.passport-card dt { color: var(--muted); font-size: 10px; }
.passport-card dd { margin: 2px 0 0; font-size: 12px; font-weight: 700; }
.passport-health, .scan-feed { min-height: 330px; }
.donut-row { display: grid; grid-template-columns: 155px 1fr; align-items: center; gap: 8px; padding: 20px 18px 10px; }
.donut { --value: 70; display: grid; width: 135px; height: 135px; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--value)*1%), #293029 0); box-shadow: 0 0 22px rgba(64,229,139,.1); }
.donut::before { position: absolute; width: 105px; height: 105px; content: ""; border-radius: 50%; background: #151916; }
.donut span { z-index: 1; font-family: "Arial Narrow", sans-serif; font-size: 30px; font-weight: 900; }
.donut small { color: var(--muted); font-size: 13px; }
.legend p { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 8px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.legend p:last-child { border-bottom: 0; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend i.good { background: var(--green); }
.legend i.warn { background: var(--gold); }
.legend i.neutral { background: var(--faint); }
.legend span { color: var(--muted); }
.boundary-note { display: flex; flex-direction: column; gap: 2px; margin: 8px 16px 16px; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(242,185,63,.06); }
.boundary-note strong { font-size: 11px; }
.boundary-note span { color: var(--muted); font-size: 10px; }

.quality-grid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(280px,.7fr); gap: 14px; }
.evidence-matrix { overflow: hidden; }
.proof-card { padding: 18px; }
.proof-card h2 { margin: 0 0 18px; font-family: "Arial Narrow", sans-serif; }
.hash-box { display: flex; flex-direction: column; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #0b0e0c; }
.hash-box span { color: var(--muted); font-size: 10px; }
.hash-box code { overflow: hidden; color: #b9e7ca; font-size: 12px; text-overflow: ellipsis; }
.proof-state { display: flex; align-items: center; gap: 10px; margin: 15px 0; padding: 12px; border-radius: 10px; background: rgba(64,229,139,.075); }
.proof-state > span { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: rgba(64,229,139,.15); color: var(--green); }
.proof-state div { display: flex; flex-direction: column; }
.proof-state strong { font-size: 12px; }
.proof-state small { color: var(--muted); font-size: 10px; }
.proof-state.is-altered { background: rgba(240,99,99,.08); }
.proof-state.is-altered > span { background: rgba(240,99,99,.15); color: var(--red); }
.proof-card > .micro-note { display: block; margin-top: 12px; line-height: 1.5; }

.route-panel { padding: 20px; }
.route-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.route-summary h2 { margin: 0; font-family: "Arial Narrow", sans-serif; }
.route-line { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; margin: 32px 0; padding: 0; list-style: none; }
.route-line li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.route-line li::before { position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; content: ""; background: var(--line); }
.route-line li:first-child::before { display: none; }
.route-line li.done::before, .route-line li.current::before { background: var(--green-deep); }
.route-line li > span { z-index: 1; display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 900; }
.route-line li.done > span { border-color: var(--green); background: #123523; color: var(--green); }
.route-line li.current > span { border-color: var(--gold); background: #392d12; color: var(--gold); box-shadow: 0 0 18px rgba(242,185,63,.16); }
.route-line li div { display: flex; flex-direction: column; margin-top: 9px; }
.route-line strong { font-size: 11px; }
.route-line small { color: var(--muted); font-size: 9px; }
.location-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.location-grid div { display: flex; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.014); }
.location-grid span { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.location-grid strong { margin-top: 5px; }
.location-grid small { color: var(--muted); font-size: 10px; }

.inbox-layout { display: grid; grid-template-columns: minmax(300px,.72fr) minmax(430px,1.4fr); gap: 14px; }
.conversation-list { overflow: hidden; }
.conversation { display: grid; width: 100%; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; min-height: 75px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; text-align: left; }
.conversation:last-child { border-bottom: 0; }
.conversation:hover, .conversation.is-active { background: rgba(64,229,139,.045); }
.conversation.is-active { box-shadow: inset 3px 0 var(--green); }
.channel { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; font-size: 10px; font-weight: 900; }
.channel.whatsapp { background: rgba(64,229,139,.13); color: var(--green); }
.channel.web { background: rgba(107,169,255,.13); color: var(--blue); }
.channel.qr { background: rgba(242,185,63,.13); color: var(--gold); }
.conversation p, .conversation-head p { display: flex; min-width: 0; flex-direction: column; margin: 0; }
.conversation strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.conversation small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.conversation time { color: var(--faint); font-size: 9px; }
.conversation-detail { min-height: 450px; overflow: hidden; }
.conversation-head { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.conversation-head > div { display: flex; align-items: center; gap: 10px; }
.conversation-head strong { font-size: 13px; }
.conversation-head small { color: var(--muted); font-size: 10px; }
.message-thread { display: flex; min-height: 315px; flex-direction: column; gap: 12px; padding: 22px; background: radial-gradient(circle at 100% 0,rgba(64,229,139,.04),transparent 40%); }
.message { max-width: 70%; padding: 11px 13px; border-radius: 13px; font-size: 12px; }
.message time { display: block; margin-top: 5px; color: var(--faint); font-size: 9px; text-align: right; }
.message.inbound { align-self: flex-end; border: 1px solid #36403a; background: #242a26; }
.message.assistant { align-self: flex-start; border: 1px solid rgba(64,229,139,.18); background: rgba(16,70,43,.32); }
.message.assistant > strong { display: block; margin-bottom: 4px; color: var(--green); font-size: 9px; letter-spacing: .09em; }
.context-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.context-strip span { padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 9px; }
.reply-box { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.reply-box input { min-width: 0; flex: 1; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #0e110f; color: var(--muted); font-size: 11px; }
.reply-box button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(64,229,139,.35); border-radius: 8px; background: rgba(64,229,139,.1); color: var(--green); font-size: 11px; font-weight: 800; }

.insight-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.insight-card { position: relative; min-height: 200px; padding: 19px; overflow: hidden; }
.insight-card.alert { border-color: rgba(242,185,63,.28); }
.insight-number { position: absolute; top: 12px; right: 14px; color: rgba(255,255,255,.05); font-family: "Arial Narrow",sans-serif; font-size: 46px; font-weight: 900; }
.insight-card p { margin: 0; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.insight-card h3 { max-width: 82%; margin: 25px 0 15px; font-size: 20px; }
.insight-card strong { display: block; color: var(--green); font-size: 13px; }
.insight-card.alert strong { color: var(--gold); }
.insight-card small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.insight-trend { margin-top: 14px; }
.theme-bars { display: grid; gap: 14px; padding: 20px; }
.theme-bars > div, .allocation-bars > div { display: grid; grid-template-columns: 150px 1fr 42px; align-items: center; gap: 12px; }
.theme-bars span, .allocation-bars span { color: #c8cec9; font-size: 12px; }
.theme-bars i, .allocation-bars i { height: 8px; overflow: hidden; border-radius: 10px; background: #292f2a; }
.theme-bars b, .allocation-bars b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green-deep),var(--green)); }
.theme-bars strong, .allocation-bars strong { font-size: 12px; text-align: right; }

.distribution-grid { display: grid; grid-template-columns: 1.35fr .75fr; gap: 14px; }
.allocation-card, .channel-card { padding: 20px; }
.allocation-card h2, .channel-card h2 { margin: 0; font-family: "Arial Narrow",sans-serif; }
.allocation-total { display: flex; align-items: baseline; gap: 9px; margin: 24px 0; }
.allocation-total strong { color: var(--green); font-family: "Arial Narrow",sans-serif; font-size: 48px; }
.allocation-total span { color: var(--muted); font-size: 12px; }
.allocation-bars { display: grid; gap: 15px; }
.channel-stat { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.channel-stat:last-child { border-bottom: 0; }
.channel-stat span { font-size: 12px; }
.channel-stat strong { color: var(--green); font-size: 20px; }
.channel-stat small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }

.analytics-grid { display: grid; grid-template-columns: 1.5fr .65fr; gap: 14px; }
.analytics-primary { min-height: 420px; }
.analytics-key { display: flex; gap: 12px; color: var(--muted); font-size: 10px; }
.analytics-key span { display: inline-flex; align-items: center; gap: 5px; }
.analytics-key i { width: 8px; height: 8px; border-radius: 50%; }
.analytics-key i.scan { background: var(--green); }
.analytics-key i.conversation-key { background: var(--purple); }
.line-chart { padding: 28px 18px 18px; }
.line-chart svg { width: 100%; height: 270px; overflow: visible; }
.grid-line { fill: none; stroke: #252a26; stroke-width: 1; }
.area { fill: url(#areaGreen); }
.scan-line { fill: none; stroke: var(--green); stroke-width: 4; stroke-linecap: round; }
.conversation-line { fill: none; stroke: var(--purple); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 8 6; }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.score-card { padding: 20px; }
.score-card h2 { margin: 0; font-family: "Arial Narrow",sans-serif; }
.score-ring { display: grid; width: 160px; height: 160px; place-items: center; margin: 26px auto; border: 11px solid #263029; border-top-color: var(--green); border-right-color: var(--green); border-bottom-color: #57c987; border-radius: 50%; transform: rotate(12deg); box-shadow: 0 0 28px rgba(64,229,139,.1); }
.score-ring span { transform: rotate(-12deg); font-family: "Arial Narrow",sans-serif; font-size: 40px; font-weight: 900; }
.score-ring small { color: var(--muted); font-size: 13px; }
.score-card ul { margin: 0; padding: 0; list-style: none; }
.score-card li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.score-card li span { color: var(--muted); }
.score-card li strong { color: var(--green); }

.settings-grid { display: grid; grid-template-columns: 1.1fr 1fr .8fr; gap: 14px; }
.settings-card { padding: 18px; }
.settings-card h3 { margin: 0 0 15px; font-family: "Arial Narrow",sans-serif; font-size: 18px; }
.settings-card label { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.settings-card label span { display: flex; flex-direction: column; }
.settings-card label strong { font-size: 12px; }
.settings-card label small { color: var(--muted); font-size: 10px; }
.settings-card input { accent-color: var(--green); }
.ownership-list { margin: 0; }
.ownership-list div { padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.ownership-list dt { color: var(--muted); font-size: 10px; }
.ownership-list dd { margin: 2px 0 0; font-size: 12px; font-weight: 700; }
.settings-card.boundary { border-color: rgba(242,185,63,.24); }
.settings-card.boundary ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 11px; }
.settings-card.boundary li { margin: 9px 0; }

.legal-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 20px 0; padding: 12px 15px; border: 1px solid rgba(242,185,63,.17); border-radius: 10px; background: rgba(242,185,63,.035); color: var(--muted); font-size: 10px; }
.legal-strip strong { color: var(--gold); letter-spacing: .08em; }

.drawer, .synthia-panel { position: fixed; top: 0; right: 0; z-index: 80; width: min(440px,100vw); height: 100vh; transform: translateX(105%); border-left: 1px solid var(--line); background: #101411; box-shadow: -24px 0 70px rgba(0,0,0,.4); transition: transform .25s ease; }
.drawer.is-open, .synthia-panel.is-open { transform: translateX(0); }
.drawer > header, .synthia-panel > header { display: flex; min-height: 76px; align-items: center; gap: 11px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer > header > div:first-child { flex: 1; }
.drawer h2 { margin: 0; font-family: "Arial Narrow",sans-serif; font-size: 20px; }
.close-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 23px; }
.panel-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.62); backdrop-filter: blur(2px); }
.drawer-content { padding: 18px; }
.drawer-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.drawer-summary div { display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.drawer-summary span { color: var(--muted); font-size: 9px; }
.drawer-summary strong { margin-top: 3px; font-size: 12px; }
.drawer-section { margin-top: 18px; }
.drawer-section h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.drawer-section ul { margin: 0; padding: 0; list-style: none; }
.drawer-section li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.drawer-section li strong { color: var(--text); }

.synthia-panel { display: flex; flex-direction: column; }
.synthia-panel > header > div:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.synthia-panel > header strong { font-family: "Arial Narrow",sans-serif; font-size: 18px; letter-spacing: .08em; }
.synthia-panel > header small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.synthia-panel > header small i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.synthia-avatar { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(64,229,139,.35); border-radius: 50%; background: radial-gradient(circle,#235335,#102419); color: var(--green); font-weight: 900; box-shadow: 0 0 16px rgba(64,229,139,.12); }
.synthia-context { display: flex; flex-direction: column; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); background: rgba(64,229,139,.035); }
.synthia-context span { color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.synthia-context strong { margin-top: 2px; font-size: 11px; }
.chat-log { display: flex; flex: 1; flex-direction: column; gap: 10px; overflow-y: auto; padding: 18px; }
.chat-message { max-width: 88%; padding: 11px 13px; border-radius: 13px; font-size: 12px; }
.chat-message.assistant { align-self: flex-start; border: 1px solid rgba(64,229,139,.2); background: rgba(21,86,51,.3); }
.chat-message.user { align-self: flex-end; border: 1px solid #39413b; background: #252b27; }
.quick-questions { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 13px; border-top: 1px solid var(--line-soft); }
.quick-questions button { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 9px; }
.quick-questions button:hover { border-color: rgba(64,229,139,.35); color: var(--green); }
.chat-form { padding: 13px; border-top: 1px solid var(--line); }
.chat-form label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.chat-form > div { display: flex; gap: 7px; }
.chat-form input { min-width: 0; flex: 1; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #0b0e0c; color: var(--text); }
.chat-form button { width: 43px; border: 1px solid var(--green); border-radius: 9px; background: var(--green); color: #07130c; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 120; max-width: 340px; padding: 12px 15px; transform: translateY(25px); border: 1px solid rgba(64,229,139,.28); border-radius: 10px; background: #17251c; color: #eafff1; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.mobile-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.66); }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .5; } }

@media (max-width: 1180px) {
  :root { --sidebar: 218px; }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
  .metric-card:nth-child(4), .metric-card:nth-child(5) { min-height: 104px; }
  .overview-grid { grid-template-columns: 1fr; }
  .synthia-now { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: auto auto auto; align-items: center; }
  .synthia-now .panel-head { grid-column: 1 / -1; }
  .synthia-orbit { grid-column: 1; grid-row: 2 / 4; }
  .synthia-stat-grid { grid-column: 2; grid-row: 2; padding-top: 14px; }
  .synthia-actions { grid-column: 2; grid-row: 3; }
  .passport-grid { grid-template-columns: 1fr 1.2fr; }
  .scan-feed { grid-column: 1 / -1; min-height: 250px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-card.boundary { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --sidebar: 248px; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main-stage { margin-left: 0; }
  .menu-button { display: block; }
  .profile-button { min-width: 48px; width: 48px; padding: 7px; }
  .profile-button > span:nth-child(2), .profile-button > i { display: none; }
  .lower-grid, .quality-grid, .inbox-layout, .distribution-grid, .analytics-grid { grid-template-columns: 1fr; }
  .passport-grid { grid-template-columns: 1fr; }
  .scan-feed { grid-column: auto; }
  .insight-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card.boundary { grid-column: auto; }
}

@media (max-width: 680px) {
  .topbar { min-height: 88px; padding: 12px; }
  .title-wrap h1 { font-size: 20px; letter-spacing: .03em; }
  .title-wrap .eyebrow { display: none; }
  .live-context { margin-top: 4px; }
  .live-context em { display: none; }
  .live-pill { min-width: auto; width: 44px; height: 44px; justify-content: center; padding: 0; }
  .live-pill span { display: none; }
  .icon-button { display: none; }
  .view-panel { padding: 12px 11px 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 98px; padding: 13px; }
  .metric-card:last-child { grid-column: 1 / -1; }
  .metric-card > strong { font-size: 29px; }
  .overview-grid, .lower-grid { gap: 10px; margin-top: 10px; }
  .stage-summary { grid-template-columns: repeat(3,1fr); }
  .stage-summary div:nth-child(4), .stage-summary div:nth-child(5) { display: none; }
  .batch-row { grid-template-columns: 78px 1fr auto; min-height: 76px; padding: 10px 12px; }
  .batch-row .batch-stage, .batch-row .status-chip { display: none; }
  .synthia-now { display: block; }
  .synthia-orbit { margin-top: 18px; }
  .synthia-stat-grid { padding-top: 0; }
  .bar-chart { gap: 5px; }
  .section-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .search-field { min-width: 0; width: 100%; }
  .section-toolbar .primary-button, .section-toolbar .secondary-button, .section-toolbar .select-control { width: 100%; }
  .donut-row { grid-template-columns: 1fr; justify-items: center; }
  .legend { width: 100%; }
  .route-line { grid-template-columns: 1fr; gap: 0; }
  .route-line li { min-height: 76px; flex-direction: row; gap: 12px; text-align: left; }
  .route-line li::before { top: auto; bottom: 50%; left: 17px; width: 2px; height: 100%; }
  .route-line li div { margin-top: 0; }
  .location-grid, .insight-grid { grid-template-columns: 1fr; }
  .theme-bars > div, .allocation-bars > div { grid-template-columns: 105px 1fr 34px; gap: 8px; }
  .message { max-width: 88%; }
  .settings-grid { gap: 10px; }
  .legal-strip { margin: 14px 11px 0; }
  .synthia-stat-grid > div { grid-template-columns: 31px 25px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
