/* NSofts Flow — colour and component layer.
   Loads after theme.css on every page, so Flow's palette wins without forking the
   shared design system. Same token names as theme.css, so every shared class works. */

:root {
  --paper:      #f5f6fb;
  --surface:    #ffffff;
  --surface-2:  #f0f2f9;
  --line:       #e2e5f0;
  --line-soft:  #eceef6;
  --ink:        #1c2238;
  --ink-2:      #545c76;
  --ink-3:      #8891a9;

  --accent:     #5b5bd6;
  --accent-ink: #4338ca;
  --accent-soft:#e7e7fc;

  --pos:        #0c9a6c;
  --pos-soft:   #d9f5ea;
  --neg:        #e11d48;
  --neg-soft:   #ffe3ea;
  --warn:       #d97706;
  --warn-soft:  #fdefd3;
  --info:       #0a7ac2;
  --info-soft:  #dcefff;

  --brand-grad: linear-gradient(135deg, #6d5cf0 0%, #22b8cf 100%);
  --shadow:     0 1px 2px rgba(28, 34, 56, .05), 0 6px 20px rgba(28, 34, 56, .06);
  --shadow-lift:0 2px 4px rgba(28, 34, 56, .06), 0 14px 30px rgba(28, 34, 56, .12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #111528;
    --surface:    #181d33;
    --surface-2:  #1f2540;
    --line:       #2a3152;
    --line-soft:  #222947;
    --ink:        #e9ecfb;
    --ink-2:      #a7aed0;
    --ink-3:      #7a82a3;
    --accent:     #8b86ff;
    --accent-ink: #c4c1ff;
    --accent-soft:#262552;
    --pos:        #3ed29a;
    --pos-soft:   #123326;
    --neg:        #ff7a94;
    --neg-soft:   #3a1a25;
    --warn:       #f5b35a;
    --warn-soft:  #3a2a12;
    --info:       #6ec3ff;
    --info-soft:  #112a40;
    --shadow:     0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
    --shadow-lift:0 2px 4px rgba(0,0,0,.4), 0 16px 34px rgba(0,0,0,.5);
  }
}

:root[data-theme="dark"] {
  --paper: #111528; --surface: #181d33; --surface-2: #1f2540;
  --line: #2a3152; --line-soft: #222947;
  --ink: #e9ecfb; --ink-2: #a7aed0; --ink-3: #7a82a3;
  --accent: #8b86ff; --accent-ink: #c4c1ff; --accent-soft: #262552;
  --pos: #3ed29a; --pos-soft: #123326; --neg: #ff7a94; --neg-soft: #3a1a25;
  --warn: #f5b35a; --warn-soft: #3a2a12; --info: #6ec3ff; --info-soft: #112a40;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.3);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.4), 0 16px 34px rgba(0,0,0,.5);
}

/* The hidden attribute always wins, even over a class that sets display. */
[hidden] { display: none !important; }

/* Brand mark: the gradient tile, not the house teal. */
.brand-mark {
  background: transparent; border: 0; width: 40px; height: 40px;
}
.brand-name { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Primary buttons get the gradient; other buttons keep the shared look. */
.btn-primary {
  background: var(--brand-grad); border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(109, 92, 240, .28);
}
.btn-primary:hover { background: var(--brand-grad); filter: brightness(1.06); }

/* Stronger tags: solid where it matters, soft elsewhere. */
.tag.info { background: var(--info-soft); color: var(--info); }

/* ------------------------------------------------------------ status dots */

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--st, var(--ink-2)); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--ink-3)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st, var(--ink-3)) 20%, transparent); }
[data-status="on_track"]     { --st: var(--pos); }
[data-status="finished"]     { --st: var(--info); }
[data-status="not_started"]  { --st: var(--ink-3); }
[data-status="discontinued"] { --st: var(--neg); }

/* ------------------------------------------------------------- filter pills */

.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pill:hover { border-color: var(--accent); color: var(--ink); }
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill .count { font-size: 11.5px; opacity: .8; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- summary strip */

.kpi { position: relative; overflow: hidden; }
.kpi::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 70px; height: 70px;
  border-radius: 50%; background: var(--kpi-tint, var(--accent-soft)); opacity: .55;
}
.kpi.accent { border-left: 0; --kpi-tint: var(--accent-soft); }
.kpi.good   { border-left: 0; --kpi-tint: var(--pos-soft); }
.kpi.warn   { border-left: 0; --kpi-tint: var(--warn-soft); }
.kpi.bad    { border-left: 0; --kpi-tint: var(--neg-soft); }
.kpi.info   { border-left: 0; --kpi-tint: var(--info-soft); }

/* ------------------------------------------------------------- progress bars */

.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > span {
  display: block; height: 100%; border-radius: inherit;
  background: var(--brand-grad); transition: width .4s ease;
}
.progress.over > span { background: linear-gradient(90deg, #f59e0b, #e11d48); }
.progress.thin { height: 5px; }

/* ----------------------------------------------------------- project cards */

.project-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.project-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.project-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--st, var(--ink-3));
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--st, var(--accent)); text-decoration: none; }
.project-card:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.pc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.pc-name { font-size: 15px; font-weight: 640; letter-spacing: -.01em; line-height: 1.35; color: var(--ink); }
.code-chip {
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink);
  /* One very long code must not push a table's other columns off the screen. */
  display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.pc-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.pc-stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.pc-stat-value { font-size: 14px; font-weight: 640; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ----------------------------------------------------------- detail header */

.hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  padding: 22px 24px; color: #fff; background: var(--brand-grad); box-shadow: var(--shadow-lift);
}
.hero h1 { color: #fff; font-size: 22px; }
.hero .code-chip { background: rgba(255,255,255,.22); color: #fff; }
.hero .status { color: #fff; }
.hero .status .dot { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.hero .muted { color: rgba(255,255,255,.8); }
.hero-sub { font-size: 13px; opacity: .9; margin-top: 6px; }

.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; align-items: center; }
.detail-list dt { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.detail-list dd { margin: 0; font-weight: 560; }
select.inline { width: auto; min-width: 180px; padding: 5px 8px; }

.wp-sub td:first-child { padding-left: 34px; }
.wp-sub td:first-child::before { content: "↳ "; color: var(--ink-3); }

/* ------------------------------------------------------------ time log */

.time-layout { display: grid; gap: 20px; grid-template-columns: minmax(300px, 400px) 1fr; align-items: start; }
.time-card { position: sticky; top: 92px; }
.btn-block { width: 100%; padding: 11px; font-size: 14.5px; }
.date-row { display: flex; gap: 6px; align-items: center; }
.date-row input { flex: 1; min-width: 0; }
.hours-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hours-row input { width: 130px; font-size: 18px; font-weight: 650; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }

.day-group { border-top: 1px solid var(--line-soft); }
.day-group:first-child { border-top: 0; }
.day-head { display: flex; justify-content: space-between; padding: 12px 16px 6px; font-size: 13px; }
.entry {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-left: 3px solid transparent;
}
.entry:hover { background: var(--surface-2); border-left-color: var(--accent); }
.entry-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.entry-subject { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-meta { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.entry-hours { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent-ink); white-space: nowrap; }

@media (max-width: 860px) {
  .time-layout { grid-template-columns: 1fr; }
  .time-card { position: static; }
}

/* ------------------------------------------------------------- phones */

@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
  .topbar .search { max-width: none; width: 100%; }
}

/* ------------------------------------------------------------- users */

.role-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.role-card { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); }
.role-card p { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); margin: 6px 0 0; }
.check input { width: auto; }
.user-row:hover { background: var(--surface-2); }

/* ------------------------------------------------------------- home */

.home-grid { display: grid; gap: 16px; margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.home-grid > .card { min-width: 0; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.stack-bar > span { display: block; min-width: 4px; }
.legend { display: grid; gap: 8px; margin-top: 14px; }
.legend-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; }
.dot-sw { width: 10px; height: 10px; border-radius: 50%; }
.attn-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 4px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none;
}
.attn-row:last-child { border-bottom: 0; }
.attn-row:hover { text-decoration: none; background: var(--surface-2); border-radius: var(--radius-sm); }
.attn-main { display: flex; gap: 8px; align-items: center; min-width: 0; }
.attn-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; margin-bottom: 12px; }
.bar-label { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-value { text-align: right; font-size: 13px; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 90px 1fr 60px; } }

/* ------------------------------------------------------ needs attention */

.bell {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.bell svg { width: 19px; height: 19px; }
.bell:hover { color: var(--ink); border-color: var(--ink-3); }
.bell.alert { color: var(--neg); border-color: var(--neg); }
.bell-n {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--neg); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; font-variant-numeric: tabular-nums;
}
.nav-badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 10px; text-align: center;
  background: var(--neg); color: #fff; font-size: 11.5px; font-weight: 700;
}
.attn-flags { display: flex; gap: 4px; flex-wrap: wrap; }
.notif-unread td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ------------------------------------------------------------- tabs */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 20px 0 18px; }
.tab {
  padding: 9px 14px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tab .count { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }

/* Report tab groups (Delivery, Time, Management) and the charts on them. */
/* Collapsible groups: a header per group, its tabs underneath when open. */
.tabs.grouped { display: block; border-bottom: 0; }
.tab-block { border-bottom: 1px solid var(--line); }
.tab-group-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 2px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); text-align: left; }
.tab-group-btn:hover, .tab-block.has-active .tab-group-btn { color: var(--accent-ink); }
.tab-group-btn .chev { width: 12px; font-size: 12px; }
.tab-group-btn .count { font-weight: 600; letter-spacing: 0; color: var(--ink-3); background: var(--accent-soft); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.tab-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.kpi-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .kpi-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.cell-days { background: var(--accent-soft); color: var(--accent-ink); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar input, .toolbar select { width: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 11px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: #fff; }

/* ----------------------------------------------------- plan versus actual */

.pva-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pva-grid > .card { min-width: 0; }
.pva-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .pva-grid.two { grid-template-columns: 1fr; } }
.pva-table { width: 100%; font-size: 13.5px; }
.pva-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding: 0 0 8px; position: static; border: 0; background: transparent; }
.pva-table td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.pva-table tr:last-child td { border-bottom: 0; }
.pva-table tbody tr:hover { background: transparent; }
.pva-table td:first-child { color: var(--ink-2); }
.pva-table .num { font-weight: 620; }
.delta-pos { color: var(--pos); font-weight: 650; }
.delta-neg { color: var(--neg); font-weight: 650; }
.delta-warn { color: var(--warn); font-weight: 650; }
.verdict { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 16px; font-size: 13.5px; }
.verdict strong { font-size: 15px; }

.dual-bar { position: relative; height: 22px; margin: 6px 0 4px; }
.dual-bar .plan, .dual-bar .actual { position: absolute; left: 0; height: 9px; border-radius: 999px; min-width: 2px; }
.dual-bar .plan { top: 0; background: var(--ink-3); opacity: .45; }
.dual-bar .actual { top: 12px; background: var(--brand-grad); }
.dual-bar .actual.over { background: linear-gradient(90deg, #f59e0b, #e11d48); }

/* ------------------------------------------------------------- gantt */

.gantt-scroll { overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gantt { position: relative; }
.g-head { position: sticky; top: 0; z-index: 6; display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
.g-corner {
  position: sticky; left: 0; z-index: 7; flex: none; display: flex; align-items: flex-end; padding: 0 12px 8px;
  background: var(--surface); border-right: 1px solid var(--line);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650;
}
.g-axis { position: relative; flex: none; }
.g-months, .g-ticks { position: relative; height: 23px; }
.g-month { position: absolute; top: 0; height: 23px; padding: 4px 8px; font-size: 12px; font-weight: 650; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-tick { position: absolute; top: 0; height: 23px; font-size: 10.5px; color: var(--ink-3); text-align: center; line-height: 22px; font-variant-numeric: tabular-nums; }
.g-tick.wk { color: var(--ink-2); font-weight: 650; text-align: left; padding-left: 3px; border-left: 1px solid var(--line-soft); }
.g-body { position: relative; }
.g-bg { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.g-weekend { position: absolute; top: 0; bottom: 0; background: var(--surface-2); opacity: .7; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--neg); opacity: .75; }
.g-today span { position: absolute; top: 2px; left: 5px; font-size: 10px; font-weight: 700; color: var(--neg); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.g-row { position: absolute; left: 0; right: 0; display: flex; border-bottom: 1px solid var(--line-soft); }
.g-name {
  position: sticky; left: 0; z-index: 5; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-right: 10px; background: var(--surface); border-right: 1px solid var(--line); cursor: pointer; font-size: 13px;
}
.g-row:hover .g-name { background: var(--surface-2); }
.g-subject { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.g-meta { flex: none; font-size: 11.5px; color: var(--ink-3); }
.g-track { position: relative; flex: 1; z-index: 2; }
.g-unscheduled { position: sticky; left: 292px; line-height: 40px; font-size: 12px; color: var(--ink-3); }
.g-plan {
  position: absolute; top: 12px; height: 15px; border-radius: 5px; background: var(--gs, #8c96b4);
  box-shadow: 0 1px 2px rgba(28,34,56,.18); touch-action: none; cursor: pointer; z-index: 3;
}
.g-plan.can-edit { cursor: grab; }
.g-plan.dragging { cursor: grabbing; opacity: .8; box-shadow: var(--shadow-lift); }
[data-state="planned"], [data-state="unscheduled"] { --gs: #8c96b4; }
[data-state="in_progress"] { --gs: var(--info); }
[data-state="late_start"]  { --gs: var(--warn); }
[data-state="late"]        { --gs: var(--neg); }
[data-state="done"]        { --gs: var(--pos); }
[data-state="done_late"]   { --gs: #b7791f; }
.g-milestone { width: 16px; height: 16px; top: 11px; border-radius: 3px; transform: rotate(45deg); }
.g-handle { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; }
.g-handle.l { left: 0; border-radius: 5px 0 0 5px; }
.g-handle.r { right: 0; border-radius: 0 5px 5px 0; }
.g-plan:hover .g-handle { background: rgba(255,255,255,.45); }
.g-base { position: absolute; top: 5px; height: 4px; border-radius: 3px; border: 1px dashed var(--ink-3); z-index: 2; }
.g-actual { position: absolute; top: 30px; height: 5px; border-radius: 3px; background: var(--ink); opacity: .78; z-index: 2; }
.g-actual.open { background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 9px); }
.g-note { position: absolute; top: 11px; font-size: 11px; font-weight: 700; color: var(--neg); white-space: nowrap; z-index: 3; }
.g-links { position: absolute; top: 0; pointer-events: none; z-index: 4; overflow: visible; }
.g-link { fill: none; stroke: var(--ink-3); stroke-width: 1.4; }
.g-arrow { fill: var(--ink-3); }
.g-link.broken { stroke: var(--neg); stroke-dasharray: 4 3; }
.g-arrow.broken { fill: var(--neg); }
.gantt-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.gantt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-key { position: static; display: inline-block; width: 22px; }
.g-key.g-plan { height: 10px; box-shadow: none; cursor: default; }
.g-key.g-actual { height: 5px; }
.g-key.g-base { height: 4px; }

/* ------------------------------------------------------------- board */

.board { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(230px, 1fr)); overflow-x: auto; align-items: start; }
.board-col { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--radius); min-height: 160px; }
.board-col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.board-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; font-weight: 650; font-size: 13px; }
.board-list { display: grid; gap: 8px; padding: 0 9px 10px; }
.board-card {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gs, var(--ink-3));
  border-radius: var(--radius-sm); padding: 10px 11px; box-shadow: var(--shadow); cursor: pointer;
}
.board-card[draggable="true"] { cursor: grab; }
.board-card.dragging { opacity: .45; }
.board-card .subject { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.board-card .meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 7px; font-size: 12px; color: var(--ink-3); }

/* ----------------------------------------------------- comments and history */

.act { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.act:last-child { border-bottom: 0; }
.act-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.act.comment .act-dot { background: var(--brand-grad); color: #fff; }
.act-head { font-size: 12.5px; color: var(--ink-3); }
.act-head strong { color: var(--ink); }
.act-body { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.act-change { font-size: 13px; color: var(--ink-2); }
.act-change s { color: var(--ink-3); }

/* ------------------------------------------------------------- timesheet */

.sheet th, .sheet td { text-align: right; }
.sheet th:first-child, .sheet td:first-child { text-align: left; }
.sheet td.cell { cursor: pointer; font-variant-numeric: tabular-nums; min-width: 58px; }
.sheet td.cell:hover { background: var(--accent-soft); }
.sheet td.zero { color: var(--ink-3); opacity: .5; }
.sheet .today-col { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.timer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 12px; }
.timer-clock { font-family: var(--mono); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer.running { background: var(--pos-soft); }

/* The assignee picker in a project's work package list. */
.assign-pick { width: auto; min-width: 150px; max-width: 200px; padding: 4px 8px; font-size: 13px; }
.assign-pick.unassigned { color: var(--warn); border-color: var(--warn); background: var(--warn-soft); }

/* Where the selected work came from on the Time log: who it is assigned to, by whom, and when. */
.wp-source { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1.45; }
.wp-source.free { background: var(--warn-soft); color: var(--warn); }
.wp-source .strong { font-weight: 600; }
.wp-source .sub { display: block; margin-top: 2px; font-size: 12px; opacity: .85; }

/* ------------------------------------------------------------- pager */

.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }

@media (max-width: 860px) {
  .board { grid-template-columns: repeat(4, 240px); }
}
