:root {
  --graphite-950: #090d10;
  --graphite-925: #0d1216;
  --graphite-900: #11181d;
  --gunmetal-850: #151f26;
  --gunmetal-800: #1a262e;
  --gunmetal-750: #202e37;
  --silver-500: #71818c;
  --silver-400: #8798a3;
  --silver-300: #a8b7c0;
  --silver-200: #cbd6dc;
  --silver-100: #edf3f5;

  --bg: var(--graphite-950);
  --surface: var(--graphite-900);
  --surface-soft: #131d23;
  --surface-muted: var(--gunmetal-850);
  --surface-raised: var(--gunmetal-800);
  --surface-contrast: #0c1317;
  --ink: var(--silver-100);
  --ink-soft: #c1ced4;
  --muted: #9aaab4;
  --subtle: #8596a1;
  --line: #293942;
  --line-strong: #40525d;

  --primary: #8adbd9;
  --primary-strong: #63c4c5;
  --primary-soft: #18373a;
  --primary-ink: #071416;
  --green: #75d6a8;
  --green-soft: #17382f;
  --orange: #f4c27a;
  --orange-soft: #3b2c18;
  --red: #ff9296;
  --red-soft: #432126;
  --blue: #8dcaf2;
  --blue-soft: #1a3243;
  --violet: #b9b4f0;
  --violet-soft: #2b2942;

  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .025);
  --shadow-md: 0 24px 70px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 255, 255, .035);
  --shadow-focus: 0 0 0 3px rgba(138, 219, 217, .24);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --sidebar-width: 264px;
  --content-max: 1500px;
  --duration-fast: 180ms;
  --duration-enter: 200ms;
  --ease-standard: cubic-bezier(.2, .75, .25, 1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { position: relative; min-width: 320px; min-height: 100dvh; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: linear-gradient(rgba(150, 181, 194, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 181, 194, .014) 1px, transparent 1px), radial-gradient(circle at 86% -12%, rgba(79, 137, 146, .16), transparent 34rem); background-size: 36px 36px, 36px 36px, auto; }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [data-action], [data-view] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [data-action]:focus-visible, [data-view]:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; box-shadow: var(--shadow-focus); }
button:disabled { cursor: not-allowed; opacity: .52; }
[hidden] { display: none !important; }
.icon { width: 17px; height: 17px; display: inline-block; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Application shell */
.app-shell { display: flex; min-height: 100dvh; }
.sidebar { width: var(--sidebar-width); min-height: 100dvh; position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; padding: max(24px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; background: linear-gradient(180deg, #111a20 0%, #0e151a 100%); border-right: 1px solid var(--line); box-shadow: 10px 0 32px rgba(0, 0, 0, .18); transition: transform var(--duration-enter) var(--ease-standard); }
.sidebar-scrim { display: none; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 9px; }
.brand-mark { width: 31px; height: 31px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; flex: 0 0 auto; }
.brand-mark span { display: block; background: var(--primary); border-radius: 4px 4px 7px 7px; box-shadow: 0 0 14px rgba(138, 219, 217, .18); }
.brand-mark span:nth-child(1) { height: 15px; opacity: .48; }
.brand-mark span:nth-child(2) { height: 23px; opacity: .75; }
.brand-mark span:nth-child(3) { height: 30px; }
.brand-name { color: var(--silver-100); font-size: 18px; line-height: 1; font-weight: 800; letter-spacing: -.035em; }
.brand-subtitle { margin-top: 5px; color: var(--silver-400); font-size: 10px; letter-spacing: .08em; }
.workspace-switcher { margin: 32px 0 25px; padding: 10px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(32, 46, 55, .65); box-shadow: var(--shadow-sm); }
.workspace-avatar, .user-avatar, .topbar-avatar { display: grid; place-items: center; color: var(--primary-ink); font-weight: 800; background: var(--primary); }
.workspace-avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.workspace-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.workspace-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.workspace-copy span { margin-top: 1px; color: var(--muted); font-size: 10px; }
.workspace-chevron { display: flex; color: var(--silver-400); }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { padding: 0 12px 9px; color: var(--silver-400); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 26px; }
.nav-item, .sidebar-action { appearance: none; width: 100%; min-height: 44px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--ink-soft); text-align: left; transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, color var(--duration-fast) ease; }
.nav-item:hover, .sidebar-action:hover { color: var(--ink); background: rgba(138, 219, 217, .06); border-color: rgba(138, 219, 217, .08); }
.nav-item.active { color: var(--primary); background: var(--primary-soft); border-color: rgba(138, 219, 217, .18); font-weight: 750; box-shadow: inset 3px 0 0 var(--primary); }
.nav-item .icon, .sidebar-action .icon { width: 17px; height: 17px; }
.nav-count { margin-left: auto; color: var(--silver-400); font-size: 11px; font-weight: 700; }
.nav-item.active .nav-count { color: var(--primary); }
.sidebar-bottom { margin-top: auto; padding-top: 26px; }
.sidebar-tip { display: flex; gap: 10px; margin: 0 5px 16px; padding: 13px 11px; border: 1px solid #2c444a; border-radius: var(--radius-md); background: #16282c; }
.tip-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #376267; border-radius: 8px; color: var(--primary); background: #1c383b; }
.tip-icon .icon { width: 15px; height: 15px; }
.sidebar-tip strong { display: block; color: var(--ink); font-size: 11px; }
.sidebar-tip p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.sidebar-action { margin-bottom: 12px; padding: 7px 11px; color: var(--muted); font-size: 11px; }
.sidebar-action .icon { width: 15px; height: 15px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 13px 8px 0; border-top: 1px solid var(--line); }
.user-avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.user-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.user-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-copy span { color: var(--muted); font-size: 10px; }
.sidebar-user > .icon { width: 16px; color: var(--silver-400); }
.main-shell { min-width: 0; flex: 1; margin-left: var(--sidebar-width); }
.topbar { min-height: 72px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(12px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 12px max(32px, env(safe-area-inset-left)); background: rgba(9, 13, 16, .9); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.topbar-left, .topbar-actions, .breadcrumbs, .global-search { display: flex; align-items: center; }
.breadcrumbs { gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-size: 13px; }
.breadcrumb-slash { color: var(--silver-500); }
.topbar-actions { min-width: 0; gap: 9px; }
.global-search { width: min(280px, 30vw); min-width: 150px; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface); }
.global-search:focus-within { border-color: var(--primary-strong); box-shadow: var(--shadow-focus); }
.global-search .icon { width: 15px; height: 15px; }
.global-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.global-search input::placeholder { color: var(--subtle); }
kbd { padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--silver-300); background: var(--surface-muted); font-size: 10px; line-height: 1.2; white-space: nowrap; }
.icon-button, .mobile-menu { width: 44px; height: 44px; display: grid; place-items: center; position: relative; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--silver-300); background: transparent; }
.icon-button:hover, .mobile-menu:hover { color: var(--ink); background: var(--surface-muted); border-color: var(--line); }
.icon-button .icon { width: 18px; height: 18px; }
.notification-button i { width: 7px; height: 7px; position: absolute; top: 9px; right: 9px; border: 2px solid var(--graphite-950); border-radius: 50%; background: var(--red); }
.topbar-avatar { width: 34px; height: 34px; margin-left: 1px; border-radius: 10px; font-size: 11px; }
.mobile-menu { display: none; }
.content { width: min(100%, var(--content-max)); min-width: 0; margin: 0 auto; padding: clamp(24px, 3vw, 42px) clamp(18px, 3vw, 46px) max(56px, env(safe-area-inset-bottom)); }

/* Shared hierarchy and actions */
.hero, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero { margin-bottom: 22px; }
.hero h1, .page-heading h1 { margin: 0; color: var(--ink); letter-spacing: -.045em; }
.hero h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.14; }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(25px, 2.6vw, 32px); line-height: 1.15; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero p:not(.eyebrow), .page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.hero-actions, .page-actions, .people-hero-actions, .detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; flex-shrink: 0; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 12px; font-weight: 750; line-height: 1.25; transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease, color var(--duration-fast) ease; }
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { color: var(--primary-ink); background: var(--primary); box-shadow: 0 8px 18px rgba(89, 190, 193, .16); }
.btn-primary:hover { background: #a0e7e3; box-shadow: 0 11px 25px rgba(89, 190, 193, .23); }
.btn-secondary { color: var(--ink-soft); border-color: var(--line-strong); background: var(--surface-raised); }
.btn-secondary:hover { color: var(--ink); border-color: var(--primary-strong); background: var(--gunmetal-750); }
.btn-quiet, .btn-compact { padding: 7px 10px; font-size: 11px; }
.btn-quiet { min-height: 36px; color: var(--ink-soft); background: transparent; border-color: transparent; }
.btn-compact { min-height: 44px; }
.btn-quiet:hover { color: var(--ink); background: var(--surface-muted); }
.btn-danger { color: var(--red); border-color: rgba(255, 146, 150, .32); background: var(--red-soft); }
.btn-danger:hover { border-color: var(--red); background: #55262d; }
.btn-ghost-on-dark { color: var(--ink); border-color: rgba(203, 214, 220, .25); background: rgba(203, 214, 220, .08); }
.btn-ghost-on-dark:hover { border-color: rgba(138, 219, 217, .56); background: rgba(138, 219, 217, .12); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-heading { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px 15px; }
.panel-heading h2, .page-heading h1 { letter-spacing: -.03em; }
.panel-heading h2 { margin: 0; font-size: 15px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-heading .section-kicker { margin-bottom: 5px; }
.text-link { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid transparent; border-radius: var(--radius-xs); color: var(--primary); background: transparent; font-size: 11px; font-weight: 750; }
.text-link:hover { color: var(--ink); background: var(--primary-soft); }
.text-link .icon { width: 14px; height: 14px; }
.panel-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #2d4b45; border-radius: var(--radius-pill); color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 750; }
.panel-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(117, 214, 168, .12); }

/* Dashboard hero, KPI and lightweight visualizations */
.dashboard-v2 { display: grid; gap: 18px; }
.hero-v2 { position: relative; min-height: 196px; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; padding: 27px 29px; overflow: hidden; color: var(--ink); border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #17262c 0%, #20363b 56%, #1b4143 100%); box-shadow: 0 18px 42px rgba(0, 0, 0, .34); }
.hero-v2::before { content: ""; width: 380px; height: 380px; position: absolute; top: -245px; right: 19%; border: 1px solid rgba(138, 219, 217, .12); border-radius: 50%; box-shadow: 0 0 0 32px rgba(138, 219, 217, .025), 0 0 0 64px rgba(138, 219, 217, .02); pointer-events: none; }
.hero-copy, .hero-visual, .hero-v2 .hero-actions { position: relative; z-index: 1; }
.hero-v2 h1 { color: var(--silver-100); }
.hero-v2 .eyebrow { color: var(--primary); }
.hero-v2 p:not(.eyebrow) { max-width: 580px; color: var(--silver-300); }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 19px; color: var(--silver-300); font-size: 10px; }
.hero-meta-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(138, 219, 217, .14); }
.hero-alert { color: var(--red); }
.hero-good { color: var(--green); }
.hero-visual { display: flex; align-items: center; gap: 12px; margin: 0 22px; }
.hero-progress-ring { width: 82px; height: 82px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--primary) var(--progress-angle), rgba(237, 243, 245, .13) 0); }
.hero-progress-ring::after { content: ""; position: absolute; inset: 6px; border-radius: inherit; background: #20383c; }
.hero-progress-ring span { position: relative; z-index: 1; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.05em; }
.hero-progress-ring small { margin-left: 1px; font-size: 10px; }
.hero-visual-copy { display: grid; gap: 3px; min-width: 132px; }
.hero-visual-copy span { color: var(--silver-300); font-size: 10px; }
.hero-visual-copy strong { color: var(--silver-100); font-size: 12px; }
.hero-visual-copy small { color: var(--silver-400); font-size: 9px; }
.hero-primary { color: var(--primary-ink); background: var(--primary); }
.quick-add-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); box-shadow: var(--shadow-sm); }
.quick-add-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #2d5557; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.quick-add-icon .icon { width: 16px; height: 16px; }
.quick-add-copy { min-width: 160px; display: grid; gap: 2px; }
.quick-add-copy strong { color: var(--ink); font-size: 11px; }
.quick-add-copy span { color: var(--muted); font-size: 10px; }
.quick-add-controls { min-width: 0; display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 8px; }
.quick-add-controls input { min-width: 120px; flex: 1; }
.quick-add-controls select { width: 160px; }
.metric-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.metric-grid-v2 { margin: 0; }
.metric-card { min-width: 0; min-height: 151px; position: relative; padding: 17px 18px 15px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.metric-card::after { content: ""; width: 90px; height: 90px; position: absolute; right: -42px; bottom: -48px; border: 1px solid rgba(138, 219, 217, .08); border-radius: 50%; pointer-events: none; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; }
.metric-icon .icon { width: 16px; height: 16px; }
.metric-icon.blue { color: var(--blue); border-color: #2b5269; background: var(--blue-soft); }
.metric-icon.orange { color: var(--orange); border-color: #65491f; background: var(--orange-soft); }
.metric-icon.green { color: var(--green); border-color: #2b604d; background: var(--green-soft); }
.metric-icon.violet { color: var(--violet); border-color: #4c4874; background: var(--violet-soft); }
.metric-value { margin-top: 13px; color: var(--ink); font-size: 29px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.metric-trend { display: grid; grid-template-columns: minmax(64px, .75fr) minmax(0, 1fr); align-items: end; gap: 9px; margin-top: 13px; }
.metric-trend .sparkline { width: 100%; height: 30px; }
.metric-trend .sparkline-empty { display: flex; align-items: center; justify-content: center; color: var(--subtle); font-size: 9px; line-height: 1.2; text-align: center; }
.metric-foot { min-width: 0; display: grid; gap: 2px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.metric-foot .trend { color: var(--green); font-weight: 750; }
.metric-foot .trend.warn { color: var(--orange); }
.metric-foot small { overflow: hidden; color: var(--subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sparkline { display: block; overflow: visible; }
.sparkline polyline { fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sparkline .sparkline-area { fill: rgba(138, 219, 217, .1); stroke: none; }
.metric-card.blue .sparkline polyline { stroke: var(--blue); }
.metric-card.orange .sparkline polyline { stroke: var(--orange); }
.metric-card.green .sparkline polyline { stroke: var(--green); }
.metric-card.violet .sparkline polyline { stroke: var(--violet); }
.viz-empty { min-height: 82px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); text-align: center; }
.viz-empty strong { color: var(--ink-soft); font-size: 11px; }
.viz-empty span { font-size: 11px; }
.viz-empty small { color: var(--subtle); font-size: 9px; }
.dashboard-insights { display: grid; grid-template-columns: 1fr; gap: 14px; }
.insight-panel { min-width: 0; overflow: hidden; }
.insight-panel .panel-heading { padding-bottom: 13px; }
.insight-body { padding: 0 21px 19px; }
.insight-note { margin: -6px 0 13px; color: var(--muted); font-size: 10px; }
.status-distribution { display: grid; gap: 13px; }
.status-distribution-bar { height: 14px; display: flex; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-muted); }
.status-distribution-bar span { min-width: 3px; height: 100%; }
.status-distribution-bar .todo { background: var(--silver-500); }
.status-distribution-bar .in-progress { background: var(--blue); }
.status-distribution-bar .review { background: var(--orange); }
.status-distribution-bar .done { background: var(--green); }
.status-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.status-legend-item { min-width: 0; display: grid; gap: 2px; }
.status-legend-label { display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.status-legend-label i, .summary-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; }
.status-legend-label .todo, .summary-dot.silver { background: var(--silver-500); }
.status-legend-label .in-progress, .summary-dot.blue { background: var(--blue); }
.status-legend-label .review, .summary-dot.orange { background: var(--orange); }
.status-legend-label .done, .summary-dot.green { background: var(--green); }
.status-legend-item strong { color: var(--ink); font-size: 15px; }
.workflow-completion { display: flex; align-items: center; gap: 18px; }
.workflow-completion-orbit { width: 108px; height: 108px; display: grid; place-items: center; position: relative; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(var(--primary) var(--completion-angle), var(--surface-muted) 0); }
.workflow-completion-orbit::after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.workflow-completion-orbit span { position: relative; z-index: 1; color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.05em; }
.workflow-completion-copy { min-width: 0; display: grid; gap: 5px; }
.workflow-completion-copy strong { color: var(--ink); font-size: 13px; }
.workflow-completion-copy span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.workflow-completion-copy small { color: var(--subtle); font-size: 9px; }

/* Dashboard content and project tables */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.dashboard-main-column, .dashboard-side-column { min-width: 0; display: grid; gap: 16px; }
.project-table-head, .project-row { display: grid; grid-template-columns: minmax(155px, 1.3fr) minmax(135px, .95fr) minmax(105px, .7fr) minmax(110px, .8fr) 76px; gap: 14px; align-items: center; }
.project-table-head { padding: 0 21px 10px; color: var(--silver-400); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.project-row { min-width: 0; padding: 14px 21px; border-top: 1px solid var(--line); cursor: pointer; transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease; }
.project-row:hover { background: rgba(138, 219, 217, .04); }
.project-name-cell, .project-meta, .project-owner { min-width: 0; display: flex; align-items: center; }
.project-name-cell { gap: 10px; }
.project-color { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .16); border-radius: 9px; color: var(--graphite-950); font-size: 11px; font-weight: 850; }
.project-color.orange { background: #e7aa63; }
.project-color.blue { background: #86bce4; }
.project-color.violet { background: #ada7df; }
.project-color.green { background: #74c99d; }
.project-name-copy { min-width: 0; }
.project-name-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.project-name-copy span { display: block; overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-meta { gap: 8px; color: var(--ink-soft); font-size: 11px; }
.project-meta .icon { width: 14px; height: 14px; color: var(--silver-400); }
.project-owner { gap: 7px; color: var(--ink-soft); font-size: 11px; }
.project-workflow-meta { min-width: 0; display: grid; gap: 2px; }
.project-workflow-meta strong { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-workflow-meta span, .project-workflow-meta.unconfigured { color: var(--muted); font-size: 9px; }
.project-workflow-meta.unconfigured { display: block; }
.mini-avatar { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; color: var(--graphite-950); background: var(--silver-300); font-size: 9px; font-weight: 800; }
.mini-avatar.me { color: var(--primary-ink); background: var(--primary); }
.progress-copy { color: var(--ink-soft); font-size: 11px; font-weight: 750; text-align: right; }
.progress-bar { width: 100%; height: 6px; margin-top: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface-muted); }
.progress-fill { height: 100%; border-radius: inherit; background: var(--primary); box-shadow: 0 0 12px rgba(138, 219, 217, .28); }
.project-row .progress-bar { width: 76px; margin-left: auto; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid transparent; border-radius: var(--radius-pill); font-size: 10px; font-weight: 750; line-height: 1.25; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.status-badge.active { color: var(--green); border-color: #2b604d; background: var(--green-soft); }
.status-badge.planning { color: var(--blue); border-color: #2b5269; background: var(--blue-soft); }
.status-badge.paused { color: var(--orange); border-color: #65491f; background: var(--orange-soft); }
.status-badge.done { color: var(--silver-200); border-color: var(--line-strong); background: var(--surface-muted); }
.focus-panel { min-height: 100%; }
.focus-list { padding: 0 21px 10px; }
.focus-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.focus-item:first-child { border-top: 0; }
.focus-check { width: 18px; height: 18px; position: relative; flex: 0 0 auto; margin-top: 1px; border: 1.5px solid var(--silver-500); border-radius: 5px; }
.focus-check.done { border-color: var(--green); background: var(--green); }
.focus-check.done::after { content: ""; width: 7px; height: 3px; position: absolute; top: 5px; left: 4px; border-left: 2px solid var(--graphite-950); border-bottom: 2px solid var(--graphite-950); transform: rotate(-45deg); }
.focus-copy { min-width: 0; flex: 1; }
.focus-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.focus-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.focus-date { margin-top: 2px; color: var(--orange); font-size: 10px; white-space: nowrap; }
.focus-date.overdue { color: var(--red); }
.focus-date.done-date { color: var(--green); }
.empty-inline { padding: 24px 0; color: var(--muted); font-size: 12px; text-align: center; }
.activity-panel { margin-top: 0; }
.activity-list { padding: 0 21px 16px; }
.activity-item { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.activity-dot { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #2b5557; border-radius: 8px; color: var(--primary); background: var(--primary-soft); }
.activity-dot .icon { width: 13px; height: 13px; }
.activity-copy { min-width: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.activity-copy strong { color: var(--ink); font-weight: 700; }
.activity-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.next-action-card { padding: 18px 19px; border: 1px solid #2b5557; border-radius: var(--radius-md); background: linear-gradient(135deg, #173037, #1a4141); box-shadow: var(--shadow-sm); }
.next-action-top { display: flex; align-items: center; gap: 8px; color: var(--silver-300); font-size: 10px; font-weight: 750; }
.next-action-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #396b6b; border-radius: 8px; color: var(--primary); background: rgba(138, 219, 217, .12); }
.next-action-icon .icon { width: 15px; height: 15px; }
.next-action-copy { display: grid; gap: 4px; margin: 20px 0 17px; }
.next-action-copy strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.next-action-copy span { color: var(--silver-300); font-size: 10px; }
.next-action-link { min-height: 36px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; color: var(--primary); background: transparent; font-size: 11px; font-weight: 750; }
.next-action-link .icon { width: 14px; height: 14px; }

/* Project space */
.projects-v2, .people-page { display: grid; gap: 16px; }
.project-list-hero { min-height: 166px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 27px 29px; color: var(--ink); border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #15252b, #1e373c 62%, #1c4141); box-shadow: 0 18px 42px rgba(0, 0, 0, .31); }
.project-list-hero h1, .people-hero h1 { margin: 0; color: var(--ink); font-size: clamp(27px, 3vw, 35px); letter-spacing: -.05em; }
.project-list-hero p:not(.eyebrow), .people-hero p:not(.eyebrow) { max-width: 600px; margin: 9px 0 0; color: var(--silver-300); font-size: 12px; line-height: 1.6; }
.project-list-microcopy { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; color: var(--silver-300); font-size: 10px; }
.micro-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(117, 214, 168, .12); }
.micro-divider { width: 1px; height: 12px; background: var(--line-strong); }
.project-health-strip { display: grid; grid-template-columns: repeat(3, minmax(78px, 1fr)); gap: 8px; }
.project-health-strip > div { min-width: 80px; display: grid; gap: 4px; padding: 11px 12px; border: 1px solid #345258; border-radius: var(--radius-sm); background: rgba(10, 20, 23, .24); }
.project-health-strip span { color: var(--silver-300); font-size: 9px; }
.project-health-strip strong { color: var(--ink); font-size: 20px; line-height: 1; }
.projects-control-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-pill { min-height: 40px; padding: 7px 11px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.filter-pill:hover { color: var(--ink); background: var(--surface-muted); }
.filter-pill.active { color: var(--primary); border-color: #2b5557; background: var(--primary-soft); }
.projects-control-meta { display: flex; align-items: center; justify-content: flex-end; gap: 11px; color: var(--muted); font-size: 10px; }
.project-search-state { display: inline-flex; align-items: center; gap: 5px; }
.project-search-state button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 7px; color: var(--muted); background: var(--surface-muted); }
.project-search-state button .icon { width: 13px; height: 13px; }
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.project-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease; }
.project-card:hover { transform: translateY(-2px); border-color: #49656d; background: #172229; box-shadow: 0 14px 32px rgba(0, 0, 0, .34); }
.project-card-v2-top, .project-card-top, .card-action-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-card-title { min-width: 0; display: flex; align-items: center; gap: 10px; }
.project-card-open { width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.project-card-open:focus-visible { border-radius: 8px; outline: 2px solid var(--primary); outline-offset: 4px; }
.project-card-title .project-color { width: 38px; height: 38px; border-radius: 10px; }
.project-card-title > div { min-width: 0; }
.project-card-title strong { display: block; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-title span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-open > span { min-width: 0; margin-top: 0; color: inherit; font-size: inherit; overflow: visible; }
.card-more-button { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-muted); }
.card-more-button:hover { color: var(--primary); border-color: #3a6969; background: var(--primary-soft); }
.card-more-button .icon { width: 16px; height: 16px; }
.project-card-v2-status { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 16px; color: var(--muted); font-size: 10px; }
.project-card-alert { color: var(--red); }
.project-card-good { color: var(--green); }
.project-card-workflow { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.project-card-workflow-label { color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-card-workflow > div { min-width: 0; display: grid; gap: 3px; }
.project-card-workflow strong { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-workflow span, .project-card-workflow small { color: var(--muted); font-size: 9px; }
.project-card-workflow small.overdue { color: var(--red); }
.project-card-description { min-height: 37px; margin: 16px 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.project-card-v2-progress .progress-copy { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.project-card-v2-progress .progress-copy span { color: var(--muted); font-weight: 600; }
.project-card-v2-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; }
.project-card-next { min-width: 0; display: grid; gap: 2px; }
.project-card-next-label { color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-card-next strong { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-card-next small, .project-card-dates { color: var(--muted); font-size: 9px; }
.project-card-v2-footer .btn { flex: 0 0 auto; }
.project-empty-v2 { margin-top: 0; }

/* Empty, error and loading surfaces */
.empty-state, .error-state, .loading-state { padding: 52px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--surface-soft); color: var(--muted); text-align: center; }
.empty-state .empty-icon, .error-state .empty-icon, .loading-state .empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border: 1px solid #2b5557; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.empty-state .icon, .error-state .icon, .loading-state .icon { width: 21px; height: 21px; }
.empty-state strong, .error-state strong, .loading-state strong { display: block; color: var(--ink); font-size: 13px; }
.empty-state p, .error-state p, .loading-state p { margin: 5px 0 16px; font-size: 11px; }
.error-state { border-color: rgba(255, 146, 150, .42); background: #241a1e; }
.error-state .empty-icon { color: var(--red); border-color: rgba(255, 146, 150, .42); background: var(--red-soft); }
.loading-state { border-style: solid; }
.skeleton { min-height: 12px; border-radius: var(--radius-xs); background: linear-gradient(90deg, var(--surface-muted), #2b3b44, var(--surface-muted)); background-size: 200% 100%; animation: skeleton-pulse 1.2s ease-in-out infinite; }

/* Board and task cards */
.board-page-heading { margin-bottom: 18px; }
.board-page-heading .eyebrow { margin-bottom: 7px; }
.board-toolbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.board-toolbar-v2 { min-height: 60px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.board-toolbar-left { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.board-select-wrap, .board-project-context { min-width: 0; display: flex; align-items: center; gap: 8px; }
.board-project-context { gap: 9px; }
.board-project-context .project-color { width: 30px; height: 30px; border-radius: 8px; }
.board-project-context > div { min-width: 0; display: grid; gap: 1px; }
.board-project-context strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.board-project-context span { color: var(--muted); font-size: 9px; }
.board-scope-pills, .detail-scope-pills { display: flex; gap: 3px; padding: 3px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); scrollbar-width: thin; }
.board-scope-pill, .detail-scope-pill { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 750; white-space: nowrap; }
.board-scope-pill:hover, .detail-scope-pill:hover { color: var(--ink); }
.board-scope-pill.active, .detail-scope-pill.active { color: var(--primary); border-color: #2b5557; background: var(--primary-soft); box-shadow: 0 2px 7px rgba(0, 0, 0, .22); }
.board-scope-pill span, .detail-scope-pill span { color: inherit; opacity: .72; font-size: 9px; }
.board-toolbar-status, .board-filter-label { color: var(--muted); font-size: 10px; white-space: nowrap; }
.board-toolbar-status { margin-left: auto; }
.board-summary-strip { min-height: 32px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 0 3px 9px; color: var(--muted); font-size: 10px; }
.board-summary-strip > span { display: inline-flex; align-items: center; gap: 6px; }
.board-key-hint { margin-left: auto; }
.summary-dot { width: 7px; height: 7px; }
.board { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(252px, 1fr)); gap: 13px; align-items: start; padding: 1px 1px 10px; overflow-x: auto; overflow-y: visible; touch-action: pan-x; scrollbar-color: var(--line-strong) var(--surface-muted); }
.board-column { min-width: 0; min-height: 490px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease; }
.board-column.drag-over { border-color: #3c7475; background: #152a2e; box-shadow: inset 0 0 0 1px rgba(138, 219, 217, .15); }
.board-column:has(.task-card.dragging) { border-style: dashed; }
.board-column .column-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 15px 12px; }
.column-title { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.column-dot { width: 8px; height: 8px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: var(--silver-500); }
.column-dot.todo { background: var(--silver-400); }
.column-dot.in-progress { background: var(--blue); }
.column-dot.review { background: var(--orange); }
.column-dot.done { background: var(--green); }
.column-count { min-width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--silver-300); background: var(--surface-muted); font-size: 10px; font-weight: 750; }
.column-body { display: grid; gap: 8px; padding: 0 9px 10px; }
.column-empty { min-height: 82px; display: grid; place-items: center; padding: 18px 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--subtle); font-size: 10px; text-align: center; }
.task-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: 0 5px 15px rgba(0, 0, 0, .2); cursor: pointer; transition: transform var(--duration-fast) ease, border-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease, opacity var(--duration-fast) ease; }
.task-card:hover { transform: translateY(-2px); border-color: #4a6970; box-shadow: 0 10px 22px rgba(0, 0, 0, .3); }
.task-card.dragging { opacity: .48; transform: rotate(1deg); }
.task-card-top, .task-card-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.task-card-title { min-width: 0; color: var(--ink); font-size: 11px; font-weight: 750; line-height: 1.45; }
.task-card-open { flex: 1; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.task-card-open:focus-visible { border-radius: 5px; outline: 2px solid var(--primary); outline-offset: 3px; }
.task-priority { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; margin-top: 4px; border: 1px solid currentColor; border-radius: 50%; }
.task-priority.high { color: var(--red); background: var(--red); }
.task-priority.medium { color: var(--orange); background: var(--orange); }
.task-priority.low { color: var(--silver-400); background: transparent; }
.task-card-description { display: -webkit-box; overflow: hidden; margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-tags, .drawer-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.task-tag { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--silver-300); background: var(--surface-muted); font-size: 9px; }
.task-card-footer { align-items: center; margin-top: 13px; }
.task-assignee { min-width: 0; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.task-assignee .mini-avatar { width: 19px; height: 19px; border-radius: 6px; font-size: 8px; }
.task-due { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.task-due .icon { width: 11px; height: 11px; }
.task-due.overdue, .workflow-node-due.overdue { color: var(--red); }
.task-due.today, .workflow-node-due.today { color: var(--orange); }
.add-task-inline { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 8px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; }
.add-task-inline:hover { color: var(--primary); border-color: #3c7475; background: var(--primary-soft); }
.add-task-inline .icon { width: 14px; height: 14px; }

/* Timeline: intentionally scrollable on narrow screens */
.timeline-panel { padding-bottom: 8px; overflow-x: auto; }
.timeline-header, .timeline-row { min-width: 790px; display: grid; grid-template-columns: minmax(180px, 1.2fr) 130px minmax(280px, 1.8fr) 100px; gap: 17px; align-items: center; }
.timeline-header { padding: 0 21px 11px; color: var(--silver-400); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.timeline-row { padding: 14px 21px; border-top: 1px solid var(--line); }
.timeline-project { min-width: 0; display: flex; align-items: center; gap: 9px; }
.timeline-project .project-color { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.timeline-project > div { min-width: 0; }
.timeline-project strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-project span { display: block; overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-dates { color: var(--ink-soft); font-size: 10px; }
.timeline-track { height: 22px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-muted); }
.timeline-months { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--silver-400); font-size: 9px; }
.timeline-bar { min-width: 18px; position: absolute; top: 4px; bottom: 4px; border-radius: 5px; }
.timeline-bar.orange { background: #d79d53; }
.timeline-bar.blue { background: #679bc1; }
.timeline-bar.violet { background: #8e88c3; }
.timeline-bar.green { background: #56a981; }
.timeline-status { justify-self: end; }

/* Project detail and workflow */
.project-detail-v2 { display: grid; gap: 16px; }
.detail-back { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 5px 8px; border: 0; border-radius: var(--radius-xs); color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.detail-back:hover { color: var(--primary); background: var(--primary-soft); }
.detail-back .icon { width: 15px; height: 15px; }
.detail-hero-v2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; min-height: 218px; padding: 26px 28px; overflow: hidden; color: var(--ink); border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #16272d, #234047 64%, #205354); box-shadow: 0 18px 42px rgba(0, 0, 0, .34); }
.detail-hero-v2::after { content: ""; width: 320px; height: 320px; position: absolute; top: -220px; right: 12%; border: 1px solid rgba(138, 219, 217, .12); border-radius: 50%; pointer-events: none; }
.detail-hero-main, .detail-hero-progress, .detail-hero-v2 .detail-actions { position: relative; z-index: 1; }
.detail-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.detail-title > div { min-width: 0; }
.detail-hero-v2 .detail-title .project-color { width: 50px; height: 50px; border-radius: 14px; }
.detail-hero-v2 .detail-title h1 { margin: 0; overflow: hidden; color: var(--ink); font-size: 28px; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero-v2 .detail-title p:not(.eyebrow) { max-width: 600px; overflow: hidden; color: var(--silver-300); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero-v2 .detail-title .eyebrow { margin-bottom: 6px; }
.detail-chip-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.detail-chip { min-height: 28px; display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(203, 214, 220, .2); border-radius: 7px; color: var(--silver-300); background: rgba(203, 214, 220, .08); font-size: 9px; }
.detail-chip.danger { color: var(--red); border-color: rgba(255, 146, 150, .35); background: var(--red-soft); }
.detail-chip.good { color: var(--green); border-color: rgba(117, 214, 168, .34); background: var(--green-soft); }
.detail-hero-progress { display: grid; justify-items: center; gap: 7px; margin: 0 24px; }
.detail-progress-orbit { width: 82px; height: 82px; display: grid; place-items: center; position: relative; border-radius: 50%; background: conic-gradient(var(--primary) var(--progress-angle), rgba(237, 243, 245, .13) 0); }
.detail-progress-orbit::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #234047; }
.detail-progress-orbit span { position: relative; z-index: 1; color: var(--ink); font-size: 20px; font-weight: 800; letter-spacing: -.05em; }
.detail-progress-orbit small { margin-left: 1px; font-size: 10px; }
.detail-hero-progress > small { color: var(--silver-300); font-size: 9px; }
.detail-hero-v2 .detail-actions { align-self: end; padding-bottom: 1px; }
.detail-hero-v2 .btn-secondary { color: var(--ink-soft); border-color: rgba(203, 214, 220, .25); background: rgba(203, 214, 220, .08); }
.detail-hero-v2 .btn-secondary:hover { color: var(--ink); background: rgba(203, 214, 220, .16); }
.detail-hero-v2 .btn-primary { color: var(--primary-ink); background: var(--primary); }
.workflow-detail-panel { padding: 19px 20px 21px; }
.workflow-detail-heading, .workflow-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.workflow-detail-heading h2, .workflow-history-heading h2 { margin: 4px 0 0; font-size: 15px; }
.workflow-detail-heading p, .workflow-history-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.workflow-detail-summary { display: flex; gap: 8px; }
.workflow-detail-summary > div { min-width: 126px; display: grid; gap: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.workflow-detail-summary span { color: var(--muted); font-size: 9px; }
.workflow-detail-summary strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; }
.workflow-track-item { min-width: 0; position: relative; }
.workflow-track-rail { height: 29px; display: flex; align-items: center; gap: 7px; }
.workflow-track-rail > i { height: 2px; flex: 1; background: var(--line-strong); }
.workflow-track-item:last-child .workflow-track-rail > i { visibility: hidden; }
.workflow-track-number { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 auto; border: 2px solid var(--line-strong); border-radius: 50%; color: var(--silver-400); background: var(--surface-muted); font-size: 10px; font-weight: 800; }
.workflow-track-number.active { color: var(--primary); border-color: #4c8685; background: var(--primary-soft); }
.workflow-track-number.done { color: var(--green); border-color: #3d8064; background: var(--green-soft); }
.workflow-track-number.skipped { color: var(--orange); border-color: #80602c; background: var(--orange-soft); }
.workflow-track-item.primary .workflow-track-number { box-shadow: 0 0 0 4px rgba(138, 219, 217, .12); }
.workflow-node-card { min-height: 171px; display: flex; flex-direction: column; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.workflow-track-item.primary .workflow-node-card { border-color: #3f7777; box-shadow: 0 8px 20px rgba(0, 0, 0, .28); }
.workflow-node-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.workflow-node-kicker { color: var(--muted); font-size: 9px; }
.workflow-node-card h3 { margin: 3px 0 0; color: var(--ink); font-size: 12px; line-height: 1.35; }
.workflow-status { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.workflow-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.workflow-status.pending { color: var(--silver-300); border-color: var(--line-strong); background: var(--surface-muted); }
.workflow-status.active { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-status.done { color: var(--green); border-color: #326b53; background: var(--green-soft); }
.workflow-status.skipped { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.workflow-node-card .workflow-node-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; color: var(--ink-soft); font-size: 9px; }
.workflow-node-card .workflow-node-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.workflow-node-card .mini-avatar { width: 19px; height: 19px; border-radius: 5px; font-size: 8px; }
.workflow-node-due { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.workflow-node-due .icon { width: 11px; height: 11px; }
.workflow-node-actions-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 13px; }
.workflow-action-button { min-height: 44px; padding: 6px 7px; color: var(--ink-soft); border-color: var(--line); background: var(--surface-soft); font-size: 9px; }
.workflow-action-button:hover { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-action-button.primary-action { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-action-button.requires-note { color: var(--orange); }
.workflow-unconfigured { padding: 20px; }
.workflow-unconfigured .workflow-detail-heading { margin-bottom: 9px; align-items: center; }
.workflow-unconfigured p { max-width: 650px; margin: 0 0 14px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.workflow-unconfigured-label { color: var(--muted); font-size: 10px; }
.workflow-history-panel { padding: 19px 20px 12px; }
.workflow-history-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.workflow-history-row { display: grid; grid-template-columns: 125px minmax(0, 1fr) auto; align-items: start; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.workflow-history-time { padding-top: 2px; color: var(--muted); font-size: 10px; }
.workflow-history-main { min-width: 0; }
.workflow-history-main > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.workflow-history-main strong { color: var(--ink); font-size: 11px; }
.workflow-history-action { color: var(--primary); font-size: 9px; font-weight: 750; }
.workflow-history-transition { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.workflow-history-status { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--silver-300); background: var(--surface-muted); font-size: 9px; }
.workflow-history-status.active { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-history-status.done { color: var(--green); border-color: #326b53; background: var(--green-soft); }
.workflow-history-status.skipped { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.workflow-history-arrow { color: var(--silver-500); font-size: 10px; }
.workflow-history-main p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.workflow-history-actor { display: flex; align-items: center; gap: 5px; padding-top: 1px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.workflow-history-actor .mini-avatar { width: 20px; height: 20px; border-radius: 5px; font-size: 8px; }
.workflow-history-empty { padding: 16px 0 8px; color: var(--muted); font-size: 10px; text-align: center; }
.detail-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.detail-stat-grid > div { min-width: 0; display: grid; gap: 5px; padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.detail-stat-grid span, .detail-info-row span { color: var(--muted); font-size: 10px; }
.detail-stat-grid strong { color: var(--ink); font-size: 24px; line-height: 1; letter-spacing: -.04em; }
.detail-stat-grid strong.warn { color: var(--orange); }
.detail-stat-grid small { color: var(--muted); font-size: 9px; }
.detail-tabs { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.detail-tab { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 3px 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; }
.detail-tab:hover { color: var(--ink); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.detail-tab span { min-width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #2b5557; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 9px; }
.detail-task-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.detail-overview-v2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-overview-v2 .panel { min-width: 0; padding: 18px; }
.detail-next-panel { color: var(--ink); border-color: #2f6465; background: linear-gradient(140deg, #17363b, #1d4b4a); }
.detail-next-heading, .detail-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-next-heading { justify-content: flex-start; }
.detail-next-heading h3, .detail-card-heading h3 { margin: 4px 0 0; color: var(--ink); font-size: 14px; }
.detail-next-copy { display: grid; gap: 4px; margin: 22px 0 16px; }
.detail-next-copy strong { color: var(--ink); font-size: 14px; }
.detail-next-copy span { color: var(--silver-300); font-size: 10px; }
.detail-info-card .icon-button { width: 44px; height: 44px; }
.detail-description { margin: 18px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.detail-info-list { display: grid; gap: 0; margin-top: 16px; }
.detail-info-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.detail-info-row strong { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.detail-task-preview-list { display: grid; gap: 5px; margin-top: 14px; }
.detail-task-preview { min-height: 44px; display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 8px; border: 0; border-radius: 8px; color: var(--ink); background: var(--surface-soft); text-align: left; }
.detail-task-preview:hover { background: var(--primary-soft); }
.detail-task-preview-copy { min-width: 0; display: grid; flex: 1; gap: 2px; }
.detail-task-preview-copy strong { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.detail-task-preview-copy small { color: var(--muted); font-size: 9px; }
.detail-task-preview > .icon { width: 12px; height: 12px; color: var(--silver-400); }
.task-status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.task-status-pill.todo { color: var(--silver-200); border-color: var(--line-strong); background: var(--surface-muted); }
.task-status-pill.in-progress { color: var(--blue); border-color: #2b5269; background: var(--blue-soft); }
.task-status-pill.review { color: var(--orange); border-color: #65491f; background: var(--orange-soft); }
.task-status-pill.done { color: var(--green); border-color: #2b604d; background: var(--green-soft); }

/* Forms, modals, drawers and command palette */
input, textarea, select { min-height: 44px; width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; color: var(--ink); background: var(--surface-contrast); }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:hover, textarea:hover, select:hover { border-color: #5b6f79; }
input:focus, textarea:focus, select:focus { border-color: var(--primary-strong); }
textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.date-picker { min-width: 0; position: relative; }
.date-picker-control { position: relative; }
.date-picker-control input { padding-right: 45px; }
.date-picker-control input.invalid { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 2px rgba(255, 146, 150, .15); }
.date-picker-trigger { width: 42px; height: 42px; position: absolute; top: 1px; right: 1px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--silver-400); background: transparent; }
.date-picker-trigger:hover { color: var(--primary); background: var(--surface-muted); }
.date-picker-trigger .icon { width: 16px; height: 16px; }
.date-picker-panel { width: min(304px, calc(100vw - 20px)); position: fixed; z-index: 120; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); box-shadow: var(--shadow-md); animation: modal-in var(--duration-fast) var(--ease-standard); }
.date-picker-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 5px; margin-bottom: 9px; color: var(--ink); text-align: center; }
.date-picker-heading strong { font-size: 12px; }
.date-picker-nav { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-muted); }
.date-picker-nav:hover { color: var(--primary); border-color: var(--primary-strong); background: var(--primary-soft); }
.date-picker-nav .icon { width: 15px; height: 15px; }
.date-picker-weekdays, .date-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.date-picker-weekdays { margin-bottom: 4px; color: var(--silver-400); font-size: 9px; font-weight: 800; text-align: center; }
.date-picker-weekdays span { min-height: 24px; display: grid; place-items: center; }
.date-picker-day { min-height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 10px; }
.date-picker-day:hover { border-color: var(--primary-strong); color: var(--primary); background: var(--primary-soft); }
.date-picker-day-empty { pointer-events: none; }
.date-picker-day.today { border-color: rgba(244, 194, 122, .7); color: var(--orange); }
.date-picker-day.selected { border-color: var(--primary); color: var(--primary-ink); background: var(--primary); font-weight: 800; }
.date-picker-day.selected.today { box-shadow: inset 0 0 0 2px rgba(7, 20, 22, .28); }
.date-picker-footer { display: flex; justify-content: space-between; gap: 7px; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.date-picker-shortcut { min-height: 34px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--primary); background: transparent; font-size: 10px; font-weight: 750; }
.date-picker-shortcut:hover { border-color: var(--line-strong); background: var(--primary-soft); }
.select-control { min-height: 40px; width: auto; padding: 7px 10px; color: var(--ink-soft); background: var(--surface-contrast); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { min-width: 0; display: grid; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.form-helper { color: var(--muted); font-size: 10px; line-height: 1.45; }
.color-options { display: flex; align-items: center; gap: 8px; }
.color-option { width: 36px; height: 36px; padding: 0; border: 2px solid transparent; border-radius: 10px; }
.color-option.orange { background: #e7aa63; }
.color-option.blue { background: #86bce4; }
.color-option.violet { background: #ada7df; }
.color-option.green { background: #74c99d; }
.color-option.selected { border-color: var(--ink); box-shadow: 0 0 0 3px var(--primary-strong); }
.workflow-editor { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.workflow-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.workflow-editor-heading > div { display: grid; gap: 4px; }
.workflow-editor-heading label { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.workflow-node-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.workflow-node-list { display: grid; gap: 8px; }
.workflow-node-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); }
.workflow-node-index { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #3d7576; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.workflow-node-fields { min-width: 0; display: grid; gap: 6px; }
.workflow-node-fields input { min-width: 0; }
.workflow-node-meta { display: grid; grid-template-columns: minmax(90px, .75fr) minmax(130px, 1fr); gap: 6px; }
.workflow-node-actions { display: flex; gap: 3px; }
.workflow-node-action { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-muted); font-size: 13px; line-height: 1; }
.workflow-node-action:hover { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-node-action.danger:hover { color: var(--red); border-color: rgba(255, 146, 150, .42); background: var(--red-soft); }
.workflow-node-empty { padding: 15px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--surface-raised); font-size: 10px; text-align: center; }
.workflow-add-node { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 6px 9px; border: 1px solid #2b5557; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 750; }
.workflow-add-node:hover { background: #21474a; }
.person-picker { min-width: 0; position: relative; }
.person-picker > input[data-person-input] { width: 100%; }
.person-picker-menu { max-height: 220px; position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; left: 0; overflow: auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); box-shadow: var(--shadow-md); }
.person-picker-option { width: 100%; min-height: 44px; display: grid; gap: 2px; padding: 8px 9px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; }
.person-picker-option:hover { background: var(--primary-soft); }
.person-picker-option strong { font-size: 10px; }
.person-picker-option span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.person-picker .form-helper { display: block; margin-top: 5px; }
.workflow-node-person { min-width: 0; flex: 1; }
.workflow-node-person .person-picker { min-width: 120px; }
.workflow-node-person .person-picker > input { font-size: 10px; }
.workflow-node-person .form-helper { display: none; }
.modal-backdrop, .drawer-backdrop, .command-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(2, 7, 10, .76); backdrop-filter: blur(8px); animation: fade-in var(--duration-enter) ease; }
.modal-backdrop { display: grid; place-items: start center; overflow: auto; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.modal { width: min(590px, 100%); max-height: calc(100dvh - max(32px, env(safe-area-inset-top) + env(safe-area-inset-bottom))); overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); animation: modal-in var(--duration-enter) var(--ease-standard); overscroll-behavior: contain; }
.modal.modal-small { width: min(420px, 100%); }
.modal.modal-project { width: min(720px, 100%); }
.modal.modal-person { width: min(620px, 100%); }
.modal-people-import { width: min(980px, 100%); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 22px 16px; border-bottom: 1px solid var(--line); background: rgba(17, 24, 29, .96); backdrop-filter: blur(12px); }
.modal-header h2 { margin: 0; color: var(--ink); font-size: 16px; letter-spacing: -.025em; }
.modal-header p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-close { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-muted); }
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-raised); }
.modal-close .icon { width: 16px; height: 16px; }
.modal form { padding: 18px 22px 22px; }
.modal-footer { position: sticky; bottom: -1px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--line); background: rgba(17, 24, 29, .96); }
.modal-footer-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.drawer-backdrop, .command-backdrop { display: flex; }
.drawer-backdrop { justify-content: flex-end; }
.task-drawer { width: min(480px, 100%); height: 100%; min-height: 100dvh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); border-left: 1px solid var(--line-strong); background: var(--surface); box-shadow: -24px 0 70px rgba(0, 0, 0, .48); animation: drawer-in var(--duration-enter) var(--ease-standard); }
.drawer-topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 25px; border-bottom: 1px solid var(--line); }
.drawer-eyebrow { color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.drawer-body { min-height: 0; flex: 1; overflow: auto; padding: 27px 25px 25px; overscroll-behavior: contain; }
.drawer-title-row { display: flex; align-items: center; gap: 7px; }
.drawer-priority-label { color: var(--muted); font-size: 10px; font-weight: 700; }
.drawer-title { margin: 10px 0 22px; color: var(--ink); font-size: 24px; line-height: 1.27; letter-spacing: -.035em; }
.drawer-project-link { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.drawer-project-link .project-color { width: 30px; height: 30px; border-radius: 8px; }
.drawer-project-link > div { display: grid; gap: 1px; }
.drawer-project-link span { color: var(--muted); font-size: 9px; }
.drawer-project-link strong { color: var(--ink); font-size: 11px; }
.drawer-section { padding-top: 24px; }
.drawer-label { display: block; margin-bottom: 9px; color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.drawer-statuses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.drawer-status-option { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); background: var(--surface-raised); font-size: 10px; text-align: left; }
.drawer-status-option:hover { color: var(--primary); border-color: #3d7576; }
.drawer-status-option.active { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); font-weight: 750; }
.drawer-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.drawer-detail-grid strong { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 11px; }
.drawer-detail-grid strong.overdue { color: var(--red); }
.drawer-detail-grid strong.today { color: var(--orange); }
.drawer-description { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.drawer-footer { display: flex; gap: 8px; padding: 16px 25px max(21px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.drawer-footer .btn { flex: 1; }
.command-backdrop { align-items: flex-start; justify-content: center; padding: max(70px, calc(env(safe-area-inset-top) + 24px)) 16px 16px; }
.command-palette { width: min(560px, 100%); max-height: min(640px, calc(100dvh - 100px)); overflow: auto; padding: 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-md); animation: modal-in var(--duration-enter) var(--ease-standard); }
.command-search { min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-contrast); }
.command-search input { min-height: 42px; padding: 5px 0; border: 0; background: transparent; }
.command-section-label { padding: 16px 8px 8px; color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.command-list { display: grid; gap: 3px; }
.command-item { min-height: 56px; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); background: transparent; text-align: left; }
.command-item:hover { border-color: #2b5557; background: var(--primary-soft); }
.command-item-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--primary); background: var(--surface-muted); }
.command-item-icon .icon { width: 15px; height: 15px; }
.command-item-copy { min-width: 0; display: grid; flex: 1; gap: 2px; }
.command-item-copy strong { font-size: 11px; }
.command-item-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.command-footer { display: flex; justify-content: space-between; gap: 10px; padding: 13px 8px 4px; color: var(--muted); font-size: 9px; }

/* People directory and import */
.people-page { display: grid; gap: 15px; }
.people-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 27px 29px; color: var(--ink); border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #16272d, #234047 64%, #205354); box-shadow: 0 18px 42px rgba(0, 0, 0, .31); }
.people-hero h1 { color: var(--ink); }
.people-hero p:not(.eyebrow) { max-width: 510px; color: var(--silver-300); }
.people-summary { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 19px; color: var(--silver-300); font-size: 10px; }
.people-summary i { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(117, 214, 168, .12); }
.people-summary-warn { color: var(--orange); }
.people-hero-actions { justify-content: flex-end; max-width: 390px; }
.people-hero .btn-secondary { color: var(--ink-soft); border-color: rgba(203, 214, 220, .25); background: rgba(203, 214, 220, .08); }
.people-hero .btn-primary { color: var(--primary-ink); background: var(--primary); }
.people-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; }
.people-toolbar-search { min-width: 0; display: flex; align-items: center; gap: 9px; flex: 1; color: var(--muted); }
.people-toolbar-search > .icon { width: 15px; height: 15px; }
.people-toolbar-search input { min-height: 38px; flex: 1; padding: 6px 0; border: 0; background: transparent; font-size: 11px; }
.people-toolbar-search > span:last-child { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.people-panel { padding: 0; overflow: hidden; }
.people-table-wrap { overflow-x: auto; }
.people-table, .people-import-table { width: 100%; border-collapse: collapse; text-align: left; }
.people-table th, .people-table td { padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 10px; white-space: nowrap; }
.people-table th { color: var(--silver-400); background: var(--surface-muted); font-size: 9px; font-weight: 800; }
.people-table tbody tr:last-child td { border-bottom: 0; }
.people-table tbody tr:hover { background: rgba(138, 219, 217, .04); }
.people-name-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.people-name-cell > div { display: grid; gap: 3px; }
.people-name-cell strong { color: var(--ink); font-size: 11px; }
.people-pending { color: var(--orange); font-size: 9px; }
.people-row-actions { display: flex; align-items: center; gap: 8px; }
.person-status { display: inline-flex; align-items: center; gap: 5px; color: var(--green); font-size: 9px; font-weight: 750; }
.person-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.person-status.inactive { color: var(--muted); }
.people-empty { margin: 17px; }
.people-import-start { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .65fr); gap: 13px; padding: 18px 22px 0; }
.import-file-drop { display: grid; justify-items: center; gap: 7px; padding: 25px 17px; border: 1px dashed #507178; border-radius: 13px; background: var(--surface-soft); text-align: center; }
.import-file-drop strong { color: var(--ink); font-size: 12px; }
.import-file-drop > span:not(.import-file-icon) { color: var(--muted); font-size: 10px; }
.import-file-drop input[type='file'] { display: none; }
.import-file-icon { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid #3d7576; border-radius: 10px; color: var(--primary); background: var(--primary-soft); }
.import-file-icon .icon { width: 18px; height: 18px; }
.people-import-help { display: grid; align-content: center; gap: 6px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-muted); }
.people-import-help strong { color: var(--ink); font-size: 11px; }
.people-import-help p, .people-import-help span { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.people-import-step { padding: 2px 22px 0; }
.import-step-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 12px; }
.import-step-heading > div { display: grid; gap: 4px; }
.import-step-heading span { color: var(--silver-400); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.import-step-heading strong { color: var(--ink); font-size: 12px; }
.people-mapping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); }
.import-error-list { display: grid; gap: 6px; margin: 12px 0; }
.import-error { display: grid; gap: 2px; padding: 8px 10px; border-left: 3px solid var(--red); border-radius: 7px; background: var(--red-soft); }
.import-error strong { color: var(--red); font-size: 9px; }
.import-error span, .import-error small { color: var(--ink-soft); font-size: 10px; }
.import-error small { color: var(--muted); }
.import-report-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 12px; }
.import-report-strip span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-muted); font-size: 9px; }
.import-report-strip strong { margin-left: 3px; color: var(--ink); }
.import-report-strip .warn, .import-report-strip .warn strong { color: var(--red); }
.import-strategy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
.import-strategy-row label { color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.import-strategy-row select { max-width: 260px; }
.import-strategy-row .form-helper { margin-left: auto; }
.people-import-table-wrap { max-height: 390px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.people-import-table th, .people-import-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 9px; white-space: nowrap; }
.people-import-table th { position: sticky; top: 0; z-index: 1; color: var(--silver-400); background: var(--surface-muted); font-weight: 800; }
.people-import-table tr:last-child td { border-bottom: 0; }
.people-import-table tr.import-row-duplicate { background: #3a2d1b; }
.people-import-table tr.import-row-error { background: #352126; }
.people-import-table td:last-child { max-width: 280px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.import-field-decisions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 9px; white-space: normal; }
.import-field-decisions label { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-soft); }
.import-field-decisions input { min-height: 18px; width: 18px; accent-color: var(--primary); }
.import-status { display: inline-flex; padding: 4px 6px; border: 1px solid transparent; border-radius: 5px; font-size: 9px; font-weight: 800; }
.import-status.new { color: var(--green); border-color: #326b53; background: var(--green-soft); }
.import-status.update { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.import-status.duplicate { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.import-status.skipped { color: var(--silver-300); border-color: var(--line-strong); background: var(--surface-muted); }
.import-status.error { color: var(--red); border-color: rgba(255, 146, 150, .42); background: var(--red-soft); }
.import-preview-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; }
.people-import-result { display: grid; justify-items: center; gap: 8px; padding: 34px 12px 23px; text-align: center; }
.people-import-result h3 { margin: 0; color: var(--ink); font-size: 16px; }
.people-import-result p { margin: 0; color: var(--muted); font-size: 10px; }
.import-result-icon { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #326b53; border-radius: 13px; color: var(--green); background: var(--green-soft); }
.import-result-icon .icon { width: 22px; height: 22px; }

/* Stage 6 interaction and accessibility states */
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 120; padding: 10px 14px; transform: translateY(-160%); border: 1px solid var(--primary); border-radius: var(--radius-sm); color: var(--primary-ink); background: var(--primary); font-size: 12px; font-weight: 800; transition: transform var(--duration-fast) var(--ease-standard); }
.skip-link:focus { transform: translateY(0); }
.content:focus { outline: 0; }
.form-status { margin-top: 13px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink-soft); background: var(--surface-soft); font-size: 10px; line-height: 1.5; }
.form-status.error { color: var(--red); border-color: rgba(255, 146, 150, .45); background: var(--red-soft); }
.form-status.info { color: var(--blue); border-color: #2b5269; background: var(--blue-soft); }
.form-error { margin: 0; color: var(--red); font-size: 10px; line-height: 1.4; }
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] { border-color: var(--red); box-shadow: 0 0 0 2px rgba(255, 146, 150, .15); }
.quick-add-card { position: relative; }
.quick-add-controls textarea { min-height: 52px; flex: 1; resize: vertical; }
.quick-add-controls textarea + select { flex: 0 0 160px; }
.quick-add-card > .form-status { width: 100%; flex-basis: 100%; margin-top: 0; }
.batch-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 10px; padding: 9px 12px; }
.batch-select-all, .batch-selection-count { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 10px; }
.batch-select-all input, .task-select input { min-height: 22px; width: 22px; margin: 0; accent-color: var(--primary); }
.batch-selection-count strong { color: var(--primary); }
.batch-toolbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.task-select { display: inline-flex; align-items: center; flex: 0 0 auto; min-width: 24px; min-height: 24px; padding: 1px; cursor: pointer; }
.task-select span { display: block; width: 17px; height: 17px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface-muted); }
.task-select input { position: absolute; opacity: 0; pointer-events: none; }
.task-select input:checked + span { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 4px var(--surface-raised); }
.task-card.selected { border-color: var(--primary-strong); box-shadow: 0 0 0 2px rgba(138, 219, 217, .2), 0 8px 20px rgba(0, 0, 0, .25); }
.task-card { touch-action: pan-y; }
.task-card-hint, .board-dnd-help, .workflow-node-dnd-help { display: block; margin-top: 8px; color: var(--subtle); font-size: 9px; line-height: 1.4; }
.board-dnd-help { margin: -2px 0 8px; }
.task-card.dragging, .workflow-track-item.dragging { cursor: grabbing; }
.workflow-track-item { cursor: grab; touch-action: pan-y; }
.workflow-track-item.drop-target { padding: 5px; border: 1px dashed var(--primary); border-radius: var(--radius-sm); background: var(--primary-soft); }
.workflow-track-item.drop-target .workflow-node-card { border-color: var(--primary); }
.workflow-node-dnd-help { margin-top: auto; }
.modal-footer-left { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.batch-selected-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.batch-selected-list span { max-width: 100%; overflow: hidden; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: var(--surface-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.batch-result { margin-top: 14px; padding: 11px; border: 1px solid #326b53; border-radius: var(--radius-sm); background: var(--green-soft); }
.batch-result-summary { display: grid; gap: 3px; color: var(--ink-soft); font-size: 10px; }
.batch-result-summary strong { color: var(--green); font-size: 11px; }
.batch-error-list { display: grid; gap: 5px; margin: 10px 0; padding-left: 18px; color: var(--red); font-size: 10px; }
.batch-error-list li { display: flex; justify-content: space-between; gap: 8px; }
.batch-error-list li span { color: var(--ink-soft); }
.conflict-panel { margin-top: 14px; padding: 12px; border: 1px solid rgba(255, 146, 150, .48); border-radius: var(--radius-sm); color: var(--ink-soft); background: var(--red-soft); }
.conflict-panel > strong { color: var(--red); font-size: 11px; }
.conflict-panel p { margin: 5px 0 0; color: var(--ink-soft); font-size: 10px; }
.conflict-diff { display: grid; gap: 6px; margin-top: 10px; }
.conflict-diff > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 3px 7px; padding-top: 6px; border-top: 1px solid rgba(255, 146, 150, .2); font-size: 10px; }
.conflict-diff span { grid-row: 1 / span 2; color: var(--silver-300); font-weight: 750; }
.conflict-diff del, .conflict-diff ins { overflow-wrap: anywhere; text-decoration: none; }
.conflict-diff del { color: var(--red); }
.conflict-diff ins { color: var(--green); }
.conflict-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.toast { display: flex; align-items: center; gap: 8px; }
.toast-message { min-width: 0; flex: 1; }
.toast-action { min-height: 36px; padding: 6px 8px; border: 1px solid var(--primary-strong); border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 800; }
.command-item.active { border-color: #3d7576; background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.command-item.active .command-item-icon { color: var(--primary); border-color: #3d7576; }

/* Motion and content breakpoints: one responsive system */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes skeleton-pulse { 0%, 100% { background-position: 200% 0; } 50% { background-position: -200% 0; } }

@media (min-width: 640px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1.48fr) minmax(300px, .86fr); }
  .dashboard-insights { grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); }
}

@media (min-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1199px) {
  .app-shell { --sidebar-width: 244px; }
  .topbar { padding-inline: 24px; }
  .content { padding-inline: 24px; }
  .project-table-head, .project-row { gap: 10px; }
  .hero-v2 { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-v2 .hero-visual { grid-column: 2; grid-row: 1; margin-right: 0; }
  .hero-v2 .hero-actions { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .detail-hero-v2 { grid-template-columns: minmax(0, 1fr) auto; }
  .detail-hero-v2 .detail-hero-progress { grid-column: 2; grid-row: 1; margin-right: 0; }
  .detail-hero-v2 .detail-actions { grid-column: 1 / -1; grid-row: 2; justify-self: start; align-self: start; margin-top: 18px; }
}

@media (max-width: 899px) {
  .sidebar { transform: translateX(-105%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 40; display: block; border: 0; background: rgba(2, 7, 10, .68); opacity: 0; pointer-events: none; transition: opacity var(--duration-enter) ease; }
  .sidebar.open ~ .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main-shell { margin-left: 0; }
  .topbar { min-height: 68px; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
  .mobile-menu { display: grid; margin-right: 5px; }
  .breadcrumbs { gap: 7px; }
  .global-search { width: min(270px, 34vw); }
  .board-toolbar-v2 { align-items: flex-start; flex-wrap: wrap; }
  .board-toolbar-status { width: 100%; margin-left: 0; }
  .board-key-hint { width: 100%; margin-left: 0; }
  .people-hero { flex-direction: column; }
  .people-hero-actions { justify-content: flex-start; max-width: none; }
}

@media (max-width: 639px) {
  .content { padding: 20px 16px max(42px, env(safe-area-inset-bottom)); }
  .hero, .page-heading, .projects-control-bar, .detail-task-toolbar { align-items: flex-start; flex-direction: column; }
  .hero-actions, .page-actions, .people-hero-actions, .detail-actions { width: 100%; }
  .hero-actions .btn, .page-actions .btn, .people-hero-actions .btn, .detail-actions .btn { flex: 1 1 auto; }
  .hero-v2 { display: flex; align-items: stretch; flex-direction: column; min-height: 0; padding: 23px 20px; border-radius: 17px; }
  .hero-v2::before { right: -160px; }
  .hero-visual { align-self: flex-start; margin: 22px 0 0; }
  .hero-v2 .hero-actions { margin-top: 21px; }
  .quick-add-card { align-items: flex-start; flex-wrap: wrap; }
  .quick-add-copy { min-width: calc(100% - 50px); }
  .quick-add-controls { width: 100%; flex-wrap: wrap; }
  .quick-add-controls input, .quick-add-controls textarea, .quick-add-controls select, .quick-add-controls .btn { width: 100%; flex: 1 1 100%; }
  .batch-toolbar-actions { width: 100%; margin-left: 0; }
  .batch-toolbar-actions .btn, .batch-toolbar-actions .text-link { flex: 1; }
  .modal-footer-left { width: 100%; }
  .modal-footer-left .btn { flex: 1; }
  .metric-card { min-height: 143px; }
  .dashboard-insights { gap: 12px; }
  .insight-body { padding-inline: 16px; }
  .status-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workflow-completion { align-items: flex-start; }
  .workflow-completion-orbit { width: 88px; height: 88px; }
  .workflow-completion-orbit::after { inset: 7px; }
  .workflow-completion-orbit span { font-size: 19px; }
  .panel-heading { padding-inline: 16px; }
  .project-table-head { display: none; }
  .project-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; padding: 14px 16px; }
  .project-row > .project-workflow-meta { grid-column: 1 / -1; }
  .project-row > .project-meta { grid-column: 1; }
  .project-row > .project-owner { grid-column: 2; justify-self: end; }
  .project-row > .progress-copy { grid-column: 1 / -1; text-align: left; }
  .project-row .progress-bar { width: 100%; margin-left: 0; }
  .project-list-hero, .people-hero { min-height: 0; padding: 23px 21px; border-radius: 17px; }
  .project-list-hero { align-items: flex-start; flex-direction: column; }
  .project-health-strip { width: 100%; }
  .projects-control-bar { gap: 10px; }
  .projects-control-meta { width: 100%; justify-content: space-between; }
  .projects-control-meta .btn { flex: 0 0 auto; }
  .project-card { padding: 16px; }
  .project-card-v2-footer { align-items: stretch; flex-direction: column; }
  .project-card-v2-footer .btn { width: 100%; }
  .board-toolbar-left, .board-select-wrap, .board-scope-pills { width: 100%; }
  .board-scope-pills { overflow-x: auto; }
  .board-scope-pill { flex: 1 0 auto; }
  .board { min-width: 0; }
  .detail-hero-v2 { display: flex; align-items: stretch; flex-direction: column; padding: 22px 20px; border-radius: 17px; }
  .detail-hero-v2 .detail-hero-progress { align-self: flex-start; margin: 22px 0 0; }
  .detail-hero-v2 .detail-actions { margin-top: 21px; }
  .detail-title { align-items: flex-start; }
  .detail-hero-v2 .detail-title h1 { font-size: 24px; white-space: normal; }
  .detail-hero-v2 .detail-title p:not(.eyebrow) { white-space: normal; }
  .detail-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .detail-stat-grid > div { padding: 13px; }
  .detail-stat-grid strong { font-size: 21px; }
  .detail-tabs { gap: 12px; overflow-x: auto; }
  .detail-tab { flex: 0 0 auto; }
  .detail-overview-v2 { grid-template-columns: 1fr; }
  .workflow-detail-panel, .workflow-history-panel { padding-inline: 16px; }
  .workflow-detail-heading, .workflow-history-heading { flex-direction: column; }
  .workflow-detail-summary { width: 100%; flex-direction: column; }
  .workflow-detail-summary > div { min-width: 0; }
  .workflow-track { grid-template-columns: 1fr; gap: 0; }
  .workflow-track-item { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; padding-bottom: 10px; }
  .workflow-track-rail { position: relative; height: 100%; min-height: 100%; align-items: flex-start; justify-content: center; }
  .workflow-track-rail > i { width: 2px; height: auto; position: absolute; top: 29px; bottom: -10px; left: 13px; flex: none; }
  .workflow-node-card { min-height: 0; }
  .workflow-history-row { grid-template-columns: 1fr auto; gap: 9px; }
  .workflow-history-time { grid-column: 1 / -1; padding-top: 0; }
  .workflow-history-actor { justify-self: end; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .modal-backdrop { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
  .modal { width: 100%; max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom))); border-radius: 16px; }
  .modal-header, .modal form { padding-inline: 16px; }
  .modal-footer { align-items: stretch; flex-direction: column; padding-inline: 16px; }
  .modal-footer-right { width: 100%; margin-left: 0; }
  .modal-footer-right .btn { flex: 1; }
  .drawer-topbar, .drawer-body, .drawer-footer { padding-inline: 18px; }
  .drawer-title { font-size: 22px; }
  .drawer-statuses { grid-template-columns: 1fr 1fr; }
  .people-hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-hero-actions .btn { width: 100%; }
  .people-toolbar { align-items: flex-start; flex-direction: column; }
  .people-toolbar-search { width: 100%; }
  .people-toolbar-search > span:last-child { display: none; }
  .people-import-start { grid-template-columns: 1fr; padding-inline: 16px; }
  .people-import-step { padding-inline: 16px; }
  .people-mapping-grid { grid-template-columns: 1fr; }
  .import-strategy-row .form-helper { width: 100%; margin-left: 0; }
  .people-import-table-wrap { max-height: 330px; }
  .import-preview-actions { align-items: stretch; flex-direction: column; }
  .command-backdrop { padding: max(54px, calc(env(safe-area-inset-top) + 16px)) 10px 10px; }
  .command-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-height: 700px) and (orientation: landscape) {
  .sidebar { padding-top: max(12px, env(safe-area-inset-top)); }
  .workspace-switcher { margin-block: 16px; }
  .sidebar-tip { display: none; }
  .topbar { min-height: 60px; }
  .modal-backdrop { align-items: start; }
  .modal-header { padding-top: 14px; padding-bottom: 11px; }
  .modal form { padding-top: 14px; }
  .drawer-topbar { min-height: 62px; }
  .drawer-body { padding-top: 18px; }
  .command-backdrop { padding-top: max(16px, env(safe-area-inset-top)); }
}

@media (hover: none) {
  .btn:hover, .project-card:hover, .task-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .btn:hover, .project-card:hover, .task-card:hover { transform: none; }
}
