/* Compatibility layer for the screens that are not rebuilt on the new system yet
   (company, billing, checkout, market, support, ops console, meetings, chat, import, the design page,
   their shared dialog and the uploads panel). Team, project settings, profile, activity, updates, search and
   tasks moved to the new system in stage F3 (koma-pages.css).
   Their layout stays in app.css; here the old variables are re-mapped to the approved tokens of koma.css and a few
   components are restyled, so these screens belong visually to the same product: light neutrals, one blue,
   brand-blue primary buttons, hairlines, Heebo, radii 4 / 6 / 8 / 12, no card shadows. Not a rewrite.
   Stage B (2026-10-25): company, billing, checkout, onboarding, market, support, meetings, chat and import moved to
   the design system itself (koma-pages.css). What still renders here is the operators' console (ops) and the
   design reference page; their primary action, active tab and checkboxes are the brand blue too (decision 1).
   The former "blueprint" theme (navy sidebar) is gone: the shell is the new one for every screen. */

:root{
  --bg:var(--c-app); --surface:var(--c-surface); --surface-2:var(--c-subtle); --line:var(--c-line); --line-2:#EEF0F3; --line-strong:var(--c-line-strong);
  --ink:var(--c-ink); --ink-2:var(--c-text-2); --muted:var(--c-text-3); --faint:#7A828D;
  --accent:var(--c-accent); --accent-ink:var(--c-accent-hover); --accent-soft:var(--c-accent-tint); --accent-soft-2:var(--c-hover); --accent-line:var(--c-accent-line); --accent-line-2:#D5E0F8;
  --ok:#1A6B3C; --ok-soft:#EAF6EF; --warn:var(--c-text-2); --warn-soft:var(--c-subtle); --bad:var(--c-return-text); --bad-soft:var(--c-return-tint); --info:var(--c-accent); --info-soft:var(--c-accent-tint);
  --viewer:var(--c-canvas); --art-bg:var(--c-stage); --topbar-bg:var(--c-surface); --scrim:rgba(20,23,26,.4);
  --font:var(--sans); --font-display:var(--sans); --h1-weight:700; --h1-tracking:-.005em;
  --radius:var(--r-lg); --radius-md:var(--r-md); --radius-lg:var(--r-xl); --radius-sm:var(--r-sm);
  --shadow:none; --shadow-lg:var(--e-2);
  --topbar:0px;          /* the page scrolls inside the shell now: sticky offsets start at the top of the scroll area */
}

/* base */
.legacy{font-family:var(--sans);font-size:14px;line-height:1.5;color:var(--c-ink);font-variant-numeric:tabular-nums}
.legacy.view{padding:24px;max-width:1240px;margin:0}
.legacy h1{font-size:20px;line-height:28px;font-weight:700;letter-spacing:-.005em}
.legacy h2,.legacy .h1-like{font-size:16px;line-height:24px;font-weight:600}
.legacy h3{font-size:14px;line-height:20px;font-weight:600}
.legacy .eyebrow{color:var(--c-text-3);font-weight:500;font-size:12px}
.legacy :focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:var(--r-sm)}
.legacy .link{color:var(--c-accent);font-weight:500}
.legacy .small{font-size:12px}
.legacy .project-actions{justify-content:flex-end;margin-bottom:16px}
.legacy .page-head{margin-bottom:16px}
.legacy .page-head.slim{margin:0 0 12px}

/* buttons: one brand-blue primary (brand book p.12, as the rest of the product), quiet secondaries */
.legacy .button{min-height:32px;padding:0 12px;border-radius:var(--r-md);border-color:var(--c-line-strong);font-size:13px;font-weight:500;gap:6px;transition:background var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease)}
.legacy .button:hover:not(:disabled){background:var(--c-hover);border-color:#BFC5CD}
.legacy .button.primary,.legacy .button.success{background:var(--c-accent);border-color:var(--c-accent);color:#fff;box-shadow:none}
.legacy .button.primary:hover:not(:disabled),.legacy .button.success:hover:not(:disabled){background:var(--c-accent-hover);border-color:var(--c-accent-hover)}
.legacy .button.danger{background:var(--c-danger);border-color:var(--c-danger);color:#fff}
.legacy .button.danger:hover:not(:disabled){background:var(--c-danger-hover);border-color:var(--c-danger-hover)}
.legacy .button.danger-ghost{color:var(--c-return-text);border-color:#E7B4AF}
.legacy .button.danger-ghost:hover:not(:disabled){background:var(--c-return-tint);border-color:#DC938C}
.legacy .button.ghost{border-color:transparent;background:transparent;color:var(--c-text-2)}
.legacy .button.ghost:hover:not(:disabled){background:var(--c-hover);border-color:transparent;color:var(--c-ink)}
.legacy .button.small{min-height:28px;padding:0 10px;font-size:12px;border-radius:var(--r-md)}
.legacy .button svg.icon,.legacy .icon-button svg.icon{width:16px;height:16px;stroke-width:1.6}
.legacy .icon-button{width:32px;height:32px;border-radius:var(--r-md);color:var(--c-text-2)}
.legacy .icon-button:hover{background:var(--c-hover);color:var(--c-ink)}
.legacy .icon-button.sm{width:28px;height:28px;border-radius:var(--r-md)}
.legacy button:disabled,.legacy .button[disabled]{opacity:1;background:var(--c-subtle);border-color:var(--c-line);color:var(--c-text-off)}
.legacy .button.ghost:disabled{background:transparent;border-color:transparent}

/* fields */
.legacy input:not([type=checkbox]):not([type=radio]):not([type=file]),.legacy select,.legacy textarea{min-height:36px;padding:6px 10px;border-color:var(--c-line-strong);border-radius:var(--r-md);font-size:13px}
.legacy input:hover,.legacy select:hover,.legacy textarea:hover{border-color:#B4BBC4}
.legacy input:focus,.legacy select:focus,.legacy textarea:focus{border-color:var(--c-accent);box-shadow:0 0 0 3px var(--c-accent-ring)}
.legacy input[type=checkbox],.legacy input[type=radio]{width:16px;height:16px;accent-color:var(--c-accent)}
.legacy .label,.legacy legend{font-size:13px;font-weight:500;color:var(--c-ink)}
.legacy .hint{font-size:12px;color:var(--c-text-3)}
.legacy .form-error{border-radius:var(--r-md);font-size:13px}
.legacy .search input{min-height:32px!important}
.legacy .segmented{padding:2px;gap:2px;border:0;border-radius:var(--r-md);background:var(--c-pressed)}
.legacy .segmented > *{min-height:28px;padding:0 10px;border-radius:var(--r-sm);font-size:13px;font-weight:500;color:var(--c-text-2)}
.legacy .segmented > [aria-pressed=true],.legacy .segmented > .active{background:var(--c-surface);color:var(--c-ink);box-shadow:0 0 0 1px rgba(20,23,26,.08)}

/* indicators: status is a word with a small coloured mark, never a coloured fill (one-blue rule) */
.legacy .badge{padding:0 6px;min-height:20px;border-radius:var(--r-sm);background:var(--c-hover);color:var(--c-text-2);font-size:12px;font-weight:500}
.legacy .badge.ok,.legacy .badge.warn,.legacy .badge.bad,.legacy .badge.muted{background:var(--c-hover);color:var(--c-text-2)}
.legacy .badge.ok svg.icon{color:var(--c-ok)} .legacy .badge.warn svg.icon{color:var(--c-wait)} .legacy .badge.bad svg.icon{color:var(--c-wait)}
.legacy .badge.info{background:var(--c-accent-tint);color:var(--c-accent)}
.legacy .tag{padding:0 6px;min-height:20px;border:0;border-radius:var(--r-sm);background:var(--c-hover);color:var(--c-text-2);font-size:12px;font-weight:500}
.legacy .tag.ok{background:var(--c-hover);color:var(--c-text-2)}
.legacy .counter{background:var(--c-accent)}
.legacy .chip{border-color:var(--c-line-strong)}
.legacy .chip.ok,.legacy .chip.warn{background:var(--c-hover);color:var(--c-text-2)!important}
.legacy .avatar,.legacy .avatar.a0,.legacy .avatar.a1,.legacy .avatar.a2,.legacy .avatar.a3,.legacy .avatar.a4,.legacy .avatar.a5,.legacy .avatar.group{background:var(--c-pressed);color:var(--c-text-2);font-weight:600;letter-spacing:0;width:28px;height:28px;font-size:11px}
.legacy .avatar.sm{width:24px;height:24px;font-size:10px}
.legacy .file-icon,.legacy .file-icon.pdf,.legacy .file-icon.cad,.legacy .file-icon.img{background:var(--c-subtle);color:var(--c-text-2);border-color:var(--c-line);border-radius:var(--r-sm);font-weight:600}
.legacy .ok-text{color:var(--c-text-2)} .legacy .warn-text{color:var(--c-text-2)} .legacy .info-text{color:var(--c-accent)}
.legacy .bell .dot,.legacy .bottom-nav .dot{background:var(--c-accent)}

/* surfaces */
.legacy .panel{border-radius:var(--r-lg);box-shadow:none;margin-bottom:16px}
.legacy .panel-head{padding:12px 16px;min-height:48px}
.legacy .panel-foot{padding:12px 16px}
.legacy .pad{padding:12px 16px} .legacy .pad-block{padding:16px}
.legacy .notice{border-radius:var(--r-lg);border-color:var(--c-line);font-size:13px}
.legacy .notice.info{background:var(--c-accent-tint);border-color:#D5E0F8;color:#173F99}
.legacy .notice.warn,.legacy .notice.ok{background:var(--c-subtle);border-color:var(--c-line-strong);color:var(--c-text-2)}
.legacy .notice.ok > .icon{color:var(--c-ok)}
.legacy .notice.bad{background:var(--c-return-tint);border-color:#F3CFCB;color:var(--c-return-text)}
.legacy .banner.warn{background:var(--c-subtle);color:var(--c-text-2)}
.legacy .stat{border-radius:var(--r-lg);box-shadow:none;padding:12px 16px}
.legacy a.stat:hover{border-color:var(--c-line-strong);transform:none}
.legacy .stat-icon,.legacy .stat-icon.warn,.legacy .stat-icon.bad{background:var(--c-subtle);color:var(--c-text-2);border-radius:var(--r-md)}
.legacy .stat-value{font-size:24px;line-height:32px;font-weight:600;letter-spacing:0}
.legacy .empty > .icon{color:var(--c-text-2);background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--r-lg);width:20px;height:20px;padding:9px}
.legacy .skeleton span{background:var(--c-pressed);animation:k-pulse 1.4s ease-in-out infinite;border-radius:5px}
.legacy .tabs a.active,.legacy .tabs a[aria-current]{color:var(--c-ink);border-color:var(--c-accent)}
.legacy .crumbs.local a{color:var(--c-accent);font-weight:500}
.legacy .callout{background:var(--c-surface)}
.legacy .callout > .icon,.legacy .row-link > .icon{color:var(--c-text-2)}
.legacy .feed li.unseen a{background:var(--c-accent-tint)}
.legacy .row-link:hover,.legacy .feed li a:hover{background:var(--c-hover)}
.legacy .table th{background:var(--c-subtle);color:var(--c-text-3);font-size:12px;font-weight:500}

.legacy form.panel.form:not(.pad-block){padding-bottom:16px}
.legacy form.panel.form:not(.pad-block) > :not(.panel-head):not(.panel-foot){margin-inline:16px}

/* the shared dialog and the uploads panel */
.legacy dialog{border:0;border-radius:var(--r-xl);box-shadow:var(--e-2);color:var(--c-ink)}
.legacy dialog::backdrop{background:rgba(20,23,26,.4)}
.legacy .dialog-head h2{font-size:16px;line-height:24px;font-weight:600}
.legacy .dropzone{border:1px dashed #B4BBC4;border-radius:var(--r-lg);background:var(--c-surface)}
.legacy .dropzone.over{background:var(--c-accent-tint);border-color:var(--c-accent)}
/* the floating uploads panel sits above the action row of the screens that fill the window, never over it */
.legacy .uploads{bottom:72px;border-radius:var(--r-lg);box-shadow:var(--e-1);border:1px solid var(--c-line)}
.legacy progress{accent-color:var(--c-accent)}

/* chat fills what is left under the project header */
.legacy .chat{height:calc(100vh - 264px);margin-top:0}
@media (max-width:900px){
  .legacy.view{padding:16px 16px 24px}
  .legacy .chat{height:calc(100dvh - 196px)}
}
@media (max-width:759px){
  .legacy h1{font-size:20px}
  .legacy .button{min-height:40px}
  .legacy .button.small{min-height:36px}
  .legacy input:not([type=checkbox]):not([type=radio]):not([type=file]),.legacy select,.legacy textarea{min-height:44px;font-size:16px}
  .legacy .uploads{bottom:calc(140px + env(safe-area-inset-bottom))}
}

/* Stage B: the uploads panel is a panel of the system (white head, hairline), not a dark slab (D-7) */
.legacy .uploads header{background:var(--c-surface);color:var(--c-ink);border-bottom:1px solid var(--c-line);font-weight:600}
.legacy .uploads header .icon-button{color:var(--c-text-2)}
.legacy .uploads header .icon-button:hover{background:var(--c-hover);color:var(--c-ink)}
@media (max-width:759px){ .legacy .uploads header .icon-button{width:44px;height:44px} }
