/* Streamlined Campaigns — operations system
   Visual language taken from the team's existing boards: black rail, yellow
   action colour, generous white cards, monospace for anything the system
   says about itself rather than about the work. */

:root {
  --rail: #0c0c0c;
  --rail-2: #171717;
  --rail-text: #e8e8e8;
  --rail-dim: #9a9a9a;
  --rail-line: #262626;

  --bg: #ffffff;
  --bg-tint: linear-gradient(180deg, #fdfaf0 0%, #ffffff 260px);
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #ececec;
  --border-strong: #dcdcdc;

  --text: #131313;
  --text-2: #5f5f5f;
  --text-3: #949494;

  --yellow: #ffc629;
  --yellow-on: #111111;
  --yellow-deep: #e0a800;
  --yellow-soft: #fdf3d0;
  --note: #f6e6ac;

  --note-line: #e8d68e;

  --green: #2ea86a;
  --amber: #d99400;
  --red: #e04d3d;
  --blue: #3b82f6;
  --purple: #a855f7;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --rail-w: 236px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1,h2,h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; }

.wrap { padding: 14px 26px 40px; max-width: 1500px; }

.hello { margin-bottom: 16px; }
.hello h1 { font-size: 24px; letter-spacing: -.035em; }
.hello-date { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.role-chip {
  display: inline-block; margin-top: 10px; padding: 5px 12px;
  border-radius: var(--radius-pill); background: #e8f0fe; color: #1a56c4;
  font-size: 13px; font-weight: 700;
}

/* --- Cards ---------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
}
.card-pad { padding: 14px 18px; }
.card-head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px 0;
}
.card-head .spacer { flex: 1; }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--text-2);
}

/* --- Stat tiles ----------------------------------------------------------- */
.stats { display: grid; gap: 10px; margin-bottom: 14px;
         grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px;
}
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat-num.amber { color: var(--amber); }
.stat-num.green { color: var(--green); }
.stat-num.red   { color: var(--red); }
.stat-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-2); margin-top: 6px;
}

/* --- Progress ring -------------------------------------------------------- */
.progress-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ring { width: 118px; height: 118px; flex: none; }
.ring-track { fill: none; stroke: #ececec; stroke-width: 11; }
.ring-arc { fill: none; stroke-width: 11; stroke-linecap: round;
            transform: rotate(-90deg); transform-origin: 50% 50%; }
.legend-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.02em; }
.legend-row { display: flex; align-items: center; gap: 9px; font-size: 15px; padding: 3px 0; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.legend-num { font-weight: 700; }

/* --- Notes ---------------------------------------------------------------- */
.note {
  background: var(--note); border-radius: var(--radius); padding: 18px 22px;
  margin-bottom: 14px; position: relative;
}
.note-label {
  font-size: 12px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: #7a6412; margin-bottom: 10px;
}
.note textarea {
  width: 100%; background: transparent; border: none; resize: vertical;
  font: inherit; font-size: 16px; color: #3d3208; min-height: 84px; padding: 0;
}
.note textarea:focus { outline: none; }
.note-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.note-close {
  position: absolute; top: 12px; right: 14px; color: #8a7420;
  font-size: 17px; line-height: 1; background: none; border: none; cursor: pointer;
}
.note-add {
  display: block; width: 100%; text-align: left; padding: 16px 22px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer; margin-bottom: 20px; color: var(--text);
}
.note-add:hover { background: var(--surface-2); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 17px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit;
  font-size: 14.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn.yellow { background: var(--yellow); border-color: var(--yellow); color: var(--yellow-on); }
.btn.yellow:hover { background: var(--yellow-deep); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--red); border-color: #f0c4bf; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* --- Filter pills --------------------------------------------------------- */
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 17px;
  border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-2); font-size: 14.5px; font-weight: 600; color: var(--text-2);
}
.pill:hover { background: #f2f2f2; }
.pill.on { background: var(--yellow-soft); border-color: var(--yellow); color: #6b5200; font-weight: 700; }
.pill-n { font-size: 12.5px; color: var(--text-3); font-weight: 700; }
.pill.on .pill-n { color: #8a6a00; }

/* --- Filter bar ----------------------------------------------------------- */
.filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filterbar .lbl { font-size: 14px; color: var(--text-2); font-weight: 600; }
select, input[type=text], input[type=search], input[type=date],
input[type=number], input[type=email], input[type=url], textarea {
  font: inherit; font-size: 14.5px; padding: 9px 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); width: 100%;
}
.filterbar select, .filterbar input { width: auto; min-width: 150px; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--yellow-soft); outline-offset: -1px; border-color: var(--yellow-deep);
}
textarea { resize: vertical; min-height: 80px; font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--text-3); }

/* --- Table ---------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-2); padding: 11px 16px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fcfcfc; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

.task-title { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.task-desc { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.task-link { font-size: 14px; color: var(--yellow-deep); font-weight: 700; margin-top: 4px;
             display: inline-flex; align-items: center; gap: 5px; }
.task-link:hover { text-decoration: underline; }
.who { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; }
.due { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.due.late { color: var(--red); font-weight: 700; }

.brand-pill {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.prio {
  display: inline-block; padding: 3px 9px; border-radius: 5px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.prio.low    { background: #eef1f4; color: #6b7280; }
.prio.med    { background: #fdf0cc; color: #8a6a00; }
.prio.high   { background: #fde4de; color: #b03323; }
.prio.urgent { background: #e04d3d; color: #fff; }

.status-select {
  padding: 7px 11px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; border: 1px solid var(--border-strong); min-width: 132px;
}
.status-select.done { background: #e7f6ee; border-color: #b6e2cb; color: #17724a; }
.status-select.in_progress { background: #fdf3d0; border-color: #f0d688; color: #7a5c00; }

/* --- Misc ----------------------------------------------------------------- */
.empty-mono {
  font-family: var(--mono); font-size: 15px; color: var(--text-3);
  text-align: center; padding: 46px 20px;
}
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.small { font-size: 13.5px; }
.tiny { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.flash {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
  font-size: 14.5px; font-weight: 600; background: #e7f6ee; color: #17724a;
}
.flash.err { background: #fdecea; color: #b03323; }

.announce { border-top: 1px solid var(--border); padding: 16px 0 0; margin-top: 14px; }
.announce:first-of-type { border-top: none; margin-top: 6px; }
.announce-body { font-size: 15.5px; }
.announce-meta { font-family: var(--mono); font-size: 13px; color: var(--text-3); margin-top: 5px; }

.emp-row { display: flex; align-items: center; gap: 12px; padding: 13px 0;
           border-bottom: 1px solid var(--border); }
.emp-row:last-child { border-bottom: none; }
.emp-name { font-weight: 700; font-size: 15px; }
.emp-counts { margin-left: auto; display: flex; gap: 22px; font-size: 14px; }
.emp-counts b { font-weight: 700; }

.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 60;
  display: grid; place-items: start center; padding: 60px 20px; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: var(--radius);
         width: 100%; max-width: 680px; }

@media (max-width: 860px) {
  .rail { display: none; }
  .wrap, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* --- Operations nav group ------------------------------------------------- */
.rail-group { margin-bottom: 4px; }
.rail-group > summary { list-style: none; }
.rail-group > summary::-webkit-details-marker { display: none; }
.rail-summary {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--rail-dim);
  cursor: pointer; user-select: none;
}
.rail-summary:hover { background: var(--rail-2); color: var(--rail-text); }
.rail-caret { display: inline-block; transition: transform .12s ease; font-size: 10px; }
.rail-group[open] > summary .rail-caret { transform: rotate(90deg); }
.rail-item.sub { padding-left: 22px; font-size: 14.5px; }
.rail-subhead {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #6a6a6a; padding: 12px 12px 5px 22px;
}

/* --- Charts --------------------------------------------------------------- */
.chart-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.chart-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
}
.chart-title { font-size: 13.5px; font-weight: 700; margin-bottom: 1px; }
.chart-sub { font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }
.donut { width: 104px; height: 104px; display: block; flex: none; }
.chart-row { display: flex; align-items: center; gap: 14px; }
.donut-hole-num { font-size: 13px; font-weight: 800; letter-spacing: -.03em; fill: var(--text); }
.donut-hole-lbl { font-size: 4.4px; font-weight: 700; fill: #949494;
                  letter-spacing: .1em; text-transform: uppercase; }
.chart-legend { flex: 1; min-width: 0; }
.chart-legend .legend-row { font-size: 12.5px; padding: 1px 0; }
.chart-legend .legend-row .n { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

.loadbar-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.loadbar-name { width: 130px; font-size: 14px; font-weight: 600; flex: none;
                display: flex; align-items: center; gap: 8px; }
.loadbar-track { flex: 1; height: 16px; background: #f2f2f2; border-radius: 5px; overflow: hidden; }
.loadbar-fill { display: block; height: 100%; border-radius: 6px; min-width: 3px; }
.loadbar-val { width: 118px; text-align: right; font-size: 13px; color: var(--text-2);
               font-variant-numeric: tabular-nums; flex: none; }
.loadbar-avg { position: relative; height: 0; }

/* --- Observations --------------------------------------------------------- */
.obs { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.obs:last-child { border-bottom: none; }
.obs-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.obs.critical .obs-dot { background: var(--red); }
.obs.warning  .obs-dot { background: var(--amber); }
.obs.info     .obs-dot { background: #9ca3af; }
.obs.good     .obs-dot { background: var(--green); }
.obs-title { font-weight: 700; font-size: 14px; }
.obs-detail { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.spin { display: none; }
.htmx-request .spin { display: inline; }
.htmx-request .nospin { display: none; }

/* --- Seven-day forecast chart --------------------------------------------- */
.daychart { display: flex; gap: 10px; align-items: flex-end; height: 190px; padding: 4px 0; }
.daycol { flex: 1; display: flex; flex-direction: column; align-items: center;
          height: 100%; min-width: 0; }
.daycol-n { font-size: 13px; font-weight: 800; height: 18px; color: var(--text); }
.daycol-n.zero { color: transparent; }
.daycol-stack {
  flex: 1; width: 100%; max-width: 54px; display: flex; flex-direction: column-reverse;
  justify-content: flex-start; background: #f4f4f4; border-radius: 7px; overflow: hidden;
}
.daycol-seg { display: block; width: 100%; min-height: 4px; }
.daycol.weekend .daycol-stack { background: #ececec; }
.daycol-lbl { font-size: 12px; font-weight: 700; color: var(--text-2); margin-top: 8px; }
.daycol-date { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.daycol.today .daycol-lbl { color: var(--yellow-deep); }
.daycol.today .daycol-date { color: var(--yellow-deep); font-weight: 700; }
.daycol.today .daycol-stack { outline: 2px solid var(--yellow); outline-offset: 2px; }

.fc-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.fc-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.fc-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.fc-figs { display: flex; gap: 16px; margin-top: 10px; font-size: 13px; }
.fc-fig b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.fc-fig span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
               color: var(--text-3); font-weight: 700; }

/* --- Week-ahead forecast --------------------------------------------------- */
.fc-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fc-stale {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--yellow-soft); color: #6b5200; font-size: 13px;
}
.who-row { display: flex; align-items: center; gap: 14px; padding: 6px 0;
           border-bottom: 1px solid var(--border); }
.who-row:last-of-type { border-bottom: none; }
.who-person { display: flex; align-items: center; gap: 10px; width: 210px; flex: none; }
.who-name { font-weight: 700; font-size: 14.5px; }
.who-track { flex: 1; height: 16px; background: #f4f4f4; border-radius: 5px;
             overflow: hidden; min-width: 60px; }
.who-fill { display: block; height: 100%; border-radius: 6px; min-width: 4px; }
.who-figs { width: 200px; flex: none; text-align: right; font-size: 13.5px; }
.who-figs b { font-size: 16px; }
.who-figs .tiny { display: block; }
.who-note {
  margin: -4px 0 8px 224px; font-size: 12.5px; color: var(--amber);
  font-weight: 600;
}
.fc-free { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
           font-size: 13.5px; color: var(--text-2); }

/* --- Pager ---------------------------------------------------------------- */
.pager { display: flex; align-items: center; gap: 10px; padding: 11px 16px;
         border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager .spacer { flex: 1; }
.pager-count, .pager-pos { font-size: 12.5px; color: var(--text-2); }
.pager-pos { font-family: var(--mono); }

/* --- Access tab ------------------------------------------------------------ */
.access-warn {
  padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px;
  background: #fdf0cc; color: #6b5200; line-height: 1.55;
}
.access-soon {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.access-soon-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 8px;
}
.access-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); }
.access-list li { padding: 2px 0; }
.access-matrix th.num, .access-matrix td.num { text-align: center; }
.acc-yes { font-size: 15px; }
.acc-no { color: #d4d4d4; font-size: 15px; }

/* --- Tabs ----------------------------------------------------------------- */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.tab {
  padding: 9px 16px; font-size: 14.5px; font-weight: 700; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  letter-spacing: .01em; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--yellow); }

/* ===========================================================================
   Layout: profile column on the left, masthead and top navigation on the right
   =========================================================================== */

/* --- Left column ----------------------------------------------------------- */
.side {
  width: 214px; flex: 0 0 214px; background: var(--bg);
  border-right: 1px solid var(--border); padding: 16px 14px 18px;
  display: flex; flex-direction: column;
}
.side-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.side-logo-mark {
  width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--yellow);
  color: #111; display: grid; place-items: center; font-weight: 800; font-size: 11px;
}
.side-logo-text { font-size: 13.5px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.side-photo { display: flex; justify-content: center; margin-bottom: 14px; }
.side-photo .avatar-lg { width: 96px; height: 96px; font-size: 34px; }

.side-card {
  background: var(--rail); color: #fff; border-radius: var(--radius);
  padding: 16px 14px; flex: 1; display: flex; flex-direction: column;
}
.side-card-top { text-align: center; }
.side-name { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.side-position {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #b9b9b9;
  margin-top: 3px;
}
.side-dept {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 9px;
  font-size: 12px; color: #cfcfcf;
}
.side-change { display: block; margin-top: 12px; font-size: 12.5px; color: var(--yellow); }
.side-change:hover { text-decoration: underline; }
.side-card-foot { margin-top: auto; padding-top: 18px; }
.side-foot-link {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 14.5px; color: #e8e8e8;
}
.side-foot-link:hover { background: var(--rail-2); }
.side-foot-link.on { background: var(--yellow); color: var(--yellow-on); font-weight: 700; }

/* --- Masthead -------------------------------------------------------------- */
.main { flex: 1; min-width: 0; background: var(--bg-tint); display: flex; flex-direction: column; }
.masthead {
  display: flex; align-items: center; gap: 20px; padding: 16px 26px 12px;
  background: var(--bg);
}
.tagline {
  flex: 1; text-align: right; font-size: 19px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: -.02em;
}
.masthead-logo {
  display: flex; align-items: center; gap: 9px; font-size: 14px;
  font-weight: 800; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap;
}
/* The wordmark is white, so it needs a dark ground to be legible. Giving it a
   panel rather than asking for a second artwork file also makes it look
   deliberate instead of like a logo dropped on the wrong background. The
   class comes from the template: :has() was silently dropped by some
   browsers, which left white artwork on a white bar. */
.masthead-logo.has-logo {
  background: var(--rail); border-radius: 10px; padding: 8px 16px;
}
.masthead-logo.has-logo:hover { background: var(--rail-2); }
.masthead-logo-img { height: 30px; width: auto; display: block; }
.masthead-logo-mark {
  width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--yellow);
  color: var(--yellow-on); display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.masthead-logo-sub { font-weight: 600; color: var(--text-2); font-size: 12px; }

/* --- Top navigation -------------------------------------------------------- */
.topnav {
  display: flex; align-items: stretch; background: var(--rail);
  margin: 0 26px; border-radius: var(--radius) var(--radius) 0 0;
  position: relative; z-index: 40;
}
.topnav-spacer { flex: 1; }
.topnav-item { position: relative; display: flex; }
.topnav-link {
  display: flex; align-items: center; gap: 7px; padding: 15px 18px;
  color: var(--yellow); font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap;
}
.topnav-item:hover > .topnav-link,
.topnav-item.open > .topnav-link { background: var(--rail-2); }
.topnav-item.active > .topnav-link { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }
.topnav-soon {
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #8a8a8a; border: 1px solid #3a3a3a; border-radius: 20px; padding: 1px 6px;
}


.topnav-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 288px;
  background: var(--yellow); border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.topnav-item:hover > .topnav-menu,
.topnav-item:focus-within > .topnav-menu,
.topnav-item.open > .topnav-menu { display: block; }
.topnav-rule {
  height: 1px; background: rgba(0,0,0,.16); margin: 7px 10px;
}
.topnav-sub {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); color: #171717;
  font-size: 14px; font-weight: 700;
}
.topnav-sub:hover { background: rgba(0,0,0,.09); text-decoration: none; }
.topnav-sub-label { display: flex; flex-direction: column; min-width: 0; }
.topnav-note {
  font-size: 11.5px; font-weight: 500; color: #6b5200; margin-top: 1px;
  white-space: normal;
}
.topnav-sub.unbuilt { color: #6b5200; }
.topnav-sub.unbuilt .topnav-sub-label::after {
  content: "not built yet"; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #8a7420; margin-top: 3px;
}
.topnav-sub.locked {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: #8a7420; cursor: not-allowed;
}
.topnav-lock { margin-left: auto; font-size: 12px; opacity: .7; }
.topnav-count { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #6b5200; }

.wrap { padding: 20px 26px 40px; max-width: 1500px; }

@media (max-width: 980px) {
  .side { display: none; }
  .tagline { font-size: 15px; }
  .topnav { margin: 0 14px; flex-wrap: wrap; }
  .wrap { padding: 16px 14px 40px; }
}

/* --- Avatars (restored: these were removed with the old rail block) -------- */
.avatar {
  border-radius: 50%; display: inline-grid; place-items: center; color: #fff;
  font-weight: 700; overflow: hidden; flex: none; line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 78px; height: 78px; font-size: 30px; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-xs { width: 20px; height: 20px; font-size: 9px; }

/* The nav scrolls sideways on a narrow window rather than wrapping into a
   second row, which used to strand the buttons under the first. */
.topnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav-link { padding: 14px 15px; font-size: 14px; }

@media (max-width: 1180px) {
  .topnav-link { padding: 13px 11px; font-size: 13.5px; }
  .topnav-soon { display: none; }
}

/* ===========================================================================
   Shell: full-width masthead and top navigation, no side column
   =========================================================================== */
body { background: var(--bg-tint); }

.masthead {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 26px 12px; background: var(--bg);
}
.masthead-logo {
  display: flex; align-items: center; gap: 9px; font-size: 14px;
  font-weight: 800; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap;
}
/* The wordmark is white, so it needs a dark ground to be legible. Giving it a
   panel rather than asking for a second artwork file also makes it look
   deliberate instead of like a logo dropped on the wrong background. The
   class comes from the template: :has() was silently dropped by some
   browsers, which left white artwork on a white bar. */
.masthead-logo.has-logo {
  background: var(--rail); border-radius: 10px; padding: 8px 16px;
}
.masthead-logo.has-logo:hover { background: var(--rail-2); }
.masthead-logo-img { height: 30px; width: auto; display: block; }
.masthead-logo-mark {
  width: 30px; height: 30px; flex: none; border-radius: 7px; background: var(--yellow);
  color: var(--yellow-on); display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.masthead-logo-sub { font-weight: 600; color: var(--text-2); font-size: 12px; }
.tagline {
  flex: 1; text-align: right; font-size: 18px; font-weight: 700;
  color: var(--yellow-deep); letter-spacing: -.02em;
}

/* --- Who you are, top right ------------------------------------------------ */
.usermenu { position: relative; flex: none; }
.usermenu-btn {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); font: inherit; font-size: 14px; font-weight: 700;
  color: var(--text); cursor: pointer;
}
.usermenu-btn:hover { background: var(--surface-2); }
.usermenu-name { white-space: nowrap; }
.caret { font-size: 10px; color: var(--text-3); }
.usermenu-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 230px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 14px 34px rgba(0,0,0,.16);
  padding: 8px; z-index: 60;
}
.usermenu.open .usermenu-panel { display: block; }
.usermenu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.usermenu-fullname { font-weight: 700; font-size: 14.5px; }
.usermenu-role { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.usermenu-link {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.usermenu-link:hover { background: var(--surface-2); text-decoration: none; }

/* --- Top navigation -------------------------------------------------------- */
.topnav {
  display: flex; align-items: stretch; background: var(--rail);
  margin: 0 26px; border-radius: var(--radius) var(--radius) 0 0;
  position: relative; z-index: 40;
  /* Wraps rather than scrolls: a scrolling container clips the dropdowns,
     which are absolutely positioned below the bar. */
  flex-wrap: wrap; overflow: visible;
}
.topnav-item { position: relative; display: flex; }
.topnav-link {
  display: flex; align-items: center; gap: 7px; padding: 14px 16px;
  color: var(--yellow); font: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: -.01em; white-space: nowrap;
  background: none; border: none; cursor: pointer;
}
.topnav-link .caret { color: rgba(255,198,41,.75); }
.topnav-item:hover > .topnav-link,
.topnav-item.open > .topnav-link { background: var(--rail-2); }
.topnav-item.active > .topnav-link { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }
.topnav-item.active > .topnav-link .caret { color: rgba(255,255,255,.7); }
.topnav-soon {
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #8a8a8a; border: 1px solid #3a3a3a; border-radius: 20px; padding: 1px 6px;
}
.topnav-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 292px;
  background: var(--yellow); border-radius: 0 0 var(--radius) var(--radius);
  padding: 12px 10px; box-shadow: 0 14px 34px rgba(0,0,0,.22); z-index: 50;
}
.topnav-item.open > .topnav-menu { display: block; }
.topnav-rule {
  height: 1px; background: rgba(0,0,0,.16); margin: 7px 10px;
}
.topnav-sub {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: var(--radius-sm); color: #171717; font-size: 13.5px;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.topnav-sub:hover { background: rgba(0,0,0,.09); text-decoration: none; }
.topnav-sub-label { display: flex; flex-direction: column; min-width: 0; }
.topnav-note {
  font-size: 11.5px; font-weight: 500; color: #6b5200; margin-top: 2px;
  white-space: normal; text-transform: none; letter-spacing: 0;
}
.topnav-sub.unbuilt { color: #6b5200; }
.topnav-sub.unbuilt .topnav-sub-label::after {
  content: "not built yet"; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #8a7420; margin-top: 3px;
}
.topnav-sub.locked {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: #8a7420; cursor: not-allowed;
}
.topnav-lock { margin-left: auto; font-size: 12px; opacity: .7; }
.topnav-count { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #6b5200; }

.wrap { padding: 20px 26px 44px; max-width: 1500px; }

/* --- Greeting -------------------------------------------------------------- */
.greet { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.greet .avatar { width: 62px; height: 62px; font-size: 24px; }
.greet h1 { font-size: 27px; letter-spacing: -.035em; }
.greet-meta { font-family: var(--mono); font-size: 13px; color: var(--text-2); margin-top: 4px; }
.greet-chip {
  display: inline-block; margin-top: 8px; padding: 4px 11px; border-radius: var(--radius-pill);
  background: #e8f0fe; color: #1a56c4; font-size: 12.5px; font-weight: 700;
}
.sec-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.sec-head .spacer { flex: 1; }
.gotolink { font-size: 14px; font-weight: 700; color: var(--yellow-deep); white-space: nowrap; }
.gotolink:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .tagline { display: none; }
  .topnav { margin: 0 14px; }
  .wrap { padding: 16px 14px 40px; }
}

/* --- Home button in the nav ------------------------------------------------ */
.topnav-home {
  display: flex; align-items: center; justify-content: center;
  padding: 0 15px; color: var(--yellow); flex: none;
  border-right: 1px solid rgba(255,255,255,.09);
}
.topnav-home:hover { background: var(--rail-2); }
.topnav-home.active { color: #fff; box-shadow: inset 0 -3px 0 var(--yellow); }

/* --- My profile ------------------------------------------------------------ */
.profile-row { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.profile-photo { display: flex; flex-direction: column; align-items: center;
                 width: 150px; flex: none; text-align: center; }
.profile-photo .tiny { margin-top: 6px; line-height: 1.4; }
.locked-fields {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.locked-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.locked-grid { display: grid; gap: 10px 22px;
               grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.locked-grid > div { display: flex; flex-direction: column; }
.locked-grid span { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.locked-grid b { font-size: 13.5px; font-weight: 600; color: var(--text-2); }

/* --- ManCom table ---------------------------------------------------------- */
.mc-scroll { overflow-x: auto; }
.mc-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 900px; }
.mc-table th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-2); padding: 10px 10px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.mc-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.mc-table tbody tr:last-child td { border-bottom: none; }
.mc-table th:first-child, .mc-table td:first-child { padding-left: 18px; }
.mc-table th:last-child, .mc-table td:last-child { padding-right: 14px; }

.mc-subject { width: 230px; }
.mc-kill { width: 40px; text-align: right; vertical-align: middle !important; }

.mc-table textarea, .mc-table select {
  width: 100%; font-size: 13.5px; padding: 7px 9px; border-radius: 7px;
  border: 1px solid transparent; background: var(--surface-2);
  resize: none; overflow: hidden; min-height: 34px; line-height: 1.45;
}
.mc-table textarea:hover, .mc-table select:hover { border-color: var(--border-strong); }
.mc-table textarea:focus, .mc-table select:focus {
  background: var(--surface); border-color: var(--yellow-deep);
  outline: 2px solid var(--yellow-soft); outline-offset: -1px;
}
.mc-row.is-done { background: #f6fbf8; }
.mc-row.is-done textarea, .mc-row.is-done select { color: var(--text-3); }
.mc-row.is-done .mc-subject select { text-decoration: line-through; }

.mc-x {
  border: none; background: none; color: var(--text-3); font-size: 19px;
  line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.mc-x:hover { background: #fdecea; color: var(--red); }
.mc-foot { padding: 12px 18px; border-top: 1px solid var(--border); }

.mc-savebar {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px;
  justify-content: flex-end; padding: 12px 18px; margin-top: 4px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius);
}

/* --- ManCom: hint row and numbered items ----------------------------------- */
.mc-hint td {
  padding: 0 8px 10px; font-size: 11.5px; font-style: italic; color: var(--text-3);
  border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.4;
}
.mc-hint td:first-child { padding-left: 18px; }
.mc-table thead tr:first-child th { border-bottom: none; padding-bottom: 6px; }

.cl-num { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; }
.cl-n {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text-3);
  flex: none; padding-top: 1px; letter-spacing: -.02em;
}
.cl-num > span:last-child { flex: 1; min-width: 0; word-break: break-word; }
.cl-gap { height: 7px; }
.mc-table .mc-subject textarea { font-weight: 700; }


/* --- Rich text cells ------------------------------------------------------- */
.rt-cell { position: relative; }
.rt {
  min-height: 36px; padding: 7px 9px; border-radius: 7px;
  border: 1px solid transparent; background: var(--surface-2);
  font-size: 13.5px; line-height: 1.5; outline: none;
  word-break: break-word;
}
.rt:hover { border-color: var(--border-strong); }
.rt:focus { background: var(--surface); border-color: var(--yellow-deep);
            box-shadow: 0 0 0 2px var(--yellow-soft); }
.rt:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rt > div, .rt > p { margin: 0; }
.rt ul { margin: 2px 0; padding-left: 20px; }
.rt ol {
  margin: 2px 0; padding-left: 34px; list-style: none; counter-reset: rtnum;
}
.rt ol > li { counter-increment: rtnum; position: relative; }
.rt ol > li::before {
  content: "[" counter(rtnum, decimal-leading-zero) "]";
  position: absolute; left: -34px; font-family: var(--mono);
  font-size: 12px; font-weight: 700; color: var(--text-3); top: 1px;
}
.rt li { padding: 1px 0; }
.rt ul.rt-checks { list-style: none; padding-left: 2px; }
.rt ul.rt-checks li { display: flex; align-items: flex-start; gap: 8px; }
.rt ul.rt-checks input[type=checkbox] {
  width: 15px; height: 15px; margin-top: 3px; flex: none;
  accent-color: var(--green); cursor: pointer;
}
.rt ul.rt-checks li.rt-done { color: var(--text-3); text-decoration: line-through; }

.rt-bar {
  display: flex; align-items: center; gap: 2px; margin-bottom: 5px;
  width: fit-content;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.13);
}
.rt-bar[hidden] { display: none; }
.rt-b {
  min-width: 28px; height: 26px; border: none; background: none; cursor: pointer;
  border-radius: 5px; font-size: 13.5px; color: var(--text-2);
  font-family: var(--sans); line-height: 1; padding: 0 7px;
}
.rt-b:hover { background: var(--yellow-soft); color: #6b5200; }
.rt-sep { width: 1px; height: 17px; background: var(--border); margin: 0 3px; }

/* --- Access toggles -------------------------------------------------------- */
.acc-fixed { color: var(--green); font-size: 15px; }
.acc-toggle {
  border: 1px solid var(--border-strong); background: var(--surface);
  width: 30px; height: 26px; border-radius: 6px; cursor: pointer;
  font-size: 14px; color: var(--text-3); line-height: 1; padding: 0;
}
.acc-toggle:hover { border-color: var(--yellow-deep); background: var(--yellow-soft); }
.acc-toggle.on { background: #e7f6ee; border-color: #b6e2cb; color: #17724a; font-weight: 800; }

/* --- Home: greeting and time clock ----------------------------------------- */
.home-top {
  display: grid; gap: 14px; align-items: stretch; margin-bottom: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}
@media (max-width: 900px) { .home-top { grid-template-columns: 1fr; } }
.home-top .greet {
  margin: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}

.clockcard {
  background: var(--rail); color: #fff; border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column;
}
.clockcard-label {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #9a9a9a; margin-bottom: 12px;
}
.clockcard-times { display: flex; gap: 10px; }
.clockslot {
  flex: 1; background: #1c1c1c; border-radius: 9px; padding: 9px 11px;
  border: 1px solid #262626;
}
.clockslot span {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #8a8a8a;
}
.clockslot b { display: block; font-size: 16px; font-weight: 700; margin-top: 3px;
               letter-spacing: -.02em; color: #6e6e6e; }
.clockslot.set b { color: var(--yellow); }
.clockcard-actions {
  display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 14px;
}
.clock-live, .clock-done { font-size: 12.5px; color: #9a9a9a; }
.clock-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: 1px;
}

/* --- Home: team tiles ------------------------------------------------------ */
.team-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.tile-card { margin-bottom: 0; display: flex; flex-direction: column; }
.tile-head {
  display: flex; align-items: center; gap: 11px; padding: 15px 17px 12px;
  border-bottom: 1px solid var(--border);
}
.tile-head .spacer { flex: 1; }
.tile-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 16px;
}
.tile-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.tile-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.tile-body { padding: 6px 17px 14px; flex: 1; }
.tile-empty { padding: 18px 0; color: var(--text-3); font-size: 13.5px; text-align: center; }

.person-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.person-row:last-child { border-bottom: none; }
.person-name { font-size: 14px; font-weight: 650; flex: 1; min-width: 0; }
.person-meta { font-size: 12.5px; color: var(--text-2); font-family: var(--mono);
               white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.person-row.is-today .person-name { font-weight: 800; }
.person-row.is-past { opacity: .5; }
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  display: inline-block;
}

/* --- Department attendance ------------------------------------------------- */
.attend-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.attend {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.attend.in { background: #f4fbf7; border-color: #cfeadd; }
.attend-body { flex: 1; min-width: 0; }
.attend-name { display: block; font-size: 14px; font-weight: 650; }
.attend-time { display: block; font-size: 11.5px; color: var(--text-2); font-family: var(--mono); margin-top: 1px; }
.attend.out .attend-name, .attend.out .attend-time { color: var(--text-3); }

/* --- Department library ---------------------------------------------------- */
.tab-soon {
  font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); border: 1px solid var(--border-strong);
  border-radius: 20px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px;
}
.lib-layout { display: grid; gap: 16px; grid-template-columns: 232px minmax(0, 1fr); }
@media (max-width: 860px) { .lib-layout { grid-template-columns: 1fr; } }
.lib-nav { display: flex; flex-direction: column; gap: 3px; }
.lib-nav-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  color: var(--text-2); border: 1px solid transparent;
}
.lib-nav-item:hover { background: var(--surface-2); color: var(--text); }
.lib-nav-item.active {
  background: var(--surface); border-color: var(--border);
  color: var(--text); font-weight: 700; box-shadow: var(--shadow);
}
.lib-nav-label { flex: 1; min-width: 0; }
.lib-nav-count { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }

.lib-empty { text-align: center; padding: 26px 20px 22px; }
.lib-empty-icon { font-size: 30px; opacity: .55; }
.lib-empty-title { font-size: 15px; font-weight: 700; margin-top: 10px; }
.lib-empty-text {
  font-size: 13.5px; color: var(--text-2); max-width: 460px; margin: 8px auto 0;
  line-height: 1.55;
}
.lib-examples { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.lib-examples-title {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 9px;
}
.lib-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lib-chip {
  font-size: 13px; padding: 5px 11px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}

/* --- Task title as the way into the editor --------------------------------- */
.task-open {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; font-size: 15.5px; letter-spacing: -.01em;
  color: var(--text); border-bottom: 1px solid transparent;
}
.task-open:hover { border-bottom-color: var(--yellow-deep); color: var(--yellow-deep); }
.modal-foot {
  display: flex; justify-content: flex-end; padding: 12px 22px 18px;
  border-top: 1px solid var(--border);
}

.status-static {
  display: inline-block; padding: 7px 11px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text-3);
  background: var(--surface-2); border: 1px solid var(--border);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2); color: var(--text-3); cursor: not-allowed;
}

/* --- Life at Streamlined Campaigns ----------------------------------------- */
.life-grid {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
}
.life-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  border-top: 3px solid var(--border-strong);
}
.life-block.accent { border-top-color: var(--yellow); }
.life-block.good { border-top-color: var(--green); }
.life-label {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--text-3);
}
.life-figure {
  font-size: 32px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1;
  margin-top: 8px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
}
.life-figure.small { font-size: 17px; font-weight: 700; align-items: center; gap: 8px; }
.life-unit { font-size: 15px; font-weight: 700; color: var(--text-3); margin-right: 6px; }
.life-note { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.45; }

/* --- Clickable life block and the training list ---------------------------- */
.life-clickable {
  cursor: pointer; text-align: left; font: inherit; width: 100%;
  border-top-color: var(--blue);
}
.life-clickable:hover { background: var(--surface-2); border-color: var(--border-strong);
                        border-top-color: var(--blue); }
.life-clickable:hover .life-more { opacity: 1; }
.life-label { display: flex; align-items: center; gap: 8px; }
.life-more {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--yellow-deep);
  letter-spacing: 0; text-transform: none; opacity: 0; transition: opacity .12s;
}

.train-list { display: flex; flex-direction: column; }
.train-row {
  display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border);
}
.train-row:last-child { border-bottom: none; }
.train-date {
  width: 52px; flex: none; text-align: center; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 9px; padding: 7px 4px;
  display: flex; flex-direction: column; line-height: 1.15;
}
.train-day { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.train-mon { font-size: 10.5px; font-weight: 700; text-transform: uppercase;
             letter-spacing: .06em; color: var(--text-2); }
.train-yr { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.train-body { flex: 1; min-width: 0; }
.train-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.train-meta { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.train-foot {
  margin-top: 16px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--yellow-soft); color: #6b5200; font-size: 12.5px; line-height: 1.5;
}



/* --- Sign in --------------------------------------------------------------- */
.login-body { background: #f4f4f4; display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login {
  display: grid; grid-template-columns: 1fr 1.25fr; width: 100%; max-width: 1000px;
  min-height: 480px; border-radius: 4px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.16);
}
.login-art {
  background: linear-gradient(160deg, #ffe9a8 0%, #ffc629 45%, #e0a800 100%);
  background-size: cover;
  /* Left of centre and above the middle: where the head and glasses sit. */
  background-position: 30% 34%;
  position: relative;
}
/* If a login image is present it takes over the panel entirely. */
.login-art { background-size: cover; background-position: center; }
.login-panel {
  background: #0b0b0b; color: #fff; padding: 96px 56px 48px;
  display: flex; flex-direction: column; justify-content: center; position: relative;
}
.login-form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.login-title {
  font-size: 34px; font-weight: 800; color: var(--yellow); letter-spacing: -.03em;
  margin-bottom: 8px;
}
.login-form input.login-input {
  width: 100%; height: 54px; box-sizing: border-box;
  border: none; border-radius: 999px; padding: 0 26px;
  font-size: 16px; font-style: italic; color: #222; background: #fff;
}
.login-form input.login-input::placeholder { color: #9a9a9a; font-style: italic; }
.login-form input.login-input:focus {
  outline: 3px solid rgba(255,198,41,.55); outline-offset: 2px;
}
.login-btn {
  width: 100%; height: 54px; box-sizing: border-box;
  border: none; border-radius: 999px; margin-top: 4px; cursor: pointer;
  background: #f3ca64; color: #111; font-size: 16px; font-weight: 700; font-style: italic;
}
.login-btn:hover { background: var(--yellow); }
.login-error {
  background: #3a1512; color: #ffb4a8; border-radius: 999px; padding: 13px 24px;
  font-size: 13.5px; line-height: 1.4; text-align: center;
}
.login-note {
  background: #12261c; color: #8fe0b4; border-radius: 999px; padding: 13px 24px;
  font-size: 13.5px; text-align: center;
}
.login-help { font-size: 12.5px; color: #8a8a8a; margin-top: 2px; text-align: center; }
.login-logo {
  position: absolute; right: 40px; top: 32px; display: flex; align-items: center;
  gap: 10px; font-size: 14px; line-height: 1.15; letter-spacing: -.02em; color: #fff;
}
.login-logo-mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--yellow); color: #111;
  display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: none;
}
.login-logo-sub { color: #9a9a9a; font-size: 12px; letter-spacing: .16em; }

@media (max-width: 780px) {
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 170px; }
  .login-panel { padding: 84px 26px 40px; }
}


/* --- Brand assets, when supplied ------------------------------------------- */
.login-logo-img { height: 46px; width: auto; display: block; }

/* --- Cross-department sign-off --------------------------------------------- */
.signoff-card { border-color: #f0d688; background: #fffdf5; }
.req-card { border-color: #cfe0fb; background: #fbfdff; }
.req-card.declined { border-color: #f4cdc7; background: #fffbfa; }
.signoff-badge, .req-badge {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--yellow); color: #111;
}
.req-badge { background: #3b82f6; color: #fff; }
.req-badge.declined { background: var(--red); }
.signoff {
  display: flex; align-items: flex-start; gap: 16px; padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}
.signoff:last-child { border-bottom: none; }
.signoff-main { flex: 1; min-width: 0; }
.signoff-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.signoff-meta { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.signoff-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.req-reason {
  margin-top: 6px; font-size: 13.5px; color: var(--text-2); font-style: italic;
  border-left: 3px solid #f4cdc7; padding-left: 10px;
}
.signoff-hint {
  background: var(--yellow-soft); color: #6b5200; border-radius: var(--radius-sm);
  padding: 10px 13px; font-size: 12.5px; line-height: 1.45;
}

.setup-lead { font-size: 13.5px; color: #9a9a9a; line-height: 1.5; margin: -4px 0 6px; }
.login-form select.login-input { appearance: none; cursor: pointer; }
