/* Koma — styles of the screens that are not rebuilt on the new system yet (company, billing, market, support, ops, meetings,
   chat, tasks, document page, team, import, settings, mailbox). Every rule is scoped to a `.legacy` container, so nothing here
   reaches the new screens (koma.css). Colours, type and radii come from the new tokens through themes.css. */
:root{
  --bg: #f6f6f9; --surface: #fff; --surface-2: #f9f9fb; --line: #e8e8ef; --line-2: #f0f0f5;
  --ink: #1f2236; --ink-2: #4a4e63; --muted: #6f7389; --faint: #9a9db0;
  --accent: #7657d6; --accent-ink: #5b3fc0; --accent-soft: #efeafc; --accent-soft-2: #f6f3fd;
  --ok: #2f7d57; --ok-soft: #e7f4ec; --warn: #9a6200; --warn-soft: #fdf3e1; --bad: #b3314a; --bad-soft: #fbe9ec;
  --info: #2c6aa8; --info-soft: #e8f1fa;
  --line-strong: #d6d6e2; --accent-line: #d9d4ec; --accent-line-2: #e0d7f8; --viewer: #eef0f3; --art-bg: #e6eae7;
  --topbar-bg: rgba(255,255,255,.88); --scrim: rgba(24, 26, 40, .4); --hero-bg: #3f4a4b; --hero-shade-1: rgba(28, 30, 44, .82); --hero-shade-2: rgba(28, 30, 44, .35); --hero-shade-3: rgba(28, 30, 44, .15);
  --font-display: var(--font); --h1-weight: 750; --h1-tracking: -.4px; --radius-lg: 16px; --radius-md: 10px;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(31, 34, 54, .04), 0 4px 16px rgba(31, 34, 54, .04);
  --shadow-lg: 0 18px 48px rgba(31, 34, 54, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arial Hebrew", Arial, "Noto Sans Hebrew", sans-serif;
  --sidebar: 256px; --topbar: 64px;
  color-scheme: light;
}
*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{ margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--font); }
.legacy h1,.legacy h2,.legacy h3,.legacy p,.legacy dl,.legacy dd,.legacy ol,.legacy ul,.legacy figure{ margin: 0; }
.legacy ul,.legacy ol{ padding: 0; list-style: none; }
.legacy h1{ font-family: var(--font-display); font-size: 28px; line-height: 1.25; letter-spacing: var(--h1-tracking); font-weight: var(--h1-weight); }
.legacy h2,.legacy .h1-like{ font-size: 17px; line-height: 1.35; font-weight: 700; }
.legacy .h1-like{ font-size: 21px; }
.legacy h3{ font-size: 15px; font-weight: 650; }
.legacy a{ color: inherit; text-decoration: none; }
.legacy button,.legacy input,.legacy select,.legacy textarea{ font: inherit; color: inherit; }
.legacy button{ cursor: pointer; background: none; border: 0; padding: 0; }
.legacy button:disabled,.legacy .button[disabled]{ cursor: not-allowed; opacity: .55; }
.legacy [aria-busy=true]{ cursor: progress; }
.legacy img{ max-width: 100%; }
.legacy :focus-visible{ outline: 3px solid color-mix(in srgb, var(--accent) 55%, white); outline-offset: 2px; border-radius: 6px; }
.legacy .sr-only{ position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.legacy .skip-link{ position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.legacy .skip-link:focus{ top: 12px; }
.legacy .muted{ color: var(--muted); } .legacy .small{ font-size: 12.5px; } .legacy .tiny{ font-size: 11px; }
.legacy .ok-text{ color: var(--ok); } .legacy .warn-text{ color: var(--warn); } .legacy .bad-text{ color: var(--bad); } .legacy .info-text{ color: var(--info); }
.legacy .eyebrow{ font-size: 11.5px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.legacy .eyebrow.light{ color: rgba(255,255,255,.8); }
.legacy .pad{ padding: 14px 18px; } .legacy .pad-block{ padding: 18px 20px; display: grid; gap: 12px; align-content: start; }
.legacy .stack{ display: grid; gap: 8px; }
.legacy .split{ display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legacy .ellipsis{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; min-width: 0; }
.legacy .plain li{ padding: 6px 0; }
.legacy bdi{ unicode-bidi: isolate; }

.legacy svg.icon{ width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.legacy svg.icon.xs{ width: 14px; height: 14px; }

/* ---------------------------------------------------------------- controls */
.legacy .button{ display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.legacy .button:hover:not(:disabled){ border-color: var(--line-strong); background: var(--surface-2); }
.legacy .button.primary{ background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.legacy .button.primary:hover:not(:disabled){ background: var(--accent-ink); }
.legacy .button.success{ background: var(--ok); border-color: var(--ok); color: #fff; }
.legacy .button.danger{ background: var(--bad); border-color: var(--bad); color: #fff; }
.legacy .button.danger-ghost{ color: var(--bad); border-color: #efc9d1; }
.legacy .button.ghost{ background: transparent; border-color: transparent; color: var(--ink-2); }
.legacy .button.ghost:hover:not(:disabled){ background: var(--accent-soft-2); }
.legacy .button.small{ min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.legacy .button.block{ width: 100%; }
.legacy .icon-button{ display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); color: var(--ink-2); position: relative; flex-shrink: 0; }
.legacy .icon-button:hover{ background: var(--accent-soft-2); color: var(--accent-ink); }
.legacy .icon-button.sm{ width: 32px; height: 32px; border-radius: 8px; }
.legacy .icon-button.primary{ background: var(--accent); color: #fff; } .legacy .icon-button.primary:hover{ background: var(--accent-ink); color: #fff; }
.legacy .icon-button.danger:hover{ color: var(--bad); background: var(--bad-soft); }
.legacy .link{ color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }
.legacy .link:hover{ text-decoration: underline; }
.legacy button.link{ font-size: inherit; }
.legacy input:not([type=checkbox]):not([type=radio]):not([type=file]),.legacy select,.legacy textarea{
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.legacy input[type=date]{ min-width: 0; }
.legacy textarea{ resize: vertical; line-height: 1.5; }
.legacy input:focus,.legacy select:focus,.legacy textarea:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.legacy input[readonly],.legacy input:disabled,.legacy select:disabled,.legacy textarea:disabled{ background: var(--surface-2); color: var(--muted); }
.legacy input[type=checkbox],.legacy input[type=radio]{ width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.legacy select{ appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f7389' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 12px center; padding-left: 32px !important; }
.legacy .form{ display: grid; gap: 14px; }
.legacy .field{ display: grid; gap: 6px; min-width: 0; }
.legacy .label{ font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.legacy .hint{ font-size: 12px; color: var(--muted); }
.legacy .form-error{ color: var(--bad); background: var(--bad-soft); border-radius: 8px; padding: 9px 12px; font-size: 13px; }
.legacy .form-error[hidden]{ display: none; }
.legacy .form-actions{ display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.legacy .form-actions.sticky{ position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 6px; }
.legacy .grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.legacy .grid-3{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.legacy .check{ display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.legacy fieldset{ border: 0; padding: 0; margin: 0; min-width: 0; }
.legacy legend{ font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.legacy .checks > div,.legacy fieldset.checks{ display: grid; gap: 8px; }
.legacy .checks .file-icon{ width: 28px; height: 22px; font-size: 8px; }
.legacy .input-icon{ position: relative; display: flex; align-items: center; min-width: 220px; flex: 1; }
.legacy .input-icon .icon{ position: absolute; inset-inline-start: 12px; color: var(--faint); pointer-events: none; }
.legacy .input-icon input{ padding-inline-start: 38px !important; }
.legacy .input-icon.block{ display: flex; margin-bottom: 10px; }
.legacy .file-button{ position: relative; justify-self: start; }

.legacy .segmented{ display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.legacy .segmented > *{ display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.legacy .segmented > [aria-pressed=true],.legacy .segmented > .active{ background: var(--accent-soft); color: var(--accent-ink); }

.legacy .badge{ display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.legacy .badge svg.icon{ width: 12px; height: 12px; stroke-width: 2.2; }
.legacy .badge.ok{ background: var(--ok-soft); color: var(--ok); } .legacy .badge.warn{ background: var(--warn-soft); color: var(--warn); }
.legacy .badge.bad{ background: var(--bad-soft); color: var(--bad); } .legacy .badge.info{ background: var(--info-soft); color: var(--info); }
.legacy .badge.muted{ background: var(--line-2); color: var(--muted); }
.legacy .tag{ display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.legacy .tag.ok{ background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.legacy .counter{ display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.legacy .chips{ display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.legacy .chips > span{ display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.legacy .chips svg.icon{ width: 15px; height: 15px; }
.legacy .chip{ display: inline-flex !important; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12.5px; color: var(--ink-2) !important; }
.legacy .chip.strong{ font-weight: 650; } .legacy .chip.ok{ background: var(--ok-soft); border-color: transparent; color: var(--ok) !important; font-weight: 650; }
.legacy .chip.warn{ background: var(--warn-soft); border-color: transparent; color: var(--warn) !important; }

.legacy .avatar{ display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; font-size: 12.5px; font-weight: 700; flex-shrink: 0; letter-spacing: -.5px; }
.legacy .avatar.sm{ width: 30px; height: 30px; font-size: 11px; }
.legacy .avatar.a0{ background: var(--accent-soft); color: var(--accent-ink); } .legacy .avatar.a1{ background: #e3f1ea; color: #2f6d4e; } .legacy .avatar.a2{ background: #fcefdc; color: #8a5a00; }
.legacy .avatar.a3{ background: #e5eef9; color: #2c5d91; } .legacy .avatar.a4{ background: #f9e6eb; color: #9e2d45; } .legacy .avatar.a5{ background: #eaeaf1; color: #474b62; }
.legacy .avatar.group{ background: var(--accent-soft); color: var(--accent-ink); }

.legacy .file-icon{ display: inline-grid; place-items: center; width: 38px; height: 44px; border-radius: 7px; font-size: 9.5px; font-weight: 800; letter-spacing: .3px; flex-shrink: 0; direction: ltr;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.legacy .file-icon.pdf{ background: #fdecee; color: #b3314a; border-color: #f7d8dd; }
.legacy .file-icon.cad{ background: #e8f1fa; color: #2c6aa8; border-color: #d4e4f4; }
.legacy .file-icon.img{ background: #e7f4ec; color: #2f7d57; border-color: #d1eadb; }

.legacy .notice{ display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px; line-height: 1.55; margin-bottom: 16px; border: 1px solid transparent; }
.legacy .notice > .icon{ margin-top: 1px; }
.legacy .notice.info{ background: var(--info-soft); color: #1f4a75; } .legacy .notice.warn{ background: var(--warn-soft); color: #6d4600; }
.legacy .notice.ok{ background: var(--ok-soft); color: #20583c; } .legacy .notice.bad{ background: var(--bad-soft); color: #86233a; }
.legacy .notice[hidden]{ display: none; }
.legacy .notice-inline{ display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.legacy .notice-inline.warn{ color: var(--warn); }
.legacy .banner{ display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 28px; font-size: 13px; border-bottom: 1px solid var(--line); }
.legacy .banner.warn{ background: var(--warn-soft); color: #6d4600; }

.legacy .empty{ display: grid; justify-items: center; text-align: center; gap: 8px; padding: 42px 20px; color: var(--muted); }
.legacy .empty > .icon{ width: 34px; height: 34px; color: var(--accent); background: var(--accent-soft-2); padding: 8px; border-radius: 12px; box-sizing: content-box; margin-bottom: 4px; }
.legacy .empty h3{ color: var(--ink); } .legacy .empty p{ max-width: 420px; } .legacy .empty .button{ margin-top: 8px; }
.legacy .skeleton{ display: grid; gap: 14px; padding: 28px 0; }
.legacy .skeleton span{ height: 18px; border-radius: 8px; background: linear-gradient(90deg, var(--line), var(--surface-2), var(--line)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.legacy .skeleton span:nth-child(1){ width: 40%; height: 28px; } .legacy .skeleton span:nth-child(3n){ width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.legacy .boot{ min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 8px; }
.legacy .boot .brand-name{ font-size: 40px; font-weight: 800; color: var(--accent); }

/* ---------------------------------------------------------------- shell */
.legacy .shell{ min-height: 100vh; }
.legacy .sidebar{ position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar); background: var(--surface); border-inline-end: 1px solid var(--line);
  padding: 22px 14px 14px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; z-index: 40; }
.legacy .brand{ display: flex; align-items: center; gap: 10px; padding: 0 10px 16px; }
.legacy .brand-mark{ width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; }
.legacy .brand-mark svg.icon{ width: 22px; height: 22px; stroke-width: 2; }
.legacy .brand-name{ font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1; display: block; }
.legacy .brand small{ display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.legacy .brand .icon-button{ margin-inline-start: auto; }
.legacy .nav-title{ font-size: 11px; font-weight: 700; color: var(--faint); padding: 0 12px; margin: 8px 0 4px; }
.legacy .nav-note{ font-size: 12.5px; color: var(--muted); padding: 4px 12px; }
.legacy .nav-item{ display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-size: 13.5px; font-weight: 550; min-height: 40px; }
.legacy .nav-item span:not(.counter){ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legacy .nav-item:hover{ background: var(--accent-soft-2); color: var(--accent-ink); }
.legacy .nav-item.active{ background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.legacy .nav-item .icon{ color: currentColor; opacity: .85; }
.legacy .project-nav{ border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 6px; }
.legacy .project-switch{ display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); text-align: start; }
.legacy .project-switch:hover{ border-color: var(--line-strong); }
.legacy .project-switch > span:not(.project-dot){ flex: 1; min-width: 0; display: grid; }
.legacy .project-switch strong{ font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy .project-switch small{ font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy .project-switch img{ width: 28px; height: 28px; object-fit: contain; border-radius: 6px; background: #fff; }
.legacy .project-dot{ width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex-shrink: 0; }
.legacy .sidebar-foot{ margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); }
.legacy .me-card{ display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); }
.legacy .me-card:hover{ background: var(--surface-2); }
.legacy .me-card span:last-child{ display: grid; min-width: 0; }
.legacy .me-card strong{ font-size: 13px; } .legacy .me-card small{ font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legacy .page{ margin-inline-start: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.legacy .topbar{ position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.legacy .crumbs{ display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.legacy .crumbs a:hover{ color: var(--accent-ink); }
.legacy .crumbs a:last-child,.legacy .crumbs span:last-child{ color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.legacy .crumbs .sep{ color: var(--faint); }
.legacy .crumbs.local{ margin-bottom: 14px; }
.legacy .crumbs.local a{ display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 600; }
.legacy .search{ margin-inline-start: auto; position: relative; display: flex; align-items: center; width: min(380px, 40vw); }
.legacy .search .icon{ position: absolute; inset-inline-start: 12px; color: var(--faint); pointer-events: none; }
.legacy .search input{ padding-inline-start: 38px !important; background: var(--surface-2) !important; min-height: 40px !important; }
.legacy .bell .dot{ position: absolute; top: 9px; inset-inline-end: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; }
.legacy .avatar-link{ border-radius: 50%; }
.legacy.view{ padding: 28px; width: 100%; max-width: 1360px; margin: 0 auto; flex: 1; outline: none; }
.legacy .only-mobile{ display: none !important; }
.legacy .bottom-nav{ display: none; }
.legacy .scrim{ display: none; }

/* ---------------------------------------------------------------- page layout */
.legacy .page-head{ display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.legacy .page-head.slim{ margin: 22px 0 14px; align-items: center; }
.legacy .page-head p.muted{ margin-top: 4px; }
.legacy .head-actions{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legacy .panel{ background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.legacy .panel-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.legacy .panel-foot{ display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.legacy .columns{ display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.legacy .narrow{ max-width: 720px; }
.legacy .group{ margin-bottom: 26px; } .legacy .group-title{ font-size: 15px; margin-bottom: 12px; color: var(--ink-2); }
.legacy .toolbar{ display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.legacy .toolbar.wrap{ flex-wrap: wrap; }
.legacy .toolbar select{ width: auto; min-width: 150px; }
.legacy .toolbar .date-filter input{ width: 160px; }
.legacy .result-count{ padding: 12px 20px 0; }
.legacy .tabs{ display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.legacy .tabs a{ padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.legacy .tabs a.active,.legacy .tabs a[aria-current]{ color: var(--accent-ink); border-color: var(--accent); }

.legacy .stat-row{ display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.legacy .stat{ display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label icon" "value value" "note note"; gap: 2px 10px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.legacy a.stat:hover{ border-color: var(--accent-line); transform: translateY(-1px); }
.legacy .stat-icon{ grid-area: icon; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--accent-soft-2); color: var(--accent); }
.legacy .stat-icon.warn{ background: var(--warn-soft); color: var(--warn); } .legacy .stat-icon.bad{ background: var(--bad-soft); color: var(--bad); }
.legacy .stat-label{ grid-area: label; font-size: 12.5px; color: var(--muted); font-weight: 600; align-self: center; }
.legacy .stat-value{ grid-area: value; font-size: 30px; font-weight: 750; letter-spacing: -1px; line-height: 1.2; }
.legacy .stat-note{ grid-area: note; font-size: 12px; color: var(--muted); }

.legacy .rows > li{ border-bottom: 1px solid var(--line-2); }
.legacy .rows > li:last-child{ border-bottom: 0; }
.legacy .row-link,.legacy .rows > li.row{ display: flex; align-items: center; gap: 12px; padding: 13px 20px; min-height: 56px; }
.legacy .row-link:hover{ background: var(--surface-2); }
.legacy .row-link > .icon{ color: var(--accent); }
.legacy .row-main{ flex: 1; min-width: 0; display: grid; gap: 1px; }
.legacy .row-main strong{ font-size: 13.5px; overflow-wrap: anywhere; }
.legacy .row-actions{ display: flex; gap: 6px; flex-wrap: wrap; }
.legacy .rows.compact .row-link{ padding: 10px 18px; min-height: 48px; }
.legacy .feed li a{ display: flex; gap: 10px; padding: 11px 18px; align-items: flex-start; }
.legacy .feed li a:hover{ background: var(--surface-2); }
.legacy .feed li a > span:last-child{ display: grid; gap: 1px; min-width: 0; }
.legacy .feed-text{ font-size: 13px; overflow-wrap: anywhere; }
.legacy .feed .event-label{ color: var(--ink-2); }
.legacy .feed.big li{ border-bottom: 1px solid var(--line-2); } .legacy .feed.big li:last-child{ border: 0; }
.legacy .feed li.unseen a{ background: var(--accent-soft-2); }
.legacy .feed li.unseen .feed-text strong::before{ content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; vertical-align: middle; }
.legacy .people li{ display: flex; align-items: center; gap: 10px; padding: 9px 18px; }
.legacy .people li > span:not(.avatar){ flex: 1; display: grid; min-width: 0; }
.legacy .people strong{ font-size: 13px; } .legacy .people small{ font-size: 11.5px; color: var(--muted); }
.legacy .facts{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.legacy .facts.wide{ grid-template-columns: 1fr; }
.legacy .facts dt{ font-size: 11.5px; color: var(--muted); font-weight: 600; }
.legacy .facts dd{ font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.legacy .facts.wide > div{ display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.legacy .callout{ display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: linear-gradient(135deg, var(--accent-soft-2), #fff); }
.legacy .callout > .icon{ width: 30px; height: 30px; color: var(--accent); }
.legacy .callout > div{ flex: 1; }

/* project cards */
.legacy .project-cards{ display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 16px; }
.legacy .project-cards.wide{ padding: 0; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.legacy .project-card{ display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.legacy .project-card:hover{ border-color: var(--accent-line); box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 8%, transparent); transform: translateY(-2px); }
.legacy .project-art{ height: 108px; background: url(/park.svg) center 60% / cover, var(--art-bg); position: relative; }
.legacy .project-card:nth-child(even) .project-art{ background-image: url(/architecture.svg); }
.legacy .project-art .stage{ position: absolute; top: 10px; inset-inline-start: 10px; background: rgba(255,255,255,.94); padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }
.legacy .project-art .company-logo{ position: absolute; bottom: 8px; inset-inline-end: 10px; height: 30px; max-width: 80px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.legacy .project-body{ padding: 14px 16px 16px; display: grid; gap: 4px; }

/* project hero */
.legacy .project-hero{ position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 180px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 24px 28px; margin-bottom: 20px; flex-wrap: wrap; color: #fff; background: var(--hero-bg); }
.legacy .project-hero.compact{ min-height: 0; padding: 16px 22px; margin-bottom: 0; }
.legacy .hero-art{ position: absolute; inset: 0; }
.legacy .hero-art img{ width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.legacy .hero-art::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(to left, var(--hero-shade-1), var(--hero-shade-2) 70%, var(--hero-shade-3)); }
.legacy .hero-text,.legacy .hero-actions{ position: relative; z-index: 1; }
.legacy .hero-text h1{ color: #fff; font-size: 30px; }
.legacy .project-hero.compact h1{ font-size: 20px; }
.legacy .hero-text p{ color: rgba(255,255,255,.86); margin-top: 3px; }
.legacy .project-hero.compact .hero-text p{ font-size: 12.5px; }
.legacy .hero-logo{ height: 34px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 6px; margin-bottom: 8px; }
.legacy .project-hero.compact .hero-logo{ display: none; }
.legacy .hero-actions{ display: flex; gap: 8px; flex-wrap: wrap; }
.legacy .hero-actions .button:not(.primary){ background: rgba(255,255,255,.95); border-color: transparent; color: var(--ink); }
.legacy .hero-actions .icon-button{ background: rgba(255,255,255,.95); color: var(--ink); }

/* ---------------------------------------------------------------- documents */
.legacy .doc-table{ display: grid; container: docs / inline-size; }
.legacy .doc-row{ display: grid; grid-template-columns: minmax(260px, 2.4fr) minmax(110px, 1fr) minmax(170px, 1.2fr) minmax(110px, 1fr) minmax(120px, 1fr) 48px; gap: 12px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--line-2); }
.legacy .doc-row:last-child{ border-bottom: 0; }
.legacy .doc-row.head{ font-size: 11.5px; font-weight: 700; color: var(--faint); padding-block: 10px; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.legacy .doc-row:not(.head):hover{ background: var(--surface-2); }
.legacy .doc-name{ display: flex; align-items: center; gap: 12px; min-width: 0; }
.legacy .doc-name > span{ display: grid; min-width: 0; }
.legacy .doc-title{ font-weight: 650; font-size: 13.5px; overflow-wrap: anywhere; }
.legacy .doc-title:hover{ color: var(--accent-ink); }
.legacy .doc-title::after{ content: ""; position: absolute; inset: 0; }
.legacy .doc-row{ position: relative; }
.legacy .doc-row .doc-actions,.legacy .doc-row a.icon-button{ position: relative; z-index: 1; }
/* The table sits in full-width pages and in narrower columns, so it adapts to its own width, not the viewport's. */
@container docs (max-width: 900px) {
  .legacy .doc-row{ grid-template-columns: minmax(200px, 2fr) minmax(150px, 1.2fr) minmax(100px, 1fr) 48px; }
  .legacy .doc-row .doc-disc,.legacy .doc-row .doc-updated{ display: none; }}
@container docs (max-width: 600px) {
  .legacy .doc-row.head{ display: none; }
  .legacy .doc-row{ grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name act" "latest latest" "appr appr"; gap: 6px 10px; padding: 12px 14px; }
  .legacy .doc-row .doc-name{ grid-area: name; } .legacy .doc-row .doc-actions{ grid-area: act; }
  .legacy .doc-row .doc-latest{ grid-area: latest; padding-inline-start: 50px; } .legacy .doc-row .doc-approved{ grid-area: appr; padding-inline-start: 50px; }}
.legacy .doc-name small{ display: flex; align-items: center; gap: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy .doc-latest{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legacy .vnum{ font-weight: 650; font-size: 12.5px; }
.legacy .doc-approved span{ display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.legacy .doc-updated{ display: grid; font-size: 12.5px; }
.legacy .doc-cards{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 16px; }
.legacy .doc-card{ display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); align-content: start; }
.legacy .doc-card:hover{ border-color: var(--accent-line); box-shadow: var(--shadow); }
.legacy .doc-thumb{ height: 110px; border-radius: 9px; display: grid; place-items: center; background: repeating-linear-gradient(0deg, var(--surface-2) 0 18px, var(--line-2) 18px 19px), repeating-linear-gradient(90deg, transparent 0 18px, var(--line-2) 18px 19px); margin-bottom: 4px; }
.legacy .doc-card-foot{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.legacy .doc-head{ display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.legacy .doc-head-main{ display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1; }
.legacy .doc-head h1{ font-size: 24px; overflow-wrap: anywhere; }
.legacy .doc-layout{ display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
.legacy .viewer{ overflow: hidden; }
.legacy .viewer-head{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.legacy .viewer-body{ background: var(--viewer); min-height: 520px; display: grid; }
.legacy .viewer-body iframe{ width: 100%; height: min(78vh, 900px); border: 0; background: #fff; }
.legacy .viewer-body img{ max-height: 78vh; margin: auto; object-fit: contain; }
.legacy .text-preview{ margin: 0; padding: 24px; white-space: pre-wrap; background: #fff; font: 14px/1.7 var(--font); overflow: auto; max-height: 78vh; }
.legacy .no-preview{ display: grid; justify-items: center; align-content: center; text-align: center; gap: 10px; padding: 40px; }
.legacy .no-preview .file-icon{ width: 64px; height: 76px; font-size: 13px; }
.legacy .no-preview p{ max-width: 420px; }
.legacy .versions li a{ display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.legacy .versions li:last-child a{ border-bottom: 0; }
.legacy .versions li a:hover{ background: var(--surface-2); }
.legacy .versions li.current a{ background: var(--accent-soft-2); box-shadow: inset -3px 0 0 var(--accent); }
.legacy .vbadge{ display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 750; font-size: 13px; flex-shrink: 0; }
.legacy .vtext{ flex: 1; display: grid; gap: 2px; min-width: 0; }
.legacy .vline{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legacy .comments li{ display: flex; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.legacy .comments li > div{ flex: 1; min-width: 0; }
.legacy .comments p{ white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.legacy .comment-form{ display: grid; gap: 8px; padding: 14px 18px; justify-items: end; }
.legacy .review-form .split{ justify-content: flex-end; }
.legacy .notice-panel{ display: flex; gap: 12px; padding: 16px 18px; align-items: flex-start; }
.legacy .notice-panel > .icon{ width: 22px; height: 22px; color: var(--warn); }
.legacy .notice-panel.ok > .icon{ color: var(--ok); } .legacy .notice-panel.bad > .icon{ color: var(--bad); }
.legacy .notice-panel > div{ display: grid; gap: 4px; }
.legacy details.menu{ position: relative; }
.legacy details.menu > summary{ list-style: none; } .legacy details.menu > summary::-webkit-details-marker{ display: none; }
.legacy .menu-list{ position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 20; display: grid; }
.legacy .menu-list > *{ display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; text-align: start; }
.legacy .menu-list > *:hover{ background: var(--surface-2); }

/* upload dialog + queue */
.legacy .dropzone{ display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 18px; border: 2px dashed var(--accent-line); border-radius: 14px; background: var(--accent-soft-2); cursor: pointer; transition: border-color .15s, background .15s; }
.legacy .dropzone:hover,.legacy .dropzone.over{ border-color: var(--accent); background: var(--accent-soft); }
.legacy .dropzone > .icon{ width: 30px; height: 30px; color: var(--accent); }
.legacy .dropzone input{ position: absolute; width: 1px; height: 1px; opacity: 0; }
.legacy .dropzone:focus-within{ outline: 3px solid var(--accent-soft); }
.legacy .upload-list{ display: grid; gap: 10px; }
.legacy .upload-list > li{ border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.legacy .upload-file{ display: flex; align-items: center; gap: 10px; }
.legacy .upload-file > span{ flex: 1; display: grid; min-width: 0; }
.legacy .upload-file strong{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legacy .upload-fields{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.legacy .uploads{ position: fixed; bottom: 18px; inset-inline-end: 18px; width: 360px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
body.has-uploads #main{ padding-bottom: 150px; }
.legacy .uploads header{ display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 6px; background: var(--ink); color: #fff; }
.legacy .uploads header .icon-button{ color: #fff; } .legacy .uploads header .icon-button:hover{ background: rgba(255,255,255,.12); }
.legacy .upload-toggle{ display: flex; align-items: center; gap: 10px; flex: 1; padding: 8px 10px; color: #fff; text-align: start; }
.legacy .upload-toggle strong{ flex: 1; font-size: 13.5px; }
.legacy .uploads ul{ max-height: 300px; overflow-y: auto; }
.legacy .uploads li{ padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; }
.legacy .up-row{ display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.legacy .up-name{ font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legacy .uploads .pct{ font-size: 12px; font-weight: 700; color: var(--accent-ink); }
.legacy .uploads li.done .up-name::before{ content: "✓ "; color: var(--ok); }
.legacy .uploads li.failed{ background: var(--bad-soft); }
.legacy progress{ width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.legacy progress::-webkit-progress-bar{ background: var(--line-2); border-radius: 99px; }
.legacy progress::-webkit-progress-value{ background: var(--accent); border-radius: 99px; transition: width .2s; }
.legacy progress::-moz-progress-bar{ background: var(--accent); }
.legacy .usage{ display: grid; gap: 6px; }

/* ---------------------------------------------------------------- chat */
.legacy .chat{ display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--topbar) - 150px); min-height: 480px; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.legacy .chat-list{ border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); }
.legacy .chat-search{ padding: 12px; border-bottom: 1px solid var(--line); }
.legacy .chat-search .input-icon{ min-width: 0; }
.legacy #conv{ overflow-y: auto; flex: 1; }
.legacy .conv-list a{ display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.legacy .conv-list a:hover{ background: #fff; }
.legacy .conv-list a.active{ background: #fff; box-shadow: inset -3px 0 0 var(--accent); }
.legacy .conv-text{ flex: 1; min-width: 0; display: grid; gap: 1px; }
.legacy .conv-text .split{ flex-wrap: nowrap; }
.legacy .conv-text strong{ font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy .chat-thread{ display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.legacy .chat-head{ display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.legacy .chat-head > div{ display: grid; }
.legacy .chat-privacy{ display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 7px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.legacy .messages{ flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.legacy .day-divider{ text-align: center; margin: 8px 0; }
.legacy .day-divider span{ font-size: 11.5px; color: var(--muted); background: var(--line-2); padding: 3px 10px; border-radius: 99px; }
.legacy .msg{ display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.legacy .msg.mine{ align-self: flex-start; }
.legacy .msg:not(.mine){ align-self: flex-end; flex-direction: row-reverse; }
.legacy .msg:not(.mine){ align-self: flex-start; flex-direction: row; }
.legacy .msg.mine{ align-self: flex-end; }
.legacy .bubble{ background: #fff; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 9px 13px; display: grid; gap: 5px; min-width: 0; }
.legacy .msg.mine .bubble{ background: var(--accent-soft); border-color: var(--accent-line-2); border-radius: 14px 14px 4px 14px; }
.legacy .bubble p{ white-space: pre-wrap; overflow-wrap: anywhere; }
.legacy .bubble p a{ color: var(--accent-ink); text-decoration: underline; }
.legacy .sender{ font-size: 12px; color: var(--accent-ink); }
.legacy .meta{ font-size: 11px; color: var(--muted); display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.legacy .msg.sending{ opacity: .65; } .legacy .msg.failed .bubble{ border-color: #efc9d1; background: var(--bad-soft); }
.legacy .attachment{ display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-md); background: rgba(255,255,255,.8); border: 1px solid var(--line); }
.legacy .attachment:hover{ border-color: var(--accent); }
.legacy .attachment > span{ display: grid; min-width: 0; }
.legacy .attachment small{ display: flex; align-items: center; gap: 4px; font-size: 11.5px; }
.legacy .attachment .file-icon{ width: 32px; height: 38px; font-size: 8.5px; }
.legacy .task-chip{ display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.legacy .composer{ border-top: 1px solid var(--line); padding: 10px 14px; display: grid; gap: 6px; background: #fff; }
.legacy .composer-row{ display: flex; gap: 8px; align-items: flex-end; }
.legacy .composer textarea{ min-height: 42px; max-height: 160px; resize: none; }
.legacy .composer.readonly{ display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 16px 18px; margin: 0; }
.legacy .attach-chip{ display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 12.5px; font-weight: 600; }
.legacy .attach-chip button{ display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.legacy .attach-chip button:hover{ background: rgba(255,255,255,.6); }
.legacy .pick-list{ display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; }
.legacy .pick-list button{ display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius-md); text-align: start; }
.legacy .pick-list button:hover{ background: var(--surface-2); }
.legacy .pick-list button > span{ flex: 1; display: grid; }
.legacy .pick-list .file-icon{ width: 32px; height: 38px; font-size: 8.5px; }

/* ---------------------------------------------------------------- tasks */
.legacy .task-list{ display: grid; }
.legacy .task-list > li{ border-bottom: 1px solid var(--line-2); }
.legacy .task-link{ display: flex; align-items: center; gap: 12px; padding: 13px 20px; }
.legacy .task-link:hover{ background: var(--surface-2); }
.legacy .task-check{ width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); flex-shrink: 0; display: grid; place-items: center; }
.legacy .task.done .task-check{ background: var(--ok); border-color: var(--ok); color: #fff; }
.legacy .task.progress .task-check{ border-color: var(--info); background: linear-gradient(90deg, transparent 50%, var(--info-soft) 50%); }
.legacy .task.done .task-main strong{ color: var(--muted); text-decoration: line-through; }
.legacy .task-main{ flex: 1; min-width: 0; display: grid; }
.legacy .task-meta{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.legacy .due{ display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; }
.legacy .done-group summary{ padding: 12px 20px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.legacy .board{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px; }
.legacy .board-col{ background: var(--surface-2); border-radius: 12px; border: 1px solid var(--line-2); min-width: 0; }
.legacy .board-col header{ display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 12px 14px; }
.legacy .board-col .counter{ background: var(--line); color: var(--ink-2); }
.legacy .board-col .task-list{ gap: 8px; padding: 0 10px 10px; }
.legacy .board-col .task-list > li{ border: 1px solid var(--line); background: #fff; border-radius: var(--radius-md); }
.legacy .board-col .task-link{ padding: 11px 12px; flex-wrap: wrap; }
.legacy .board-col .task-meta{ width: 100%; justify-content: flex-start; padding-inline-start: 32px; }
.legacy .status-pick{ display: flex; gap: 8px; flex-wrap: wrap; }
.legacy .status-pick legend{ width: 100%; }
.legacy .status-pick label{ position: relative; }
.legacy .status-pick input{ position: absolute; opacity: 0; }
.legacy .status-pick span{ display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid var(--line); font-weight: 600; cursor: pointer; }
.legacy .status-pick input:checked + span{ background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.legacy .status-pick input:focus-visible + span{ outline: 3px solid var(--accent-soft); }
.legacy .task-desc{ white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: var(--radius-md); }
.legacy .source-line{ display: flex; align-items: center; gap: 6px; font-size: 13px; }
.legacy details.log summary{ cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.legacy details.log ul{ display: grid; gap: 6px; margin-top: 8px; font-size: 12.5px; }

/* ---------------------------------------------------------------- team */
.legacy .member-list > li{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.legacy .member-list > li:last-child{ border-bottom: 0; }
.legacy .member-main{ display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.legacy .member-main > span{ display: grid; min-width: 0; }
.legacy .member-main small{ overflow: hidden; text-overflow: ellipsis; }
.legacy .member-edit{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.legacy .member-edit input{ width: 150px !important; min-height: 36px !important; }
.legacy .member-edit select{ width: 150px !important; min-height: 36px !important; }
.legacy .member-meta{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legacy .copy-row{ display: flex; gap: 8px; margin: 6px 0 4px; }
.legacy .copy-row input{ flex: 1; font-size: 12.5px; }

/* ---------------------------------------------------------------- meetings */
.legacy .connection .states{ display: grid; gap: 8px; }
.legacy .pipeline{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.legacy .pipeline li{ display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-weight: 600; }
.legacy .pipeline li.on{ background: var(--ok-soft); color: var(--ok); } .legacy .pipeline li.mid{ background: var(--warn-soft); color: var(--warn); }
.legacy .meeting-editor{ display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.legacy .meeting-editor > .editor-main:only-child{ grid-column: 1 / -1; }
.legacy .transcript{ position: sticky; top: calc(var(--topbar) + 12px); max-height: calc(100vh - var(--topbar) - 40px); display: flex; flex-direction: column; }
.legacy .lines{ overflow-y: auto; padding: 8px 0; font-size: 13px; }
.legacy .lines li{ display: flex; gap: 10px; padding: 4px 16px; }
.legacy .lines li.hl{ background: var(--warn-soft); }
.legacy .ln{ color: var(--faint); font-variant-numeric: tabular-nums; min-width: 22px; text-align: end; font-size: 11.5px; padding-top: 2px; }
.legacy .edit-list li{ display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.legacy .edit-list li > input[name=d-text],.legacy .edit-list li > input[name=a-text]{ flex: 1 1 240px; }
.legacy .edit-list select{ width: 150px !important; } .legacy .edit-list input[type=date]{ width: 150px !important; }
.legacy .prose{ white-space: pre-wrap; line-height: 1.8; }

/* ---------------------------------------------------------------- company, billing, onboarding */
.legacy .company-title{ display: flex; gap: 16px; align-items: center; }
.legacy .company-logo-lg{ width: 64px; height: 64px; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid var(--line); padding: 6px; }
.legacy .company-logo-lg.placeholder{ display: grid; place-items: center; color: var(--accent); }
.legacy .logo-edit{ display: flex; gap: 16px; align-items: center; }
.legacy .logo-preview{ width: 76px; height: 76px; border-radius: var(--radius-lg); border: 1px dashed var(--accent-line); background: var(--accent-soft-2); display: grid; place-items: center; color: var(--accent); overflow: hidden; flex-shrink: 0; }
.legacy .logo-preview img{ width: 100%; height: 100%; object-fit: contain; background: #fff; }
.legacy .logo-edit label.button{ position: relative; }
.legacy .plans,.legacy .plan-pick{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.legacy .plan{ display: grid; gap: 8px; align-content: start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); position: relative; cursor: default; }
.legacy .plan-pick .plan{ cursor: pointer; }
.legacy .plan.current,.legacy .plan:has(input:checked){ border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.legacy .plan input[type=radio]{ position: absolute; top: 16px; inset-inline-end: 16px; }
.legacy .price{ font-size: 24px; font-weight: 750; } .legacy .price small{ font-size: 12px; color: var(--muted); font-weight: 500; }
.legacy .plan ul{ display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.legacy .plan ul li{ display: flex; gap: 6px; align-items: center; }
.legacy .steps{ display: flex; gap: 8px; margin-bottom: 18px; counter-reset: step; flex-wrap: wrap; }
.legacy .steps li{ counter-increment: step; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); padding-inline-end: 14px; }
.legacy .steps li::before{ content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); font-size: 12px; }
.legacy .steps li.current{ color: var(--accent-ink); } .legacy .steps li.current::before{ background: var(--accent); color: #fff; }
.legacy .steps li.done::before{ content: "✓"; background: var(--ok-soft); color: var(--ok); }
.legacy .checkout{ display: grid; gap: 0; }
.legacy .provider{ border: 2px dashed var(--accent-line); background: repeating-linear-gradient(-45deg, #fff 0 12px, var(--accent-soft-2) 12px 24px); }
.legacy .result{ display: grid; justify-items: center; text-align: center; gap: 10px; }
.legacy .result > .icon{ width: 44px; height: 44px; }
.legacy .result.ok > .icon{ color: var(--ok); } .legacy .result.bad > .icon{ color: var(--bad); }
.legacy .onboard-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.legacy .big-choice{ padding: 26px; display: grid; gap: 10px; justify-items: start; }
.legacy .big-choice > .icon{ width: 30px; height: 30px; color: var(--accent); }
.legacy .import-table{ max-height: 60vh; overflow-y: auto; }
.legacy .import-row{ display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; cursor: pointer; }
.legacy .import-row.rejected{ opacity: .7; cursor: default; }
.legacy .import-map{ border-bottom: 1px solid var(--line); }
.legacy .import-map h3{ margin: 0 0 4px; font-size: 1rem; }
.legacy .map-list{ display: grid; gap: 8px; margin-top: 10px; }
.legacy .map-row{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.legacy .map-row select{ min-width: 180px; flex: 0 1 240px; }
.legacy .switch-list{ display: grid; gap: 4px; }
.legacy .switch-item{ display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-md); text-align: start; width: 100%; }
.legacy .switch-item:hover{ background: var(--surface-2); }
.legacy .switch-item span{ display: grid; }
.legacy .switch-item small{ color: var(--muted); font-size: 12px; }

/* marketplace */
.legacy .chips-select{ display: flex; gap: 6px; flex-wrap: wrap; }
.legacy .chip-link{ padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.legacy .chip-link.active{ background: var(--ink); border-color: var(--ink); color: #fff; }
.legacy .cards{ display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.legacy .provider-card{ display: grid; gap: 10px; align-content: start; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.legacy .provider-card header{ display: flex; gap: 12px; align-items: center; }
.legacy .provider-logo{ width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft-2); color: var(--accent); display: grid; place-items: center; overflow: hidden; }
.legacy .provider-logo img{ width: 100%; height: 100%; object-fit: contain; }
.legacy .provider-card footer{ display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 4px; }
.legacy .provider-card footer .tag{ margin-inline-end: auto; }

/* ---------------------------------------------------------------- auth */
body.auth-mode{ background: var(--surface); }
.legacy .auth{ display: grid; grid-template-columns: minmax(380px, 520px) 1fr; min-height: 100vh; }
.legacy .auth-form{ display: flex; flex-direction: column; padding: 32px 48px; gap: 26px; }
.legacy .auth-form .brand{ padding: 0; }
.legacy .auth-card{ flex: 1; display: grid; align-content: center; gap: 16px; max-width: 420px; width: 100%; padding: 0 !important; margin: 0 !important; }
.legacy .auth-card h1{ font-size: 30px; }
.legacy .auth-foot{ display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legacy .auth-art{ position: relative; background: var(--art-bg); overflow: hidden; }
.legacy .auth-art img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.legacy .auth-quote{ position: absolute; inset-inline: 40px; bottom: 40px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-radius: 18px; padding: 24px 26px; display: grid; gap: 6px; max-width: 520px; box-shadow: var(--shadow-lg); }
.legacy .auth-quote strong{ font-size: 19px; line-height: 1.4; }
.legacy .auth-quote span{ color: var(--ink-2); }
.legacy .demo-accounts{ border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; }
.legacy .demo-accounts h2{ display: flex; align-items: center; gap: 6px; font-size: 14px; }
.legacy .demo-list{ display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.legacy .demo-user{ display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); text-align: start; }
.legacy .demo-user:hover{ border-color: var(--accent); background: var(--accent-soft-2); }
.legacy .demo-user span{ display: grid; min-width: 0; }
.legacy .demo-user strong{ font-size: 12.5px; } .legacy .demo-user small{ font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy .invite-card{ display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-2); }
.legacy .mail-list{ display: grid; gap: 10px; }
.legacy .mail-list li{ border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 6px; justify-items: start; }
.legacy .mail-list li > .split{ width: 100%; }

/* ---------------------------------------------------------------- dialog & toast */
.legacy dialog{ border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow-lg); color: var(--ink); }
.legacy dialog.wide{ width: min(820px, calc(100vw - 24px)); }
.legacy dialog::backdrop{ background: var(--scrim); backdrop-filter: blur(2px); }
.legacy .dialog-body{ padding: 22px 24px; display: grid; gap: 14px; }
.legacy .dialog-head{ display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.legacy .dialog-head h2{ font-size: 19px; }
.legacy .dialog-head p{ margin-top: 3px; font-size: 13px; }
.legacy .dialog-text{ line-height: 1.7; }
.legacy .dialog-foot{ display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.legacy .toast{ position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90; max-width: calc(100vw - 32px); box-shadow: var(--shadow-lg); }
.legacy .toast.show{ opacity: 1; transform: translate(-50%, 0); }
.legacy .toast.bad{ background: var(--bad); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .legacy .columns,.legacy .doc-layout{ grid-template-columns: minmax(0, 1fr); }
  .legacy .stat-row{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy .meeting-editor{ grid-template-columns: minmax(0, 1fr); }
  .legacy .transcript{ position: static; max-height: 320px; }}
@media (max-width: 900px) {
  :root{ --sidebar: 0px; }
  .legacy .sidebar{ width: min(300px, 86vw); transform: translateX(100%); transition: transform .22s ease; box-shadow: none; }
  body.menu-open .sidebar{ transform: none; box-shadow: var(--shadow-lg); }
  body.menu-open .scrim{ display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
  .legacy .only-mobile{ display: inline-grid !important; }
  .legacy nav.only-mobile{ display: flex !important; }
  .legacy .only-desktop{ display: none; }
  .legacy .topbar{ padding: 0 12px; gap: 8px; }
  .legacy .crumbs{ display: none; }
  .legacy .search{ width: auto; flex: 1; margin: 0; }
  .legacy.view{ padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .legacy .banner{ padding: 10px 16px; }
  .legacy .bottom-nav{ display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: var(--topbar-bg); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .legacy .bottom-nav > *{ display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; min-height: 50px; position: relative; }
  .legacy .bottom-nav .icon{ width: 22px; height: 22px; }
  .legacy .bottom-nav .active{ color: var(--accent-ink); }
  .legacy .bottom-nav .dot{ position: absolute; top: 6px; left: calc(50% - 14px); width: 8px; height: 8px; background: var(--bad); border-radius: 50%; }
  .legacy .uploads{ bottom: calc(76px + env(safe-area-inset-bottom)); inset-inline-end: 12px; }
  body.has-uploads #main{ padding-bottom: calc(230px + env(safe-area-inset-bottom)); }
  .legacy .row.wrap-row{ flex-wrap: wrap; } .legacy .row.wrap-row .row-main{ flex-basis: 100%; }
  .legacy .table-wrap > .table{ min-width: 600px; }
  .legacy .tabs.only-mobile{ margin: 12px 0 0; }
  .legacy .auth{ grid-template-columns: 1fr; }
  .legacy .auth-art{ display: none; }
  .legacy .auth-form{ padding: 24px 20px; }
  .legacy .chat{ grid-template-columns: 1fr; height: calc(100vh - var(--topbar) - 230px); min-height: 420px; }
  .legacy .chat.show-list .chat-thread,.legacy .chat.show-thread .chat-list{ display: none; }
  .legacy .plans,.legacy .plan-pick,.legacy .onboard-grid{ grid-template-columns: 1fr; }}
@media (max-width: 760px) {
  .legacy h1{ font-size: 23px; }
  .legacy .hero-text h1{ font-size: 24px; }
  .legacy .project-hero{ padding: 18px; min-height: 150px; }
  .legacy .project-hero.compact{ padding: 12px 16px; }
  .legacy .project-hero.compact .hero-actions{ width: 100%; }
  .legacy .stat-row{ gap: 10px; }
  .legacy .stat{ padding: 12px 14px; }
  .legacy .stat-value{ font-size: 24px; }
  .legacy .toolbar .input-icon{ min-width: 100%; }
  .legacy .toolbar select,.legacy .toolbar .date-filter input{ flex: 1 1 140px; width: auto; min-width: 0; }
  .legacy .grid-2,.legacy .grid-3,.legacy .upload-fields{ grid-template-columns: 1fr; }
  .legacy .board{ grid-template-columns: 1fr; }
  .legacy .task-link{ flex-wrap: wrap; padding: 12px 14px; }
  .legacy .task-meta{ width: 100%; justify-content: flex-start; padding-inline-start: 32px; }
  .legacy .row-link,.legacy .rows > li.row{ padding: 12px 14px; flex-wrap: wrap; }
  .legacy .panel-head{ padding: 13px 14px; } .legacy .pad-block{ padding: 16px 14px; }
  .legacy .msg{ max-width: 92%; }
  .legacy .demo-list{ grid-template-columns: 1fr; }
  .legacy .facts.wide > div{ grid-template-columns: 1fr; gap: 2px; }
  .legacy .member-edit input,.legacy .member-edit select{ width: auto !important; flex: 1 1 120px; }
  .legacy .dialog-body{ padding: 18px 16px; }
  .legacy .doc-head .head-actions{ width: 100%; }
  .legacy .viewer-body{ min-height: 360px; }
  .legacy .viewer-body iframe{ height: 64vh; }
  .legacy .company-title{ gap: 12px; } .legacy .company-logo-lg{ width: 48px; height: 48px; }
  .legacy .edit-list select,.legacy .edit-list input[type=date]{ width: auto !important; flex: 1 1 130px; }}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after{ transition: none !important; animation: none !important; scroll-behavior: auto !important; }}
@media print { .legacy .sidebar,.legacy .topbar,.legacy .bottom-nav,.legacy .uploads{ display: none !important; } .legacy .page{ margin: 0; }}

/* ---------------------------------------------------------------- design reference */
.legacy .palette{ display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 20px; }
.legacy .palette li{ display: grid; gap: 4px; }
.legacy .palette i{ display: block; height: 56px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.legacy .palette strong{ font-size: 13px; }
.legacy .faint{ color: var(--faint); }
.legacy .sample-row{ display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.legacy .type-sample{ display: grid; gap: 8px; }
.legacy .col-side > .stat{ margin-bottom: 16px; }

/* ---------------------------------------------------------------- platform & billing (stage 2) */
.legacy .stat-row.three{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.legacy .stat-value.small-value{ font-size: 15px; line-height: 1.4; }
.legacy .stat-value.small-value .badge{ font-size: 13px; }
.legacy .price-line{ font-size: 13.5px; color: var(--ink-2); margin: 4px 0 14px; }
.legacy .price-line strong{ font-size: 22px; color: var(--ink); font-weight: 800; margin-inline-end: 4px; }
.legacy .sub-head{ font-size: 13px; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
.legacy .sub-head.pad{ margin: 14px 18px 4px; }
.legacy .panel-head.flush{ padding: 0 0 10px; border: 0; }
.legacy .module-list{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.legacy .module-list li{ display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.legacy .module-list li > span{ display: grid; gap: 1px; min-width: 0; }
.legacy .module-list li.on .icon{ color: var(--ok); }
.legacy .module-list li.off{ opacity: .7; }
.legacy .module-list li.planned .icon,.legacy .module-list li.off .icon{ color: var(--faint); }
.legacy .segmented > .on,.legacy .segmented > [aria-checked=true]{ background: var(--accent-soft); color: var(--accent-ink); }
.legacy .table-wrap{ overflow-x: auto; }
.legacy .table{ width: 100%; border-collapse: collapse; font-size: 13px; }
.legacy .table th{ text-align: start; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.legacy .table td{ padding: 10px 18px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.legacy .table tr:last-child td{ border-bottom: 0; }
.legacy .table .block,.legacy small.block{ display: block; }
.legacy .perm-table th,.legacy .perm-table td{ padding: 8px 10px; text-align: center; }
.legacy .perm-table th:first-child,.legacy .perm-table td:first-child{ text-align: start; }
.legacy .feed > li:not(:has(> a)){ display: grid; gap: 2px; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.legacy .feed > li:not(:has(> a)):last-child{ border-bottom: 0; }
.legacy .thread{ display: grid; }
.legacy .thread > li{ display: grid; gap: 2px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.legacy .thread > li p{ white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; font-size: 14px; }
.legacy .thread > li.from-staff{ background: var(--accent-soft-2); }
.legacy .thread > li.internal{ background: var(--warn-soft); }
.legacy .faq details{ border-bottom: 1px solid var(--line-2); }
.legacy .faq details:last-child{ border-bottom: 0; }
.legacy .faq summary{ padding: 13px 18px; font-weight: 600; cursor: pointer; font-size: 14px; }
.legacy .faq details p{ padding: 0 18px 14px; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.legacy .chips-nav{ display: flex; gap: 8px; flex-wrap: wrap; margin: -6px 0 16px; }
.legacy .chips-nav a{ padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--muted); }
.legacy .chips-nav a.on{ background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.legacy .plan-admin{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.legacy .plan-admin .panel{ margin: 0; }
.legacy .plan-admin details{ margin: 10px 0; font-size: 13px; }
.legacy .plan-admin summary{ cursor: pointer; color: var(--accent-ink); font-weight: 600; }
.legacy .muted-panel{ opacity: .65; }
.legacy .action-row{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.legacy .inline-form{ display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0; }
.legacy .inline-form .field{ flex: 1 1 140px; margin: 0; }
.legacy .page-sub{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 16px; font-size: 13px; color: var(--muted); }
.legacy .list-note{ margin: -8px 0 12px; }
.legacy .plain-link{ color: inherit; }
.legacy .plain-link:hover strong{ color: var(--accent-ink); }
.legacy .secret{ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; background: var(--surface-2); padding: 3px 8px; border-radius: 6px; letter-spacing: .04em; }
.legacy .code-input{ font-size: 22px !important; letter-spacing: .3em; text-align: center; max-width: 220px; }
.legacy .plain-steps{ display: grid; gap: 8px; padding-inline-start: 20px; list-style: decimal; font-size: 14px; margin-bottom: 14px; }
.legacy .cycle-pick{ display: flex; gap: 18px; flex-wrap: wrap; border: 0; padding: 0; margin: 0 0 6px; font-size: 14px; }
.legacy .cycle-pick legend{ font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.legacy .section-actions{ display: flex; justify-content: flex-end; margin-bottom: 14px; }
.legacy .section-actions:empty{ display: none; }
.legacy .banner.info{ background: var(--accent-soft-2); color: var(--ink-2); }
.legacy .banner .link{ margin-inline-start: auto; }
.legacy .notice > .button{ margin-inline-start: auto; flex-shrink: 0; }
.legacy fieldset.checks{ border: 0; padding: 0; margin: 0 0 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.legacy fieldset.checks legend{ font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.legacy .narrow-wide{ max-width: 860px; }
@media (max-width: 1180px) { .legacy .plan-admin{ grid-template-columns: repeat(2, minmax(0, 1fr)); }}
@media (max-width: 760px) {
  .legacy .stat-row.three,.legacy .plan-admin,.legacy .module-list{ grid-template-columns: 1fr; }
  .legacy .table th,.legacy .table td{ padding: 8px 12px; }
  .legacy .inline-form{ flex-direction: column; align-items: stretch; }}
.legacy .facts.single{ grid-template-columns: 1fr; }
.legacy .card-line{ display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 4px 0 8px; }
.legacy .invoice-sheet{ max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: grid; gap: 18px; }
.legacy .invoice-sheet > header{ display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.legacy .invoice-sheet .table tr.total td{ font-weight: 800; border-top: 2px solid var(--line-strong); }
@media print {
  .legacy .sidebar,.legacy .topbar,.legacy .banner,.legacy .bottom-nav,.legacy .no-print,.legacy #banner{ display: none !important; }
  body,.main,main{ background: #fff !important; }
  .legacy .invoice-sheet{ border: 0; padding: 0; max-width: none; }}
.legacy .first-steps .panel-head > div{ display: grid; gap: 2px; }
.legacy .step-list{ display: grid; }
.legacy .step-list > li{ display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.legacy .step-list > li > span{ display: grid; gap: 1px; flex: 1; min-width: 0; }
.legacy .step-list > li .icon{ color: var(--faint); flex-shrink: 0; }
.legacy .step-list > li.done .icon{ color: var(--ok); }
.legacy .step-list > li.done strong{ color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }