: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; }
.user-avatar, .topbar-avatar { display: grid; place-items: center; color: var(--primary-ink); font-weight: 800; background: var(--primary); }
.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); }
.app-version { margin: 10px 8px 0; color: var(--subtle); font-size: 10px; letter-spacing: .08em; text-align: right; }
.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 { min-width: 0; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumbs strong, .breadcrumb-current { min-width: 0; overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb-link, .breadcrumb-current { min-height: 32px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font-size: 12px; }
.breadcrumb-link:hover, .breadcrumb-current:hover { color: var(--primary); background: var(--primary-soft); }
.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 { display: none; width: 7px; height: 7px; position: absolute; top: 9px; right: 9px; border: 2px solid var(--graphite-950); border-radius: 50%; background: var(--red); }
.notification-button.has-unread i { display: block; }
.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(125px, .9fr) minmax(120px, .85fr) minmax(120px, .85fr) 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-color.project-icon { color: var(--graphite-950); }
.project-color-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.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; }
.project-lane-progress { min-width: 0; display: grid; gap: 2px; }
.project-lane-progress span { color: var(--muted); font-size: 9px; }
.project-lane-progress strong { overflow: hidden; color: var(--ink-soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-lane-progress small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.project-lane-progress small.overdue { color: var(--red); }
.project-lane-progress.empty strong { color: var(--subtle); }
.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-stall-alert { color: var(--red); font-weight: 800; }
.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-dual-progress { display: grid; gap: 9px; }
.project-card-dual-progress .project-lane-progress { padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.project-card-dual-progress .project-lane-progress:last-child { padding-bottom: 0; border-bottom: 0; }
.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-source-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.task-source-badge { min-height: 24px; padding: 3px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 9px; font-weight: 800; cursor: pointer; }
.task-source-badge.stall { color: var(--red); border-color: rgba(255, 146, 150, .42); background: var(--red-soft); }
.task-source-badge.risk { color: var(--orange); border-color: rgba(244, 194, 122, .46); background: var(--orange-soft); }
.task-source-badge:hover, .task-source-badge:focus-visible { border-color: currentColor; outline: 2px solid rgba(138, 219, 217, .18); outline-offset: 2px; }
.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-context-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.task-project-context, .task-batch-context { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 6px; border: 1px solid #315b5d; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 700; }
.task-batch-context { color: var(--silver-300); border-color: var(--line-strong); background: var(--surface-muted); }
.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 .project-color-icon { width: 29px; height: 29px; stroke-width: 1.5; }
.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-parallel-connector { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 30px; padding: 5px 9px; border: 1px dashed #80602c; border-radius: 8px; color: var(--orange); background: var(--orange-soft); }
.workflow-parallel-connector-icon { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid #a67938; border-radius: 6px; color: var(--orange); background: rgba(244, 194, 122, .12); font-size: 13px; line-height: 1; }
.workflow-parallel-connector-label { font-size: 10px; font-weight: 800; }
.workflow-parallel-connector-svg { width: 56px; height: 24px; flex: 0 0 auto; overflow: visible; color: var(--orange); }
.workflow-parallel-connector-svg path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.workflow-parallel-connector small { margin-left: auto; color: var(--silver-300); font-size: 9px; }
.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.blocked { color: var(--red); border-color: rgba(255, 146, 150, .65); background: var(--red-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-track-item.parallel .workflow-node-card { border-color: #80602c; box-shadow: 0 8px 20px rgba(0, 0, 0, .24), inset 0 2px 0 rgba(244, 194, 122, .18); }
.workflow-track-item.parallel .workflow-track-number { color: var(--orange); border-color: #a67938; background: var(--orange-soft); }
.workflow-track-item.blocked .workflow-node-card { border-color: rgba(255, 146, 150, .52); box-shadow: 0 8px 20px rgba(0, 0, 0, .24), inset 0 2px 0 rgba(255, 146, 150, .16); }
.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-node-badges { position: relative; z-index: 3; display: flex; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.workflow-link-indicator { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px; color: var(--primary); vertical-align: -3px; }
.workflow-link-indicator .icon { width: 13px; height: 13px; }
.workflow-parallel-badge { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border: 1px solid #a67938; border-radius: 6px; color: var(--orange); background: var(--orange-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.workflow-reason-badge-wrap { position: relative; display: inline-flex; }
.workflow-reason-badge { min-height: 24px; padding: 3px 6px; border: 1px solid transparent; border-radius: 6px; color: var(--ink-soft); font-size: 9px; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer; }
.workflow-reason-badge.stall { color: var(--red); border-color: rgba(255, 146, 150, .45); background: var(--red-soft); }
.workflow-reason-badge.risk { color: var(--orange); border-color: rgba(244, 194, 122, .48); background: var(--orange-soft); }
.workflow-reason-badge:hover, .workflow-reason-badge:focus-visible { border-color: currentColor; outline: 2px solid rgba(138, 219, 217, .18); outline-offset: 2px; }
.workflow-reason-tooltip { width: min(245px, 56vw); position: absolute; z-index: 50; top: calc(100% + 7px); right: 0; display: none; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink-soft); background: var(--surface-raised); box-shadow: var(--shadow-md); font-size: 9px; text-align: left; }
.workflow-reason-badge-wrap:hover .workflow-reason-tooltip, .workflow-reason-badge-wrap:focus-within .workflow-reason-tooltip { display: block; }
.workflow-reason-tooltip strong { color: var(--ink); font-size: 10px; }
.workflow-reason-tooltip ul { display: grid; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.workflow-reason-tooltip li { display: grid; gap: 2px; padding-top: 5px; border-top: 1px solid var(--line); }
.workflow-reason-tooltip li:first-child { padding-top: 0; border-top: 0; }
.workflow-reason-tooltip li small, .workflow-reason-tooltip > small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.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.blocked { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-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-owner { min-width: 0; }
.workflow-owner-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-owner-more { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 4px; border: 1px solid #3d7576; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 8px; font-weight: 800; }
.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-amount { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.workflow-node-amount .icon { width: 11px; height: 11px; }
.workflow-node-amount.partial { color: var(--orange); border: 1px solid #725428; background: var(--orange-soft); }
.workflow-node-amount.complete { color: var(--green); border: 1px solid #326b53; background: var(--green-soft); }
.amount-progress { display: grid; gap: 6px; margin-bottom: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.amount-progress-bar { height: 8px; overflow: hidden; border-radius: 5px; background: var(--line-strong); }
.amount-progress-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary), #3d7576); transition: width .3s ease; }
.amount-progress span { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.amount-records { display: grid; gap: 6px; margin: 12px 0 2px; }
.amount-records-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 2px; color: var(--muted); font-size: 9px; }
.amount-records-heading strong { color: var(--ink-soft); font-size: 9px; }
.amount-record-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.amount-record-main { display: grid; gap: 2px; min-width: 0; }
.amount-record-main strong { color: var(--ink); font-size: 11px; }
.amount-record-main span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.amount-record-row small { flex: 0 0 auto; color: var(--muted); font-size: 8px; }
.amount-record-empty { padding: 10px; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.batch-mode-toggle { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.batch-toggle-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink); cursor: pointer; }
.batch-mode-radios { display: flex; gap: 14px; }
.batch-mode-radios label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-soft); cursor: pointer; }
.project-batches-panel { margin-top: 16px; }
.batch-summary-strip { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); font-size: 10px; color: var(--muted); }
.batch-summary-strip strong { color: var(--ink); font-size: 13px; margin: 0 2px; }
.batch-list { display: grid; gap: 8px; margin-top: 10px; }
.batch-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 1fr) minmax(120px, .9fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.batch-row-main { display: grid; gap: 4px; min-width: 0; }
.batch-row-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.batch-row-title strong { color: var(--ink); font-size: 12px; }
.batch-overdue { padding: 2px 6px; border-radius: 5px; color: var(--red); background: var(--red-soft); font-size: 8px; font-weight: 750; }
.batch-row-quantity { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.batch-row-progress { display: grid; gap: 4px; min-width: 0; }
.batch-row-progress .progress-bar { height: 6px; }
.batch-row-progress > span { color: var(--ink-soft); font-size: 9px; font-weight: 700; }
.batch-row-meta { color: var(--muted); font-size: 9px; }
.batch-row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.batch-row-actions .btn { min-height: 32px; padding: 4px 8px; font-size: 9px; }
.batch-empty { padding: 22px 14px; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); text-align: center; }
.batch-empty strong { display: block; color: var(--ink-soft); font-size: 12px; margin-bottom: 4px; }
.batch-empty p { margin: 0; font-size: 9px; }
.project-card-batch { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-soft); }
.project-card-batch-icon { display: inline-flex; color: var(--primary); }
.project-card-batch-icon .icon { width: 13px; height: 13px; }
.project-card-batch strong { color: var(--ink); font-size: 11px; }
.project-card-batch small { margin-left: auto; color: var(--muted); font-size: 9px; }
.workflow-node-stall { display: grid; gap: 4px; margin-top: 10px; padding: 7px 8px; border: 1px solid rgba(255, 146, 150, .34); border-radius: 7px; background: var(--red-soft); }
.workflow-stall-badge { color: var(--red); font-size: 9px; font-weight: 800; }
.workflow-node-stall ul { display: grid; gap: 3px; margin: 0; padding: 0 0 0 13px; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.workflow-node-stall li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-node-stall p { margin: 0; overflow: hidden; color: var(--ink-soft); font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.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-track-item.blocked .workflow-action-button.primary-action { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-soft); }
.workflow-node-source-highlight .workflow-node-card { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(138, 219, 217, .22), 0 10px 24px rgba(0, 0, 0, .35); animation: workflow-source-pulse 1s ease-in-out 2; }
.workflow-lanes { display: grid; gap: 13px; }
.workflow-lanes { grid-template-columns: minmax(0, 1fr); }
.workflow-lane { min-width: 0; padding: 11px 12px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-soft); }
.workflow-lane + .workflow-lane { border-top-color: #3e5961; }
.workflow-lane-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.workflow-lane-title { min-width: 0; display: flex; align-items: center; gap: 8px; }
.workflow-lane-index { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #3d7576; border-radius: 7px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 800; }
.workflow-lane-title > div { min-width: 0; display: grid; gap: 3px; }
.workflow-lane-title strong { color: var(--ink); font-size: 11px; }
.workflow-lane-title span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-lane-health { color: var(--muted); font-size: 9px; white-space: nowrap; }
.workflow-lane-health .workflow-health-stall { color: var(--red); }
.workflow-lane-health .workflow-health-risk { color: var(--orange); }
.workflow-lane-track { min-width: 0; display: flex; gap: 0; overflow-x: auto; padding: 2px 1px 5px; scrollbar-color: var(--line-strong) var(--surface-muted); }
.workflow-lane-track .dual-lane-item { min-width: 166px; flex: 1 0 166px; }
.workflow-lane-track .workflow-node-card { min-height: 171px; }
.task-card-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; margin-left: auto; }
.close-request-button { min-height: 30px; padding: 5px 8px; color: var(--primary-ink); background: var(--primary); border-color: var(--primary); font-size: 10px; }
.close-request-state { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.close-request-state.pending { color: var(--orange); background: var(--orange-soft); }
.close-request-review { display: grid; gap: 9px; margin-top: 14px; padding: 11px; border: 1px solid #705932; border-radius: 10px; background: rgba(59, 44, 24, .35); }
.close-request-review-row { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: var(--ink-soft); font-size: 11px; }
.close-request-review-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.close-request-review-row > div { display: inline-flex; flex: 0 0 auto; gap: 6px; }
.drawer-readonly-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.visibility-role-options { display: flex; flex-wrap: wrap; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.visibility-role-option { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.visibility-role-option:has(input:checked) { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.visibility-role-option input { accent-color: var(--primary); }
.workflow-dual-summary { flex-wrap: wrap; }
.workflow-dual-summary > div { min-width: 120px; }
.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.blocked { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-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[type='checkbox'], input[type='radio'] { width: 20px; min-width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; padding: 0; margin: 0; border-radius: 4px; accent-color: var(--primary); }
input[type='radio'] { border-radius: 50%; }
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); }
.project-icon-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; }
.project-icon-option { min-height: 66px; display: grid; place-items: center; gap: 5px; padding: 7px 5px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface-muted); font-size: 9px; font-weight: 700; }
.project-icon-option:hover { color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.project-icon-option.selected { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px rgba(138, 219, 217, .18); }
.project-choice-icon { width: 24px; height: 24px; display: grid; place-items: center; stroke-width: 1.5; }
.project-choice-icon .icon, .project-choice-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.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-lane-editor-list { display: grid; gap: 10px; }
.workflow-lane-editor { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.workflow-lane-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.workflow-lane-editor-heading > div { min-width: 0; display: grid; gap: 3px; }
.workflow-lane-editor-heading strong { color: var(--ink); font-size: 11px; }
.workflow-lane-editor-heading span { color: var(--muted); font-size: 9px; }
.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); cursor: grab; transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, opacity var(--duration-fast) ease; }
.workflow-node-row.dragging { opacity: .58; cursor: grabbing; }
.workflow-node-row.drop-target { border-color: var(--primary); background: var(--primary-soft); }
.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-fields .workflow-node-person, .workflow-node-fields .workflow-node-person { min-width: 0; display: grid; gap: 5px; }
.workflow-extra-owners { display: grid; gap: 5px; }
.workflow-owner-extra-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 5px; align-items: start; }
.workflow-owner-extra-row .workflow-node-action { width: 44px; }
.workflow-node-fields .workflow-node-person .form-helper { display: none; }
.workflow-add-owner { min-height: 32px; justify-self: start; padding: 4px 7px; border: 1px dashed #3d7576; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 750; }
.workflow-add-owner:hover { background: #21474a; }
.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; }
.workflow-reason-list { display: grid; gap: 8px; }
.workflow-reason-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 7px; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.workflow-reason-input-main { min-width: 0; display: grid; gap: 7px; }
.workflow-reason-input-main > input { min-width: 0; }
.workflow-reason-owner-picker { min-width: 0; }
.workflow-reason-owner-picker .form-helper { display: none; }
.workflow-reason-input-row .workflow-node-action { width: 44px; }
.workflow-add-reason { margin-top: 9px; }
.workflow-reason-details-body { display: grid; gap: 8px; padding: 17px 22px 0; }
.workflow-reason-detail-item { padding: 11px 12px; border: 1px solid rgba(255, 146, 150, .4); border-radius: 8px; background: var(--red-soft); }
.workflow-reason-detail-item.resolved { border-color: var(--line); opacity: .7; background: var(--surface-soft); }
.workflow-reason-detail-main > div:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.workflow-reason-detail-main strong { color: var(--ink); font-size: 11px; line-height: 1.45; }
.workflow-reason-detail-main p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.workflow-reason-status { display: inline-flex; min-height: 21px; align-items: center; padding: 2px 6px; border: 1px solid transparent; border-radius: 5px; font-size: 8px; font-weight: 800; }
.workflow-reason-status.open { color: var(--red); border-color: rgba(255, 146, 150, .42); background: rgba(255, 146, 150, .12); }
.workflow-reason-status.resolved { color: var(--green); border-color: rgba(117, 214, 168, .38); background: var(--green-soft); }
.workflow-reason-detail-item textarea { width: 100%; min-height: 55px; margin-top: 9px; }
.workflow-resolve-item { margin-top: 7px; color: var(--primary); border-color: #3d7576; background: var(--primary-soft); }
.workflow-reason-details-modal .modal-footer { margin-inline: 22px; }
.workflow-early-unlock-modal .form-field { display: grid; gap: 7px; }
.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; flex-wrap: wrap; gap: 8px; }
.people-row-actions .btn { min-height: 36px; white-space: nowrap; }
.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 { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; color: var(--ink-soft); }
.import-field-decisions label:has(input:checked) { color: var(--primary); background: var(--primary-soft); }
.import-field-decisions input { min-height: 20px; width: 20px; 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 { min-height: 36px; padding: 4px 7px; border-radius: 7px; cursor: pointer; }
.batch-select-all input, .task-select input { min-height: 20px; width: 20px; 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; justify-content: center; flex: 0 0 auto; min-width: 36px; min-height: 36px; padding: 3px; border-radius: 7px; 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:hover { background: var(--primary-soft); }
.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; } }
@keyframes workflow-source-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(138, 219, 217, .22), 0 10px 24px rgba(0, 0, 0, .35); } 50% { box-shadow: 0 0 0 7px rgba(138, 219, 217, .08), 0 10px 24px rgba(0, 0, 0, .35); } }

@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, .project-row > .project-lane-progress { 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-lane { padding: 10px 10px 12px; }
  .workflow-lane-track { display: grid; gap: 0; overflow: visible; padding: 0; }
  .workflow-lane-track .dual-lane-item { min-width: 0; width: 100%; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; padding-bottom: 10px; }
  .workflow-lane-track .dual-lane-item .workflow-track-rail { position: relative; height: 100%; min-height: 100%; align-items: flex-start; justify-content: center; }
  .workflow-lane-track .dual-lane-item .workflow-track-rail > i { width: 2px; height: auto; position: absolute; top: 29px; bottom: -10px; left: 13px; flex: none; }
  .workflow-lane-track .dual-lane-item:last-child { padding-bottom: 0; }
  .workflow-lane-track .dual-lane-item:last-child .workflow-track-rail > i { display: none; }
  .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; }
  .workflow-reason-modal, .workflow-reason-details-modal, .workflow-early-unlock-modal { align-self: end; max-height: min(82dvh, 680px); margin-top: auto; border-radius: 16px 16px 0 0; }
  .modal-header, .modal form { padding-inline: 16px; }
  .workflow-reason-details-body { padding-inline: 16px; }
  .workflow-reason-details-modal .modal-footer { margin-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)); }
  .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; }
}

/* ===== v1.3 新增 ===== */
/* #6 任务状态分布-逾期 */
.status-legend-label i.overdue, .summary-dot.overdue { background: #d64545; }
.status-legend-item.status-overdue .status-legend-label { color: #d64545; }
.status-legend-item.status-overdue strong { color: #d64545; }

/* #5 金额记录方式切换 */
.amount-mode-switch { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); }
.amount-mode-label { color: var(--muted); font-size: 11px; font-weight: 600; }
.amount-mode-option { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.amount-mode-option input { accent-color: var(--primary); }

/* #3 项目卡片拖拽排序 */
.project-card-v2.dragging { opacity: .48; transform: rotate(1deg); }
.project-card-v2.drop-target { border: 1px dashed var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* #2 添加节点按钮 */
.workflow-lane-add { margin-top: 10px; align-self: flex-start; }

/* ===== #7 分辨率适配 v1.3 ===== */
/* 超宽屏：项目卡片 3/4 列；多轨流程始终按 lane 独立分行 */
@media (min-width: 1400px) {
  .projects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
  .projects-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(320px, .85fr); }
}
@media (min-width: 1920px) {
  .content { --content-max: 1920px; }
  .projects-grid-v2 { grid-template-columns: repeat(4, minmax(280px, 1fr)); gap: 16px; }
  .project-card-v2 { min-height: 100%; }
}
@media (max-width: 390px) {
  .content { padding-inline: 10px; }
  .project-list-hero { gap: 16px; padding: 18px 15px; }
  .project-list-hero h1 { font-size: 26px; }
  .project-list-microcopy { gap: 6px; margin-top: 14px; }
  .project-health-strip { width: 100%; gap: 5px; }
  .project-health-strip > div { min-width: 0; padding: 9px 8px; }
  .project-health-strip strong { font-size: 18px; }
  .project-card { padding: 14px; }
  .project-card-v2-top { align-items: flex-start; }
  .project-card-title strong, .project-card-title span, .project-card-workflow strong, .project-card-next strong { overflow: visible; overflow-wrap: anywhere; white-space: normal; text-overflow: clip; }
  .project-card-workflow { grid-template-columns: 1fr; gap: 6px; padding: 10px; }
  .project-card-description { min-height: 0; overflow-wrap: anywhere; }
  .project-card-v2-status { gap: 5px; line-height: 1.45; }
  .project-card-v2-footer { gap: 10px; }
}
/* 笔记本小高度（1366x768 / 1280x800）：压缩垂直留白，减少滚动 */
@media (max-height: 820px) and (min-width: 900px) {
  .hero-v2 { padding-top: 18px; padding-bottom: 18px; }
  .metric-card { padding: 12px; }
  .project-card { padding: 14px; }
  .board-column { min-height: 400px; }
  .dashboard-grid, .dashboard-insights { gap: 12px; }
  .quick-add-card { padding: 10px 14px; }
}
/* 更矮的屏幕（1280x720）：进一步压缩 */
@media (max-height: 740px) and (min-width: 900px) {
  .hero-v2 { padding-top: 14px; padding-bottom: 14px; }
  .hero-v2 .hero-actions { margin-top: 10px; }
  .project-list-hero, .people-hero { padding: 16px 21px; }
  .workflow-track-item { padding-bottom: 8px; }
  .workflow-detail-panel { padding: 14px 18px; }
}

/* ===== #8 多账号登录 ===== */
.auth-shell { display: flex; justify-content: center; align-items: flex-start; padding: 48px 16px; min-height: calc(100dvh - 140px); }
.auth-card { width: min(100%, 420px); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.auth-brand { display: grid; gap: 6px; margin-bottom: 18px; }
.auth-brand .brand-mark { display: flex; gap: 4px; }
.auth-brand h1 { font-size: 22px; margin: 0; }
.auth-brand p { margin: 0; color: var(--muted); font-size: 12px; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; border-radius: 10px; background: var(--surface-soft); }
.auth-tab { flex: 1; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.auth-tab.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.auth-methods { display: flex; gap: 14px; margin-bottom: 14px; font-size: 12px; }
.auth-method-option { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.auth-method-option input { accent-color: var(--primary); }
.auth-actions { display: flex; gap: 10px; margin-top: 6px; }
.auth-actions .btn { flex: 1; }
@media (max-width: 639px) { .auth-shell { padding: 24px 10px; } .auth-card { padding: 22px 18px; } }

/* Notifications, account administration and compact touch surfaces */
.notification-panel { width: min(390px, calc(100vw - 24px)); position: fixed; top: 76px; right: max(18px, env(safe-area-inset-right)); z-index: 70; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-md); animation: modal-in var(--duration-enter) var(--ease-standard); }
.notification-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 17px 12px; border-bottom: 1px solid var(--line); }
.notification-panel-header h2 { margin: 0; font-size: 15px; }
.notification-panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.notification-panel-header .icon-button { width: 36px; height: 36px; }
.notification-list { max-height: min(62dvh, 460px); overflow: auto; }
.notification-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 13px 17px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #2d5557; border-radius: 8px; color: var(--primary); background: var(--primary-soft); }
.notification-item-icon .icon { width: 15px; height: 15px; }
.notification-item-copy { min-width: 0; display: grid; gap: 3px; }
.notification-item-copy strong { color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.notification-item-copy span { color: var(--muted); font-size: 9px; }
.notification-empty { padding: 31px 18px; color: var(--muted); font-size: 11px; text-align: center; }
.account-page { display: grid; gap: 16px; }
.account-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 22px 24px; border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #15252b, #1e373c 62%, #1c4141); box-shadow: var(--shadow-sm); }
.account-hero h1 { margin: 0; color: var(--ink); font-size: clamp(25px, 3vw, 33px); letter-spacing: -.045em; }
.account-hero p:not(.eyebrow) { max-width: 650px; margin: 8px 0 0; color: var(--silver-300); font-size: 11px; line-height: 1.6; }
.account-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.account-tab { min-height: 40px; padding: 7px 12px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; }
.account-tab.active { color: var(--primary); border-color: #2b5557; background: var(--primary-soft); }
.account-table-wrap, .audit-table-wrap { overflow-x: auto; }
.account-table, .audit-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.account-table th, .account-table td, .audit-table th, .audit-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; text-align: left; vertical-align: middle; }
.account-table th, .audit-table th { color: var(--silver-400); background: var(--surface-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.account-table tr:last-child td, .audit-table tr:last-child td { border-bottom: 0; }
.account-name-cell { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.account-name-copy { min-width: 0; display: grid; gap: 2px; }
.account-name-copy strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-name-copy span { color: var(--muted); font-size: 9px; }
.account-role-select, .account-person-select { min-height: 36px; width: auto; min-width: 106px; padding: 6px 9px; }
.account-person-select { min-width: 150px; }
.account-status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: 9px; font-weight: 750; white-space: nowrap; }
.account-status.pending, .account-status.invited { color: var(--orange); background: var(--orange-soft); }
.account-status.suspended { color: var(--red); background: var(--red-soft); }
.account-unbound { color: var(--orange); }
.account-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.account-filters label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.account-filters select { min-height: 38px; width: auto; min-width: 150px; padding: 6px 9px; }
.account-log-event { color: var(--ink); font-weight: 700; }
.account-log-time { color: var(--muted); white-space: nowrap; }
.account-log-empty { padding: 36px 18px; color: var(--muted); text-align: center; }

/* Template center */
.template-page, .template-editor-shell { display: grid; gap: 16px; }
.template-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 24px; border: 1px solid #2f4a50; border-radius: var(--radius-lg); background: linear-gradient(125deg, #15252b, #1e373c 62%, #1c4141); box-shadow: var(--shadow-sm); }
.template-hero h1 { margin: 0; color: var(--ink); font-size: clamp(25px, 3vw, 33px); letter-spacing: -.045em; }
.template-hero p:not(.eyebrow) { max-width: 680px; margin: 8px 0 0; color: var(--silver-300); font-size: 11px; line-height: 1.6; }
.template-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.template-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.template-card { min-width: 0; display: grid; gap: 12px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.template-card-top, .template-card-meta, .template-card-actions, .template-preview-heading, .template-lane-heading, .template-editor-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.template-status, .template-type { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: var(--radius-pill); font-size: 9px; font-weight: 750; }
.template-status.draft { color: var(--orange); background: var(--orange-soft); }
.template-status.published { color: var(--green); background: var(--green-soft); }
.template-status.archived { color: var(--muted); background: var(--surface-muted); }
.template-type { color: var(--primary); background: var(--primary-soft); }
.template-card h2 { margin: 0; color: var(--ink); font-size: 15px; letter-spacing: -.02em; }
.template-card p { min-height: 38px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.template-card-meta { justify-content: flex-start; flex-wrap: wrap; color: var(--silver-400); font-size: 9px; }
.template-card-meta span + span::before { content: "·"; margin-right: 7px; color: var(--subtle); }
.template-card-actions { padding-top: 4px; border-top: 1px solid var(--line); }
.template-card-secondary { margin-left: auto; }
.template-empty { display: grid; justify-items: center; gap: 9px; padding: 52px 20px; text-align: center; }
.template-empty strong { color: var(--ink); font-size: 14px; }
.template-empty p { margin: 0; color: var(--muted); font-size: 11px; }
.template-notice { padding: 10px 13px; border: 1px solid #80602c; border-radius: var(--radius-sm); color: var(--orange); background: var(--orange-soft); font-size: 10px; line-height: 1.5; }
.template-editor-panel { overflow: hidden; }
.template-form-body { display: grid; gap: 18px; padding: 0 21px 20px; }
.template-editor-section-heading { align-items: flex-end; padding-top: 4px; }
.template-editor-section-heading h3, .template-lane-heading h3 { margin: 2px 0 0; color: var(--ink); font-size: 13px; }
.template-editor-section-heading p:not(.section-kicker) { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.template-role-options, .template-node-flags { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.template-role-options label, .template-node-flags label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.template-lane-list, .template-node-list, .template-dependency-list { display: grid; gap: 10px; }
.template-lane-editor { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.template-lane-heading { align-items: flex-start; }
.template-lane-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.template-lane-fields label, .template-node-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.template-node-row { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.template-node-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 11px; }
.template-node-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 100px minmax(0, 1.2fr); gap: 8px; }
.template-dependency-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.template-dependency-index { color: var(--muted); font-size: 10px; text-align: center; }
.template-preview-inline { display: grid; gap: 8px; margin-top: 8px; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.template-preview-inline.muted { color: var(--muted); font-size: 10px; }
.template-preview-heading { color: var(--ink-soft); font-size: 10px; }
.template-preview-heading span { color: var(--muted); }
.template-preview-lanes { display: grid; gap: 6px; }
.template-preview-lane { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; }
.template-preview-lane > span { color: var(--muted); font-size: 9px; }
.template-preview-lane > div { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.template-preview-node { display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border: 1px solid #2b5557; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: 9px; }
.template-preview-node small { color: var(--muted); }
.template-preview-lane i { color: var(--subtle); font-size: 10px; font-style: normal; }
.danger-link { color: var(--red) !important; }
.btn-small { min-height: 32px; padding: 6px 9px; font-size: 10px; }
.loading-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.system-status-field { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.system-status-field > span:last-child { color: var(--muted); font-size: 10px; }
.execution-shadow-panel { display: grid; gap: 14px; margin-bottom: 16px; border-color: #2c5557; background: linear-gradient(135deg, var(--surface) 0%, #15272a 100%); }
.execution-shadow-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 10px; }
.execution-shadow-summary > strong, .execution-shadow-summary > span { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: rgba(255,255,255,.03); }
.execution-shadow-summary > strong { color: var(--primary); border-color: #326c6c; }
.execution-shadow-diff-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--muted); background: rgba(255,255,255,.03); cursor: pointer; font: inherit; }
.execution-shadow-diff-tag:hover, .execution-shadow-diff-tag:focus-visible { border-color: var(--primary); color: var(--primary); outline: none; }
.execution-shadow-diff-tag strong { padding: 0; border: 0; color: inherit; background: transparent; }
.execution-shadow-list { display: grid; gap: 7px; }
.execution-shadow-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) auto minmax(160px, 2fr); align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(8, 14, 18, .35); }
.execution-shadow-row strong { color: var(--ink-soft); font-size: 11px; }
.execution-shadow-row small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.execution-shadow-status, .execution-node-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: var(--surface-muted); font-size: 9px; font-weight: 750; white-space: nowrap; }
.execution-shadow-status.due_soon, .execution-node-badge.due_soon { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.execution-shadow-status.overdue, .execution-node-badge.overdue { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-soft); }
.execution-shadow-status.blocked, .execution-node-badge.blocked { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-soft); }
.execution-shadow-status.stalled, .execution-node-badge.stalled { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.execution-shadow-status.attention, .execution-node-badge.attention { color: var(--orange); border-color: #725428; background: var(--orange-soft); }
.execution-shadow-status.warning, .execution-node-badge.warning { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-soft); }
.execution-shadow-status.critical, .execution-node-badge.critical { color: var(--red); border-color: rgba(255, 146, 150, .48); background: var(--red-soft); }
.execution-shadow-status.normal, .execution-node-badge.normal { color: var(--green); border-color: #326b53; background: var(--green-soft); }
.execution-node-badge small { color: var(--muted); font-weight: 500; }
.workflow-node-execution-meta { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.execution-diff-modal { max-width: 720px; }
.execution-diff-list { display: grid; gap: 8px; max-height: min(58vh, 520px); overflow: auto; padding: 0 20px 2px; }
.execution-diff-row { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-muted); }
.execution-diff-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: 8px; }
.execution-diff-heading strong { min-width: 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.execution-diff-heading small { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.execution-diff-kind { width: fit-content; padding: 3px 6px; border-radius: 5px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 750; white-space: nowrap; }
.execution-diff-values { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 10px; }
.execution-diff-old, .execution-diff-new { padding: 5px 7px; border-radius: 5px; }
.execution-diff-old { color: var(--muted); background: rgba(255,255,255,.05); }
.execution-diff-new { color: var(--primary); background: var(--primary-soft); }
.execution-diff-arrow { color: var(--subtle); }
.execution-diff-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.execution-diff-empty { margin: 0; }

@media (max-width: 760px) {
  .template-hero { align-items: flex-start; flex-direction: column; padding: 20px 18px; }
  .template-hero-actions, .template-hero-actions .btn { width: 100%; }
  .template-hero-actions .btn { flex: 1; }
  .template-node-grid, .template-lane-fields { grid-template-columns: 1fr 1fr; }
  .template-dependency-row { grid-template-columns: 24px minmax(0, 1fr) 14px minmax(0, 1fr); }
  .template-dependency-row .danger-link { grid-column: 2 / -1; justify-self: end; }
  .execution-shadow-row { grid-template-columns: 1fr auto; }
  .execution-shadow-row small { grid-column: 1 / -1; }
  .execution-diff-heading { grid-template-columns: auto minmax(0, 1fr); }
  .execution-diff-heading small { grid-column: 1 / -1; }
}

@media (max-width: 639px) {
  .topbar { gap: 5px; padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); }
  .topbar-left { min-width: 0; flex: 1; }
  .breadcrumbs { min-width: 0; max-width: 100%; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .breadcrumbs::-webkit-scrollbar { display: none; }
  .topbar-actions { gap: 2px; }
  .mobile-menu, .icon-button { width: 32px; height: 32px; }
  .topbar-avatar { width: 30px; height: 30px; }
  .global-search { min-width: 32px; width: 32px; padding: 6px; }
  .global-search input, .global-search kbd { display: none; }
  .board { grid-template-columns: repeat(4, minmax(280px, calc(100vw - 48px))); gap: 10px; width: 100%; max-width: none; padding-inline: 0; overflow-x: auto; overscroll-behavior-x: contain; }
  .board-column { min-height: 420px; }
  .board-toolbar-left { align-items: stretch; }
  .board-select-wrap, .board-scope-pills { max-width: 100%; }
  .notification-panel { top: 70px; right: 12px; }
  .account-hero { align-items: flex-start; flex-direction: column; padding: 20px 18px; }
  .account-hero-actions, .account-hero-actions .btn { width: 100%; }
  .account-hero-actions .btn { flex: 1; }
  .account-filters { align-items: stretch; flex-direction: column; }
  .account-filters label, .account-filters select { width: 100%; }
}

.alerts-page, .workbench-page { display: grid; gap: 16px; }
.alerts-hero, .workbench-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 28px; border: 1px solid #2d5b5d; border-radius: var(--radius-lg); color: #efffff; background: linear-gradient(135deg, #17363a 0%, #0e1f25 74%); box-shadow: 0 20px 42px rgba(0, 0, 0, .18); }
.alerts-hero h1, .workbench-hero h1 { margin: 4px 0 8px; font-size: clamp(27px, 4vw, 42px); letter-spacing: -.045em; }
.alerts-hero p, .workbench-hero p { max-width: 680px; margin: 0; color: #b8d4d3; line-height: 1.7; }
.alerts-hero-count, .workbench-hero-stat { display: grid; min-width: 150px; justify-items: end; gap: 4px; color: #a9c7c5; }
.alerts-hero-count strong, .workbench-hero-stat strong { color: var(--primary); font-size: 42px; line-height: 1; }
.alerts-hero-count span, .workbench-hero-stat span { font-size: 11px; }
.alert-sync-state, .alert-sync-error { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10px; }
.alert-sync-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(98, 210, 156, .12); }
.alert-sync-error { color: #ffb3b6; }
.alert-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.alert-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); color: var(--muted); background: var(--surface); font-size: 11px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.alert-tab span, .workbench-section-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; border-radius: 10px; color: var(--ink-soft); background: var(--surface-muted); font-size: 10px; }
.alert-tab.active { border-color: #3f8985; color: var(--primary); background: var(--primary-soft); }
.alert-filter-panel { padding: 11px 14px; }
.alert-filter-scroll { display: flex; align-items: center; gap: 10px; overflow-x: auto; }
.alert-filter-scroll label { display: grid; flex: 0 0 150px; gap: 5px; color: var(--muted); font-size: 10px; }
.alert-filter-scroll select { width: 100%; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--surface-muted); }
.alert-filter-scroll .btn { flex: 0 0 auto; margin-top: 15px; }
.alert-list { display: grid; gap: 10px; }
.alert-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 16px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.alert-card.severity-critical { border-left-color: var(--red); }
.alert-card.severity-info { border-left-color: var(--blue); }
.alert-card.is-resolved { opacity: .68; }
.alert-card-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; color: var(--orange); background: var(--orange-soft); }
.severity-critical .alert-card-icon { color: var(--red); background: var(--red-soft); }
.severity-info .alert-card-icon { color: var(--blue); background: var(--blue-soft); }
.alert-card-icon .icon { width: 18px; height: 18px; }
.alert-card-top, .alert-card-actions, .alert-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.alert-card-top > div, .alert-card-actions-right { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.alert-type, .alert-stage, .alert-severity { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 800; }
.alert-type { color: var(--ink-soft); background: var(--surface-muted); }
.alert-stage { color: var(--muted); background: var(--surface-soft); }
.alert-severity { color: var(--orange); background: var(--orange-soft); }
.severity-critical .alert-severity { color: var(--red); background: var(--red-soft); }
.severity-info .alert-severity { color: var(--blue); background: var(--blue-soft); }
.alert-card h3 { margin: 8px 0 5px; color: var(--ink); font-size: 15px; letter-spacing: -.02em; }
.alert-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.alert-card-meta { justify-content: flex-start; flex-wrap: wrap; margin-top: 12px; color: var(--subtle); font-size: 10px; }
.alert-card-meta span + span::before { content: "·"; margin-right: 8px; color: var(--line-strong); }
.alert-card-actions { justify-content: space-between; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.alert-card-actions .text-link { display: inline-flex; align-items: center; gap: 4px; }
.alert-card-actions .icon { width: 13px; height: 13px; }
.alert-resolved-label { color: var(--muted); font-size: 10px; }
.alert-empty { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; text-align: center; }
.alert-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); }
.alert-empty strong { color: var(--ink-soft); }
.alert-empty p { margin: 0; color: var(--muted); font-size: 11px; }
.workbench-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.workbench-section { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 15px; }
.workbench-section:first-child { border-color: #765537; background: linear-gradient(145deg, var(--surface) 0%, #2a2019 100%); }
.workbench-section .panel-heading { margin-bottom: 0; }
.workbench-section .panel-heading h2 { font-size: 16px; }
.workbench-section-count { color: var(--primary); background: var(--primary-soft); }
.workbench-items { display: grid; gap: 6px; }
.workbench-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 9px 8px; border: 1px solid transparent; border-radius: 8px; color: inherit; text-align: left; background: var(--surface-soft); cursor: pointer; }
.workbench-item:hover, .workbench-item:focus-visible { border-color: var(--line-strong); background: var(--surface-muted); outline: none; }
.workbench-item-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--primary); background: var(--primary-soft); }
.workbench-item-icon.severity-critical { color: var(--red); background: var(--red-soft); }
.workbench-item-icon.severity-warning { color: var(--orange); background: var(--orange-soft); }
.workbench-item-icon .icon { width: 15px; height: 15px; }
.workbench-item-copy { display: grid; min-width: 0; gap: 3px; }
.workbench-item-copy strong, .workbench-item-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workbench-item-copy strong { color: var(--ink-soft); font-size: 11px; }
.workbench-item-copy small { color: var(--muted); font-size: 9px; }
.workbench-item-status { color: var(--blue); font-size: 9px; font-weight: 750; white-space: nowrap; }
.workbench-item-status.danger, .workbench-item-status.critical { color: var(--red); }
.workbench-item-status.warning { color: var(--orange); }
.workbench-empty { display: flex; align-items: center; gap: 8px; min-height: 62px; padding: 8px; color: var(--muted); font-size: 10px; }
.workbench-empty .icon { width: 17px; height: 17px; color: var(--green); }
.mobile-node-action-bar { display: none; }

@media (max-width: 760px) {
  .alerts-hero, .workbench-hero { align-items: flex-start; flex-direction: column; padding: 21px 18px; }
  .alerts-hero-count, .workbench-hero-stat { width: 100%; justify-items: start; grid-template-columns: auto auto; align-items: center; column-gap: 9px; }
  .alerts-hero-count strong, .workbench-hero-stat strong { font-size: 32px; }
  .alerts-hero-count .alert-sync-state, .alerts-hero-count .alert-sync-error { grid-column: 1 / -1; margin-top: 2px; }
  .workbench-hero-stat .btn { grid-column: 1 / -1; }
  .workbench-grid { grid-template-columns: 1fr; }
}

@media (max-width: 639px) {
  .alerts-page, .workbench-page { gap: 11px; }
  .alert-filter-panel { margin-inline: -2px; }
  .alert-card { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; padding: 12px 10px; }
  .alert-card-icon { width: 30px; height: 30px; border-radius: 8px; }
  .alert-card-icon .icon { width: 15px; height: 15px; }
  .alert-card-actions { align-items: flex-start; flex-direction: column; }
  .alert-card-actions-right { width: 100%; }
  .alert-card-actions-right .btn { flex: 1; }
  .workbench-section { padding: 12px 10px; }
  .workbench-item { grid-template-columns: 27px minmax(0, 1fr); }
  .workbench-item-status { grid-column: 2; }
  .project-detail-v2 { padding-bottom: 122px; }
  .mobile-node-action-bar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)); border-top: 1px solid rgba(130, 185, 180, .32); background: rgba(13, 20, 25, .96); box-shadow: 0 -10px 26px rgba(0, 0, 0, .22); backdrop-filter: blur(14px); }
  .mobile-node-action-bar button { display: grid; min-height: 44px; place-items: center; gap: 2px; padding: 4px 2px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: 9px; font-weight: 700; }
  .mobile-node-action-bar button:active, .mobile-node-action-bar button:focus-visible { border-color: #3f8985; color: var(--primary); background: var(--primary-soft); outline: none; }
  .mobile-node-action-bar .icon { width: 17px; height: 17px; }
}

/* Management cockpit */
.cockpit-page { display: grid; gap: 16px; }
.cockpit-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 184px; padding: 28px; border: 1px solid #2d5b5d; border-radius: var(--radius-lg); color: #efffff; background: linear-gradient(135deg, #17363a 0%, #0e1f25 74%); box-shadow: 0 20px 42px rgba(0, 0, 0, .18); }
.cockpit-hero h1 { margin: 4px 0 8px; color: var(--ink); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.05em; }
.cockpit-hero p:not(.eyebrow) { max-width: 620px; margin: 0; color: #b8d4d3; line-height: 1.7; }
.cockpit-hero-note { display: grid; min-width: 190px; justify-items: end; gap: 5px; color: var(--silver-300); font-size: 11px; text-align: right; }
.cockpit-hero-note strong { color: var(--primary); }
.cockpit-hero-note small { color: var(--silver-400); font-size: 9px; }
.cockpit-hero-icon { display: grid; width: 40px; height: 40px; place-items: center; margin-bottom: 4px; border: 1px solid #396b6b; border-radius: 12px; color: var(--primary); background: rgba(138, 219, 217, .12); }
.cockpit-hero-icon .icon { width: 19px; height: 19px; }
.cockpit-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cockpit-metric-card { min-height: 142px; }
.cockpit-metric-card[role='button'] { cursor: pointer; transition: transform var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease; }
.cockpit-metric-card[role='button']:hover, .cockpit-metric-card[role='button']:focus-visible { border-color: var(--primary); background: var(--surface-muted); outline: none; transform: translateY(-2px); }
.cockpit-metric-card.red .metric-icon { color: var(--red); border-color: rgba(255, 146, 150, .32); background: var(--red-soft); }
.cockpit-metric-card.red .metric-value { color: var(--red); }
.cockpit-card-hint { align-self: end; color: var(--subtle); font-size: 9px; line-height: 1.3; }
.cockpit-panel { min-width: 0; overflow: hidden; }
.cockpit-panel-count { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: var(--radius-pill); color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 750; white-space: nowrap; }
.cockpit-table-wrap { overflow-x: auto; }
.cockpit-ranking-table { width: 100%; min-width: 760px; border-collapse: collapse; text-align: left; }
.cockpit-ranking-table th, .cockpit-ranking-table td { padding: 13px 15px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; vertical-align: middle; }
.cockpit-ranking-table th { color: var(--silver-400); background: var(--surface-soft); font-size: 9px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.cockpit-ranking-table td:first-child { min-width: 168px; }
.cockpit-ranking-table td:first-child strong, .cockpit-ranking-table td:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-ranking-table td:first-child strong { color: var(--ink); font-size: 11px; }
.cockpit-ranking-table td:first-child small { margin-top: 4px; color: var(--subtle); font-size: 9px; }
.cockpit-ranking-row { cursor: pointer; transition: background var(--duration-fast) ease; }
.cockpit-ranking-row:hover, .cockpit-ranking-row:focus-visible { background: rgba(138, 219, 217, .06); outline: none; }
.cockpit-reason { max-width: 260px; color: var(--muted) !important; line-height: 1.45; }
.cockpit-level-badge, .cockpit-action-level { display: inline-flex; align-items: center; min-height: 23px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--radius-pill); font-size: 9px; font-weight: 800; white-space: nowrap; }
.cockpit-level-badge.normal, .cockpit-action-level.normal { color: var(--green); border-color: #2b604d; background: var(--green-soft); }
.cockpit-level-badge.attention, .cockpit-action-level.attention { color: var(--blue); border-color: #2b5269; background: var(--blue-soft); }
.cockpit-level-badge.warning, .cockpit-action-level.warning { color: var(--orange); border-color: #65491f; background: var(--orange-soft); }
.cockpit-level-badge.severe, .cockpit-action-level.severe { color: var(--red); border-color: rgba(255, 146, 150, .36); background: var(--red-soft); }
.cockpit-score { font-size: 16px; letter-spacing: -.04em; }
.cockpit-score.normal { color: var(--green); }
.cockpit-score.attention { color: var(--blue); }
.cockpit-score.warning { color: var(--orange); }
.cockpit-score.severe { color: var(--red); }
.cockpit-two-column { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 16px; align-items: stretch; }
.cockpit-actions-list { display: grid; gap: 0; padding: 0 16px 8px; }
.cockpit-action-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.cockpit-action-item:first-child { border-top: 0; }
.cockpit-action-copy { min-width: 0; }
.cockpit-action-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-action-copy p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.cockpit-action-copy small { display: block; margin-top: 5px; color: var(--subtle); font-size: 9px; }
.cockpit-action-item .text-link { margin-top: 1px; white-space: nowrap; }
.cockpit-empty, .cockpit-empty-inline { display: grid; justify-items: center; align-content: center; gap: 6px; color: var(--muted); text-align: center; }
.cockpit-empty { min-height: 150px; padding: 24px 18px; }
.cockpit-empty strong { color: var(--ink-soft); font-size: 11px; }
.cockpit-empty span { font-size: 10px; }
.cockpit-empty-inline { min-height: 70px; padding: 16px; font-size: 10px; }
.cockpit-trend-body { padding: 0 18px 18px; }
.cockpit-trend-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 9px; }
.cockpit-trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cockpit-trend-legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.cockpit-trend-legend i.red, .cockpit-trend-bar.red { background: var(--red); }
.cockpit-trend-legend i.orange, .cockpit-trend-bar.orange { background: var(--orange); }
.cockpit-trend-legend i.violet, .cockpit-trend-bar.violet { background: var(--violet); }
.cockpit-trend-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-height: 150px; padding: 12px 8px 0; border-top: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 35px, var(--line) 36px); }
.cockpit-trend-day { display: grid; grid-template-rows: 1fr auto; align-items: end; gap: 7px; min-width: 0; }
.cockpit-trend-bars { display: flex; align-items: end; justify-content: center; gap: 3px; height: 116px; }
.cockpit-trend-bar { display: block; width: min(11px, 28%); min-height: 3px; border-radius: 3px 3px 0 0; opacity: .85; }
.cockpit-trend-day small { color: var(--subtle); font-size: 8px; text-align: center; }
.cockpit-bottleneck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.cockpit-bottleneck-grid > section { min-width: 0; padding: 0 17px 18px; border-left: 1px solid var(--line); }
.cockpit-bottleneck-grid > section:first-child { border-left: 0; }
.cockpit-bottleneck-grid h3 { margin: 0 0 10px; color: var(--ink-soft); font-size: 12px; }
.cockpit-bottleneck-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.cockpit-bottleneck-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-width: 0; padding: 8px 0; border-top: 1px solid var(--line); }
.cockpit-bottleneck-list li:first-child { border-top: 0; }
.cockpit-bottleneck-list li > div { min-width: 0; }
.cockpit-bottleneck-list strong, .cockpit-bottleneck-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-bottleneck-list strong { color: var(--ink-soft); font-size: 10px; }
.cockpit-bottleneck-list small { margin-top: 3px; color: var(--subtle); font-size: 8px; }
.cockpit-bottleneck-list b { color: var(--primary); font-size: 10px; }
.cockpit-bottleneck-rank { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: 9px; font-weight: 800; }
.cockpit-quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 0 18px 18px; }
.cockpit-quick-link { display: grid; grid-template-columns: 27px minmax(0, 1fr) 14px; align-items: center; gap: 8px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); text-align: left; background: var(--surface-soft); cursor: pointer; }
.cockpit-quick-link:hover, .cockpit-quick-link:focus-visible { border-color: var(--primary); color: var(--primary); outline: none; }
.cockpit-quick-link > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: var(--primary); background: var(--primary-soft); }
.cockpit-quick-link .icon { width: 14px; height: 14px; }
.cockpit-quick-link strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cockpit-quick-link > .icon { width: 13px; height: 13px; color: var(--subtle); }

@media (max-width: 899px) {
  .cockpit-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cockpit-two-column { grid-template-columns: 1fr; }
  .cockpit-bottleneck-grid { grid-template-columns: 1fr; }
  .cockpit-bottleneck-grid > section { padding: 13px 17px; border-top: 1px solid var(--line); border-left: 0; }
  .cockpit-bottleneck-grid > section:first-child { border-top: 0; }
  .cockpit-quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .cockpit-page { gap: 11px; }
  .cockpit-hero { align-items: flex-start; flex-direction: column; min-height: 0; padding: 23px 20px; }
  .cockpit-hero-note { width: 100%; justify-items: start; text-align: left; }
  .cockpit-summary-grid { gap: 9px; }
  .cockpit-metric-card { min-height: 132px; padding: 13px; }
  .cockpit-panel .panel-heading { padding-inline: 16px; }
  .cockpit-action-item { grid-template-columns: auto minmax(0, 1fr); }
  .cockpit-action-item .text-link { grid-column: 2; justify-self: start; }
  .cockpit-quick-links { padding-inline: 12px; }
}
