/* TrackWize Release Console 3.0 — the app's khaki receipt world: torn paper, receipt type, dotted leaders. */
@font-face { font-family: 'TW Mono'; src: url('/projects/trackwize/dashboard/fonts/TrackWizeMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TW Mono'; src: url('/projects/trackwize/dashboard/fonts/TrackWizeMono-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'TW Mono'; src: url('/projects/trackwize/dashboard/fonts/TrackWizeMono-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'TW Display'; src: url('/projects/trackwize/dashboard/fonts/TrackWizeMono-Display.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'TW Heading'; src: url('/projects/trackwize/dashboard/fonts/TrackWizeHeading-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #F4F0E6;
  --paper: #FBF8F1;
  --line: #D8CFBD;
  --rule: #E3DBCB;
  --perf: #A39C8A;
  --lead: #B8B09E;
  --ink: #28261F;
  --ink-2: #666256;
  --pri: #C2AE83;
  --pri-hover: #B5A074;
  --pri-dark: #8E7A52;
  --pri-text: #6E5C38;
  --pri-soft: #E6DDCA;
  --on-pri: #2B281F;
  --ok: #60745E;
  --warn: #96622B;
  --bad: #B64A43;
  --bad-soft: #F2DCD5;
  --leaf: #28261F;
  --on-leaf: #FBF8F1;
  --frame: #28261F;
  --wash: rgba(194, 174, 131, .3);
  --scrim: rgba(40, 38, 31, .42);
  --lift: rgba(40, 38, 31, .07);
  --shadow: rgba(40, 38, 31, .28);
  --mono: 'TW Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --display: 'TW Display', 'TW Mono', ui-monospace, monospace;
  --heading: 'TW Heading', 'Segoe UI', system-ui, sans-serif;
  --body: 'Segoe UI Variable Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar-width: 248px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #20211D;
  --paper: #292A23;
  --line: #514B3C;
  --rule: #3B3A31;
  --perf: #787260;
  --lead: #5E5A4B;
  --ink: #F7F2E8;
  --ink-2: #CAC3B2;
  --pri-hover: #D0BD93;
  --pri-dark: #E0CC9E;
  --pri-text: #C2AE83;
  --pri-soft: #4A4434;
  --ok: #A9C09C;
  --warn: #D8B675;
  --bad: #F09B91;
  --bad-soft: #4D302C;
  --leaf: #C2AE83;
  --on-leaf: #2B281F;
  --frame: #0E0F0C;
  --wash: rgba(194, 174, 131, .2);
  --scrim: rgba(0, 0, 0, .55);
  --lift: rgba(0, 0, 0, .3);
  --shadow: rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
::selection { background: var(--pri-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--pri-dark); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--heading); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; line-height: 24px; }
h3 { font-size: 15px; line-height: 20px; }
p { margin: 0; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.display { font-family: var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.sub, .section-heading p { color: var(--ink-2); font-size: 13px; }
.note { margin-top: 8px; color: var(--ink-2); font-size: 12.5px; }
* { scrollbar-color: var(--line) transparent; }
.theme-changing *, .theme-changing *::before, .theme-changing *::after { transition: background-color .25s, color .25s, border-color .25s !important; }

/* Buttons and chips */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; background: transparent; font-weight: 600; white-space: nowrap; text-decoration: none; transition: background .15s, border-color .15s, transform .12s; }
.button:active:not(:disabled) { transform: scale(.98); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button svg { width: 17px; height: 17px; }
.button.primary { background: var(--pri); color: var(--on-pri); }
.button.primary:hover:not(:disabled) { background: var(--pri-hover); }
.button.secondary { border-color: var(--line); color: var(--ink); }
.button.secondary:hover:not(:disabled) { background: var(--pri-soft); }
.button.quiet { color: var(--pri-text); padding: 0 12px; }
.button.quiet:hover:not(:disabled) { background: var(--wash); }
.button.danger { color: var(--bad); padding: 0 12px; }
.button.danger:hover:not(:disabled) { background: var(--bad-soft); }
.button.small { min-height: 34px; padding: 0 13px; font-size: 13px; }
.button.large { min-height: 48px; padding: 0 22px; font-size: 15px; }
.button.full-width { width: 100%; }
.text-button { border: 0; background: none; padding: 6px 8px; border-radius: 6px; color: var(--pri-text); font-weight: 600; }
.text-button:hover { background: var(--wash); }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink-2); transition: background .15s, color .15s; }
.icon-button:hover { background: var(--pri-soft); color: var(--ink); }
.chip, .state-badge, .check-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border: 1px solid currentColor; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip svg, .check-chip svg { width: 13px; height: 13px; }
.chip-khaki { color: var(--pri-text); }
.chip-warn, .state-badge.draft, .check-chip.warn { color: var(--warn); }
.state-badge.published, .check-chip.ok { color: var(--ok); }
.state-badge.archived, .check-chip.muted, .state-badge.earlier { color: var(--ink-2); }
.check-chip.error { color: var(--bad); }

/* Receipt paper: torn top and bottom, outline from a hairline drop shadow */
.paper { position: relative; margin: 7px 0; padding: 22px 28px 24px; background: var(--paper); filter: drop-shadow(0 0 .6px var(--perf)) drop-shadow(0 8px 12px var(--lift)); }
.paper::before, .paper::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background-repeat: repeat-x; background-size: 12px 6px; }
.paper::before { top: -6px; background-image: conic-gradient(from 135deg at 50% 0, var(--paper) 90deg, transparent 0); }
.paper::after { bottom: -6px; background-image: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0); }
.paper-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.receipt-head { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; }
.receipt-head strong { color: var(--ink); font-family: var(--mono); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.receipt-head .mono { margin-left: auto; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.lines { margin-top: 6px; }
.line { display: flex; align-items: baseline; gap: 10px; min-height: 42px; padding: 10px 0; }
.line::after { content: ""; order: 1; flex: 1; min-width: 16px; border-bottom: 2px dotted var(--lead); transform: translateY(-4px); }
.line > :first-child { flex: none; color: var(--ink-2); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.line > :last-child { order: 2; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.line .mono { font-size: 12.5px; }
.rule-double { height: 5px; margin: 10px 0 18px; border-top: 1.5px dashed var(--perf); border-bottom: 1.5px dashed var(--perf); }
.rule { margin: 10px 0; border-top: 1.5px dashed var(--perf); }
.receipt-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.receipt-total > span { font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }
.receipt-total strong { font-size: 32px; line-height: 40px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.offline { background: var(--bad); }
.dot.unknown { background: var(--perf); }

/* Sign in */
.auth-screen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-leaf { position: relative; display: flex; flex-direction: column; padding: 40px 56px; background: #28261F; color: #FBF8F1; }
.auth-leaf::after { content: ""; position: absolute; top: 24px; bottom: 24px; right: -1px; border-right: 2px dashed #A39C8A; }
.brand-lockup { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-lockup .logo { width: 38px; height: 38px; }
.brand-lockup strong { display: block; font-family: var(--heading); font-size: 17px; line-height: 20px; }
.brand-lockup small { display: block; font-size: 12px; color: var(--ink-2); }
.auth-leaf .brand-lockup small { color: #CAC3B2; }
.auth-pitch { margin: auto 0; max-width: 520px; }
.auth-pitch h1 { font-size: clamp(38px, 4.4vw, 56px); line-height: 1.05; }
.auth-pitch p { margin-top: 18px; max-width: 44ch; color: #CAC3B2; font-size: 16px; line-height: 25px; }
.auth-points { list-style: none; margin: 28px 0 0; padding: 0; }
.auth-points li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #3B3A31; }
.auth-points li:last-child { border-bottom: 1px solid #3B3A31; }
.auth-points svg { color: #C2AE83; }
.auth-version { color: #B1AA99; font-size: 12px; }
.auth-form-panel { display: flex; flex-direction: column; padding: 32px 56px; }
.auth-form-top { display: flex; align-items: center; justify-content: space-between; }
.auth-form-top .brand-lockup { visibility: hidden; }
.auth-form { width: 100%; max-width: 400px; margin: auto; display: flex; flex-direction: column; }
.auth-form .chip { align-self: flex-start; }
.auth-form h2 { margin-top: 16px; font-size: 32px; line-height: 38px; }
.auth-sub { margin: 4px 0 24px; color: var(--ink-2); }
.auth-form label { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.auth-form input { margin-bottom: 16px; }
.password-field { position: relative; }
.password-field input { padding-right: 70px; }
.input-action { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--pri-text); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--ink-2); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1.5px dashed var(--perf); }
.demo-note { margin-top: 8px; text-align: center; color: var(--ink-2); font-size: 12.5px; }
.auth-assurance { display: flex; gap: 12px; align-items: flex-start; width: 100%; max-width: 400px; margin: 0 auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.auth-assurance svg { color: var(--pri-dark); }
.auth-assurance strong { color: var(--ink); }

/* Forms */
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--pri-dark); box-shadow: 0 0 0 3px var(--wash); }
input::placeholder, textarea::placeholder { color: var(--ink-2); opacity: .85; }
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--pri-dark); flex: none; }
input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.field label span { font-weight: 400; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.field-hint { display: flex; align-items: center; gap: 8px; margin-top: -4px; color: var(--ink-2); font-size: 12.5px; }
.character-count { margin-top: 4px; text-align: right; color: var(--ink-2); font-size: 11.5px; }
.choice { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: background .15s, border-color .15s; }
.choice:hover { background: var(--wash); }
.choice:has(input:checked) { border-color: var(--pri-dark); background: var(--wash); }
.choice-warn:has(input:checked) { border-color: var(--warn); }
.choice strong { display: block; font-size: 13.5px; }
.choice small { display: block; color: var(--ink-2); font-size: 12.5px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding-top: 4px; }
.form-message { color: var(--ink-2); font-size: 13px; }
.form-message.error { color: var(--bad); }
.form-message.success { color: var(--ok); }

/* Shell */
.app-shell { position: relative; display: flex; height: 100vh; overflow: hidden; }
.sidebar { position: relative; z-index: 30; width: var(--sidebar-width); flex: none; display: flex; flex-direction: column; overflow: hidden; border-right: 1px solid var(--line); background: var(--bg); transition: margin-left .3s var(--ease), visibility 0s 0s; }
.sidebar-brand { padding: 20px 18px 16px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; }
.nav-section { padding: 16px 12px 6px; color: var(--ink-2); font-size: 12px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); text-align: left; font-weight: 500; white-space: nowrap; transition: background .18s, color .18s; }
.nav-link:hover { background: var(--wash); color: var(--ink); }
.nav-link.is-active { background: var(--pri-soft); color: var(--ink); font-weight: 600; }
.nav-link.is-active svg { color: var(--pri-dark); }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--pri); color: var(--on-pri); font-size: 11px; line-height: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.environment-line { display: flex; align-items: center; gap: 8px; }
.console-version { display: block; margin-top: 4px; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.connection-dot.offline { background: var(--bad); }
.connection-dot.checking { background: var(--warn); animation: breathe 1.4s ease-in-out infinite; }
.sidebar-edge-toggle { position: absolute; top: 50%; left: var(--sidebar-width); z-index: 31; width: 20px; height: 44px; margin-top: -22px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: var(--bg); color: var(--ink-2); transition: left .3s var(--ease), background .15s, color .15s; }
.sidebar-edge-toggle:hover { background: var(--pri-soft); color: var(--ink); }
.sidebar-edge-toggle svg { width: 14px; height: 14px; stroke-width: 2; transition: transform .3s var(--ease); }
.sidebar-off .sidebar { margin-left: calc(-1 * var(--sidebar-width) - 1px); visibility: hidden; transition: margin-left .3s var(--ease), visibility 0s .3s; }
.sidebar-off .sidebar-edge-toggle { left: 0; border-left: 1px solid var(--line); }
.sidebar-off .sidebar-edge-toggle svg { transform: rotate(180deg); }
.sidebar-scrim { position: absolute; inset: 0; z-index: 25; background: var(--scrim); animation: fade .2s ease-out; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { flex: none; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.topbar-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-title h1 { font-size: 24px; line-height: 30px; }
.topbar-title p { color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.last-refreshed { color: var(--ink-2); font-size: 12px; white-space: nowrap; }
.workspace-switcher { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-weight: 600; }
.workspace-switcher .logo { width: 26px; height: 26px; }
.theme-switcher { position: relative; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 160px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 8px 14px -10px var(--shadow); }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.theme-menu button:hover { background: var(--wash); }
.theme-choice-check { margin-left: auto; opacity: 0; }
.theme-menu button[aria-pressed="true"] .theme-choice-check { opacity: 1; color: var(--pri-dark); }
.workspace-scroll { flex: 1; overflow: auto; padding: 28px 28px 56px; }
.workspace-view { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.workspace-view[hidden] { display: none; }
.workspace-view.is-entering { animation: viewIn .32s var(--ease); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

/* Overview */
.overview-top, .overview-bottom { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.overview-side { display: flex; flex-direction: column; gap: 22px; }
.live-hero { display: flex; align-items: baseline; gap: 14px; margin: 14px 0 6px; border-radius: 6px; }
.live-hero .display { font-size: 68px; line-height: 1; }
.live-hero .mono { color: var(--ink-2); font-size: 13px; }
.receipt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.empty-receipt { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 0 4px; }
.empty-receipt p { max-width: 46ch; color: var(--ink-2); }
.compare { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 16px 0 8px; }
.compare > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 6px; }
.compare > div.is-draft { border-color: var(--pri-dark); background: var(--wash); }
.compare small { color: var(--ink-2); font-size: 12px; }
.compare > div.is-draft small { color: var(--pri-text); }
.compare strong { font-family: var(--display); font-size: 28px; line-height: 34px; letter-spacing: -.03em; }
.compare > svg { color: var(--ink-2); }
.check-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 13.5px; animation: printIn .42s var(--ease) both; animation-delay: calc(var(--check-index, 0) * 55ms); }
.check-list li svg { width: 16px; height: 16px; margin-top: 1px; color: var(--ok); }
.check-list li.warn svg { color: var(--warn); }
.check-list li.error svg { color: var(--bad); }
.next-meta { color: var(--ink-2); font-size: 12px; }
.release-path { padding-top: 24px; border-top: 1px solid var(--line); }
.stations { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.stations::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 23px; border-top: 1.5px dashed var(--perf); }
.station { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; border: 0; background: none; text-align: center; }
.station-icon { position: relative; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--pri-dark); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.station:hover .station-icon { transform: translateY(-2px); }
.station.is-selected .station-icon { background: var(--pri-soft); border-color: var(--pri-dark); }
.station-live.is-live .station-icon { color: var(--ok); border-color: var(--ok); }
.station-live.is-live .station-icon::after { content: ""; position: absolute; inset: -5px; border: 1.5px solid var(--ok); border-radius: 50%; opacity: 0; animation: ring 2.8s ease-out infinite; }
.station strong { font-size: 13.5px; }
.station small { color: var(--ink-2); font-size: 12px; }
.path-insight { min-height: 21px; max-width: 68ch; margin: 16px auto 0; text-align: center; color: var(--ink-2); font-size: 13.5px; }
.activity-day { display: flex; justify-content: space-between; padding: 16px 0 6px; border-bottom: 1.5px dashed var(--perf); color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.activity-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 11px 0; }
.activity-row time { padding-top: 2px; color: var(--ink-2); font-size: 12px; }
.activity-row strong { display: block; font-weight: 600; }
.activity-row small { display: block; color: var(--ink-2); font-size: 12.5px; }
.size-list { margin-top: 10px; }
.size-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; align-items: center; gap: 12px; padding: 6px 0; font-size: 12px; }
.size-track { height: 8px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.size-track span { display: block; height: 100%; background: var(--pri); transform-origin: left; animation: grow .7s var(--ease) both; }
.size-row.is-live .size-track span { background: var(--ok); }
.size-row > :last-child { text-align: right; color: var(--ink-2); }

/* Empty states */
.empty-state { display: grid; place-items: center; padding: 28px 12px; text-align: center; }
.empty-symbol { width: 44px; height: 44px; margin: 0 auto 10px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--pri-dark); }
.empty-state h3 { font-size: 15px; }
.empty-state p { margin-top: 4px; color: var(--ink-2); font-size: 13px; }

/* Release composer */
.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 40px; align-items: start; }
.step { margin: 0 0 30px; padding: 0; border: 0; min-width: 0; }
.step legend { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 0; font-family: var(--heading); font-size: 17px; }
.step-num { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--pri-text); font-size: 12px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 20px; border: 1.5px dashed var(--perf); border-radius: 8px; background: var(--paper); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-dragging { border-color: var(--pri-dark); background: var(--wash); }
.dropzone-icon { color: var(--pri-dark); margin-bottom: 6px; }
.dropzone > span:not(.dropzone-icon) { color: var(--ink-2); font-size: 13px; }
.selected-file { margin-top: 8px; padding: 4px 10px; border: 1px solid var(--pri-dark); border-radius: 6px; color: var(--ink) !important; }
.upload-progress { margin-top: 12px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.progress-track { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--pri-dark); transition: width .2s; }
.composer-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 14px; }
.panel-label { font-size: 13px; font-weight: 600; }
.preview-note { text-align: center; color: var(--ink-2); font-size: 12.5px; }
.checklist { padding: 14px 18px; }
.checklist ul { list-style: none; margin: 6px 0 0; padding: 0; }
.checklist li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist svg { width: 16px; height: 16px; color: var(--ok); }

/* Phone preview: the app's receipt pop-up */
.phone-preview { width: 288px; margin: 0 auto; border: 9px solid var(--frame); border-radius: 36px; background: var(--bg); overflow: hidden; box-shadow: 0 22px 40px -22px var(--shadow); }
.phone-screen { position: relative; height: 540px; padding: 34px 16px 0; }
.fake-title { display: block; width: 92px; height: 14px; border-radius: 3px; background: var(--line); }
.fake-leaf { display: flex; gap: 10px; margin-top: 16px; }
.fake-leaf i { width: 64px; height: 64px; border-radius: 4px; background: var(--leaf); }
.fake-leaf span { flex: 1; display: flex; flex-direction: column; gap: 7px; padding-top: 6px; }
.fake-leaf b, .fake-slip b { display: block; height: 8px; border-radius: 2px; background: var(--line); }
.fake-leaf b + b { width: 60%; }
.fake-slip { margin-top: 16px; padding: 6px 12px 14px; background: var(--paper); border: 1px solid var(--line); }
.fake-slip b { margin-top: 12px; }
.fake-slip b:nth-child(2) { width: 70%; }
.phone-backdrop { position: absolute; inset: 0; display: flex; align-items: center; padding: 16px; background: rgba(0, 0, 0, .58); }
.pop-receipt { position: relative; width: 100%; padding: 14px 18px 12px; background: var(--paper); font-family: var(--mono); filter: drop-shadow(0 0 .6px var(--perf)) drop-shadow(0 14px 22px rgba(0, 0, 0, .35)); }
.pop-receipt::before, .pop-receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 5px; background-repeat: repeat-x; background-size: 10px 5px; }
.pop-receipt::before { top: -5px; background-image: conic-gradient(from 135deg at 50% 0, var(--paper) 90deg, transparent 0); }
.pop-receipt::after { bottom: -5px; background-image: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0); }
.pop-brand { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; }
.pop-sub { margin-top: 3px; text-align: center; color: var(--ink-2); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; }
.pop-rule { margin: 10px 0; border-top: 1.5px dashed var(--perf); }
.pop-rule.double { height: 4px; border-bottom: 1.5px dashed var(--perf); }
.pop-receipt h3 { margin-bottom: 6px; font-family: var(--mono); font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; overflow-wrap: anywhere; }
.pop-line { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; color: var(--ink-2); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; }
.pop-line i { flex: 1; border-bottom: 2px dotted var(--lead); transform: translateY(-3px); }
.pop-line b { color: var(--ink); }
.pop-receipt p { max-height: 120px; overflow: hidden; color: var(--ink-2); font-size: 11px; line-height: 17px; white-space: pre-line; overflow-wrap: anywhere; }
.pop-button { display: grid; place-items: center; min-height: 40px; border-radius: 26px; background: var(--pri); color: var(--on-pri); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pop-later { display: block; padding-top: 9px; text-align: center; color: var(--ink-2); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Tables */
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.segmented button { height: 36px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink-2); font-size: 13px; }
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--pri-soft); color: var(--ink); font-weight: 600; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; color: var(--ink-2); }
.search-field input { min-height: 36px; width: 230px; padding: 6px 12px 6px 34px; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.data-table { width: 100%; min-width: 880px; border-collapse: collapse; font-size: 13.5px; }
.data-table th { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr.is-live td { background: var(--wash); }
.table-primary strong { display: block; font-size: 14px; }
.table-primary small { display: block; max-width: 46ch; color: var(--ink-2); font-size: 12px; overflow-wrap: anywhere; }
.table-muted { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.whats-new-toggle { display: inline-flex; white-space: nowrap; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 12px; }
.whats-new-toggle.is-on { border-color: var(--pri-dark); background: var(--pri-soft); color: var(--ink); }
.whats-new-toggle svg { width: 13px; height: 13px; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; white-space: nowrap; }
.hash-value { font-family: var(--mono); color: var(--ink-2); font-size: 12px; }

/* Security */
.security-summary { display: flex; gap: 16px; align-items: flex-start; max-width: 78ch; }
.security-mark { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--pri-soft); color: var(--pri-dark); }
.security-summary p { margin-top: 4px; color: var(--ink-2); }
.storage-top { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 36px; align-items: start; margin-bottom: 32px; }
.storage-top > section:last-child { padding-top: 8px; }
.state-badge.leftover { color: var(--ink-2); border-style: dashed; }
.data-table .select-cell { width: 44px; padding-right: 0; }
.select-cell input { margin: 0; }
.security-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.security-stack { display: flex; flex-direction: column; gap: 22px; }
.service-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; }
.endpoint-preview { margin: 12px 0 0; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--ink); font-size: 12px; line-height: 1.7; white-space: pre; overflow-x: auto; }
.definition-list { margin: 6px 0 0; }
.definition-list > div { display: flex; align-items: baseline; gap: 10px; min-height: 42px; padding: 10px 0; }
.definition-list > div::after { content: ""; order: 1; flex: 1; min-width: 16px; border-bottom: 2px dotted var(--lead); transform: translateY(-4px); }
.definition-list dt { flex: none; color: var(--ink-2); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.definition-list dd { order: 2; margin: 0; text-align: right; }
.safeguard-list > div { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.safeguard-list > div:last-child { border-bottom: 0; }
.safeguard-list svg { width: 16px; height: 16px; margin-top: 2px; color: var(--ok); }
.safeguard-list strong { display: block; }
.safeguard-list small { display: block; color: var(--ink-2); font-size: 13px; }

/* App picker, dialog, toasts */
.app-picker { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--scrim); }
.app-picker-card { width: min(520px, 100%); }
.app-list { display: flex; flex-direction: column; gap: 8px; }
.app-choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: transparent; text-align: left; }
.app-choice:hover, .app-choice.is-active { border-color: var(--pri-dark); background: var(--wash); }
.app-choice-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #304B40; color: #F4F0E6; font-family: var(--heading); }
.app-choice strong { display: block; }
.app-choice small { display: block; color: var(--ink-2); font-size: 12.5px; }
.app-state { margin-left: auto; color: var(--pri-text); font-size: 12px; font-weight: 600; }
.confirm-dialog { width: min(460px, calc(100% - 32px)); padding: 24px; border: 0; background: var(--paper); color: var(--ink); filter: drop-shadow(0 0 .6px var(--perf)) drop-shadow(0 30px 40px var(--shadow)); overflow: visible; }
.confirm-dialog::before, .confirm-dialog::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background-repeat: repeat-x; background-size: 12px 6px; }
.confirm-dialog::before { top: -6px; background-image: conic-gradient(from 135deg at 50% 0, var(--paper) 90deg, transparent 0); }
.confirm-dialog::after { bottom: -6px; background-image: conic-gradient(from -45deg at 50% 100%, var(--paper) 90deg, transparent 0); }
.confirm-dialog[open] { animation: pop .24s var(--ease); }
.confirm-dialog::backdrop { background: var(--scrim); }
.confirm-dialog h2 { font-size: 21px; line-height: 26px; }
.confirm-dialog p { margin-top: 8px; color: var(--ink-2); }
.confirm-details { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 6px; font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100% - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: var(--leaf); color: var(--on-leaf); box-shadow: 0 18px 36px -16px var(--shadow); animation: rise .32s var(--ease); }
.toast strong { display: block; }
.toast span { display: block; font-size: 13px; opacity: .85; }
.toast .toast-icon svg { width: 20px; height: 20px; }
.toast.error .toast-icon, .toast.warning .toast-icon { color: #F09B91; }
.toast button { margin-left: auto; border: 0; background: transparent; color: inherit; opacity: .7; font-size: 12px; }
.toast-check-path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .4s .1s var(--ease) forwards; }

/* Loading */
.skeleton-block { min-height: 280px; }
.skeleton-lines:empty { min-height: 120px; background: repeating-linear-gradient(var(--paper) 0 18px, var(--rule) 18px 20px, var(--paper) 20px 40px); opacity: .6; }
.is-revealing { animation: printIn .32s var(--ease); }

/* Motion: receipt lines print in; the live receipt reprints after publishing */
.print-in > * { animation: printIn .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.reprint .live-hero { animation: glow 1.6s ease-out .3s both; }
@keyframes printIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes glow { 0% { background: var(--wash); box-shadow: 0 0 0 8px var(--wash); } 100% { background: transparent; box-shadow: 0 0 0 8px transparent; } }
@keyframes ring { 0% { opacity: .7; transform: scale(.92); } 80%, 100% { opacity: 0; transform: scale(1.25); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { opacity: .35; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1080px) {
  .overview-top, .overview-bottom, .composer-grid, .security-grid, .storage-top { grid-template-columns: minmax(0, 1fr); }
  .composer-side { position: static; }
  .last-refreshed { display: none; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: minmax(0, 1fr); }
  .auth-leaf { display: none; }
  .auth-form-panel { padding: 24px 16px; }
  .auth-form-top .brand-lockup { visibility: visible; }
  .sidebar, .sidebar-off .sidebar { position: absolute; top: 0; bottom: 0; left: 0; width: 280px; margin-left: 0; visibility: hidden; transform: translateX(-100%); transition: transform .3s var(--ease), visibility 0s .3s; box-shadow: 12px 0 32px -18px var(--shadow); }
  .sidebar.is-open { visibility: visible; transform: none; transition: transform .3s var(--ease), visibility 0s 0s; }
  .sidebar-edge-toggle { display: none; }
  .topbar { gap: 10px; min-height: 64px; padding: 10px 16px; }
  .topbar-title h1 { font-size: 20px; line-height: 26px; }
  .topbar-title p, .hide-small, .workspace-switcher span, .demo-badge { display: none; }
  .workspace-switcher { padding: 0 6px; }
  .workspace-scroll { padding: 20px 16px 40px; }
  .workspace-view { gap: 24px; }
  .paper { padding: 18px 20px 20px; }
  .live-hero .display { font-size: 52px; }
  .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .stations::before { display: none; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .search-field, .search-field input { width: 100%; }
  .toast-region { right: 16px; bottom: 16px; }
}
.receipt-head .check-chip { margin-left: auto; }

/* Portfolio demo: no account, workspace or sign-out controls. */
#logout, #securityLogout, #switchApp, #appPicker, #authScreen { display: none !important; }
