/* ==========================================================================
   Mint DM CRM
   Brand tokens lifted from the marketing site so the two read as one product.
   The layout is an app shell, not a marketing page: dense, quiet, built to be
   looked at for an hour at a time rather than for eight seconds.
   ========================================================================== */

:root {
  --bg-base:        #EEF0F1;
  --ink:            #0E1A1F;
  --ink-soft:       #3F5159;
  --ink-muted:      #5B6E76;
  --ink-faint:      #8A9AA1;

  --mint:           #2EE5A8;
  --mint-deep:      #1FBE8C;
  --cyan:           #22A6D8;
  --cyan-deep:      #1A8AB8;
  --cyan-bright:    #29B6E4;

  /* Text-only accents. The fills above fail AA as small type on this
     background; these carry the same hue above 4.5:1. Never swap a fill. */
  --mint-text:      #147A5A;
  --cyan-text:      #14688C;

  --red:            #C44A4A;
  --red-text:       #A33636;   /* 4.7:1 on --surface, for small status type */
  --amber:          #D9922B;
  --amber-text:     #8A5A05;   /* 4.9:1 on --surface */

  --dark-1:         #0A2E38;
  --dark-2:         #062028;
  --dark-3:         #03171C;
  --on-dark:        #E6EEF1;
  --on-dark-soft:   #C2D2D8;
  --on-dark-faint:  #7C9099;

  --border-hairline: rgba(14,42,42,0.10);
  --border-input:    rgba(14,42,42,0.16);
  --surface:         #FFFFFF;
  --sunken:          #E3E8E9;
  --card-fill:       rgba(255,255,255,0.85);

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-body:    'Poppins', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --rail: 232px;
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --sh-card: 0 10px 30px -22px rgba(14,42,42,0.45);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- app shell ------------------------------------------------------------ */

.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }

.rail {
  background: linear-gradient(170deg, var(--dark-1) 0%, var(--dark-3) 70%);
  color: var(--on-dark);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rail__brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.rail__brand img { width: 26px; height: 22px; }
.rail__word { font-family: var(--f-display); font-size: 18px; font-weight: 500; letter-spacing: -0.01em; color: #fff; white-space: nowrap; }
.rail__word b { color: var(--mint); font-weight: 500; }
.rail__tag {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--on-dark-faint); padding: 0 6px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav + .nav { margin-top: 18px; }
.nav__group {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--on-dark-faint);
  padding: 0 12px 6px; border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px; margin-top: 2px;
}
.nav a {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--on-dark-soft); font-size: 14.5px; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.nav a.is-active { background: rgba(46,229,168,0.14); color: #fff; }
/* Out of flow: as a flex child this marker counted in space-between and
   pushed the label to the right-hand edge. */
.nav a.is-active::before {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px; background: var(--mint);
}
.nav__count {
  font-family: var(--f-mono); font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: rgba(255,255,255,0.10); color: var(--on-dark-soft);
}
.nav__count--alert { background: var(--red); color: #fff; }

.rail__foot { margin-top: auto; font-size: 12.5px; color: var(--on-dark-faint); padding: 0 6px; }
.rail__foot a { color: var(--on-dark-soft); }

.main { padding: 26px 32px 70px; min-width: 0; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-title { font-family: var(--f-display); font-size: 29px; font-weight: 500; letter-spacing: -0.025em; margin: 0; }
.page-sub { color: var(--ink-muted); font-size: 14.5px; margin: 4px 0 0; }

/* --- cards & grid --------------------------------------------------------- */

.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-card);
}
.card--dark {
  background: linear-gradient(160deg, var(--dark-2) 0%, var(--dark-3) 68%);
  border-color: rgba(46,229,168,0.20); color: var(--on-dark);
}
.card--dark .card__label { color: var(--mint); }
.card--dark .stat { color: #fff; }
.card__label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px;
}
.stat { font-family: var(--f-display); font-size: 34px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.stat__note { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.card--dark .stat__note { color: var(--on-dark-soft); }

.section-title {
  font-family: var(--f-display); font-size: 19px; font-weight: 500;
  letter-spacing: -0.015em; margin: 30px 0 14px;
}

/* --- status pills --------------------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.07em;
  text-transform: uppercase; white-space: nowrap;
  border: 1px solid transparent;
}
.pill--mint  { background: rgba(46,229,168,0.14);  color: var(--mint-text);  border-color: rgba(31,190,140,0.30); }
.pill--amber { background: rgba(217,146,43,0.14);  color: var(--amber-text); border-color: rgba(217,146,43,0.32); }
.pill--red   { background: rgba(196,74,74,0.12);   color: var(--red-text);   border-color: rgba(196,74,74,0.28); }
.pill--cyan  { background: rgba(34,166,216,0.13);  color: var(--cyan-text);  border-color: rgba(26,138,184,0.28); }
.pill--muted { background: var(--sunken);          color: var(--ink-muted);  border-color: var(--border-hairline); }

/* --- filter dropdown ------------------------------------------------------ */

.filter { display: inline-flex; align-items: center; gap: 9px; margin: 0; }
.filter__label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted); white-space: nowrap;
}
.filter__select {
  width: auto; min-width: 190px; padding: 8px 12px; font-size: 14px;
  min-height: 38px;
}
@media (max-width: 640px) {
  /* Full width on a phone: a 190px select next to a label is a cramped tap
     target, and the row has nothing to compete with at that width. */
  .filter { display: flex; width: 100%; }
  .filter__select { flex: 1; min-width: 0; }
}

/* --- tables --------------------------------------------------------------- */

.table-wrap {
  background: var(--surface); border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-card);
}
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; padding: 11px 16px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-muted);
  background: var(--sunken); border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border-hairline); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: rgba(46,229,168,0.04); }
.t-title { font-weight: 400; color: var(--ink); }
.t-meta  { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.t-done .t-title { text-decoration: line-through; color: var(--ink-faint); }
.num { font-family: var(--f-mono); font-size: 13px; }

.empty { padding: 44px 20px; text-align: center; color: var(--ink-muted); }
.empty__big { font-family: var(--f-display); font-size: 17px; color: var(--ink-soft); margin-bottom: 6px; }

/* --- forms & buttons ------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--f-body); font-size: 14px; font-weight: 500;
  cursor: pointer; text-decoration: none; min-height: 40px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
/* Primary action: deep blue pill, white label. The mint fill it replaced was
   a brand accent being asked to do a job it was never meant for — it reads as
   a highlight, not a button, and the dark label on bright green was harsh. */
.btn--primary {
  background: linear-gradient(180deg, #11506E 0%, #0C3850 100%);
  color: #FFFFFF; font-weight: 600;
  box-shadow: 0 14px 30px -14px rgba(12,56,80,0.65);
}
.btn--primary:hover {
  color: #FFFFFF;
  background: linear-gradient(180deg, #156386 0%, #0F4664 100%);
  box-shadow: 0 18px 36px -14px rgba(12,56,80,0.75);
}
.btn--blue { background: linear-gradient(180deg, var(--cyan-bright), var(--cyan-deep)); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--border-input); color: var(--ink); }
.btn--sm { padding: 6px 13px; min-height: 32px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.field { display: block; margin-bottom: 16px; }
.field__label {
  display: block; font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 7px;
}
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border-input); background: var(--surface);
  font-family: var(--f-body); font-size: 14.5px; color: var(--ink);
}
.input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }

.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: 14px; }
.alert--err  { background: rgba(196,74,74,0.10); border: 1px solid rgba(196,74,74,0.30); color: var(--red-text); }
.alert--ok   { background: rgba(46,229,168,0.12); border: 1px solid rgba(31,190,140,0.30); color: var(--mint-text); }
.alert--warn { background: rgba(217,146,43,0.12); border: 1px solid rgba(217,146,43,0.32); color: var(--amber-text); }

/* --- check-off control ---------------------------------------------------- */

.check {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--border-input); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  transition: background .15s ease, border-color .15s ease;
}
.check:hover { border-color: var(--mint-deep); }
.check[aria-pressed="true"] {
  background: var(--mint-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303171C' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
  border-color: var(--mint-deep);
}

/* --- gantt: quarterly view, one row per client ----------------------------- */

.gantt { padding: 18px 20px 22px; }
.gantt__legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }

/* Keeps a usable minimum width and scrolls rather than compressing a quarter
   into something unreadable. */
.gantt__scroll { overflow-x: auto; }
.gantt__plot { min-width: 560px; }

.gantt__axis { position: relative; height: 20px; margin-left: 160px; border-bottom: 1px solid var(--border-hairline); }
.gantt__tick {
  position: absolute; top: 0; padding-left: 6px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-faint);
  border-left: 1px solid var(--border-hairline);
}

.gantt__row { display: flex; align-items: center; margin-bottom: 8px; }
.gantt__row:first-of-type { margin-top: 12px; }
.gantt__label {
  flex: 0 0 160px; width: 160px; padding-right: 12px; min-width: 0;
}
.gantt__name {
  display: block; font-size: 13.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt__dates { display: block; font-size: 10.5px; color: var(--ink-faint); margin-top: 1px; }
.gantt__week { position: absolute; top: 0; bottom: -4px; width: 1px; background: var(--border-hairline); }
.gantt__tickday { margin-left: 4px; opacity: .6; }
.gantt__track { position: relative; flex: 1; height: 28px; background: var(--sunken); border-radius: 7px; }
.gantt__today { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--red); border-radius: 2px; z-index: 2; }

.gantt__bar {
  position: absolute; top: 3px; bottom: 3px;
  border-radius: 5px; text-decoration: none;
  box-shadow: 0 2px 8px -3px rgba(14,42,42,0.4);
  transition: transform .14s ease, box-shadow .14s ease;
}
.gantt__bar:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -5px rgba(14,42,42,0.5); text-decoration: none; }

/* One colour per client row. Five hues cycle; all carry white text above 4.5:1. */
.gantt__bar--c0 { background: linear-gradient(180deg, #2EE5A8, #1FBE8C); }
.gantt__bar--c1 { background: linear-gradient(180deg, #29B6E4, #1A8AB8); }
.gantt__bar--c2 { background: linear-gradient(180deg, #7C6BE8, #5B4CC4); }
.gantt__bar--c3 { background: linear-gradient(180deg, #E8A33C, #C47F1B); }
.gantt__bar--c4 { background: linear-gradient(180deg, #E86B8A, #C4435F); }

/* Square off the edge where a client's work runs outside the quarter, so a
   clamped bar never reads as a real start or finish. */
.gantt__bar--cutl { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.gantt__bar--cutr { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.gantt__pct {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--f-mono); font-size: 10px; color: #fff;
  text-shadow: 0 1px 2px rgba(3,23,28,0.65); pointer-events: none;
}

@media (max-width: 820px) {
  .gantt__label { flex-basis: 112px; width: 112px; }
  .gantt__name { font-size: 12.5px; }
  .gantt__axis { margin-left: 112px; }
}

/* --- sprints -------------------------------------------------------------- */

.sprint {
  background: var(--surface); border: 1px solid var(--border-hairline);
  border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px;
  box-shadow: var(--sh-card);
  /* Jumping to #sprint-N must not tuck the header under the sticky mobile
     top bar, and a little breathing room reads better than a flush landing. */
  scroll-margin-top: 72px;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.sprint__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.sprint__kicker {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 5px;
}
.sprint__kicker a { color: var(--mint-text); }
.sprint__name {
  font-family: var(--f-display); font-size: 21px; font-weight: 500;
  letter-spacing: -0.02em; margin: 0 0 4px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.sprint__name a { color: var(--ink); text-decoration: none; }
.sprint__name a:hover { color: var(--cyan-text); }
.sprint__pct { font-family: var(--f-display); font-size: 27px; font-weight: 500; letter-spacing: -0.03em; }

.bar { height: 7px; border-radius: 999px; background: var(--sunken); overflow: hidden; margin: 14px 0 18px; }
.bar__fill { height: 100%; border-radius: 999px; transition: width .4s cubic-bezier(.22,.61,.36,1); }
.bar__fill--cyan { background: linear-gradient(90deg, var(--cyan-bright), var(--cyan-deep)); }
.bar__fill--mint { background: linear-gradient(90deg, var(--mint), var(--mint-deep)); }
.bar__fill--red  { background: linear-gradient(90deg, #D97070, var(--red)); }

.sprint__editor { margin: 0 0 16px; padding: 14px; border-radius: var(--r-md); background: var(--sunken); }
.sprint__foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sprint__foot > details { flex: 0 0 auto; }
.sprint__foot > details[open] { flex: 1 1 100%; }
.sprint__foot summary { list-style: none; cursor: pointer; display: inline-flex; }
.sprint__foot summary::-webkit-details-marker { display: none; }

/* --- task stream ---------------------------------------------------------- */

.tl--tasks { padding-left: 24px; margin-top: 4px; }
.tl--tasks::before { top: 10px; bottom: 10px; }

/* The whole row is the tap target — a 22px tick box was far too small on a
   phone, and the dialog behind this tap is where the decision happens. */
.tl__item--tap {
  display: block; cursor: pointer; border-radius: var(--r-sm);
  padding: 7px 10px 9px; margin-left: -10px;
  transition: background .14s ease;
}
.tl__item--tap:hover { background: rgba(46,229,168,0.07); }
.tl__item--tap .tl__dot { left: -14px; top: 12px; }
.tl__task { color: var(--ink); }
/* The description belongs on the row: without it you have to open every task
   to remember what it was. Clamped so a long note cannot swamp the stream. */
.tl__detail {
  font-size: 12.5px; line-height: 1.5; color: var(--ink-muted);
  margin-top: 3px; max-width: 78ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl__item--done .tl__task { text-decoration: line-through; color: var(--ink-faint); }
.tl__msg { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.lane__empty { color: var(--ink-faint); font-size: 13.5px; padding: 8px 2px; }

/* --- dialog --------------------------------------------------------------- */

.modal { display: none; }
.modal-state:checked + .modal {
  display: flex; position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center; padding: 20px;
}
.modal__scrim {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(3,23,28,0.5);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.modal__card {
  position: relative; z-index: 1; width: 100%; max-width: 520px;
  max-height: 86dvh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg);
  padding: 24px 24px 20px;
  box-shadow: 0 40px 90px -30px rgba(3,23,28,0.6);
}
.modal__kicker {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px;
}
.modal__title {
  font-family: var(--f-display); font-size: 21px; font-weight: 500;
  letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink);
}
.modal__detail { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 12px; }
.modal__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 0; }
.modal__actions .btn { flex: 1 1 auto; justify-content: center; }
.modal__edit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-hairline); }

/* --- hand-off ------------------------------------------------------------- */

/* A hand-off sits in the stream rather than in a box at the bottom, so the
   note reads as the moment it happened, right under the work it followed. */
.tl__item--handoff {
  padding: 10px 12px; margin: 4px 0 4px -12px; border-radius: var(--r-sm);
  background: rgba(34,166,216,0.07); border: 1px solid rgba(26,138,184,0.20);
}
.tl__item--handoff .tl__dot { left: -14px; top: 15px; }
.tl__item--handoff .tl__msg { font-size: 13.5px; color: var(--ink-soft); }
.tl__item--handoff strong { color: var(--ink); font-weight: 500; }
.handoff__note {
  margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--cyan-deep);
  color: var(--ink); font-style: italic; font-size: 13.5px;
}

/* The HTML `hidden` attribute is only display:none in the UA stylesheet, so any
   component rule that sets display (.btn does) silently overrides it. */
[hidden] { display: none !important; }

/* --- notifications -------------------------------------------------------- */

.notif {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 15px 18px; border-bottom: 1px solid var(--border-hairline);
}
.notif:last-child { border-bottom: 0; }
.notif__main { min-width: 0; flex: 1 1 auto; }
.notif__top  { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.notif__title {
  display: block; color: var(--ink); text-decoration: none;
  font-size: 15px; line-height: 1.4;
}
.notif__title:hover { text-decoration: underline; }
.notif__body { font-size: 13.5px; color: var(--ink-muted); margin-top: 3px; line-height: 1.5; }

/* Unread gets a mint edge rather than a fill, so a long list does not turn
   into a wall of colour. */
.notif--unread { box-shadow: inset 3px 0 0 var(--mint); background: rgba(46,229,168,0.04); }
.notif--unread .notif__title { font-weight: 500; }

/* The bell only exists on the phone layout: the rail carries the count on
   desktop, and the rail is behind the drawer on a narrow screen. */
.topbar__bell { display: none; }

@media (max-width: 820px) {
  .topbar__bell {
    display: flex; align-items: center; justify-content: center;
    position: relative; margin-left: auto;
    width: 40px; height: 40px; border-radius: var(--r-sm);
    color: var(--on-dark); text-decoration: none; flex: 0 0 auto;
  }
  .topbar__bell:active { background: rgba(255,255,255,0.08); }
  .topbar__dot {
    position: absolute; top: 4px; right: 3px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--mint); color: #06252C;
    font-family: var(--f-mono); font-size: 10.5px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--dark-1);
  }
  .notif { padding: 14px; flex-direction: column; align-items: stretch; gap: 10px; }
}

/* --- login ---------------------------------------------------------------- */

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(170deg, var(--dark-1) 0%, var(--dark-3) 70%);
}
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: var(--r-lg); padding: 34px 30px; box-shadow: 0 40px 80px -32px rgba(3,23,28,0.5); }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.login-brand .rail__word { color: var(--ink); }
.login-brand .rail__word b { color: var(--mint-deep); }

/* --- timeline ------------------------------------------------------------- */

.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border-hairline); }
.tl__item { position: relative; padding: 0 0 20px; }
.tl__dot {
  position: absolute; left: -24px; top: 5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ink-faint); border: 2px solid var(--bg-base);
}
.tl__dot--mint { background: var(--mint-deep); }
.tl__dot--red  { background: var(--red); }
.tl__dot--cyan { background: var(--cyan-deep); }
.tl__when { font-family: var(--f-mono); font-size: 11px; color: var(--ink-faint); letter-spacing: 0.05em; }
.tl__msg  { font-size: 14.5px; color: var(--ink-soft); }
.tl__msg b { font-weight: 500; color: var(--ink); }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 1040px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
/* --- mobile drawer -------------------------------------------------------- */

.topbar, .scrim, .drawer-btn { display: none; }

@media (max-width: 820px) {
  /* One column, full width: the content gets the whole screen and the nav
     slides over it only when asked for. */
  .app { grid-template-columns: 1fr; }

  .topbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 40;
    padding: 10px 14px;
    background: linear-gradient(170deg, var(--dark-1), var(--dark-3));
    color: var(--on-dark);
  }
  .topbar__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
  .topbar__brand .rail__word { font-size: 16px; }

  .drawer-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; padding: 9px; cursor: pointer; flex: 0 0 auto;
    border-radius: var(--r-sm);
  }
  .drawer-btn span { display: block; height: 2px; border-radius: 2px; background: var(--on-dark); }
  .drawer-btn:active { background: rgba(255,255,255,0.08); }

  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60;
    width: 264px; height: 100dvh;
    transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 0 60px rgba(3,23,28,0.5);
  }
  .drawer-state:checked ~ .app .rail { transform: translateX(0); }

  /* The scrim blurs and dims everything behind the open drawer. */
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 50;
    background: rgba(3,23,28,0.45);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    opacity: 0; pointer-events: none;
    transition: opacity .26s ease;
  }
  .drawer-state:checked ~ .scrim { opacity: 1; pointer-events: auto; }

  /* Stop the page scrolling under an open drawer. */
  .drawer-state:checked ~ .app { overflow: hidden; max-height: 100dvh; }

  .main { padding: 18px 14px 60px; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .page-title { font-size: 24px; }

  /* Tables go horizontal-scroll rather than squashing to unreadable columns. */
  .table-wrap { overflow-x: auto; }
  table.data { min-width: 620px; }

  .sprint { padding: 16px; }
  .sprint__foot > details { flex: 1 1 100%; }
  .sprint__foot summary { width: 100%; justify-content: center; }
  .modal__card { padding: 20px 18px 16px; max-height: 90dvh; }
}

/* Reduced motion: the drawer still works, it just appears. */
@media (prefers-reduced-motion: reduce) {
  .rail, .scrim, .bar__fill { transition: none; }
}
