:root {
  color-scheme: dark;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Manrope', system-ui, sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, monospace;
  --canvas: oklch(0.19 0.0025 157.5);
  --surface-panel: oklch(0.215 0.0025 157.5);
  --surface-floating: oklch(0.24 0.0025 157.5);
  --text: oklch(0.95 0.00275 157.5);
  --secondary: oklch(0.798 0.00275 157.5);
  --muted: oklch(0.684 0.00275 157.5);
  --border: oklch(0.95 0.001485 157.5 / 0.075125);
  --border-control: rgb(255 255 255 / 14%);
  --overlay: oklch(0.95 0.00275 157.5 / 0.0328947);
  --selected: oklch(0.95 0.00275 157.5 / 0.0493421);
  --accent: oklch(0.76 0.15 157.5);
  --primary: oklch(0.43627 0.11 157.5);
  --ease: cubic-bezier(0.22,1,0.36,1);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--text); font: 450 13px/1.5 var(--font-body); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(button,a,input,select,textarea,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 32px; padding: 6px 12px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--overlay); color: var(--text); font-size: 12px; font-weight: 500; line-height: 18px; cursor: pointer; box-shadow: 0 1px 2px #0002, inset 0 1px 0 #ffffff04; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease); }
button:hover { background: var(--selected); border-color: #ffffff30; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--primary); border-color: #77dba54d; color: #f2fff8; }
.primary:hover { background: oklch(0.48 0.11 157.5); border-color: #77dba577; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.icon { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 30px; height: 30px; padding: 0; font-size: 20px; color: var(--muted); box-shadow: none; background: transparent; border-color: transparent; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 10; background: var(--surface-floating); padding: 10px 16px; border: 1px solid var(--accent); border-radius: 8px; }
.skip-link:focus { top: 8px; }
#sidebar { position: fixed; z-index: 5; width: 208px; inset: 0 auto 0 0; background: var(--surface-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.brand { height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 20px; color: var(--text); font: 700 18px var(--font-heading); letter-spacing: -.6px; border-bottom: 1px solid var(--border); }
.brand:hover { text-decoration: none; }
.brand-mark { font: 700 27px var(--font-heading); color: var(--accent); }
.brand-label { margin-left: auto; color: var(--muted); border: 1px solid var(--border-control); border-radius: 4px; padding: 2px 4px; font: 400 9px var(--font-mono); letter-spacing: .4px; }
.workspace-label { display: flex; align-items: center; gap: 8px; margin: 24px 12px 21px; }
.workspace-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border-control); background: var(--overlay); font: 600 12px var(--font-heading); }
.workspace-label strong { display: block; font-size: 12px; font-weight: 500; }
.workspace-label small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.private-label { color: var(--muted); font: 400 9px var(--font-mono); margin-left: auto; }
nav { padding: 0 10px; overflow-y: auto; }
.nav-group { color: var(--muted); font: 400 10px var(--font-mono); letter-spacing: .6px; padding: 0 10px; margin: 21px 0 8px; }
.nav-group:first-child { margin-top: 0; }
nav button { width: 100%; display: flex; justify-content: flex-start; min-height: 34px; padding: 7px 10px; margin: 2px 0; gap: 10px; border: 0; background: transparent; color: var(--muted); text-align: left; font-size: 12px; font-weight: 450; box-shadow: none; }
nav button:hover { background: var(--overlay); color: var(--text); }
nav button[aria-current=page] { background: var(--selected); color: var(--text); }
nav button .icon { color: var(--muted); }
nav button[aria-current=page] .icon { color: var(--secondary); }
.nav-count { margin-left: auto; font: 400 10px var(--font-mono); color: var(--muted); }
footer { margin-top: auto; padding: 24px 20px 18px; font-size: 10px; color: var(--muted); }
footer p { font-size: 10px; margin: 4px 0 0; }
footer small { display: block; font-size: 10px; margin-top: 4px; }
.experiment-label { color: var(--secondary); }
.dot { display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.footer-rule { border-top: 1px solid var(--border); margin: 16px 0; }
#main { margin-left: 208px; min-height: 100vh; }
.topbar { height: 48px; padding: 0 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--secondary); min-width: 0; }
.breadcrumb-org, .slash { color: var(--muted); }
#crumb { color: var(--text); white-space: nowrap; }
#auth { font-size: 11px; min-height: 26px; padding: 3px 10px; white-space: nowrap; }
#nav-toggle { display: none; }
.workspace { max-width: 1440px; margin: 0 auto; padding: 32px 40px 24px; outline: none; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 0 0 28px; }
.eyebrow { color: var(--muted); font: 400 10px/16px var(--font-mono); letter-spacing: 1px; margin-bottom: 8px; }
h1 { font: 600 22px/1.333 var(--font-heading); margin: 0; letter-spacing: -.55px; }
p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 6px 0 0; }
h2 { font: 600 16px/1.4 var(--font-heading); letter-spacing: -.25px; margin: 0; }
.intro .primary { flex-shrink: 0; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: var(--surface-panel); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 32px; overflow: hidden; }
.metric { padding: 20px 24px; border-right: 1px solid var(--border); }
.metric:last-child { border-right: 0; }
.metric .label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--secondary); font-size: 12px; }
.metric .label .icon { color: var(--muted); width: 14px; height: 14px; }
.metric .value { font: 500 28px/1.3 var(--font-heading); font-variant-numeric: tabular-nums; margin: 12px 0 4px; letter-spacing: -1px; }
.metric small { color: var(--muted); font-size: 11px; }
.workflow-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.workflow-head p { font-size: 11px; margin: 0; }
.workflow-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 32px; }
.workflow-card { display: flex; align-items: flex-start; text-align: left; gap: 12px; padding: 18px; border-radius: 10px; border: 1px solid var(--border); background: transparent; box-shadow: none; }
.workflow-card .step { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid var(--border-control); border-radius: 7px; color: var(--muted); background: var(--overlay); }
.workflow-card strong { font-size: 12px; font-weight: 500; }
.workflow-card p { font-size: 11px; line-height: 1.6; margin-top: 4px; }
.workflow-card .arrow { margin-left: auto; color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading { display: flex; align-items: center; gap: 8px; }
.section-heading h2 { font-size: 16px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 20px; padding: 0 5px; font: 400 10px var(--font-mono); color: var(--muted); border: 1px solid var(--border); border-radius: 5px; }
.table-controls { display: flex; gap: 8px; }
input, select, textarea { width: 100%; min-height: 34px; border: 1px solid var(--border-control); border-radius: 8px; background: var(--canvas); color: var(--text); padding: 7px 10px; font: 400 13px/18px var(--font-body); max-width: 100%; transition: border-color 160ms var(--ease); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover, select:hover, textarea:hover { border-color: #ffffff38; }
input:disabled, select:disabled { background: var(--overlay); color: var(--muted); opacity: .6; cursor: not-allowed; }
textarea { resize: vertical; min-height: 100px; }
.search-field { position: relative; width: 210px; }
.search-field>span { position: absolute; left: 10px; top: 9px; display: flex; color: var(--muted); pointer-events: none; }
.search-field .icon { width: 14px; height: 14px; }
.search-field input { padding-left: 32px; font-size: 12px; }
.table-controls select { width: 152px; font-size: 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-panel); }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
th { font: 400 10px/16px var(--font-mono); letter-spacing: .7px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--overlay); white-space: nowrap; }
td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--secondary); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff02; }
td:first-child { min-width: 220px; width: 36%; }
td strong { color: var(--text); font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
td small { display: block; color: var(--muted); margin-top: 5px; font-size: 10px; }
td a { font-size: 11px; display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
td a .icon { width: 12px; height: 12px; }
.date-cell, .technical { font: 400 11px/1.6 var(--font-mono); white-space: nowrap; }
.actor-cell { font: 400 11px/1.6 var(--font-mono); overflow-wrap: anywhere; max-width: 200px; }
.badge { display: inline-flex; gap: 5px; align-items: center; border: 1px solid var(--border-control); border-radius: 5px; padding: 2px 7px; color: var(--secondary); background: var(--overlay); font-size: 10px; line-height: 17px; white-space: nowrap; }
.badge::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.pending { background: #b4861710; color: #e6bc69; border-color: #bc933632; }
.badge.approved, .badge.completed { background: #36c38a0c; color: #72d7a9; border-color: #36c38a28; }
.badge.rejected { background: #ea756810; color: #ee9b91; border-color: #ea756828; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { min-height: 26px; padding: 3px 8px; font-size: 11px; }
.action-reject { color: #ee9b91; }
details { max-width: 460px; margin-top: 8px; }
summary { color: var(--muted); cursor: pointer; font-size: 11px; }
details[open] summary { color: var(--secondary); }
details p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; padding: 8px 0 2px; color: var(--secondary); }
.empty-cell { text-align: center; width: auto !important; padding: 0; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 216px; padding: 32px 24px; }
.empty-symbol { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-control); border-radius: 10px; background: var(--overlay); color: var(--muted); margin-bottom: 14px; }
.empty h3 { font-size: 13px; font-weight: 500; color: var(--text); margin: 0; }
.empty p { max-width: 390px; font-size: 12px; margin-top: 5px; }
.empty button { margin-top: 16px; }
.workspace-footnote { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; color: var(--muted); font: 400 9px/1.5 var(--font-mono); letter-spacing: .3px; }
#notice:not(:empty) { padding: 10px 12px; border: 1px solid var(--border-control); background: var(--overlay); border-radius: 8px; margin: 0 0 24px; font-size: 11px; color: var(--secondary); }
#notice[data-tone=error] { border-color: #ea756840; color: #eeaaa1; background: #ea756807; }
dialog { padding: 0; width: 560px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); background: var(--surface-floating); color: var(--text); border: 1px solid var(--border-control); border-radius: 12px; box-shadow: 0 24px 80px #0008; }
dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 24px 20px; border-bottom: 1px solid var(--border); }
.dialog-head .eyebrow { font-size: 9px; margin-bottom: 5px; }
.dialog-head h2 { font-size: 18px; }
.form-body { padding: 4px 24px 20px; }
label { position: relative; display: grid; gap: 7px; font-size: 12px; color: var(--secondary); margin: 16px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { margin-bottom: 0; }
.required { position: absolute; right: 0; top: 0; font-size: 10px; color: var(--muted); }
.form-hint { font-size: 11px; line-height: 1.65; padding-left: 10px; border-left: 2px solid var(--border-control); }
#form-error, #decision-error { color: #ee9b91; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--overlay); }
#decision-record { color: var(--text); margin-top: 16px; }
@media(min-width:1600px) { .workspace { padding-top: 40px; } }
@media(max-width:1100px) { .workspace { padding: 28px 24px 24px; } .topbar { padding: 0 24px; } .metric { padding: 18px; } .workflow-card { padding: 14px; gap: 10px; } .workflow-card .arrow { display: none; } }
@media(max-width:900px) { .workflow-grid { gap: 8px; } .workflow-card .step { display: none; } .metric .label .icon { display: none; } .toolbar { align-items: flex-start; flex-direction: column; gap: 12px; } .table-controls { width: 100%; } .search-field { flex: 1; } .workflow-head p { display: none; } }
@media(max-width:700px) {
  #sidebar { transform: translateX(-100%); transition: transform 180ms var(--ease); width: 240px; }
  body.nav-open #sidebar { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  #nav-backdrop { position: fixed; inset: 0; width: 100%; height: 100dvh; z-index: 4; border: 0; border-radius: 0; background: #0009; padding: 0; }
  #main { margin-left: 0; }
  #nav-toggle { display: inline-flex; flex-shrink: 0; }
  .topbar { height: 56px; padding: 0 16px; gap: 8px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb-org, .breadcrumb-org+.slash { display: none; }
  #crumb { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
  .workspace { padding: 24px 16px; }
  .intro { align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
  .intro p { max-width: 48ch; font-size: 12px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 24px; }
  .metric { padding: 16px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .metric .value { font-size: 26px; margin-top: 8px; }
  .metric .label .icon { display: block; }
  .workflow-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 24px; }
  .workflow-card { align-items: center; padding: 14px; }
  .workflow-card .step, .workflow-card .arrow { display: grid; }
  .workflow-card p { font-size: 11px; }
  .toolbar { gap: 12px; }
  .table-controls select { width: 143px; }
  .search-field { min-width: 0; }
  button, input, select { min-height: 40px; }
  nav button { min-height: 40px; font-size: 13px; }
  #auth, .icon-button { min-height: 40px; }
  .actions button { min-height: 36px; }
  .search-field>span { top: 13px; }
  .workspace-footnote { font-size: 8px; }
  .workspace-footnote span:last-child { display: none; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .dialog-head { padding: 20px; }
  .form-body { padding: 4px 20px 20px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
