/* Marketing Command Centre — Central Marketing Reporting Portal */

:root {
  --bg:        #f4f6f9;
  --panel:     #ffffff;
  --ink:       #1b2230;
  --ink-soft:  #5f6979;
  --ink-mute:  #8a93a3;
  --line:      #dde2ea;
  --line-soft: #eceff4;
  --accent:    #1d5fd0;
  --accent-sf: #eaf1fd;
  --green:     #1a7f44;
  --green-bg:  #e6f5ec;
  --amber:     #a76a00;
  --amber-bg:  #fdf3e0;
  --red:       #b3261e;
  --red-bg:    #fdecea;
  --grey-bg:   #eef0f4;
  /* Chart palette — validated with the data-viz palette validator against the
     #ffffff card surface (lightness band, chroma, CVD separation, contrast).
     Slot order is the colourblind-safety mechanism; do not re-order casually. */
  --s1: #2a78d6;  --s2: #eb6834;  --s3: #1baf7a;  --s4: #eda100;
  --s5: #e87ba4;  --s6: #008300;  --s7: #4a3aa7;  --s8: #e34948;
  --grid:     #e1e0d9;
  --axis:     #c3c2b7;
  --ink-axis: #898781;
}

* { box-sizing: border-box; }

/* ================================================================== *
 * macOS, Safari and iOS.
 *
 * The one that actually breaks the portal is colour scheme. With no
 * declaration, a Mac in Dark Mode renders every NATIVE control dark —
 * selects, date pickers, checkboxes, the dropdown popups, the scrollbars —
 * while the page around them stays light and the text stays dark. Dark on
 * dark is unreadable, and a form you cannot read is a page that has not
 * opened properly.
 *
 * This portal is a light design, so it says so once, here, and every
 * browser then renders its own furniture to match.
 * ================================================================== */
:root { color-scheme: light; }

/* Safari on iOS enlarges text when the phone turns sideways unless told
   not to, which breaks every column width on a sheet. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Belt and braces behind color-scheme: a control that names its own
   colours cannot be repainted by the operating system. */
input, select, textarea, button, option {
  font-family: inherit;
  color: var(--ink);
  background-color: #fff;
}
button, .btn { background-color: var(--panel); }
option { background-color: #fff; color: var(--ink); }

/* Safari draws a disclosure triangle inside every <summary>. Where the
   summary is styled as a button that leaves a stray arrow sitting in it,
   so it is turned off everywhere rather than one class at a time. */
summary::-webkit-details-marker { display: none; }
summary::marker { content: ''; }
summary { cursor: pointer; }

/* Safari zeroes the radius and shadow on a checkbox otherwise, and iOS
   renders date inputs at the wrong height without an explicit one. */
input[type="date"], input[type="datetime-local"], input[type="time"] {
  min-height: 34px;                 /* iOS collapses these otherwise */
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Momentum scrolling for the wide tables on a trackpad or a phone. */
.scrollx, .pickbox, .minutes, .drawer .body {
  -webkit-overflow-scrolling: touch;
}

/* The hidden attribute loses to any explicit display rule, and several
   panels here are flex or block. Stated once so JS toggling `hidden`
   works the same in every browser. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--accent); }

/* ------------------------------------------------------------- chrome */

/* The top bar and the nav strip travel together and stay put, so the sheet
   you are on and the way out are always on screen however far you scroll. */
.apphead { position: sticky; top: 0; z-index: 50; }

.topbar {
  background: #16202f;
  color: #fff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar .brandmark {
  display: flex; align-items: center; gap: 9px;
  font-weight: 650; letter-spacing: .2px; font-size: 15px;
}
.topbar .brandmark .brandname span { color: #8fb4f5; font-weight: 400; }
/* The mark sits on a light tile: a logo drawn for white paper disappears
   against the dark bar, and every client's is drawn for their own paper. */
.topbar .brandlogo {
  width: 28px; height: 28px; flex: 0 0 auto;
  object-fit: contain; border-radius: 6px;
  background: #fff; padding: 3px; box-sizing: border-box;
}
@media (max-width: 640px) {
  .topbar .brandmark .brandname span { display: none; }
}
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12.5px; color: #9fabbd; }
.topbar a.btn-top {
  color: #dce6f5; text-decoration: none; font-size: 13px;
  border: 1px solid #33425a; border-radius: 6px; padding: 5px 11px;
}
.topbar a.btn-top:hover { background: #22304a; }
.topbar a.btn-top.danger { border-color: #5a3340; color: #f3c9c9; }
.topbar a.btn-top.danger:hover { background: #46212b; color: #fff; }

.navstrip {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
.navstrip a {
  padding: 11px 14px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.navstrip a:hover { color: var(--ink); background: var(--line-soft); }
.navstrip a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.navstrip a .ro { font-size: 10.5px; color: var(--ink-mute); margin-left: 5px; }

.wrap { padding: 20px; }
/* Reading width for a single column of prose or one short form. */
.wrap-narrow { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
/* The management screens — rosters and long forms. Wide enough that a nine
   column table is not squeezed into a third of a modern display, capped so the
   lines never run away on an ultrawide. */
.wrap-page { max-width: 1440px; margin: 0 auto; padding: 24px 20px; }
.wrap-page > .card,
.wrap-page > .block { width: 100%; }

.pagehead { margin-bottom: 16px; }
.pagehead h1 { margin: 0 0 3px; font-size: 19px; letter-spacing: .2px; }
.pagehead .sub { color: var(--ink-soft); font-size: 13px; }
.pagehead .note {
  margin-top: 8px; font-size: 12.5px; color: var(--ink-soft);
  background: var(--accent-sf); border: 1px solid #cfe0fa;
  border-radius: 6px; padding: 7px 11px; display: inline-block;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-block; font: inherit; font-size: 13px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  border-radius: 6px; padding: 7px 13px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--line-soft); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #1a54b8; }
.btn-danger { color: var(--red); border-color: #e9c3c0; }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { padding: 4px 9px; font-size: 12px; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar select, .toolbar input {
  font: inherit; font-size: 13px; padding: 6px 9px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink);
}

/* --------------------------------------------------------------- grid */

.gridbox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  max-height: calc(100vh - 260px);
  /* Hug the table. A four-column sheet like Lists would otherwise sit in a
     full-width white box with most of it empty; a wide sheet still scrolls. */
  width: max-content;
  max-width: 100%;
}
table.grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.grid th, table.grid td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 0;
  vertical-align: top;
}
table.grid thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f0f3f8; color: var(--ink);
  font-weight: 600; font-size: 12px; text-align: left;
  padding: 8px 10px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.grid tbody th.rowhead,
table.grid thead th.corner {
  position: sticky; left: 0; z-index: 2;
  background: #f7f9fc; font-weight: 600; text-align: left;
  padding: 0; white-space: nowrap;
  border-right: 1px solid var(--line);
}
table.grid thead th.corner { z-index: 4; background: #f0f3f8; }

table.grid td .cell, table.grid th.rowhead .cell {
  display: block; padding: 6px 10px; min-height: 30px;
  max-width: 360px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.grid td.num .cell { text-align: right; font-variant-numeric: tabular-nums; }

/* Column widths live on the cell, so a <select> or <input> fills them too and
   values like "Digital Marketing" are readable rather than clipped to "Digit". */
table.grid td            { min-width: 120px; }
table.grid td.t-select   { min-width: 160px; }
table.grid td.t-date     { min-width: 148px; }
table.grid td.t-text,
table.grid td.t-url      { min-width: 170px; }
table.grid td.wide       { min-width: 240px; }
table.grid td.t-int,
table.grid td.t-money,
table.grid td.t-dec      { min-width: 118px; }
table.grid td.idcell     { min-width: 104px; }
table.grid td.computed   { min-width: 112px; }

table.grid td input, table.grid td select, table.grid td textarea {
  font: inherit; font-size: 13px; width: 100%; border: 0; background: transparent;
  padding: 6px 10px; color: inherit; border-radius: 0; outline: none;
}
table.grid td input:focus, table.grid td select:focus, table.grid td textarea:focus {
  box-shadow: inset 0 0 0 2px var(--accent); background: #fff;
}
table.grid td.computed { background: #f8f9fb; color: var(--ink-mute); }
table.grid td.computed .cell { font-style: normal; }
table.grid td.idcell .cell { font-weight: 600; color: var(--ink-soft); }
table.grid tbody tr:hover td { background: #fbfcfe; }
table.grid tbody tr:hover td.computed { background: #f4f6f9; }

td.rag-red    .cell, .rag-red    { background: var(--red-bg);   color: var(--red);   font-weight: 600; }
td.rag-amber  .cell, .rag-amber  { background: var(--amber-bg); color: var(--amber); font-weight: 600; }
td.rag-green  .cell, .rag-green  { background: var(--green-bg); color: #1a7f44;      font-weight: 600; }
td.rag-done   .cell, .rag-done   { background: var(--grey-bg);  color: var(--ink-soft); }

.rowtools { display: flex; gap: 4px; align-items: center; padding: 4px 8px; }
.rowtools button {
  border: 0; background: transparent; cursor: pointer; color: var(--ink-mute);
  font-size: 13px; padding: 2px 5px; border-radius: 4px; line-height: 1;
}
.rowtools button:hover { background: var(--line-soft); color: var(--ink); }
.rowtools .rn { font-size: 11px; color: var(--ink-mute); min-width: 24px; }

/* ------------------------------------------------------------- status */

.savestate {
  font-size: 12.5px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid transparent; visibility: hidden;
}
.savestate.on { visibility: visible; }
.savestate.saving { background: var(--amber-bg); color: var(--amber); border-color: #f0dcb4; }
.savestate.saved  { background: var(--green-bg); color: #1a7f44;      border-color: #c3e6d1; }
.savestate.error  { background: var(--red-bg);   color: var(--red);   border-color: #f0c8c8; }

/* ------------------------------------------------------- tiles/tables */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.tile .k { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.tile .v { font-size: 21px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile.red   .v { color: var(--red); }
.tile.amber .v { color: var(--amber); }
.tile.green .v { color: #1a7f44; }

.block { margin-bottom: 26px; }
.block > h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--ink-soft); margin: 0 0 10px; font-weight: 650;
}

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

table.data {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 13px;
}
table.data th, table.data td { padding: 7px 11px; border-bottom: 1px solid var(--line-soft); text-align: left; }
table.data tbody td:first-child { white-space: nowrap; }
table.data thead th {
  background: #f0f3f8; font-size: 11.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .3px; color: var(--ink-soft); white-space: nowrap;
}
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafbfd; }
.scrollx { overflow-x: auto; }

/* ------------------------------------------------------------- charts */

.chartgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.chartcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; }
.chartcard h3 { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--ink); }
.chartcard svg { display: block; width: 100%; height: auto; overflow: visible; }
/* An SVG scales to its box, so capping the box is what keeps the small
   charts from swelling on a wide screen and dwarfing the grid they
   describe. Only the ones in a chart grid: the sheet dashboard is one wide
   panel and sets its own width. */
.chartgrid .chartcard svg { max-width: 400px; margin: 0 auto; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--ink-soft); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* -------------------------------------------------------------- forms */

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.card > h2 { margin: 0 0 14px; font-size: 15px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 13.5px; width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 70px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-mute); margin-top: 3px; }
.fieldrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }

.pill { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
/* Status pills named by tone, so a module can colour a state without
   knowing which words the rest of the portal happens to use. */
.pill.green { background: var(--green-bg); color: #1a7f44; }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.red   { background: var(--red-bg);   color: var(--red); }
.pill.grey  { background: var(--grey-bg);  color: var(--ink-soft); }

/* The strip that holds one desk's pages together (Finance: Overview,
   Invoices, Compliance, Expenses). Sits under the page title, not beside
   the main nav, so it never competes with it. */
.subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.subtabs a {
  padding: 8px 15px; font-size: 13.5px; font-weight: 550; color: var(--ink-soft);
  text-decoration: none; border: 1px solid transparent; border-bottom: 0;
  border-radius: 7px 7px 0 0; margin-bottom: -1px;
}
.subtabs a:hover { color: var(--ink); background: var(--panel); }
.subtabs a.on {
  color: var(--ink); background: #fff; border-color: var(--line);
  border-bottom: 1px solid #fff;
}
.pill.ok      { background: var(--green-bg); color: #1a7f44; }
.pill.expired { background: var(--amber-bg); color: var(--amber); }
.pill.revoked { background: var(--red-bg);   color: var(--red); }
.pill.view    { background: var(--grey-bg);  color: var(--ink-soft); }
.pill.edit    { background: var(--accent-sf);color: var(--accent); }

.tokenlink {
  font: 12.5px/1.5 ui-monospace, Consolas, monospace; background: #f4f6fa;
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
  word-break: break-all; display: inline-block;
}

.flash { padding: 10px 14px; border-radius: 7px; margin-bottom: 14px; font-size: 13.5px; }
.flash.ok  { background: var(--green-bg); color: #1a6b3c; border: 1px solid #c3e6d1; }
.flash.err { background: var(--red-bg);   color: var(--red); border: 1px solid #f0c8c8; }

.empty { color: var(--ink-mute); font-size: 13px; padding: 18px; text-align: center; }

/* -------------------------------------------------------------- panel */

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 92vw);
  background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -8px 0 28px rgba(20,28,44,.13); z-index: 50;
  display: none; flex-direction: column;
}
.drawer.on { display: flex; }
.drawer header {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.drawer header h3 { margin: 0; font-size: 14px; flex: 1; }
.drawer .body { padding: 14px 18px; overflow: auto; flex: 1; }
.drawer .entry { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.drawer .entry .meta { font-size: 11.5px; color: var(--ink-mute); margin-bottom: 3px; }
.drawer .entry del { color: var(--red); text-decoration: line-through; }
.drawer .entry ins { color: #1a7f44; text-decoration: none; }

/* ------------------------------------------------------------- tones */
/* One tone per meaning, used everywhere: grid cells, pills, tiles, calendar.
   Tints are kept light so text stays legible; the left rule carries the tone. */

:root {
  --tone-good-ink:    #1a6b3c; --tone-good-bg:    #e9f6ee; --tone-good-line:    #a9dcbf;
  --tone-info-ink:    #1e4f9c; --tone-info-bg:    #eaf1fd; --tone-info-line:    #b4cdf5;
  --tone-warn-ink:    #8a5300; --tone-warn-bg:    #fff4e0; --tone-warn-line:    #f2d49a;
  --tone-risk-ink:    #9f1f1a; --tone-risk-bg:    #fdeceb; --tone-risk-line:    #f0b8b4;
  --tone-muted-ink:   #5f6979; --tone-muted-bg:   #f0f2f5; --tone-muted-line:   #d5dae2;
  --tone-neutral-ink: #1b2230; --tone-neutral-bg: transparent; --tone-neutral-line: transparent;
}

.pill.tone-good,    .tone-good    { background: var(--tone-good-bg);    color: var(--tone-good-ink); }
.pill.tone-info,    .tone-info    { background: var(--tone-info-bg);    color: var(--tone-info-ink); }
.pill.tone-warn,    .tone-warn    { background: var(--tone-warn-bg);    color: var(--tone-warn-ink); }
.pill.tone-risk,    .tone-risk    { background: var(--tone-risk-bg);    color: var(--tone-risk-ink); }
.pill.tone-muted,   .tone-muted   { background: var(--tone-muted-bg);   color: var(--tone-muted-ink); }
.pill.tone-neutral, .tone-neutral { background: var(--tone-neutral-bg); color: var(--tone-neutral-ink); }

/* A status dot beside the label, so tone is never colour-alone. */
.pill .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; opacity: .85; vertical-align: 1px; }

/* Grid cells: tint the whole cell and give the <select> a matching ink. */
table.grid td.tone-good,  table.grid td.tone-good  select { background: var(--tone-good-bg);  color: var(--tone-good-ink);  font-weight: 600; }
table.grid td.tone-info,  table.grid td.tone-info  select { background: var(--tone-info-bg);  color: var(--tone-info-ink);  font-weight: 600; }
table.grid td.tone-warn,  table.grid td.tone-warn  select { background: var(--tone-warn-bg);  color: var(--tone-warn-ink);  font-weight: 600; }
table.grid td.tone-risk,  table.grid td.tone-risk  select { background: var(--tone-risk-bg);  color: var(--tone-risk-ink);  font-weight: 600; }
table.grid td.tone-muted, table.grid td.tone-muted select { background: var(--tone-muted-bg); color: var(--tone-muted-ink); }
table.grid td[class*="tone-"] { box-shadow: inset 3px 0 0 currentColor; }
table.grid td.tone-neutral { box-shadow: none; }
table.grid tbody tr:hover td[class*="tone-"] { filter: saturate(1.15); }

/* Dashboard table cells and readiness verdicts reuse the same tones. */
table.data td.tone-good, table.data td.tone-info, table.data td.tone-warn,
table.data td.tone-risk, table.data td.tone-muted { font-weight: 600; box-shadow: inset 3px 0 0 currentColor; }

/* Legend chips explaining the tones, shown once above a grid. */
.tonekey { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; }
.tonekey .pill { font-weight: 600; }

/* --------------------------------------------------------- workload */
.bar { position: relative; height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; min-width: 90px; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--s1); }
.bar.warn > i { background: #eda100; } .bar.risk > i { background: #d03b3b; } .bar.muted > i { background: #b6bdc8; }
.balance { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }

/* --------------------------------------------------------- calendar */
.calhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.calhead h3 { margin: 0; font-size: 15px; min-width: 160px; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.calgrid .dow { background: #f0f3f8; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-soft); padding: 6px 8px; }
.calgrid .day { background: var(--panel); min-height: 96px; padding: 5px 6px; font-size: 12px; }
.calgrid .day.other { background: #fafbfc; color: var(--ink-mute); }
.calgrid .day.today { background: #fffbeb; }
.calgrid .day .n { font-size: 11.5px; font-weight: 650; color: var(--ink-soft); margin-bottom: 4px; display: flex; justify-content: space-between; }
.calgrid .day.today .n { color: var(--amber); }
.chip { display: block; font-size: 11px; line-height: 1.35; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid transparent; }
.chip.src-event    { background: #eaf1fd; color: #1e4f9c; border-left-color: #2a78d6; }
.chip.src-festival { background: #fdeee7; color: #8a3a12; border-left-color: #eb6834; }
.chip.src-content  { background: #e6f6ef; color: #1a6b3c; border-left-color: #1baf7a; }
.chip.src-campaign { background: #fff6e0; color: #7a4b00; border-left-color: #eda100; }
.chip.src-design   { background: #f3eefb; color: #4a3aa7; border-left-color: #4a3aa7; }
.chip.src-creative { background: #fde9f1; color: #8a2a52; border-left-color: #e87ba4; }
.chip.more { background: transparent; color: var(--ink-mute); border-left-color: transparent; padding-left: 4px; }
.callegend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
.callegend label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.callegend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ------------------------------------------------------- intake form */
.formwrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.formwrap .card { padding: 22px 24px; }
.formwrap h1 { font-size: 20px; margin: 0 0 4px; }
.formwrap .lead { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 18px; }
.formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.formgrid .field.full { grid-column: 1 / -1; }
.req { color: var(--red); margin-left: 2px; }

/* Inline column tools (admin): click a header to rename, gear to edit options. */
table.grid thead th.renamable { cursor: text; }
table.grid thead th.renamable:hover .hlabel { text-decoration: underline dotted var(--ink-mute); text-underline-offset: 3px; }
table.grid thead th.renamable.renamed .hlabel::after { content: ' \2022'; color: var(--accent); }
table.grid thead th input.hedit {
  font: inherit; font-size: 12px; font-weight: 600; padding: 2px 6px; margin: -3px 0;
  border: 1px solid var(--accent); border-radius: 4px; background: #fff; color: var(--ink); min-width: 140px; outline: none;
}
.colgear { border: 0; background: transparent; cursor: pointer; color: var(--ink-mute); font-size: 12px; margin-left: 2px; padding: 0 3px; opacity: .55; line-height: 1; }
.colgear:hover { color: var(--accent); opacity: 1; }

/* options editor rows inside the drawer */
.optrow { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.optrow input.oval { font: inherit; font-size: 13px; flex: 1; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; min-width: 0; }
.optrow input.oval:focus { border-color: var(--line); outline: none; background: #fff; }
.optrow.hidden input.oval { color: var(--ink-mute); text-decoration: line-through; }
.optrow button { border: 1px solid var(--line); background: var(--panel); border-radius: 5px; cursor: pointer; font-size: 12px; padding: 3px 7px; color: var(--ink-soft); }
.optrow button:hover { background: var(--line-soft); color: var(--ink); }
.optrow button.danger:hover { background: var(--red-bg); color: var(--red); border-color: #e9c3c0; }
/* Only on screen once the name has actually been edited — see grid.js. */
.optrow button.osave { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.optrow button.osave:hover { background: var(--accent); border-color: var(--accent); color: #fff; filter: brightness(1.08); }
.optadd { display: flex; gap: 6px; margin: 4px 0 12px; }
.optadd input { font: inherit; font-size: 13px; flex: 1; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; }
.optmsg { font-size: 12.5px; color: var(--ink-soft); min-height: 18px; margin-bottom: 6px; }

/* ------------------------------------------------- files & review */
.rowtools button b { font-size: 9.5px; font-weight: 700; margin-left: 2px; vertical-align: 2px; }
.js-files b { color: var(--accent); }

.filelist { display: flex; flex-direction: column; gap: 10px; }
.fileitem { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.fileitem .thumb { width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; background: #f4f6fa; flex: none; }
.fileitem .ficon { width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--line); background: #f4f6fa; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-mute); flex: none; text-transform: uppercase; }
.fileitem .meta { flex: 1; min-width: 0; }
.fileitem .meta a { font-weight: 600; word-break: break-all; }
.fileitem .meta .sub { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }

.dropzone { border: 2px dashed var(--line); border-radius: 8px; padding: 18px; text-align: center; color: var(--ink-soft); font-size: 13px; margin-bottom: 14px; cursor: pointer; background: #fbfcfe; }
.dropzone.over { border-color: var(--accent); background: var(--accent-sf); color: var(--accent); }
.dropzone input { display: none; }

.reviewnow { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; }
.reviewnow .state { font-size: 15px; font-weight: 700; }
.reviewnow .who { font-size: 12px; opacity: .85; margin-top: 2px; }
.reviewnow .rem { margin-top: 8px; font-size: 13px; background: rgba(255,255,255,.65); border-radius: 6px; padding: 8px 10px; }
.reviewacts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.btn-approve { background: var(--tone-good-bg); border-color: var(--tone-good-line); color: var(--tone-good-ink); font-weight: 600; }
.btn-approve:hover { background: #d9efe3; }
.btn-reject { background: var(--tone-risk-bg); border-color: var(--tone-risk-line); color: var(--tone-risk-ink); font-weight: 600; }
.btn-reject:hover { background: #fadedb; }
.rejectbox { margin-top: 10px; }
.rejectbox textarea { font: inherit; font-size: 13px; width: 100%; min-height: 80px; padding: 8px 10px; border: 1px solid var(--tone-risk-line); border-radius: 6px; }
.rejectbox .warn { font-size: 12px; color: var(--tone-risk-ink); margin-top: 4px; }

/* ------------------------------------------------- people & access forms */

/* A long form reads as a few labelled sections rather than one wall. */
.formsec { margin: 22px 0 14px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.formsec:first-of-type { margin-top: 6px; padding-top: 0; border-top: 0; }
.formsec > h3 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase;
                letter-spacing: .6px; color: var(--ink-soft); }
.formsec > .lead { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-mute); }

/* Fields line up on a real grid, so labels and inputs share a baseline. */
.fieldrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.fieldrow.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field input, .field select, .field textarea { width: 100%; }

/* Sheet access on a creation form: name on the left, one select on the right,
   every row the same height however long the sheet name is. */
.sheetgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 18px; }
.sheetgrid .row { display: flex; align-items: center; gap: 10px; min-height: 40px;
                  padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.sheetgrid .row span.name { flex: 1; font-size: 13px; }
.sheetgrid .row select { width: 132px; flex: none; font: inherit; font-size: 12.5px;
                         padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px;
                         background: var(--panel); color: var(--ink); }

/* Rights are granted beside sheets, and read the same way. */
.permtable td { vertical-align: top; }
.permtable td .hint { margin-top: 3px; }
.permtable .permcol { width: 90px; text-align: center; vertical-align: middle; }
.permtable .permcol input { width: 16px; height: 16px; }
table.data.permtable th, table.data.permtable td { padding: 10px 12px; }

/* Sheet access as radio columns: the choices line up under their headings
   instead of hugging the left edge of a column sized by its label. */
table.data.accesstable { table-layout: fixed; }
table.data.accesstable th, table.data.accesstable td { padding: 9px 12px; }
table.data.accesstable thead th + th,
table.data.accesstable tbody td + td { width: 110px; text-align: center; }
table.data.accesstable tbody td + td { vertical-align: middle; }
table.data.accesstable tbody td:first-child { white-space: normal; }
table.data.accesstable input[type="radio"] { width: 16px; height: 16px; margin: 0; cursor: pointer; }
table.data.accesstable tbody tr:hover td { background: #fafbfd; }
.accesstable .pill { margin-left: 6px; }
@media (max-width: 620px) {
  table.data.accesstable thead th + th,
  table.data.accesstable tbody td + td { width: 64px; padding: 9px 4px; font-size: 11.5px; }
}

/* The buttons that end a form, always on their own line. */
.formfoot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
            margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.formfoot .note { font-size: 12.5px; color: var(--ink-mute); }

/* A creation form kept out of the way until it is wanted. <details> does the
   work, so it opens with no script and still opens for a keyboard. */
.addbox { margin-bottom: 16px; }
.addbox > summary {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  background: var(--accent); border: 1px solid var(--accent); color: #fff;
  border-radius: 7px; padding: 9px 16px; cursor: pointer; list-style: none;
  user-select: none;
}
.addbox > summary::-webkit-details-marker { display: none; }
.addbox > summary::marker { content: ''; }
.addbox > summary:hover { background: #1a54b8; }
.addbox > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.addbox > summary .chev { font-size: 15px; line-height: 1; }
.addbox[open] > summary { background: var(--panel); color: var(--ink); border-color: var(--line); }
.addbox[open] > summary:hover { background: var(--line-soft); }
.addbox[open] > summary .chev { transform: rotate(45deg); display: inline-block; }
.addbox > .card { margin-top: 12px; }

/* =========================================================== sign-in ===
   A two-panel entrance: the product on the left, the one thing you came to
   do on the right. On a phone the left panel folds away to a slim header. */

.authbody { margin: 0; background: var(--panel); }
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* ---- the brand panel ---- */
.authside {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, #16202f 0%, #1b2d4d 45%, #1d5fd0 140%);
  color: #fff; padding: 56px 56px 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
/* A soft wash so the flat gradient has some depth behind the text. */
.authside::after {
  content: ''; position: absolute; inset: auto -20% -45% -20%; height: 70%;
  background: radial-gradient(60% 100% at 50% 100%, rgba(42,120,214,.5), transparent 70%);
  pointer-events: none;
}
.authside > * { position: relative; z-index: 1; }
.authside h2 {
  margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: -.4px; font-weight: 680;
  max-width: 15ch;
}
.authside p { margin: 0; max-width: 46ch; font-size: 15px; line-height: 1.65; color: #b9c9e4; }
.authpoints { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.authpoints li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #d7e3f5; }
.authpoints li::before {
  content: '✓'; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #8fc0ff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.authfoot {
  margin-top: auto; padding-top: 28px; font-size: 12.5px; color: #7f93b5;
  border-top: 1px solid rgba(255,255,255,.1);
}

/* ---- the wordmark, in the panel and again above the form on mobile ---- */
.authbrand { display: flex; align-items: center; gap: 12px; }
.authbrand .mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; font-size: 19px; font-weight: 800;
  background: #fff; color: #16202f; letter-spacing: -.5px;
}
.authbrand .name { font-size: 16px; font-weight: 680; letter-spacing: .2px; }
.authbrand.small { display: none; margin-bottom: 26px; color: var(--ink); }
.authbrand.small .mark { background: #16202f; color: #fff; width: 36px; height: 36px; font-size: 17px; }

/* ---- the form side ---- */
.authmain {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px 28px; background: var(--bg);
}
.authcard {
  width: 100%; max-width: 400px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 34px 30px; box-shadow: 0 18px 44px rgba(22,32,47,.09);
}
.authcard h1 { margin: 0 0 6px; font-size: 23px; letter-spacing: -.3px; }
.authcard .lead { margin: 0 0 22px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.6; }
.authcard .field { margin-bottom: 15px; }
.authcard .field label { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.authcard .field input {
  padding: 11px 13px; font-size: 14.5px; border-radius: 8px; border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.authcard .field input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sf);
}
.authcard .flash { margin-bottom: 18px; }
.authgo {
  width: 100%; padding: 12px; font-size: 14.5px; font-weight: 650; border-radius: 8px;
  margin-top: 6px;
}

/* the one-time code, spaced out so six digits are easy to read back */
.authcard input.otp {
  font: 600 26px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 14px; text-indent: 14px; text-align: center; padding: 13px 10px;
}

.authalt { margin-top: 18px; text-align: center; font-size: 13px; }
.authalt a { color: var(--accent); text-decoration: none; font-weight: 600; }
.authalt a:hover { text-decoration: underline; }
.authnote {
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--ink-mute); line-height: 1.6; text-align: center;
}
.authresend {
  margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--ink-mute);
}
.linkbtn {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 600;
  color: var(--accent); cursor: pointer; text-decoration: underline;
}
.authlegal { margin-top: 26px; font-size: 12px; color: var(--ink-mute); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; min-height: 100dvh; }
  .authside { display: none; }
  .authbrand.small { display: flex; }
  .authmain { justify-content: flex-start; padding: 40px 18px 24px; background: var(--panel); }
  .authcard { border: 0; box-shadow: none; padding: 0; max-width: 420px; }
  .authcard h1 { font-size: 21px; }
}

/* the unread count beside Notifications */
.navstrip a .badge {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 6px;
  background: var(--red); color: #fff; border-radius: 10px;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 16px;
}

/* ============================================================ invoices ===
   A document meant to be read, and to print onto one page cleanly. */

.invbody { background: var(--bg); margin: 0; padding: 0 0 40px; }
.invtools {
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
  max-width: 820px; margin: 0 auto; padding: 18px 20px 10px;
}
.invoice {
  max-width: 820px; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; padding: 40px 44px;
  box-shadow: 0 10px 30px rgba(22,32,47,.06);
}
.invhead { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start;
           padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.invfrom { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.invsub  { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
.invmeta { text-align: right; }
.invmeta h1 { margin: 0; font-size: 26px; letter-spacing: 2px; text-transform: uppercase;
              color: var(--ink-soft); font-weight: 650; }
.invmeta .num { font: 600 15px ui-monospace, Consolas, monospace; margin: 2px 0 6px; }

.invparties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0 28px; }
.invparties h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase;
                 letter-spacing: .7px; color: var(--ink-mute); }
.invparties .big { font-size: 15px; font-weight: 650; }
.invparties .muted, .invoice .muted { color: var(--ink-mute); }

table.data.invlines { border: 0; border-radius: 0; }
table.data.invlines thead th { background: transparent; border-bottom: 1px solid var(--ink); }
table.data.invlines td { border-bottom: 1px solid var(--line-soft); padding: 10px 11px; }

.invtotals { margin: 18px 0 0; margin-left: auto; width: 300px; font-size: 14px; }
.invtotals > div { display: flex; justify-content: space-between; padding: 7px 0; }
.invtotals .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 11px;
                    font-size: 17px; }
.invtotals .grand strong { font-weight: 700; }

.invaddr { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 6px;
           white-space: pre-line; }
.invbank { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--line);
           border-radius: 8px; background: var(--line-soft); }
.invbank h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase;
              letter-spacing: .7px; color: var(--ink-mute); }
.invbank pre { margin: 0; font: 13px/1.7 ui-monospace, Consolas, monospace;
               white-space: pre-wrap; color: var(--ink); }

.invnotes { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.invnotes h3 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase;
               letter-spacing: .7px; color: var(--ink-mute); }
.invnotes p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.invfoot { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line-soft);
           font-size: 12px; color: var(--ink-mute); text-align: center; }

/* an invoice's own screen: what it is, and where it is up to */
.invcard { padding-top: 24px; }
.invtop { display: flex; justify-content: space-between; align-items: flex-start;
          gap: 20px; flex-wrap: wrap; }
.invnum { font: 700 22px ui-monospace, Consolas, monospace; letter-spacing: -.5px; }
.invwho { font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
.invamt { text-align: right; }
.invamt .k { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-mute); }
.invamt .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }

/* Draft -> Sent -> Paid, always in that order. */
.invsteps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr);
            gap: 10px; margin: 22px 0 0; padding: 0; }
.invsteps li { display: flex; gap: 11px; align-items: flex-start;
               padding: 13px 15px; border: 1px solid var(--line);
               border-radius: 9px; background: var(--panel); }
.invsteps .dot { flex: none; width: 26px; height: 26px; border-radius: 50%;
                 display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
                 background: var(--line-soft); color: var(--ink-mute); }
.invsteps .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.invsteps .txt strong { font-size: 13.5px; }
.invsteps .txt em { font-style: normal; font-size: 12px; color: var(--ink-mute); line-height: 1.45; }
.invsteps li.done { border-color: #bfe6c8; background: var(--green-bg); }
.invsteps li.done .dot { background: var(--green); color: #fff; }
.invsteps li.done .txt strong { color: #15663a; }
.invsteps li.now { border-color: var(--accent); background: var(--accent-sf);
                   box-shadow: 0 0 0 3px rgba(29,95,208,.08); }
.invsteps li.now .dot { background: var(--accent); color: #fff; }
.invsteps li.now .txt strong { color: var(--accent); }
.invsteps li.todo { opacity: .7; }
@media (max-width: 760px) { .invsteps { grid-template-columns: 1fr; } }

.invnext { margin-top: 16px; padding: 12px 15px; border-radius: 8px;
           background: var(--line-soft); font-size: 13.5px; line-height: 1.6; }
.invnext { display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
           justify-content: space-between; }
.invnext .say { flex: 1; min-width: 240px; }
.invnext .act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.invnext .act input {
  font: inherit; font-size: 13px; padding: 8px 11px; min-width: 200px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink);
}
.invnext em { font-style: normal; font-weight: 650; }
.rowacts { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.invnext .late { color: var(--red); font-weight: 650; }

/* the editable line table on the admin side */
table.data.invitems td { padding: 4px 6px; }
table.data.invitems input {
  font: inherit; font-size: 13px; width: 100%; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink);
}
table.data.invitems td.num input { text-align: right; }

@media print {
  .invtools { display: none; }
  .invbody  { background: #fff; }
  .invoice  { border: 0; box-shadow: none; max-width: none; margin: 0; padding: 0; }
}

/* the client picker that narrows a sheet to one client */
.toolbar #clientpick { min-width: 210px; font-weight: 600; }
.filternote { font-size: 12.5px; color: var(--ink-soft); }

/* asking for something to be deleted */
.delask { margin-top: 10px; }
.delask textarea {
  font: inherit; font-size: 13px; width: 100%; min-height: 62px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; margin: 8px 0;
}
.delask .row { display: flex; gap: 8px; flex-wrap: wrap; }
.delform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.delform input[name="note"] {
  font: inherit; font-size: 12.5px; padding: 5px 9px; min-width: 190px;
  border: 1px solid var(--line); border-radius: 6px;
}

/* the notification centre */
.inboxbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.inboxbar .spacer { flex: 1; }
.inboxbar form { display: flex; gap: 8px; flex-wrap: wrap; }
.inboxlist { padding: 0; }
.inboxlist .notice {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.inboxlist .notice:last-child { border-bottom: 0; }
.inboxlist .notice.new { background: var(--accent-sf); }
.inboxlist .notice .body { flex: 1; min-width: 0; }
.inboxlist .notice .t { font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.inboxlist .notice .t .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.inboxlist .notice .b { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.inboxlist .notice .when { font-size: 11.5px; color: var(--ink-mute); margin-top: 6px; }
.inboxlist .notice .acts { display: flex; gap: 8px; align-items: center; flex: none; }
.inboxlist .notice .acts form { display: flex; gap: 6px; }

/* profile details, read as label / value pairs */
.proftable { display: grid; gap: 0; }
.proftable .prow {
  display: grid; grid-template-columns: 210px 1fr; gap: 14px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
}
.proftable .prow:last-child { border-bottom: 0; }
.proftable .prow .k { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.proftable .prow .v { font-size: 13.5px; }
.proftable .prow .v .none { color: var(--ink-mute); }
@media (max-width: 560px) { .proftable .prow { grid-template-columns: 1fr; gap: 2px; } }

/* the approval history of a sheet, for the people who have to act on it */
.approvalblock > h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.approvalblock > h2 .pill { text-transform: none; letter-spacing: 0; font-weight: 600; }
table.data.approvaltable td { vertical-align: top; }
table.data.approvaltable tbody td:first-child { white-space: normal; max-width: 280px; }
.approvaltable .meta { font-size: 11.5px; color: var(--ink-mute); margin-top: 2px; }
.approvaltable td.reason { white-space: normal; max-width: 320px; }
.approvaltable td.reason .asked { color: var(--ink-mute); font-style: italic; }
.approvaltable tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* what a save actually did, when it did more than store a value */
.gridnotice {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px);
  max-width: min(640px, calc(100vw - 32px));
  background: #16202f; color: #fff; font-size: 13.5px; line-height: 1.5;
  padding: 12px 18px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.28);
  opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  z-index: 60; cursor: pointer;
}
.gridnotice.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* the column that sends a row, and the record of who it went to */
td[data-field="approval_to"] select { font-weight: 600; }
td[data-field="approval_requested"] .cell { white-space: normal; max-width: 260px; }

/* an approval request: why this row is in front of you */
.askedbox { border: 1px solid var(--tone-warn-line); background: var(--tone-warn-bg); color: var(--tone-warn-ink);
            border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.askedbox .note { margin-top: 6px; background: rgba(255,255,255,.6); border-radius: 6px; padding: 7px 9px; }
.askedbox .who { margin-top: 6px; font-size: 12px; opacity: .85; }

/* choosing who has to sign a row off */
.requestbox { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.requestbox h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); margin: 0 0 8px; }
.requestbox textarea { font: inherit; font-size: 13px; width: 100%; min-height: 62px; padding: 8px 10px;
                       border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; }
.askhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.askhead input[type="search"] { flex: 1; min-width: 150px; font: inherit; font-size: 13px;
                                padding: 6px 10px; border: 1px solid var(--line);
                                border-radius: 6px; background: var(--panel); color: var(--ink); }
.askcount { width: 100%; font-size: 12px; color: var(--ink-mute); }
.askcount.on { color: var(--accent); font-weight: 600; }
.asklist { max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 6px;
           padding: 4px 10px; margin-bottom: 8px; }
.asklist label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0;
                 border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.asklist label:last-child { border-bottom: 0; }
.asklist label:hover { color: var(--accent); }
.asklist label input { flex: none; }
.sentlist { margin-bottom: 10px; }
.sentitem { display: flex; justify-content: space-between; align-items: center; gap: 10px;
            font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.sentitem .meta { font-size: 11.5px; color: var(--ink-mute); }
/* a row waiting on the person looking at it */
.rowtools .js-review.asked { background: var(--tone-warn-bg); color: var(--tone-warn-ink);
                             font-weight: 700; box-shadow: inset 0 0 0 1px var(--tone-warn-line); }

/* client / member image */
.avatar { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: #f4f6fa; }
.avatar.sm { width: 32px; height: 32px; border-radius: 7px; }
.avatar-ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink-mute); background: #eef1f6; }

/* portal notifications */
.notifybar { background: var(--accent-sf); border: 1px solid #cfe0fa; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.notifybar h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
.notifybar .item { padding: 7px 0; border-top: 1px solid #dbe7fb; font-size: 13px; }
.notifybar .item:first-of-type { border-top: 0; }
.notifybar .item .when { font-size: 11.5px; color: var(--ink-mute); }

/* a row just added through an intake form */
@keyframes justadded { 0%,70% { background: #fff6da; } 100% { background: transparent; } }
table.grid tr.justadded td, table.grid tr.justadded th.rowhead { animation: justadded 6s ease-out; }
table.grid tr.justadded th.rowhead { box-shadow: inset 3px 0 0 var(--amber); }

/* ------------------------------------------------------- checklist */
.js-check b { font-size: 9.5px; font-weight: 700; margin-left: 2px; vertical-align: 2px; color: var(--accent); }
.ckprog { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ckprog .bar { flex: 1; }
.ckprog .n { font-size: 13px; font-weight: 700; min-width: 46px; text-align: right; }

.ckitem { border-bottom: 1px solid var(--line-soft); padding: 9px 0; }
.ckitem .top { display: flex; align-items: flex-start; gap: 9px; }
.ckitem input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; flex: none; cursor: pointer; }
.ckitem .lbl { flex: 1; font-size: 13.5px; cursor: pointer; }
.ckitem.on .lbl { color: var(--tone-good-ink); text-decoration: line-through; text-decoration-color: #a9dcbf; }
.ckitem .acts { display: flex; gap: 4px; flex: none; }
.ckitem .acts button { border: 1px solid var(--line); background: var(--panel); border-radius: 5px;
  cursor: pointer; font-size: 12px; padding: 2px 7px; color: var(--ink-mute); line-height: 1.5; }
.ckitem .acts button:hover { background: var(--line-soft); color: var(--ink); }
.ckitem .acts button.haseye { color: var(--accent); border-color: #cfe0fa; background: var(--accent-sf); }

.cknote { margin: 8px 0 0 25px; font-size: 13px; background: var(--accent-sf); border: 1px solid #cfe0fa;
  border-radius: 6px; padding: 9px 11px; white-space: pre-wrap; }
.cknote .who { font-size: 11.5px; color: var(--ink-mute); margin-top: 6px; }
.ckedit { margin: 8px 0 0 25px; }
.ckedit textarea { font: inherit; font-size: 13px; width: 100%; min-height: 76px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; }
.ckedit .row { display: flex; gap: 6px; margin-top: 6px; }

/* ------------------------------------------------- step-by-step form */
.steps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.stepchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; text-decoration: none;
  color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: 5px 12px 5px 6px; }
.stepchip:hover { border-color: var(--accent); color: var(--accent); }
.stepchip .n { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px;
  border-radius: 50%; background: var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.stepchip.now { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.stepchip.now .n { background: rgba(255,255,255,.28); color: #fff; }
.stepchip.filled { background: var(--tone-good-bg); border-color: var(--tone-good-line); color: var(--tone-good-ink); }
.stepchip.filled .n { background: var(--tone-good-ink); color: #fff; }
.stepnav { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* checklist: mandatory marker and the item editor */
.ckitem .lbl .req { margin-left: 4px; }
.ckmust { font-size: 12.5px; font-weight: 600; border-radius: 6px; padding: 7px 10px; margin-bottom: 10px; }
.ckmust.ok { background: var(--tone-good-bg); color: var(--tone-good-ink); }
.ckmust.no { background: var(--tone-warn-bg); color: var(--tone-warn-ink); }

.ckreq { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.ckrow { display: flex; align-items: center; gap: 5px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.ckrow.off { opacity: .55; }
.ckrow .ckname { font: inherit; font-size: 13px; flex: 1; min-width: 150px; padding: 5px 8px;
  border: 1px solid transparent; border-radius: 6px; }
.ckrow .ckname:focus { border-color: var(--line); outline: none; background: #fff; }
.ckrow button { border: 1px solid var(--line); background: var(--panel); border-radius: 5px; cursor: pointer;
  font-size: 11.5px; padding: 3px 7px; color: var(--ink-soft); }
.ckrow button:hover { background: var(--line-soft); color: var(--ink); }
.ckrow button.on { background: var(--tone-risk-bg); border-color: var(--tone-risk-line); color: var(--tone-risk-ink); font-weight: 600; }
.ckrow button.danger:hover { background: var(--red-bg); color: var(--red); border-color: #e9c3c0; }

/* ------------------------------------------------ sign-in details box */
.signinbox { background: var(--accent-sf); border: 1px solid #cfe0fa; border-radius: 8px;
  padding: 12px 14px; margin: 10px 0; }
.signinbox strong { display: block; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent); margin-bottom: 8px; }
.signinbox .pair { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 2px 0; }
.signinbox .pair span { min-width: 74px; color: var(--ink-soft); }
.signinbox .pair code { font: 12.5px/1.6 ui-monospace, Consolas, monospace; background: #fff;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; word-break: break-all; }


/* ------------------------------------------------------------------ *
 * The invoice register.
 *
 * A ledger, not a report: one line per invoice, the money hard right so
 * the columns of digits line up and can be read down, and the state as a
 * solid badge at the end. Deliberately denser than table.data.
 * ------------------------------------------------------------------ */
table.ledger { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ledger thead th {
  padding: 9px 12px; text-align: left; font-size: 11.5px; font-weight: 650;
  color: var(--ink-soft); text-transform: none; letter-spacing: .2px;
  background: var(--panel); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.ledger td {
  padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
table.ledger tbody tr:hover td { background: #fafbfd; }
table.ledger tbody tr:last-child td { border-bottom: 0; }

/* Money, dates and anything counted reads right-aligned and tabular, so
   the decimal points sit under one another. */
table.ledger .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ledger .tot { font-weight: 650; }
table.ledger .pick { width: 34px; text-align: center; }
table.ledger .ref  { font-weight: 650; white-space: nowrap; }
table.ledger .ref a, table.ledger .who a { text-decoration: none; }
table.ledger .who a:hover { text-decoration: underline; }
table.ledger .when { white-space: nowrap; color: var(--ink-soft); }

/* A due date that has gone by is the one thing on the row worth alarming
   about, so it is the only red on it. */
table.ledger .late { color: var(--red); font-weight: 600; white-space: nowrap; }

/* A cancelled invoice stays on the record but stops asking to be read. */
table.ledger tr.void td, table.ledger tr.void td a { color: var(--ink-mute); }

/* Solid state badges, as an accounts package prints them. */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 11px;
  font-weight: 650; letter-spacing: .2px; white-space: nowrap; color: #fff;
}
.tag.draft     { background: #2f9bbd; }
.tag.sent      { background: #8a93a3; }
.tag.paid      { background: #1a7f44; }
.tag.cancelled { background: #d64545; }
.tag.overdue   { background: #b8352f; }

/* The row of buttons that acts on the invoice, kept off the money. */
table.ledger .acts { white-space: nowrap; text-align: right; }
table.ledger .acts form { display: inline; }
table.ledger .acts .btn { margin-left: 4px; }

/* Appears only once something is ticked, so it never takes space idly. */
.bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel);
}
.bulkbar[hidden] { display: none; }
.bulkbar .n { font-size: 13px; font-weight: 650; margin-right: 4px; }

/* A count carried on a tab, so what needs attention is visible before
   the tab is opened — the reason the other tabs were being missed. */
.subtabs a .c {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px;
  font-size: 11px; font-weight: 700; background: var(--grey-bg); color: var(--ink-soft);
}
.subtabs a .c.warn { background: var(--amber-bg); color: var(--amber); }
.subtabs a .c.bad  { background: var(--red-bg);   color: var(--red); }

/* ------------------------------------------------------------------ *
 * The desk guide: one card per tab, saying plainly what lives there.
 * A module with four tabs needs to introduce itself once.
 * ------------------------------------------------------------------ */
.deskguide { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.deskguide a {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; text-decoration: none; color: inherit;
}
.deskguide a:hover { border-color: var(--accent); background: var(--panel); }
.deskguide .t { font-size: 14px; font-weight: 650; margin-bottom: 3px; }
.deskguide .d { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.deskguide .s { margin-top: 9px; font-size: 12.5px; font-weight: 650; }
.deskguide .s.bad  { color: var(--red); }
.deskguide .s.warn { color: var(--amber); }
.deskguide .s.good { color: #1a7f44; }

/* A labelled band of tiles. Twelve tiles in a row say nothing; the same
   twelve under "Money in", "Money out" and "What is left" say it all. */
.band { margin-bottom: 20px; }
.band > h3 {
  margin: 0 0 9px; font-size: 12px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--ink-soft);
}
.band .tiles { margin-bottom: 0; }

/* The panel that opens when one filing is being updated. */
.editpanel { border-left: 3px solid var(--accent); }
.editpanel h2 { margin-top: 0; }

/* The bar that decides what the page is showing: which client, and over
   what period. One row, labels attached to their control. */
.filterbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 16px; margin-bottom: 16px;
}
.filterbar .grp { display: flex; align-items: center; gap: 7px; }
.filterbar label { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.filterbar select { min-width: 150px; }
.filterbar .pill { font-weight: 500; }

/* ------------------------------------------------------------------ *
 * Meetings.
 * ------------------------------------------------------------------ */

/* The invite picker: a scrollable column of names rather than a select,
   because inviting eight people should be eight clicks, not eight
   ctrl-clicks in a list box nobody can operate. */
.pickbox {
  max-height: 210px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; background: #fff;
}
.pickbox label {
  display: block; padding: 4px 2px; font-size: 13px; font-weight: 500;
  border-bottom: 1px solid var(--line-soft); cursor: pointer;
}
.pickbox label:last-child { border-bottom: 0; }
.pickbox label:hover { background: var(--panel); }
.pickbox input { margin-right: 7px; }
.pickbox .muted { font-size: 11.5px; margin-left: 6px; }

/* Minutes are read, not skimmed: wider measure, real line height, and the
   line breaks the author (or Gemini) put in are kept. */
.minutes {
  white-space: pre-wrap; font-size: 13.5px; line-height: 1.65;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin-top: 10px; max-height: 520px; overflow-y: auto;
}

/* Names in the invite picker read under the organisation they belong to:
   one flat list cannot tell you whose "Sunil" you are about to invite. */
.pickbox .grp + .grp { margin-top: 8px; }
.pickbox .grp[hidden] { display: none; }
.pickbox .ghead {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--ink-soft); padding: 6px 2px 3px; border-bottom: 1px solid var(--line);
  position: sticky; top: -8px; background: #fff;
}
.pickbox label[hidden] { display: none; }
/* ------------------------------------------------------------------ *
 * The editable dropdown, outside the grid.
 *
 * A <select> backed by one of the portal's lists, with the same add /
 * rename / reorder / hide / remove panel the sheet grid draws. Only the
 * frame is defined here: the rows inside reuse .optmsg, .optadd and
 * .optrow from the grid, so the two panels cannot drift apart.
 * ------------------------------------------------------------------ */
.listfield-panel {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; overflow: hidden; max-width: 460px;
}
.listfield-panel[hidden] { display: none; }
.listfield-panel .lf-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--ink-soft);
}
.listfield-panel .lf-x {
  border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer;
  color: var(--ink-mute); padding: 0 2px;
}
.listfield-panel .lf-x:hover { color: var(--ink); }
.listfield-panel .lf-body { padding: 10px 12px 12px; }
.listfield-panel .empty { padding: 10px 0; font-size: 13px; color: var(--ink-mute); }
.listfield-panel .optrow:last-of-type { border-bottom: 0; }
.listfield-panel .hint { font-size: 12px; color: var(--ink-mute); line-height: 1.5; }

/* Whose dropdown options these are. A team member editing their
   organisation's copy and one of us editing the shared defaults are very
   different acts, and the panel should not make anyone guess which. */
.optscope {
  padding: 8px 10px; margin-bottom: 8px; border-radius: 6px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 12px; line-height: 1.5;
}

/* ------------------------------------------------------------------ *
 * Team page: the figures above the charts.
 * ------------------------------------------------------------------ */
.teamtiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.teamtile {
  padding: 13px 15px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 10px;
}
.teamtile.good { border-left-color: var(--green); }
.teamtile.warn { border-left-color: var(--amber); }
.teamtile.risk { border-left-color: var(--red); }
.teamtile span {
  display: block; color: var(--ink-mute); font-size: 10px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
}
.teamtile strong { display: block; margin-top: 5px; font-size: 21px; font-weight: 750; }
.teamtile small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 11.5px; }

/* The progress bar in the per-member table. */
.tbar {
  display: inline-block; width: 100px; height: 7px; vertical-align: middle;
  background: var(--line-soft); border-radius: 4px; overflow: hidden;
}
.tbar i { display: block; height: 100%; background: var(--accent); }
.tbar i.good { background: var(--green); }
.tbar i.warn { background: var(--amber); }
.tbar i.risk { background: var(--red); }
.tbarnum { margin-left: 7px; font-size: 12px; color: var(--ink-soft); }
tr.loose td { background: var(--panel); }
tr.loose .meta { margin-top: 2px; font-size: 11.5px; color: var(--ink-mute); }
tr.noowner td { background: var(--panel); }
.nowt { color: var(--ink-mute); font-size: 12.5px; }
/* File and image columns on a built sheet. */
.cellfile { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 130px; }
.cellfile img { display: block; width: 44px; height: 34px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.cellfilename { font-size: 12px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cellfilex { border: 0; background: none; color: var(--ink-mute); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; }
.cellfilex:hover { color: var(--red); }
.cellfileadd { font-size: 11.5px; font-weight: 600; color: var(--accent); cursor: pointer; white-space: nowrap; }
.cellfileadd:hover { text-decoration: underline; }
td .js-cellbox { width: 16px; height: 16px; cursor: pointer; }

/* ------------------------------------------------------------------ *
 * Admin - Sheets. One list of every sheet, and the column builder.
 * ------------------------------------------------------------------ */
.sb-head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 16px;
}
.sb-head h2 { margin: 2px 0 4px; }
.sb-head .eyebrow, .ik-listhead .eyebrow {
  color: var(--ink-mute); font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.sb-key {
  display: inline-block; padding: 2px 6px; border-radius: 4px;
  background: var(--panel); border: 1px solid var(--line-soft);
  font: 11.5px/1.4 ui-monospace, Consolas, monospace; color: var(--ink-soft);
}
.sb-sub { margin: 20px 0 10px; font-size: 14px; }
.sb-sub .ro { margin-left: 6px; font-weight: 500; }

/* A row of labelled fields that line up whatever their widths. */
.sb-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.sb-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sb-field.grow { flex: 1 1 220px; }
.sb-field label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-mute);
}
.sb-field input, .sb-field select {
  font: inherit; font-size: 13px; padding: 8px 10px; min-width: 170px; width: 100%;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px;
}
.sb-field input:focus, .sb-field select:focus { border-color: var(--accent); outline: none; }
.sb-field .btn { white-space: nowrap; }

.sb-add {
  padding: 16px 18px; margin-top: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
}
.sb-note { margin: 10px 0 0; color: var(--ink-soft); font-size: 12px; min-height: 16px; }

/* Forms that sit inside a table cell must not break the row's alignment. */
.sb-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.sb-inline input {
  font: inherit; font-size: 13px; padding: 6px 9px; min-width: 0; width: 100%;
  border: 1px solid var(--line); border-radius: 6px;
}
.sb-cols td, .sb-all td { vertical-align: middle; }
.sb-cols td input, .sb-all td input {
  font: inherit; font-size: 13px; padding: 6px 9px; width: 100%;
  border: 1px solid var(--line); border-radius: 6px;
}
.sb-acts { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.sb-type {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  font-weight: 650; color: var(--ink-soft); background: var(--panel);
  border: 1px solid var(--line-soft);
}
.sb-meta { display: flex; gap: 8px; align-items: center; margin-top: 5px; flex-wrap: wrap; }
.sb-away td { background: var(--panel); }
.sb-away td input { opacity: .7; }

/* The three things this page maintains, as three tabs: a sheet's name, its
   columns' names, and what its dropdowns offer. */
.sb-tabs {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.sb-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px;
  margin-bottom: -1px; color: var(--ink-soft); font-size: 13px; font-weight: 650;
  text-decoration: none; border: 1px solid transparent; border-bottom-color: var(--line);
  border-radius: 8px 8px 0 0;
}
.sb-tab:hover { color: var(--ink); background: var(--panel); }
.sb-tab.on {
  color: var(--accent); background: #fff;
  border-color: var(--line); border-bottom-color: #fff;
}
.sb-tab span {
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--ink-soft); background: var(--panel); border: 1px solid var(--line-soft);
}
.sb-tab.on span { color: var(--accent); background: var(--accent-bg, #eef4ff); }

/* The sentence that says what this tab is for. */
.sb-lead {
  flex: 1 1 320px; max-width: 560px; margin: 0;
  color: var(--ink-soft); font-size: 12.5px; line-height: 1.6;
}
.sb-head .sb-row { flex: 0 0 auto; }

/* A column whose name the portal owns, shown as text rather than a box so
   it does not look like a field somebody forgot to fill in. */
.sb-fixed { display: inline-block; padding: 6px 0; font-size: 13px; color: var(--ink-soft); }
.sb-added {
  padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  color: #147348; background: #e8f8f0; border: 1px solid #bfe6cf;
}
.sb-group {
  padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 650;
  color: var(--accent); background: var(--accent-bg, #eef4ff);
  border: 1px solid var(--line-soft);
}

/* The list a dropdown column reads, with how many options are on it. */
.sb-listlink {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  font-size: 12.5px; text-decoration: none; color: var(--accent);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 7px;
}
.sb-listlink:hover { background: var(--accent-bg, #eef4ff); }
.sb-listlink span {
  padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line-soft);
}
.sb-uses {
  display: inline-block; margin: 2px 4px 2px 0; padding: 2px 9px;
  font-size: 11.5px; text-decoration: none; color: var(--ink-soft);
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 999px;
}
.sb-uses:hover { color: var(--accent); }

/* ---------------------------------------------------------------------------
   The sheet's briefing, under its dashboard

   Three columns on a wide screen, stacked on a narrow one: what wants doing,
   whether anybody has been near it, and who is carrying it.
   --------------------------------------------------------------------------- */
.sbrief-cols {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.sbrief-one h3 {
  margin: 0 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-soft, #68707f);
}
.sbrief-one .hint { margin: 0 0 8px; }
.sbrief-warn { color: #8a5a10; }

.sbrief-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.sbrief-list li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; line-height: 1.4;
}
.sbrief-list a { text-decoration: none; color: var(--accent, #2f6df6); font-weight: 600; }
.sbrief-list a:hover { text-decoration: underline; }
.sbrief-meta { font-size: 11.5px; color: var(--ink-soft, #68707f); }

.sbrief-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.sbrief-facts strong { font-size: 15px; }

.sbrief-who { flex: 0 0 auto; min-width: 96px; font-size: 12.5px; }
.sbrief-bar {
  flex: 1 1 60px; height: 7px; border-radius: 999px;
  background: var(--line-soft, #e6e9f0); overflow: hidden; min-width: 50px;
}
.sbrief-bar i { display: block; height: 100%; background: var(--accent, #2f6df6); }

/* ---------------------------------------------------------------------------
   Narrowing the Master Activity Log

   Sits between the toolbar and the grid: it is about what the grid is
   showing, not about what can be done to it.
   --------------------------------------------------------------------------- */
.mfbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  margin: 0 0 12px; padding: 10px 12px;
  background: var(--panel, #f7f8fb);
  border: 1px solid var(--line-soft, #e6e9f0); border-radius: 9px;
}
.mfbar label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--ink-soft, #68707f);
}
.mfbar select, .mfbar input[type="search"] {
  min-width: 132px; padding: 6px 9px; font: inherit; font-size: 12.5px;
  color: #1d2330; background: #fff;
  border: 1px solid var(--line-soft, #dfe3ea); border-radius: 7px;
}
.mfbar .mfsearch input { min-width: 210px; }
.mfbar select:focus-visible, .mfbar input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.mfcount { font-size: 12.5px; color: var(--ink-soft, #68707f); margin-left: auto; }
.mfcount strong { color: #1d2330; }
@media (max-width: 720px) {
  .mfbar .mfsearch input { min-width: 100%; }
  .mfcount { margin-left: 0; }
}

/* ---------------------------------------------------------------------------
   Arranging the columns

   The table is the list, so the order is changed by dragging its rows. The
   handle is deliberately quiet until the row is hovered: it is one control
   among several on a busy row, and a column is renamed far more often than
   it is moved.
   --------------------------------------------------------------------------- */
.sb-order {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 9px 12px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 9px;
}
.sb-order.sb-dirty {
  background: var(--accent-bg, #eef4ff); border-color: var(--accent);
}
.sb-orderundo { margin-top: -4px; background: none; border: 0; padding: 9px 0; }
.sb-orderhint { flex: 1 1 340px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.sb-gripmark { letter-spacing: -2px; color: var(--accent); font-weight: 700; }

.sb-gripcell { white-space: nowrap; }
.sb-grip {
  display: inline-block; margin-right: 5px; padding: 0 3px;
  font-size: 13px; line-height: 1; letter-spacing: -2px;
  color: var(--line); cursor: grab; border-radius: 5px;
  user-select: none; -webkit-user-select: none;
}
.sb-cols tr:hover .sb-grip { color: var(--accent); }
.sb-grip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; color: var(--accent); }
.sb-grip:active { cursor: grabbing; }
.sb-grip-none { display: inline-block; margin-right: 5px; padding: 0 3px; color: var(--line); }

/* The row being carried, and the gap it would drop into. */
.sb-cols tr.sb-dragging td { opacity: .45; background: var(--accent-bg, #eef4ff); }
.sb-cols tr.sb-over td { box-shadow: inset 0 2px 0 var(--accent); }

.sb-opts td, .sb-cols td, .sb-all td { vertical-align: top; }
.sb-opts td .sb-inline, .sb-cols td .sb-inline { width: 100%; }
.sb-cols td.num, .sb-opts td.num, .sb-all td.num { vertical-align: middle; }
/* The composer: one line to fill in before the row exists. */
tr.composer td { background: var(--accent-bg, #f4f7ff); vertical-align: middle; padding: 8px 6px; }
tr.composer td.corner { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
tr.composer input:not([type=checkbox]), tr.composer select {
  font: inherit; font-size: 13px; padding: 6px 8px; width: 100%; min-width: 110px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff; }
tr.composer input:focus, tr.composer select:focus { border-color: var(--accent); outline: none; }
tr.composeract td { background: var(--accent-bg, #f4f7ff); padding: 10px 8px; border-top: 0; }
tr.composeract .btn { margin-right: 6px; }
.composermsg { margin-left: 10px; font-size: 12.5px; color: var(--ink-soft); }
.composermsg.bad { color: var(--red); font-weight: 600; }
.cellfile[data-new] img { width: 40px; height: 30px; }
/* The Images column: a gallery inside a grid cell. */
.cellimgs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 120px; }
.cellimgs figure { position: relative; margin: 0; width: 40px; height: 32px; border-radius: 5px;
  overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.cellimgs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cellimgx { position: absolute; top: 0; right: 0; width: 14px; height: 14px; padding: 0;
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  border-radius: 0 0 0 4px; color: #fff; background: rgba(20,30,28,.6); font-size: 11px; line-height: 1; }
.cellimgx:hover { background: var(--red); }
.cellimgadd { width: 30px; height: 32px; display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; border-radius: 5px; font-size: 16px; font-weight: 700;
  color: var(--accent); background: var(--panel); border: 1px dashed var(--line); }
.cellimgadd:hover { background: var(--line-soft); }
/* The banner over a group of columns. */
.grid thead tr.grouprow th { padding: 5px 8px; font-size: 10px; letter-spacing: .05em;
  background: var(--panel); border-bottom: 0; color: var(--ink-mute); }
.grid thead tr.grouprow th.grouped { color: var(--accent); background: var(--accent-bg, #f4f7ff);
  text-align: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
/* A results cell the event has not reached yet. */
.celllocked { display: block; color: var(--ink-mute); cursor: help; }
.celllocked i { font-style: normal; opacity: .45; font-size: 11px; }

/* ------------------------------------------------------------------ *
 * Admin - Requisition Form Management. The queue, and the link that
 * feeds it.
 * ------------------------------------------------------------------ */
.rq-head {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 12px;
}
.rq-head h2 { margin: 0 0 4px; }
.rq-lead { margin: 0; max-width: 620px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.6; }

.rq-queue td { vertical-align: top; }
.rq-queue td .meta { margin-top: 3px; }
.rq-slipped td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.rq-ext {
  padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
  color: var(--tone-warn-ink); background: var(--tone-warn-bg);
  border: 1px solid var(--tone-warn-line);
}

/* Moving a date is three fields on one line, inside a cell. */
.rq-extend { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 0; }
.rq-extend input {
  font: inherit; font-size: 12.5px; padding: 5px 8px; min-width: 0; flex: 1 1 96px;
  border: 1px solid var(--line); border-radius: 6px;
}
.rq-extend input[type=date] { flex: 0 0 132px; }
.rq-url {
  font: 12px/1.5 ui-monospace, Consolas, monospace; width: 100%; padding: 6px 9px;
  color: var(--ink-soft); background: var(--panel);
  border: 1px solid var(--line); border-radius: 6px;
}

/* A turnaround switched off is still on the list, just not on the form. */
.sb-switch { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; }
.sb-switch input { width: 15px; height: 15px; }
.sb-types td { vertical-align: middle; }
.sb-types td input[type=number] { max-width: 110px; }
.rq-why { color: var(--red); font-size: 12px; overflow-wrap: anywhere; }

/* A line under a sign-in field, for the one thing somebody needs told. */
.fieldhint { display: block; margin-top: 5px; color: var(--ink-mute); font-size: 11.5px; line-height: 1.45; }

/* The send-their-details bar, directly under the client's logo. */
.credbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  justify-content: space-between; padding: 14px 16px; margin: 0 0 18px;
  background: var(--accent-bg, #eef4ff); border: 1px solid var(--line); border-radius: 10px;
}
.credbar > div { flex: 1 1 280px; min-width: 0; }
.credbar strong { font-size: 13.5px; }
.credbar .hint { margin-top: 3px; }
.credbar .btn { white-space: nowrap; }

/* ------------------------------------------------------------------ *
 * The requisition calendar: what the queue promised, by the day.
 * ------------------------------------------------------------------ */
.rqcal-head {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 14px;
}
.rqcal-head h2 { margin: 0 0 4px; }
.rqcal-lead { margin: 0; max-width: 60ch; color: var(--ink-soft); font-size: 12.5px; }

.rqcal-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.rqcal-pick label {
  display: flex; flex-direction: column; gap: 4px; font-size: 10px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--ink-mute);
}
.rqcal-pick select, .rqcal-pick input {
  font: inherit; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none;
  color: var(--ink); padding: 7px 9px; min-width: 140px;
  background: #fff; border: 1px solid var(--line); border-radius: 7px;
}

.rqcal-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.rqcal-tile {
  padding: 11px 13px; background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: 9px;
}
.rqcal-tile span {
  display: block; color: var(--ink-mute); font-size: 9.5px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
}
.rqcal-tile strong { display: block; margin-top: 3px; font-size: 20px; font-weight: 750; }

/* One row per day, the date held in a column of its own so the days line
   up however many requisitions sit against each one. */
.rqcal-days { display: flex; flex-direction: column; gap: 10px; }
.rqcal-day {
  display: flex; gap: 14px; padding: 12px 14px; background: #fff;
  border: 1px solid var(--line-soft); border-radius: 10px;
}
.rqcal-day.now { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.rqcal-date { flex: 0 0 58px; text-align: center; }
.rqcal-date strong { display: block; font-size: 21px; font-weight: 800; line-height: 1.1; }
.rqcal-date span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }
.rqcal-date small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ink-mute); }

.rqcal-list { flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.rqcal-item {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 8px 11px; background: var(--panel);
  border: 1px solid var(--line-soft); border-radius: 8px; font-size: 13px;
}
.rqcal-item.rag-red   { background: var(--red-bg);   border-color: #f1c6ca; }
.rqcal-item.rag-amber { background: var(--amber-bg); border-color: #ecdcb0; }
.rqcal-item.rag-green { background: var(--green-bg); border-color: #bfe6cf; }
.rqcal-item.rag-done  { background: var(--grey-bg);  color: var(--ink-soft); }
.rqcal-what strong { margin-right: 7px; }
.rqcal-who { grid-column: 1; color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.rqcal-state {
  grid-row: 1 / span 2; align-self: center; white-space: nowrap;
  font-size: 11px; font-weight: 700;
}
.rqcal-ext {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700;
  color: var(--tone-warn-ink); background: var(--tone-warn-bg); border: 1px solid var(--tone-warn-line);
}
.rqcal-unplaced { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.rqcal-unplaced h3 { margin: 0 0 4px; font-size: 14px; }

@media (max-width: 640px) {
  .rqcal-day { flex-direction: column; gap: 8px; }
  .rqcal-date { display: flex; gap: 6px; align-items: baseline; text-align: left; }
  .rqcal-date strong { font-size: 17px; }
}

/* ------------------------------------------------------------------ *
 * Whether the portal's last message to somebody actually left.
 * ------------------------------------------------------------------ */
.mailstate {
  padding: 14px 16px; margin: 0 0 18px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
}
/* Queued is a state, not a fault: blue, not amber. */
.mailstate.pending { background: var(--tone-info-bg); border-color: var(--tone-info-line); }
.mailstate-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mailstate-head strong { font-size: 13.5px; margin-right: 2px; }

.mailstate-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 20px; margin: 11px 0 0; align-items: start;
}
.mailstate-facts > div { min-width: 0; }
.mailstate-facts > div.wide { grid-column: 1 / -1; }
.mailstate-facts dt {
  color: var(--ink-mute); font-size: 9.5px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
}
.mailstate-facts dd { margin: 2px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.mailstate-why { color: var(--red); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.mailstate-cool { margin: 10px 0 0; color: var(--tone-warn-ink); font-size: 12.5px; }
.mailstate-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mailstate + .hint { margin-top: -10px; }

/* One mailbox, several accounts: said where somebody would otherwise sit
   trying passwords. */
.sharednote {
  padding: 11px 14px; margin: 10px 0 0; border-radius: 9px; font-size: 12.5px;
  line-height: 1.6; color: var(--tone-warn-ink);
  background: var(--tone-warn-bg); border: 1px solid var(--tone-warn-line);
}
.sharednote strong { display: block; margin-bottom: 2px; }

/* Setting a password by hand: the way in that needs no email at all. */
.setpw {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
  justify-content: space-between; padding: 14px 16px; margin: 0 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
.setpw-head { flex: 1 1 300px; min-width: 0; }
.setpw-head strong { font-size: 13.5px; }
.setpw-head .hint { margin-top: 3px; }
.setpw-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.setpw-row input {
  font: inherit; font-size: 13px; padding: 8px 10px; min-width: 210px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink);
}
.setpw-row .btn { white-space: nowrap; }

/* The invitation: what the welcome email contains, ready to hand over by
   any means when the mail itself is slow. */
.invitebox {
  padding: 14px 16px; margin: 0 0 14px; background: var(--accent-bg, #eef4ff);
  border: 1px solid var(--line); border-radius: 10px;
}
.invitebox-head strong { font-size: 13.5px; }
.invitebox-head .hint { margin-top: 3px; }
.invitebox-link {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px;
}
.invitebox-link .tokenlink { flex: 1 1 320px; min-width: 0; }
.invitebox-link .btn { white-space: nowrap; }


/* ---------------------------------------------------------- Website Content
   The Add Website panel above the grid, and the modal it opens. */
.wcbox { padding: 18px 20px 16px; }
.wcbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.wcbox-head h2 { margin: 0 0 4px; font-size: 17px; }
.wcbox-head .hint { max-width: 62ch; }
.wcbox-head .btn { white-space: nowrap; }
.wclist { margin-top: 12px; display: grid; gap: 6px; }
/* One slim line per website: who, how far along, when, and what can be done. */
.wcrow { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(200px, 1.6fr) 104px minmax(232px, auto);
         align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid #e4e8f0;
         border-radius: 9px; background: #fbfcfe; }
.wcrow[hidden] { display: none; }
.wcrow-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcrow-state { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; }
.wcrow-state .wcbar { flex: 0 0 110px; }
.wcrow-state .wcstage, .wcrow-state .wcpc { white-space: nowrap; }
.wcrow-state .wcnote { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wcrow-act { display: flex; gap: 6px; justify-content: flex-end; }
.wcrow-when { text-align: right; }
.wcrow-act form { margin: 0; }
.wcshowall { margin-top: 8px; border: 0; background: none; padding: 2px 0; font: inherit;
             font-size: 13px; font-weight: 600; color: var(--accent, #2d6cdf); cursor: pointer; }
.wcshowall:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .wcrow { grid-template-columns: 1fr auto; }
  .wcrow-act { grid-column: 1 / -1; justify-content: flex-start; }
  .wcrow-state { grid-column: 1 / -1; }
}
.wcrow-who a { font-weight: 600; text-decoration: none; }
.wcbrand { margin-left: 9px; font-size: 13px; color: #68707f; }
.wcrow-when { font-size: 12px; color: #68707f; white-space: nowrap; }

/* The bar. Its width is the only thing that changes while polling, so the
   transition is what makes it read as progress rather than as a redraw. */
.wcbar { height: 7px; border-radius: 4px; background: #e8ecf4; overflow: hidden; }
.wcbar-fill { display: block; height: 100%; border-radius: 4px; width: 0;
              transition: width .5s ease; background: #2d6cdf; }
.wcbar-fill.go  { background: linear-gradient(90deg, #2d6cdf, #4f9bf5); }
.wcbar-fill.ok  { background: #17a34a; }
.wcbar-fill.bad { background: #c02626; }

.wcstage { font-weight: 600; color: #414a5a; }
.wcpc { font-variant-numeric: tabular-nums; color: #2d6cdf; font-weight: 600; }
.wcnote { color: #7a828f; }
.wcempty { margin-top: 12px; padding: 16px; border: 1px dashed #d8dde7; border-radius: 8px;
           color: #68707f; font-size: 14px; }
.wcqueue { margin-top: 12px; padding: 9px 12px; background: #f4f7ff; border: 1px solid #d6e0fb;
           border-radius: 6px; font-size: 13px; color: #27408b; }
/* The "Read the site again" button under each website. */
.wcownagain { display: flex; gap: 10px; align-items: center; margin: 10px 0 0; }
.wcownagain .hint { margin: 0; }
.wcownagain form { margin: 0; }

.wcwarn  { margin-top: 12px; padding: 9px 12px; background: #fff8ec; border: 1px solid #f0dcb8;
           border-radius: 6px; font-size: 13px; color: #7a5312; }
.wcwarn code { background: #fdf1d9; padding: 1px 5px; border-radius: 4px; }

.wcmodal { position: fixed; inset: 0; background: rgba(15, 20, 30, .55); z-index: 90;
           display: flex; align-items: center; justify-content: center; padding: 20px; }
.wcmodal[hidden] { display: none; }
.wcmodal-card { background: #fff; border-radius: 12px; padding: 24px 26px; width: 100%;
                max-width: 460px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.wcmodal-card h3 { margin: 0 0 4px; font-size: 18px; }
.wcmodal-card > .hint { margin-bottom: 16px; }
.wcmodal-card label { display: block; margin: 14px 0 5px; font-size: 13px; font-weight: 600; }
.wcmodal-card input, .wcmodal-card select { width: 100%; padding: 9px 11px; font-size: 14px;
    border: 1px solid #ccd3df; border-radius: 6px; background: #fff; }
.wcmodal-card input:focus, .wcmodal-card select:focus { outline: 2px solid #2d6cdf;
    outline-offset: 1px; border-color: #2d6cdf; }
.wcmodal-card .hint { font-size: 12px; color: #68707f; margin-top: 5px; }
.wcmodal-card .hint.err { color: #a12020; }
.wcmodal-foot { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

@media (max-width: 640px) {
  .wcbox-head { flex-direction: column; }
  .wcbox-head .btn { width: 100%; }
}

/* ------------------------------------------- Requisition forms, embedded
   The forms desk renders inside the Requisition sheet rather than on a page
   of its own, so it needs a rule above it and its own heading — otherwise it
   reads as more of the grid. */
.formsembed { margin-top: 26px; padding-top: 22px; border-top: 2px solid #e4e8f0; }
.formsembed-head { margin: 0 0 4px; font-size: 18px; }
.formsembed > .hint { margin-bottom: 16px; max-width: 70ch; }
.formsembed .card:first-of-type { margin-top: 0; }

/* ------------------------------------------------ Event Management, in four
   The page is four rooms with one set of filters. The tabs carry the room;
   the filter bar sits under them because it applies to all four, and putting
   it inside a tab would suggest otherwise. */
.evtabs { display: flex; gap: 2px; margin: 0 0 14px; border-bottom: 2px solid #e4e8f0;
          overflow-x: auto; }
.evtab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px;
         font-size: 14px; font-weight: 600; color: #68707f; text-decoration: none;
         border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.evtab:hover { color: #1d2330; background: #f6f8fc; }
.evtab.on { color: #2d6cdf; border-bottom-color: #2d6cdf; }
.evtab-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px;
           background: #eef1f6; color: #55607a; }
.evtab.on .evtab-n { background: #e5edfd; color: #2d6cdf; }

.evfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
             padding: 11px 12px; margin: 0 0 16px; background: #f8fafc;
             border: 1px solid #e4e8f0; border-radius: 8px; }
.evfilters select, .evfilters input { font-size: 13px; padding: 6px 9px;
             border: 1px solid #ccd3df; border-radius: 6px; background: #fff;
             color: #1d2330; max-width: 200px; }
.evfilters select:focus, .evfilters input:focus { outline: 2px solid #2d6cdf;
             outline-offset: 1px; border-color: #2d6cdf; }
.evsearch { min-width: 220px; flex: 1 1 220px; }
.evdate { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
          color: #68707f; white-space: nowrap; }
.evdate input { padding: 5px 8px; }
.evcount { margin-left: auto; font-size: 13px; color: #68707f; white-space: nowrap; }
.evcount strong { color: #2d6cdf; }

.evempty { padding: 26px 20px; margin-bottom: 16px; text-align: center;
           border: 1px dashed #d8dde7; border-radius: 8px; background: #fcfdff; }
.evempty .hint { margin-top: 5px; }

.deptwarn { margin-top: 8px; padding: 8px 11px; background: #fff8ec;
            border: 1px solid #f0dcb8; border-radius: 6px; font-size: 13px; color: #7a5312; }

@media (max-width: 760px) {
  .evfilters select, .evfilters input { max-width: none; flex: 1 1 140px; }
  .evcount { margin-left: 0; width: 100%; }
}

/* --------------------------- Departments: which event, without a picker
   The section works on one event and the page filters choose it, so what
   is shown here is a statement rather than a control. */
.deptwhich { padding: 10px 13px; margin-bottom: 14px; background: #f4f7ff;
             border: 1px solid #d9e3fa; border-radius: 7px; font-size: 14px; }
.deptwhich strong { color: #1d2330; }
.deptwhich .deptpickhint { display: block; margin-top: 3px; font-size: 12px; color: #68707f; }

/* Narrowing the departments to one hub or spoke. Sits directly above the
   table it filters, so what is shown and what is doing the showing read as
   one thing. */
.depthsbar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px;
}
.depthsbar label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: #68707f;
}
.depthsbar select {
  min-width: 190px; padding: 7px 9px; font: inherit; font-size: 13px;
  color: #1d2330; background: #fff;
  border: 1px solid var(--line-soft, #dfe3ea); border-radius: 8px;
}
.depthsbar select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.deptchoose { padding: 18px 20px; border: 1px dashed #d8dde7; border-radius: 8px;
              background: #fcfdff; }
.deptchoose > .hint { margin-top: 4px; max-width: 70ch; }
.deptchoose-head { margin: 15px 0 7px; font-size: 12px; font-weight: 700;
                   letter-spacing: .4px; text-transform: uppercase; color: #68707f; }
.deptchoose-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.deptchoose-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px;
                      background: #fff; border: 1px solid #e4e8f0; border-radius: 6px; }
.deptchoose-list a { font-weight: 600; text-decoration: none; }
.deptchoose-when { font-size: 12px; color: #68707f; }
.deptchoose-n { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 8px;
                border-radius: 9px; background: #eef1f6; color: #55607a; }

/* ---------------------------------------------------------------------------
   The event budget: the cell that opens it, and the form inside the drawer.

   The cell is a button rather than a span because it is the way in to the
   form, and a thing you click should look like a thing you click. It keeps
   the grid's own cell metrics so the column does not jump out of line with
   its neighbours.
   --------------------------------------------------------------------------- */
.cellbudget { display: block; width: 100%; text-align: left; font: inherit;
              color: inherit; background: none; border: 0; padding: 0;
              cursor: pointer; line-height: 1.35; }
.cellbudget:hover  { text-decoration: underline; }
.cellbudget:focus-visible { outline: 2px solid var(--s1); outline-offset: -2px; }
.bqn  { display: block; font-style: normal; font-size: 11px; color: var(--ink-mute); }
.bqover { margin-left: 5px; font-size: 11px; font-weight: 800; color: #fff;
          background: #d03b3b; border-radius: 9px; padding: 0 6px; }

.bqtable { width: 100%; }
.bqtable td, .bqtable th { vertical-align: middle; }
.bqtable tfoot th { border-top: 2px solid var(--line); font-size: 13px; }
.bqamt { width: 120px; max-width: 100%; text-align: right; font: inherit;
         padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px;
         background: var(--panel); color: var(--ink); }
.bqamt:focus { outline: none; border-color: var(--s1);
               box-shadow: 0 0 0 2px rgba(42,120,214,.18); }
.bqamt:disabled { background: var(--line-soft); color: var(--ink-mute); }
.bqv .pill { white-space: normal; }

.bqlist { list-style: none; margin: 10px 0 0; padding: 0; }
.bqlist li { display: flex; align-items: center; gap: 8px; padding: 7px 0;
             border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.bqlist li a { font-weight: 600; }
.bqlist .bqn { display: inline; margin-left: auto; text-align: right; }
.bqx { border: 0; background: none; color: var(--ink-mute); font-size: 16px;
       line-height: 1; cursor: pointer; padding: 2px 4px; }
.bqx:hover { color: #d03b3b; }

/* The admin's catalogue in Sheet Management. */
.bqadmin input[type=number] { width: 120px; }
.bqadmin input[type=text]   { width: 100%; min-width: 140px; }
.bqadmin td { vertical-align: middle; }
.bqadmin .bqmove { display: flex; gap: 3px; }

/* --------------------------------------------------------------------------
   The budget once it became a conversation: a draft, a question, an answer.
   -------------------------------------------------------------------------- */

/* The badge on the grid cell. Three readings, and the worse news wins. */
.bqflag { display: inline-block; margin-left: 6px; font-size: 10.5px;
          font-weight: 700; font-style: normal; padding: 1px 7px;
          border-radius: 9px; background: var(--line-soft); color: var(--ink-soft);
          white-space: nowrap; }
.bqflag.bqwait { background: var(--tone-warn-bg); color: var(--tone-warn-ink); }
.bqflag.bqbad  { background: var(--tone-risk-bg); color: var(--tone-risk-ink); }

/* The owner's reason, sitting under the status it explains. */
.bqwhy { margin-top: 5px; padding: 6px 9px; border-radius: 6px; font-size: 12px;
         line-height: 1.45; background: var(--line-soft); color: var(--ink); }
.bqwhy.bad { background: var(--tone-risk-bg); color: var(--tone-risk-ink);
             box-shadow: inset 3px 0 0 #d03b3b; }
.bqwhy .bqn { margin-top: 3px; }

.bqdecide { display: flex; gap: 5px; flex-wrap: wrap; }

/* Approved By: CEO or Committee, beside the decision. */
.bqby select { min-width: 150px; font-size: 12px; padding: 4px 6px; }
.bqby .pill { white-space: nowrap; }

/* The file drawer's two lists: invoices, then the quotations planned on. */
.bqkind { margin: 14px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase;
          letter-spacing: .04em; color: var(--ink-soft); }

/* The line under the table: what has been agreed, and the way to ask. */
.bqfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
          margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bqfoot > div { display: flex; flex-direction: column; }
.bqfoot strong { font-size: 17px; }
.bqfoot .js-bqsubmit { margin-left: auto; }
.bqfoot button[disabled] { opacity: .5; cursor: default; }

.bqfix { margin-top: 10px; padding: 8px 11px; border-radius: 6px;
         background: var(--tone-risk-bg); color: var(--tone-risk-ink); }

/* A column the portal keeps rather than a person: shown, not offered. */
.cellkept { display: flex; align-items: center; gap: 6px; }
.keptmark { font-style: normal; font-size: 9.5px; font-weight: 700;
            letter-spacing: .04em; text-transform: uppercase;
            padding: 1px 5px; border-radius: 8px;
            background: var(--line-soft); color: var(--ink-mute); }

/* ------------------------------------------------ frozen panes (grid.js)
   The row's ID and name stay pinned at the left, the header stays at the
   top, and the new-row line stays under the header while you scroll. */
table.grid .frz { position: sticky; z-index: 2; background: var(--panel); }
table.grid thead th.frz { z-index: 4; background: #f0f3f8; }
table.grid .frz-last { box-shadow: 3px 0 4px -2px rgba(27, 34, 48, .18); }
table.grid tbody tr:hover td.frz { background: #fbfcfe; }
table.grid tbody tr.justadded td.frz { background: #fff6da; }

tr.composer > td { position: sticky; top: var(--grid-head, 0px); z-index: 3;
                   box-shadow: inset 0 -1px 0 var(--accent, #2a78d6); }
tr.composer > td.frz { z-index: 5; background: var(--accent-bg, #f4f7ff); }
tr.composer > td.corner { position: sticky; left: 0; z-index: 6; white-space: nowrap; padding: 6px; }
tr.composer > td.corner .btn { margin-left: 4px; padding: 3px 7px; }
.composertag { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
               color: var(--accent, #2a78d6); }
tr.composeract > td { position: sticky; top: calc(var(--grid-head, 0px) + var(--grid-comp, 0px)); z-index: 3; }
.composerbar { position: sticky; left: 8px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.composerhint { margin-left: 10px; font-size: 11.5px; color: var(--ink-mute, #8a93a3); }

/* "+ Add row" stays in reach while the page scrolls past the sheet. */
.toolbar.toolbar-stick { position: sticky; z-index: 40; background: var(--bg);
                         padding: 8px 0; margin-top: -8px; }

/* ------------------------------------- dashboard charts (dashwidgets.php) */
.tile .tnote { margin-top: 3px; font-size: 11.5px; color: var(--ink-soft); }
.dw-hint { margin: 10px 0 0; }
.dwgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.dwcard { grid-column: span 2; background: var(--panel); border: 1px solid var(--line);
          border-radius: 10px; padding: 12px 14px; min-width: 0; }
.dwcard.dw-half { grid-column: span 3; }
.dwcard.dw-full { grid-column: 1 / -1; }
.dwcard h3 { margin: 0 0 10px; font-size: 13px; font-weight: 650; color: var(--ink); }
@media (max-width: 900px) { .dwcard, .dwcard.dw-half { grid-column: 1 / -1; } }
.dwtile { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.dwsub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.dwbars { display: grid; gap: 7px; }
.dwbar { display: grid; grid-template-columns: minmax(70px, 34%) 1fr auto; gap: 8px; align-items: center; font-size: 12px; }
.dwbar .dwl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.dwbar .dwtrack { height: 12px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.dwbar .dwtrack i { display: block; height: 100%; border-radius: 3px; }
.dwbar .dwv { font-weight: 650; font-variant-numeric: tabular-nums; }
.dwsvg { width: 100%; height: auto; display: block; overflow: visible; }
.dwsvg .dwsv { font-size: 10px; font-weight: 650; fill: var(--ink-soft); }
.dwsvg .dwsl { font-size: 9.5px; fill: var(--ink-mute, #8a93a3); }
.dwsvg .dwdt { font-size: 18px; font-weight: 700; fill: var(--ink); }
.dwpiewrap { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.dwpiewrap .dwpie { width: 150px; flex: 0 0 150px; }
.dwlegend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 140px; display: grid; gap: 5px; font-size: 12px; }
.dwlegend li { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 7px; align-items: center; }
.dwlegend i { width: 10px; height: 10px; border-radius: 2px; }
.dwlegend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dwlegend small { color: var(--ink-soft); min-width: 32px; text-align: right; }
.dwtable td { padding: 5px 8px; font-size: 12.5px; }
.dwadmin select, .dwadmin input[type=text] { width: 100%; min-width: 0; }

/* --------------------------- several figures per chart, and the builder */
.dwkey { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 10px; font-size: 11.5px; color: var(--ink-soft); }
.dwkey span { display: inline-flex; align-items: center; gap: 5px; }
.dwkey i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dwbar .dwmulti { display: grid; gap: 3px; grid-column: 2 / 4; }
.dwbar .dwrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.dwbar .dwtrack.dwstack { display: flex; }
.dwbar .dwtrack.dwstack i { flex: none; border-radius: 0; }
.dwscroll { overflow-x: auto; }
.dwscroll .dwsvg { min-width: 100%; }
.dwtiles { display: flex; flex-wrap: wrap; gap: 14px 22px; }
.dwtilebox span { display: block; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
.dwtable thead th { font-size: 11.5px; white-space: nowrap; }
tr.dwtotal td { font-weight: 700; border-top: 2px solid var(--line); }
tr.dwzero td { color: var(--ink-mute, #8a93a3); }
.dwcard.dwoff { opacity: .55; }
.dwcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dwcard-top .ro { font-size: 11px; white-space: nowrap; }
.dwcard-acts { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

.dwbuilder { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--bg); margin-top: 6px; }
.dwb-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dwb-head h3 { margin: 0; }
.dwb-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 980px) { .dwb-cols { grid-template-columns: 1fr; } }
.dwb-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.dwb-step:last-child { border-bottom: 0; }
.dwb-n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent, #2a78d6); color: #fff;
         font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.dwb-label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 8px; }
.dwb-label small { display: block; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
.dwb-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.dwb-type { cursor: pointer; }
.dwb-type input { position: absolute; opacity: 0; pointer-events: none; }
.dwb-type span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 6px;
                 border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
                 color: var(--ink-soft); text-align: center; font-size: 11.5px; }
.dwb-type b { font-weight: 600; color: var(--ink); }
.dwb-type:hover span { border-color: var(--accent, #2a78d6); }
.dwb-type input:checked + span { border-color: var(--accent, #2a78d6); color: var(--accent, #2a78d6);
                                  box-shadow: 0 0 0 2px var(--accent-bg, #e7f0fd); background: var(--accent-bg, #f4f7ff); }
.dwb-type input:focus-visible + span { outline: 2px solid var(--accent, #2a78d6); outline-offset: 2px; }
.dwb-note { margin-top: 8px; font-size: 12px; color: var(--ink-soft); min-height: 16px; }
.dwb-find { width: 100%; font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line);
            border-radius: 7px; margin-bottom: 8px; background: var(--panel); }
.dwb-measures { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 8px;
                background: var(--panel); padding: 6px 10px; }
.dwb-fam > span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
                  color: var(--ink-soft); margin: 8px 0 4px; }
.dwb-m { display: flex; gap: 8px; align-items: center; padding: 4px 2px; font-size: 13px; cursor: pointer; }
.dwb-m input:disabled + * , .dwb-m:has(input:disabled) { color: var(--ink-mute, #8a93a3); }
.dwb-preview { position: sticky; top: 90px; display: grid; gap: 10px; }
.dwb-preview .dwcard { min-height: 200px; }


/* ------------------- Events dashboard: headline row, then the spoke row */
.evrow-head { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.evrow-head span { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.evrow-head small { font-size: 11.5px; color: var(--ink-mute, #8a93a3); }
.evrow-head::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }

/* Row 1 -- the seven figures, equal widths, equal heights. */
.evfixed { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
@media (max-width: 1280px) { .evfixed { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .evfixed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.evtile { position: relative; display: flex; flex-direction: column; min-width: 0;
          background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
          padding: 14px 16px 12px 18px; overflow: hidden;
          box-shadow: 0 1px 2px rgba(27, 34, 48, .04); transition: box-shadow .15s, transform .15s; }
.evtile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.evtile:hover { box-shadow: 0 6px 18px rgba(27, 34, 48, .08); transform: translateY(-1px); }
.evtile .k { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
             color: var(--ink-soft); line-height: 1.3; min-height: 2.6em; }
.evtile .v { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15;
             margin: 6px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evtile .tnote { margin-top: auto; font-size: 11.5px; color: var(--ink-soft); line-height: 1.35; }
.evtile.t-green .v { color: #1a7f44; }
.evtile.t-amber .v { color: #a76a00; }
.evtile.t-red   .v { color: var(--red); }
.evtile.t-red { background: #fff8f7; }

/* Row 2 -- one card per hub / spoke. */
.spokecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.spokecard { display: flex; flex-direction: column; gap: 10px; min-width: 0; background: var(--panel);
             background: linear-gradient(180deg, color-mix(in srgb, var(--c) 7%, var(--panel)) 0, var(--panel) 56px);
             border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
             box-shadow: 0 1px 2px rgba(27, 34, 48, .04); transition: box-shadow .15s, transform .15s; }
.spokecard:hover { box-shadow: 0 6px 18px rgba(27, 34, 48, .08); transform: translateY(-1px); }
.spokecard .sc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.spokecard .sc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c);
                     box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.spokecard .sc-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; color: var(--ink);
                      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spokecard .sc-share { flex: none; font-size: 11px; font-weight: 700; color: var(--c);
                       background: color-mix(in srgb, var(--c) 12%, transparent); padding: 2px 7px; border-radius: 999px; }
.spokecard .sc-bar { height: 4px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.spokecard .sc-bar i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.spokecard .sc-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spokecard .sc-figs > div { text-align: center; padding: 2px 2px; min-width: 0; }
.spokecard .sc-figs > div + div { border-left: 1px solid var(--line-soft); }
.spokecard .sc-figs b { display: block; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.2; }
.spokecard .sc-figs span { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--ink-soft);
                           letter-spacing: 0; white-space: nowrap; }
.spokecard.empty { background: var(--panel); }
.spokecard.empty .sc-figs b, .spokecard.empty .sc-name { color: var(--ink-mute, #8a93a3); }

/* A chart Sheet Management keeps but the dashboard leaves out, and why. */
.dwnote { margin: 0 0 10px; padding: 7px 10px; border-radius: 7px; font-size: 12px;
          background: #fff4e0; color: #7a4d00; border: 1px solid #f3dcae; }

/* ------------------------------------------- Intake Forms (admin/intake.php) */
.ik-new .sb-field select { min-width: 180px; }
.ik-list { display: grid; gap: 12px; }
.ik-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent, #2a78d6);
           border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(27, 34, 48, .04); }
.ik-card.ik-off { border-left-color: var(--line); opacity: .8; }
.ik-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.ik-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ik-title strong { font-size: 15px; }
.ik-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-soft); }
.ik-link { display: flex; gap: 8px; margin: 12px 0 8px; align-items: center; }
.ik-link input { flex: 1; min-width: 0; font: inherit; font-size: 12.5px; padding: 6px 10px;
                 border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.ik-cols { margin: 4px 0 8px; font-size: 13px; }
.ik-cols summary { cursor: pointer; color: var(--accent, #2a78d6); font-weight: 600; padding: 4px 0; }
.ik-colgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px;
              margin-top: 8px; padding: 10px 12px; background: var(--bg); border-radius: 8px; }
.ik-colgrid h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.ik-colgrid ol, .ik-colgrid ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
.ik-colgrid li { margin: 2px 0; break-inside: avoid; }
.ik-acts { padding-top: 10px; border-top: 1px solid var(--line-soft); align-items: center; }
.ik-acts select { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; }

/* ---------------------------------------------------------------------------
   Post preview (Website Content): a row drawn as LinkedIn or Instagram would
   show it. See fabo_wc_preview_block() in lib/wcblock.php.
   --------------------------------------------------------------------------- */
.pvmodal { position: fixed; inset: 0; background: rgba(15, 20, 30, .6); z-index: 95;
           display: flex; align-items: center; justify-content: center; padding: 16px; }
.pvmodal[hidden] { display: none; }
.pvcard { background: #f3f2ef; border-radius: 12px; width: 100%; max-width: 560px;
          max-height: calc(100vh - 32px); display: flex; flex-direction: column;
          box-shadow: 0 18px 50px rgba(0, 0, 0, .3); overflow: hidden; }
.pvhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
          padding: 16px 18px 10px; background: #fff; }
.pvhead h3 { margin: 0; font-size: 17px; }
.pvmeta { margin-top: 3px; font-size: 12px; color: #68707f; }
.pvx { border: 0; background: none; font-size: 24px; line-height: 1; color: #68707f;
       cursor: pointer; padding: 0 4px; }
.pvx:hover { color: #1d2330; }
.pvtabs { display: flex; gap: 4px; padding: 0 18px; background: #fff;
          border-bottom: 1px solid #e3e6ec; }
.pvtabs button { border: 0; background: none; padding: 9px 12px; font: inherit; font-size: 13px;
                 font-weight: 600; color: #68707f; cursor: pointer;
                 border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pvtabs button[aria-selected="true"] { color: #0a66c2; border-bottom-color: #0a66c2; }
.pvstage { overflow-y: auto; padding: 16px; flex: 1; }
.pvwait { padding: 40px 10px; text-align: center; color: #68707f; font-size: 13px; }
.pvfoot { display: flex; justify-content: space-between; align-items: center; gap: 12px;
          padding: 10px 18px; background: #fff; border-top: 1px solid #e3e6ec; }
.pvcheck { font-size: 12px; line-height: 1.4; }
.pvcheck.ok { color: #147348; }
.pvcheck.warn { color: #8a5a10; }

/* The post itself, in each platform's own type and colours. */
.pvli, .pvig { background: #fff; border: 1px solid #e0dfdc; border-radius: 8px; overflow: hidden;
               font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
               color: rgba(0, 0, 0, .9); max-width: 500px; margin: 0 auto; }
.pvwho { display: flex; align-items: center; gap: 9px; padding: 12px 14px 8px; }
.pvwho strong { display: block; font-size: 14px; }
.pvwho span { display: block; font-size: 12px; color: rgba(0, 0, 0, .6); }
.pvavatar { width: 44px; height: 44px; border-radius: 6px; flex: 0 0 auto; display: grid;
            place-items: center; font-weight: 700; font-size: 18px; color: #fff;
            background: linear-gradient(135deg, #0a66c2, #5b8def); }
.pvig .pvavatar { width: 34px; height: 34px; border-radius: 50%; font-size: 14px;
                  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7); }
.pvtext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; }
.pvli .pvtext { padding: 0 14px; }
.pvclamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
           overflow: hidden; }
.pvtag { color: #0a66c2; font-weight: 600; }
.pvig .pvtag { color: #00376b; font-weight: 400; }
.pvmore { display: block; margin: 2px 14px 0 auto; border: 0; background: none; padding: 0;
          font: inherit; font-size: 13px; color: rgba(0, 0, 0, .6); cursor: pointer; }
.pvimg { margin-top: 10px; background: #eef1f5; }
.pvimg img { display: block; width: 100%; height: auto; }
.pvimg.sq { margin-top: 0; aspect-ratio: 1 / 1; }
.pvimg.sq img { height: 100%; object-fit: cover; }
.pvph { aspect-ratio: 1.91 / 1; display: flex; flex-direction: column; justify-content: center;
        gap: 6px; padding: 24px; text-align: center; color: #fff;
        background: linear-gradient(135deg, #1d2a44, #2d6cdf); }
.pvimg.sq .pvph { aspect-ratio: 1 / 1; height: 100%; }
.pvph strong { font-size: 20px; line-height: 1.25; }
.pvph span { font-size: 13px; opacity: .85; }
.pvlink { display: block; padding: 9px 14px; background: #eef3f8; text-decoration: none;
          color: inherit; }
.pvlink strong { display: block; font-size: 14px; }
.pvlink span { font-size: 12px; color: rgba(0, 0, 0, .6); }
.pvbar { display: flex; justify-content: space-around; padding: 6px 8px;
         border-top: 1px solid #e8e8e8; font-size: 13px; font-weight: 600; color: rgba(0, 0, 0, .6); }
.pvbar.ig { justify-content: flex-start; gap: 16px; border-top: 0; padding: 10px 14px 4px;
            font-size: 22px; font-weight: 400; color: #262626; }
.pvcap { padding: 2px 14px 14px; font-size: 14px; }
.pvcap > strong { float: left; margin-right: 5px; }
.pvcap .pvtext { display: inline; }

@media (max-width: 640px) {
  .pvstage { padding: 10px; }
  .pvfoot { flex-direction: column; align-items: stretch; }
}

/* Add website: date and time side by side, and the auto-post switch. */
.wcrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wcmodal-card .wccheck { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px;
                         font-weight: 400; font-size: 13px; line-height: 1.45; cursor: pointer; }
.wcmodal-card .wccheck input { width: auto; margin-top: 3px; flex: 0 0 auto; }
@media (max-width: 480px) { .wcrow2 { grid-template-columns: 1fr; } }

/* Post window, LinkedIn kinds: how each kind is shown in the preview. */
.pvgrid { display: grid; gap: 2px; margin-top: 10px; background: #fff; }
.pvgrid.n2 { grid-template-columns: 1fr 1fr; }
.pvgrid.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pvgrid.n3 .pvgcell:first-child { grid-row: 1 / 3; }
.pvgrid.n4 { grid-template-columns: 1fr 1fr; }
.pvgcell { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #eef1f5; }
.pvgrid.n1 .pvgcell { aspect-ratio: auto; }
.pvgcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pvmore4 { position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
           font-size: 26px; font-weight: 600; background: rgba(0, 0, 0, .45); }

.pvdoc { margin-top: 10px; border-top: 1px solid #e8e8e8; }
.pvdocbar { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px;
            font-size: 12.5px; background: #f3f2ef; }
.pvdocbar span { color: rgba(0, 0, 0, .6); white-space: nowrap; }
.pvdocpage { position: relative; background: #eef1f5; }
.pvdocpage img { display: block; width: 100%; height: auto; }
.pvdocnav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
            border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff;
            font-size: 22px; line-height: 1; cursor: pointer; }
.pvdocnav:disabled { opacity: .25; cursor: default; }
.pvdocnav.prev { left: 10px; }
.pvdocnav.next { right: 10px; }
.pvpdf { display: block; width: 100%; height: 520px; border: 0; background: #eef1f5; }

.pvvideo { display: block; width: 100%; max-height: 420px; margin-top: 10px; background: #000; }
.pvempty { margin: 10px 14px 4px; padding: 28px 14px; text-align: center; font-size: 13px;
           color: rgba(0, 0, 0, .6); border: 1px dashed #cfd5df; border-radius: 8px; }

.pvpoll { margin: 10px 14px 6px; padding: 14px; border: 1px solid #e0dfdc; border-radius: 8px; }
.pvpollq { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.pvpollopt { padding: 8px 14px; margin-bottom: 7px; border: 1px solid #0a66c2; border-radius: 18px;
             color: #0a66c2; font-weight: 600; font-size: 13.5px; text-align: center; }
.pvpollmeta { font-size: 12px; color: rgba(0, 0, 0, .6); }

.pvlinkcard { display: block; margin-top: 10px; text-decoration: none; color: inherit;
              background: #eef3f8; }
.pvlinkcard .pvimg { margin-top: 0; }
.pvlinkcard.pvside { display: grid; grid-template-columns: 38% 1fr; align-items: center; }
.pvlinkmeta { display: grid; gap: 3px; padding: 10px 14px; }
.pvlinkmeta strong { font-size: 14px; }
.pvlinkmeta span { font-size: 12px; color: rgba(0, 0, 0, .6); }
.pvkicker { font-weight: 600; color: #8a5a10 !important; }
.pvact { justify-self: start; margin-top: 6px; padding: 5px 14px; border: 1px solid #0a66c2;
         border-radius: 16px; color: #0a66c2 !important; font-weight: 600; font-size: 12.5px !important; }

.pvupload { cursor: pointer; }
.pvupnote { margin-left: 8px; font-size: 12px; color: #68707f; }

/* The post window as an editor: preview on the left, editing and approval on
   the right, Save along the bottom. */
.pvcard.pvwide { max-width: 1180px; }
.pvhead { align-items: center; }
.pvhead > div { flex: 1; min-width: 0; }
.pvpill { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
          white-space: nowrap; }
.pvpill.ok   { color: #147348; background: #e8f8f0; }
.pvpill.wait { color: #8a5a10; background: #fff4e2; }
.pvpill.bad  { color: #a12020; background: #fdecec; }
.pvbody { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr);
          flex: 1; min-height: 0; }
.pvleft { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #e3e6ec; }
.pvleft .pvtabs { align-items: center; }
.pvleft .pvtabs .pvready { margin-left: auto; }
.pvright { overflow-y: auto; padding: 4px 18px 14px; background: #fff; }
.pvsec { padding: 12px 0; border-bottom: 1px solid #eef0f4; }
.pvsec:last-child { border-bottom: 0; }
.pvsec[hidden] { display: none; }
.pvlab { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px;
         font-size: 12px; font-weight: 700; color: #414a5a; text-transform: uppercase;
         letter-spacing: .04em; }
.pvlab .pvhint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pvin { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; font-size: 13.5px;
        color: #1d2330; background: #fff; border: 1px solid #d3d9e3; border-radius: 7px; }
.pvin:focus { outline: 2px solid #2d6cdf; outline-offset: 0; border-color: #2d6cdf; }
.pvin:disabled { background: #f5f6f9; color: #68707f; }
textarea.pvin { resize: vertical; line-height: 1.5; }
.pvin.pvneed { border-color: #c02626; outline-color: #c02626; }
.pvcount { font-weight: 600; color: #8a93a3; text-transform: none; letter-spacing: 0; }
.pvcount.over { color: #c02626; }
.pvopts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0 10px; }
.pvrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pvhint { margin-top: 6px; font-size: 12px; color: #68707f; line-height: 1.45; }
.pvfilelist { list-style: none; margin: 0 0 9px; padding: 0; display: grid; gap: 5px; }
.pvfilelist li { display: flex; align-items: center; gap: 8px; padding: 6px 9px; font-size: 13px;
                 background: #f7f8fb; border: 1px solid #e6e9f0; border-radius: 7px; }
.pvfilelist li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvfilelist li.pvnone { color: #7a828f; background: none; border-style: dashed; }
.pvnew { padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700;
         color: #1d4ed8; background: #e7efff; }
.pvfx { border: 0; background: none; font-size: 18px; line-height: 1; color: #8a93a3;
        cursor: pointer; padding: 0 2px; }
.pvfx:hover { color: #c02626; }
.pvapprove .pvdecision { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
                         font-size: 13px; margin-bottom: 10px; }
.pvdot { width: 9px; height: 9px; border-radius: 50%; }
.pvdot.ok { background: #17a34a; }
.pvdot.wait { background: #e0a106; }
.pvdot.bad { background: #c02626; }
.pvremark { flex-basis: 100%; margin-top: 4px; padding: 8px 10px; font-size: 12.5px;
            background: #fff8ec; border-left: 3px solid #e0a106; border-radius: 4px; }
.pvbtns { display: flex; flex-wrap: wrap; gap: 8px; }
.pvbtns[hidden] { display: none; }
.btn.pvgo { color: #fff; background: #17a34a; border-color: #17a34a; }
.btn.pvgo:hover { background: #128a3e; }
.pvreject { margin-bottom: 10px; }
.pvreject[hidden] { display: none; }
.pvreject .pvbtns { margin-top: 8px; justify-content: flex-end; }
.pvfoot { gap: 10px; }
.pvfoot .pvcheck { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pvdirty { color: #b45309; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pvdirty[hidden] { display: none; }
.pvsaved { font-size: 12.5px; color: #147348; max-width: 520px; line-height: 1.35; }
.pvsaved.warn { color: #8a5a10; }
.pvsaved.bad { color: #a12020; }
@media (max-width: 900px) {
  .pvbody { grid-template-columns: 1fr; overflow-y: auto; }
  .pvleft { border-right: 0; border-bottom: 1px solid #e3e6ec; }
  .pvstage { overflow: visible; }
  .pvright { overflow: visible; }
  .pvfoot { flex-wrap: wrap; }
  .pvsaved { max-width: 100%; }
}

/* The document as a book: one page at a time, turned over from the spine. */
.pvbook { position: relative; perspective: 2400px; background: #e9ecf1; overflow: hidden;
          touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer;
          min-height: 220px; outline: none; }
.pvbook:focus-visible { box-shadow: inset 0 0 0 2px #0a66c2; }
.pvpage { display: block; width: 100%; height: auto; pointer-events: none; }
.pvleaf { position: absolute; inset: 0; z-index: 2; transform-origin: left center;
          transform-style: preserve-3d; pointer-events: none; }
.pvleaf.turning { transition: transform .62s cubic-bezier(.45, .05, .25, 1); }
.pvface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
          overflow: hidden; background: #fff; }
.pvface img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The front darkens towards the spine as it lifts; the back is plain paper. */
.pvface::after { content: ''; position: absolute; inset: 0;
                 background: linear-gradient(to left, rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 40%); }
.pvback { transform: rotateY(180deg);
          background: linear-gradient(to right, #f4f3ef, #e2e0da); }
.pvback::after { background: linear-gradient(to right, rgba(0, 0, 0, .12), rgba(0, 0, 0, 0) 45%); }
.pvbook .pvdocnav { z-index: 3; }
.pvbookwait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px;
              color: rgba(0, 0, 0, .55); }
.pvbookbar { height: 4px; background: #dfe3ea; }
.pvbookbar span { display: block; height: 100%; width: 0; background: #0a66c2;
                  transition: width .35s ease; }
.pvbooknote { padding: 7px 14px; font-size: 12px; color: #8a5a10; background: #fff8ec; }
@media (prefers-reduced-motion: reduce) {
  .pvleaf.turning { transition-duration: .01s; }
}

/* ---------------------------------------------------------------------------
   Approval committees: the row button, the panel, and the dashboard card.
   See lib/cmblock.php.
   --------------------------------------------------------------------------- */
.rowtools .js-committee { color: #8a5a10; }
.rowtools .js-committee.cm-approved { color: #147348; }
.rowtools .js-committee.cm-rejected { color: #a12020; }

.cmcard { max-width: 620px; }
.cmeyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
             color: #2d6cdf; margin-bottom: 3px; }
.cmbody { padding: 14px 18px 6px; overflow-y: auto; background: #fff; }
.cmbar { display: flex; gap: 3px; height: 10px; border-radius: 6px; overflow: hidden; background: #eef1f5; }
.cmseg.yes { background: #17a34a; }
.cmseg.no { background: #c02626; }
.cmseg.wait { background: #e5c46b; }
.cmsum { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 12px; font-size: 12.5px; font-weight: 600; }
.cmk.yes { color: #147348; }
.cmk.no { color: #a12020; }
.cmk.wait { color: #8a5a10; }
.cmlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.cmm { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid #e6e9f0;
       border-radius: 9px; background: #fbfcfe; }
.cmm.approved { border-left: 3px solid #17a34a; }
.cmm.rejected { border-left: 3px solid #c02626; background: #fffafa; }
.cmm.pending { border-left: 3px solid #e5c46b; }
.cmav { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
        font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2d6cdf, #7c5cff); }
.cmwho { flex: 1; min-width: 0; }
.cmwho strong { display: block; font-size: 13.5px; }
.cmwho small { color: #7a828f; font-size: 11.5px; }
.cmjust { margin-top: 5px; padding: 6px 9px; font-size: 12.5px; line-height: 1.45; color: #5b1b1b;
          background: #fdecec; border-radius: 6px; }
.cmchip { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.cmchip.approved { color: #147348; background: #e8f8f0; }
.cmchip.rejected { color: #a12020; background: #fdecec; }
.cmchip.pending { color: #8a5a10; background: #fff4e2; }
.cmdone { margin: 12px 0 4px; padding: 8px 11px; font-size: 12.5px; color: #147348; background: #ecfaf2; border-radius: 7px; }
.cmvote { padding: 12px 18px 14px; background: #fff; border-top: 1px solid #e3e6ec; }
.cmvote[hidden] { display: none; }
.cmvote-q { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #414a5a; margin-bottom: 8px; }
.cmreason[hidden] { display: none; }
.cmreason label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.cmreq { font-size: 11px; color: #a12020; font-weight: 700; }
.cmreason textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; font-size: 13.5px;
                     border: 1px solid #d3d9e3; border-radius: 7px; resize: vertical; margin-bottom: 9px; }
.cmreason textarea.cmneed { border-color: #c02626; outline: 2px solid rgba(192, 38, 38, .25); }
.cmbtns { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.cmnote { flex: 1; font-size: 12.5px; color: #a12020; }

.block.cmw { border: 1px solid #f0dcb8; background: linear-gradient(180deg, #fffaf0, #fff); }
.cmw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.cmw-head h2 { margin: 0 0 3px; }
.cmw-count { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 19px; display: grid; place-items: center;
             font-size: 17px; font-weight: 800; color: #fff; background: #e08a00; }
.cmw-count.zero { background: #17a34a; }
.cmw-empty { padding: 12px 14px; font-size: 13.5px; color: #147348; background: #ecfaf2; border-radius: 8px; }
.cmw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cmw-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px;
            background: #fff; border: 1px solid #ece4d3; border-radius: 9px; }
.cmw-item.done { opacity: .7; background: #f7faf8; }
.cmw-main { display: grid; gap: 2px; min-width: 0; }
.cmw-main strong { font-size: 14px; }
.cmw-meta { font-size: 12px; color: #68707f; }
.cmw-state { font-size: 12px; font-weight: 600; color: #8a5a10; }
.cmw-item.done .cmw-state { color: #147348; }
.cmw-act { display: flex; gap: 7px; flex: 0 0 auto; }
@media (max-width: 640px) {
  .cmw-item { flex-direction: column; align-items: stretch; }
  .cmw-act { justify-content: flex-end; }
}

/* Sheet Management -> Committees */
.cmc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.cmc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid #e3e7ef;
       border-radius: 10px; background: #fbfcfe; }
.cmc.on { border-color: #2d6cdf; box-shadow: 0 0 0 3px rgba(45, 108, 223, .12); }
.cmc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cmc-top h3 { margin: 0; font-size: 15px; }
.cmc-rule { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
            color: #1d4ed8; background: #e7efff; }
.cmc-people { display: flex; flex-wrap: wrap; gap: 5px; }
.cmc-chip { padding: 3px 9px; border-radius: 999px; font-size: 12px; background: #eef1f6; color: #2a3140; }
.cmc-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.cmc-foot .hint { flex: 1; }
.cmc-form { border-top: 1px solid #e6e9f0; padding-top: 14px; }
.cmc-formtitle { margin: 0 0 8px; font-size: 15px; }
.cmc-pick { margin: 6px 0 12px; }
.cmc-pickhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cmc-pickhead label { font-weight: 700; font-size: 13px; margin-right: auto; }
.cmc-pickhead input[type=search] { padding: 6px 9px; border: 1px solid #d3d9e3; border-radius: 7px; font: inherit;
                                   font-size: 13px; min-width: 200px; }
.cmc-people-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px;
                   max-height: 320px; overflow-y: auto; padding: 2px; }
.cmc-person { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #e3e7ef;
              border-radius: 8px; background: #fff; cursor: pointer; }
.cmc-person[hidden] { display: none; }
.cmc-person:has(input:checked) { border-color: #2d6cdf; background: #f2f6ff; }
.cmc-person input { margin: 0; }
.cmc-person .cmav { flex: 0 0 28px; height: 28px; font-size: 12px; }
.cmc-pname { display: grid; min-width: 0; }
.cmc-pname strong { font-size: 13px; }
.cmc-pname small { font-size: 11.5px; color: #7a828f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Intake Forms, Live sheets: the line under the share form. */
.ls-new .ls-hint { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }
.ls-card { border-left-color: #0f6e63; }

/* Files drawer: documents and images, each under its own heading. */
.filegroup + .filegroup { margin-top: 16px; }
.filegroup h4 { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
                text-transform: uppercase; color: var(--ink-soft); }
.filegroup h4 span { margin-left: 4px; padding: 0 6px; border-radius: 9px; background: var(--line); color: var(--ink); }

/* Intake Forms: the filter bar above each list, and the page links below. */
.ik-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin: 4px 0 10px;
             padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.ik-filter label { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ik-filter label > span { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
                          color: var(--ink-soft); }
.ik-filter input, .ik-filter select { font: inherit; font-size: 13px; padding: 6px 9px; min-height: 34px;
                                      border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.ik-fsearch { flex: 1 1 240px; }
.ik-fsearch input { width: 100%; box-sizing: border-box; }
.ik-fsel select { min-width: 130px; max-width: 220px; }
.ik-facts { display: flex; gap: 6px; padding-bottom: 1px; }
.ik-count { margin: 0 0 10px; font-size: 12.5px; color: var(--ink-soft); }
.ik-listhead { margin: 22px 0 8px; }
.ik-listhead h2 { margin: 2px 0 0; }
.ik-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 16px 0 4px; }
.ik-pg { min-width: 34px; padding: 6px 10px; text-align: center; font-size: 13px; font-weight: 600;
         color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; text-decoration: none; }
a.ik-pg:hover { border-color: var(--accent, #2a78d6); color: var(--accent, #2a78d6); }
.ik-pg.on { color: #fff; background: var(--accent, #2a78d6); border-color: var(--accent, #2a78d6); }
.ik-pg.off { opacity: .45; }
.ik-pggap { color: var(--ink-soft); padding: 0 2px; }
@media (max-width: 640px) { .ik-fsel select { min-width: 0; width: 100%; } .ik-filter label { flex: 1 1 45%; } }

/* ---------------------------------------------------------------------------
   The committee desk (committee.php): filter chips, and the View details
   pop-up with the event's fields and attachments. See lib/committees.php.
   --------------------------------------------------------------------------- */
.cmd-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cmd-bar h2 { margin: 0; flex: 1 1 auto; }
.cmd-bar input[type=search] { min-width: 200px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.cmd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cmd-chips button { border: 1px solid var(--line); background: var(--panel); color: var(--ink-soft); border-radius: 999px;
                    padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cmd-chips button b { margin-left: 4px; color: var(--ink); }
.cmd-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmd-chips button.on b { color: #fff; }
#cmdTable tr[hidden] { display: none; }
.cmdcard { max-width: 760px; }
.cmd-sec { margin: 16px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #414a5a; }
.cmd-sec:first-child { margin-top: 2px; }
.cmd-dl { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 0; margin: 0; border: 1px solid #e6e9f0; border-radius: 8px; overflow: hidden; }
.cmd-dl dt, .cmd-dl dd { margin: 0; padding: 7px 10px; font-size: 13px; border-top: 1px solid #eef1f5; }
.cmd-dl dt:first-of-type, .cmd-dl dt:first-of-type + dd { border-top: 0; }
.cmd-dl dt { color: #5f6979; background: #f8f9fb; font-weight: 600; }
.cmd-dl dd { overflow-wrap: anywhere; }
.cmd-dl dd.long { white-space: pre-wrap; }
.cmd-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cmd-file { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid #e6e9f0; border-radius: 8px;
            background: #fbfcfe; color: inherit; text-decoration: none; }
.cmd-file:hover { border-color: var(--accent); }
.cmd-file img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: 0 0 44px; }
.cmd-ficon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 6px; display: grid; place-items: center;
             font-size: 10.5px; font-weight: 800; color: #2d6cdf; background: #eaf1fd; }
.cmd-fname { display: grid; min-width: 0; }
.cmd-fname strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd-fname small { font-size: 11.5px; color: #7a828f; }
@media (max-width: 560px) { .cmd-dl { grid-template-columns: 1fr; } .cmd-dl dd { border-top: 0; padding-top: 0; } }
.field.cm-tick label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.field.cm-tick input[type=checkbox] { width: auto; margin: 0; padding: 0; }

/* The committee dashboard's programme list: fits the page, no sideways scroll. */
.cmd-table { width: 100%; table-layout: auto; }
.cmd-table td, .cmd-table th { white-space: normal; vertical-align: middle; }
.cmd-table td:last-child { white-space: nowrap; text-align: right; }
.cmd-table tr[hidden] { display: none; }
.cmd-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-soft); }
.cmd-await { color: #8a5a10; }
.cmd-appr { margin: 0 0 12px; padding: 8px 11px; font-size: 12.5px; line-height: 1.45; border-radius: 7px; }
.cmd-appr.approved { color: #147348; background: #ecfaf2; }
.cmd-appr.rejected { color: #8a1c1c; background: #fdecec; }
@media (max-width: 760px) {
  .cmd-table thead { display: none; }
  .cmd-table, .cmd-table tbody, .cmd-table tr, .cmd-table td { display: block; width: 100%; box-sizing: border-box; }
  .cmd-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; padding: 6px 4px; background: var(--panel); }
  .cmd-table td { border: 0; padding: 4px 10px; text-align: left; }
  .cmd-table td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
  .cmd-table td:last-child { text-align: left; padding-top: 6px; }
}
.rowtools .js-evdetails { color: var(--accent); }

/* ------------------------------------------- Upcoming / Completed Events
   Programs Data cut in two (lib/eventstages.php). The plan is shown on
   Completed for reference, so it reads as read-only rather than as a box
   that refuses to take a click. */
.evstage-note { margin: -4px 0 12px; font-size: 13px; color: var(--ink-soft); }
table.grid td.stage-ro { background: #f8f9fb; color: var(--ink-soft); }
table.grid tbody tr:hover td.stage-ro { background: #f4f6f9; }
table.grid td.stage-ro .cell { cursor: default; }

/* The Fill button and its box (assets/evfill.js). */
.rowtools .js-evfill { color: var(--accent); }
.rowtools .js-evfill.evfill-done { color: var(--ink-mute); opacity: .55; }
.evfill-card { max-width: 620px; max-height: 88vh; overflow-y: auto; }
.evfill-card textarea { width: 100%; padding: 9px 11px; font: inherit; font-size: 14px;
    border: 1px solid #ccd3df; border-radius: 6px; resize: vertical; }
.evfill-card .hint.err:empty { display: none; }

/* Sheet Management -> Event Views. */
.sb-evviews { display: flex; gap: 6px; margin: 0 0 12px; }
.sb-evviews a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
    font-size: 13px; color: var(--ink-soft); text-decoration: none; background: var(--panel); }
.sb-evviews a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sb-stage-ro { font-size: 11px; color: var(--ink-mute); }
.evfill-card input[type=checkbox] { width: auto; }
.ss-addfields > .hint:first-child { margin: 12px 0 0; }
/* The Add row box on the live sheets: its boxes read as form fields, not as
   the borderless cells of the grid they share a class with. */
.evfill-card .ls-cell { width: 100%; padding: 9px 11px; font-size: 14px; min-width: 0;
    border: 1px solid #ccd3df; border-radius: 6px; background: #fff; }

/* ============================================================ sidebar ===
   The sections run down the left instead of across the top. The menu button
   in the top bar opens and closes it: on a wide screen the page moves over
   to make room, on a narrow one it slides over the page. */
:root { --sidenav-w: 248px; --topbar-h: 56px; }

/* The top bar: menu button, logo and name on the left, way out on the right. */
.topbar {
  min-height: 56px; box-sizing: border-box; padding: 8px 18px; gap: 14px;
  flex-wrap: nowrap; box-shadow: 0 1px 0 rgba(255, 255, 255, .04), 0 2px 10px rgba(15, 23, 42, .18);
}
.topbar .brandmark { min-width: 0; gap: 11px; }
.topbar .brandmark .brandname {
  display: flex; align-items: baseline; gap: 6px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 15.5px; font-weight: 700;
}
.topbar .brandmark .brandname span {
  overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 500;
}
.topbar .brandlogo { width: 32px; height: 32px; border-radius: 8px; }
.topbar a.btn-top { flex: 0 0 auto; padding: 6px 13px; border-radius: 7px; font-weight: 500; }

.navtoggle {
  flex: 0 0 auto; width: 36px; height: 36px; padding: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: 1px solid #33425a; border-radius: 8px; cursor: pointer;
  transition: background .15s ease;
}
.navtoggle:hover { background: #22304a; }
.navtoggle span {
  display: block; width: 16px; height: 2px; border-radius: 1px; background: #dce6f5;
  transition: transform .2s ease, opacity .2s ease;
}
/* An open menu shows its button as an X. */
html:not(.nav-closed) .navtoggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
html:not(.nav-closed) .navtoggle span:nth-child(2) { opacity: 0; }
html:not(.nav-closed) .navtoggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* The sidebar itself. */
.navstrip {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; z-index: 45;
  width: var(--sidenav-w); box-sizing: border-box;
  flex-direction: column; gap: 2px; padding: 14px 12px 28px;
  overflow-x: hidden; overflow-y: auto;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f7fb 100%);
  border-bottom: 0; border-right: 1px solid var(--line);
  scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent;
  transition: transform .22s ease;
}
.navstrip::-webkit-scrollbar { width: 6px; }
.navstrip::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* Who is signed in, and for which organisation. */
.sidehead {
  display: flex; align-items: center; gap: 11px; flex: 0 0 auto;
  padding: 12px; margin-bottom: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.sideavatar {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #2f6fe4, #16202f);
  font-size: 15px; font-weight: 700;
}
.sidewho { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidewho strong {
  font-size: 13.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidewho small { margin-top: 2px; font-size: 11.5px; color: var(--ink-mute); }
.sidelabel {
  flex: 0 0 auto; padding: 10px 12px 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-mute);
}

.navstrip a {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 8px;
  border-bottom: 0; border-left: 3px solid transparent;
  white-space: normal; line-height: 1.3; font-size: 13.5px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.navstrip a:hover { color: var(--ink); background: #e9eef6; }
.navstrip a.on {
  color: var(--accent); background: #e6efff;
  border-left-color: var(--accent); font-weight: 650;
}
.navstrip a .badge, .navstrip a .ro { margin-left: auto; }

/* On a wide screen the sidebar runs from the very top, and the person's
   card becomes a band level with the top bar, so the corner is not left
   empty. A narrow screen keeps it under the bar, where the X button is. */
@media (min-width: 901px) {
  .navstrip { top: 0; padding-top: 0; }
  .sidehead {
    position: sticky; top: 0; z-index: 1;
    min-height: var(--topbar-h); box-sizing: border-box;
    margin: 0 -12px 8px; padding: 8px 16px;
    background: #16202f; border: 0; border-radius: 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
  }
  .sidehead .sidewho strong { color: #fff; }
  .sidehead .sidewho small {
    color: #9fabbd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sidehead .sideavatar {
    width: 36px; height: 36px; background: linear-gradient(135deg, #2f6fe4, #5b8ef0);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
  }
}

body.has-sidenav { transition: padding-left .22s ease; }
html:not(.nav-closed) body.has-sidenav { padding-left: var(--sidenav-w); }
/* Beside the sidebar the page uses the whole width, starting right at the sidebar's edge, rather than
   a centred 1440px column that leaves a gap between the two on a wide screen. */
body.has-sidenav .wrap-page { max-width: none; margin: 0; padding-left: 28px; padding-right: 28px; }
html.nav-closed .navstrip { transform: translateX(-100%); }

.navshade { display: none; }

@media (max-width: 900px) {
  html:not(.nav-closed) body.has-sidenav { padding-left: 0; }
  .navstrip { transform: translateX(-100%); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
  html.nav-open .navstrip { transform: none; }
  html.nav-open .navshade {
    display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 44;
    background: rgba(15, 23, 42, .35);
  }
  /* The X follows the narrow screen's own open state. */
  html:not(.nav-open) .navtoggle span:nth-child(1),
  html:not(.nav-open) .navtoggle span:nth-child(3) { transform: none; }
  html:not(.nav-open) .navtoggle span:nth-child(2) { opacity: 1; }
  html.nav-open .navtoggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  html.nav-open .navtoggle span:nth-child(2) { opacity: 0; }
  html.nav-open .navtoggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .topbar { padding: 8px 12px; gap: 10px; }
}

@media print {
  .navstrip, .navtoggle, .navshade { display: none !important; }
  body.has-sidenav { padding-left: 0 !important; }
}

/* The person's photograph over their initial, which shows if it cannot load. */
.sideavatar { position: relative; overflow: hidden; }
.sideavatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ================================================================== *
 * Meetings desk (lib/meetingpage.php). Everything is prefixed .mt- so
 * none of it leaks into the sheets or the other desks.
 * ================================================================== */
.mt { max-width: 1180px; }
.mt h1, .mt h2, .mt h3 { letter-spacing: 0; }
.mt .mt-hint { font-size: 12.5px; color: var(--ink-mute); margin: 4px 0 0; }
.mt .opt { font-size: 11px; font-weight: 500; color: var(--ink-mute); background: var(--grey-bg);
  border-radius: 10px; padding: 1px 7px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.mt .opt.req { color: var(--red); background: var(--red-bg); }
.mt .muted { color: var(--ink-mute); }
.mt .ok { color: var(--green); }
.mt .warn { color: var(--amber); }
.mt .btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; font-weight: 550;
  transition: background .15s, border-color .15s, box-shadow .15s; }
.mt .btn:focus-visible, .mt input:focus-visible, .mt select:focus-visible, .mt textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
.mt .btn-primary { box-shadow: 0 1px 2px rgba(29, 95, 208, .25); }
.mt .btn.ok { color: var(--green); border-color: #bfe3cd; background: var(--green-bg); }
.mt .btn[disabled] { opacity: .65; cursor: progress; }
.mt .mt-big { padding: 10px 18px; font-size: 14px; }
.mt .ico { flex: 0 0 auto; vertical-align: -3px; }
.mt .field input:not([type=checkbox]):not([type=radio]), .mt .field select, .mt .field textarea, .mt .mt-search, .mt .mt-inline input {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s; }
.mt .field input:focus, .mt .field select:focus, .mt .field textarea:focus, .mt .mt-search:focus,
.mt .mt-inline input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sf); outline: none; }
.mt .field > label, .mt .mt-pickhead > label { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; margin-bottom: 5px; display: block; }

/* page head */
.mt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px; }
.mt-head h1 { margin: 0; font-size: 24px; font-weight: 700; }
.mt-head .sub { margin: 4px 0 0; color: var(--ink-soft); font-size: 14px; }
.mt-back { display: inline-block; margin-bottom: 12px; font-size: 13px; color: var(--ink-soft);
  text-decoration: none; font-weight: 550; }
.mt-back:hover { color: var(--accent); }

/* messages */
.mt-flash, .mt-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.mt-flash .ic, .mt-note .ic { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.mt-flash.ok   { background: var(--green-bg); border-color: #c3e6d1; color: #165f36; }
.mt-flash.ok .ic { background: var(--green); }
.mt-flash.warn { background: var(--amber-bg); border-color: #f1dcae; color: #7a4f00; }
.mt-flash.warn .ic { background: #d08a00; }
.mt-flash.err  { background: var(--red-bg); border-color: #f0c8c8; color: var(--red); }
.mt-flash.err .ic { background: var(--red); }
.mt-flash.small { padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.mt-note { background: var(--accent-sf); border-color: #cfe0fa; color: #1f3d73; }
.mt-note .ic { background: var(--accent); font-style: italic; font-family: Georgia, serif; }
.mt-note a { font-weight: 600; }

/* stats */
.mt-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.mt-stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.mt-stat:hover { border-color: #c4cfe0; box-shadow: 0 2px 8px rgba(20, 32, 54, .06); }
.mt-stat .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.mt-stat .v small { font-size: 13px; color: var(--ink-mute); font-weight: 500; }
.mt-stat .k { font-size: 12px; color: var(--ink-soft); }
.mt-stat.amber .v { color: var(--amber); }
.mt-stat.green .v { color: var(--green); }
@media (max-width: 760px) { .mt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 460px) { .mt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* tabs + filter */
.mt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px; }
.mt-tabs { display: inline-flex; background: var(--grey-bg); border-radius: 10px; padding: 3px; }
.mt-tabs a { padding: 7px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); text-decoration: none; position: relative; }
.mt-tabs a.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 32, 54, .12); }
.mt-tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #d08a00;
  margin-left: 5px; vertical-align: 2px; }
.mt-filter { display: flex; align-items: center; gap: 8px; }
.mt-filter label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.mt-filter select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 180px; }

/* the date tile */
.mt-date { flex: 0 0 auto; width: 56px; border-radius: 10px; overflow: hidden; text-align: center;
  background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.mt-date .mo { background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px; padding: 2px 0; }
.mt-date .dy { font-size: 21px; font-weight: 700; line-height: 1.15; padding-top: 3px; }
.mt-date .wd { font-size: 10.5px; color: var(--ink-mute); padding-bottom: 4px; text-transform: uppercase; }

/* badges and tags */
.mt-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 650;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.mt-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mt-badge.blue  { background: var(--accent-sf); color: var(--accent); }
.mt-badge.green { background: var(--green-bg); color: var(--green); }
.mt-badge.amber { background: var(--amber-bg); color: var(--amber); }
.mt-badge.red   { background: var(--red-bg); color: var(--red); }
.mt-badge.grey  { background: var(--grey-bg); color: var(--ink-soft); }
.mt-badge.live  { background: #e3f7ea; color: #0f7a3a; }
.mt-badge.live::before { animation: mtPulse 1.4s infinite; }
@keyframes mtPulse { 50% { opacity: .25; } }
.mt-tag { display: inline-block; font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 6px;
  background: var(--grey-bg); color: var(--ink-soft); margin-left: 6px; vertical-align: 1px; }

/* the list */
.mt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mt-row { position: relative; display: flex; align-items: center; gap: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s; }
.mt-row:hover { border-color: #c4cfe0; box-shadow: 0 4px 14px rgba(20, 32, 54, .07); }
.mt-row.void { opacity: .6; }
.mt-row.void .title { text-decoration: line-through; }
.mt-row .main { flex: 1; min-width: 0; }
.mt-row .title { font-size: 15px; font-weight: 650; color: var(--ink); text-decoration: none; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-row .title.stretch::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.mt-row .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.mt-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mt-row .side .when { font-size: 12px; color: var(--ink-mute); }
.mt-row .acts { display: flex; gap: 6px; position: relative; z-index: 1; }
@media (max-width: 640px) {
  .mt-row { flex-wrap: wrap; }
  .mt-row .side { flex-direction: row; align-items: center; order: 3; }
  .mt-row .acts { order: 4; margin-left: auto; }
  .mt-row .title { white-space: normal; }
}

.mt-empty { text-align: center; padding: 40px 20px; background: var(--panel); border: 1px dashed var(--line);
  border-radius: 12px; }
.mt-empty .art { font-size: 34px; }
.mt-empty h3 { margin: 6px 0 4px; font-size: 16px; }
.mt-empty p { margin: 0 0 14px; color: var(--ink-soft); font-size: 13.5px; }
.mt-empty.small { padding: 16px; border: 0; background: var(--bg); }
.mt-empty.small p { margin: 0; }

/* the create panel */
.mt-panel { margin-bottom: 20px; }
.mt-panel.anim { animation: mtIn .2s ease-out; }
@keyframes mtIn { from { opacity: 0; transform: translateY(-6px); } }
.mt-form { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(20, 32, 54, .08); overflow: hidden; }
.mt-form-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft); }
.mt-form-head h2 { margin: 0; font-size: 17px; }
.mt-x { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-mute); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px; }
.mt-x:hover { background: var(--grey-bg); color: var(--ink); }
.mt-step { border: 0; margin: 0; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.mt-step legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; }
.mt-step legend + * { clear: left; }
.mt-step .n { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-sf); color: var(--accent);
  display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.mt-step .field:last-child { margin-bottom: 0; }
.mt-when { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.mt-when.two { grid-template-columns: 1fr 1fr; }
.mt-when .field { margin-bottom: 0; }
.mt-edit .mt-when { margin-bottom: 12px; }
@media (max-width: 560px) { .mt-when { grid-template-columns: 1fr 1fr; } .mt-when .field:first-child { grid-column: 1 / -1; }
  .mt-when.two .field:first-child { grid-column: auto; } }
.mt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.mt-chips .lbl { font-size: 12.5px; color: var(--ink-mute); margin-right: 2px; }
.mt-chips .chip { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 4px 11px;
  font-size: 12.5px; cursor: pointer; color: var(--ink-soft); font-weight: 550; }
.mt-chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.mt-chips .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* choice cards */
.mt-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 640px) { .mt-choices { grid-template-columns: 1fr; } }
.mt-choice { position: relative; cursor: pointer; }
.mt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mt-choice .box { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--panel); transition: border-color .15s, background .15s; }
.mt-choice .t { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14px; }
.mt-choice .d { font-size: 12px; color: var(--ink-mute); }
.mt-choice:hover .box { border-color: #b8c6dc; }
.mt-choice input:checked + .box { border-color: var(--accent); background: var(--accent-sf); box-shadow: 0 0 0 1px var(--accent) inset; }
.mt-choice input:checked + .box .t { color: var(--accent); }
.mt-choice input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-choice.off { cursor: not-allowed; }
.mt-choice.off .box { background: var(--bg); opacity: .7; }
.mt-choices.three .box { align-items: center; justify-content: center; padding: 10px; }
@media (max-width: 640px) { .mt-choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* people picker */
.mt-pickhead { display: flex; justify-content: space-between; align-items: baseline; }
.mt-count { font-size: 12px; color: var(--ink-mute); font-weight: 600; }
.mt-count.on { color: var(--accent); }
.mt .mt-search { margin-bottom: 8px; }
.mt-people { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.mt-people.compact { max-height: 220px; }
.mt-people .grp + .grp { margin-top: 4px; }
.mt-people .ghead { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--ink-mute); padding: 8px 10px 4px; position: sticky; top: -4px; background: var(--panel); z-index: 1; }
.mt .mt-people .person { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-radius: 8px; cursor: pointer; margin: 0; font-weight: 400; color: var(--ink); }
.mt-people .person:hover { background: var(--bg); }
.mt .mt-people .person input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.mt-people .nm { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 550; display: flex; flex-direction: column; }
.mt-people .nm small { font-size: 11.5px; color: var(--ink-mute); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-people .tick { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line); color: transparent;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.mt-people .person:has(input:checked) { background: var(--accent-sf); }
.mt-people .person input:checked ~ .tick { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-people .person input:focus-visible ~ .tick { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-none { padding: 12px; margin: 0; color: var(--ink-mute); font-size: 13px; text-align: center; }
.mt .av { width: 32px; height: 32px; border-radius: 50%; background: #dfe8f7; color: #2a4f8f; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.mt .av.host { background: var(--accent); color: #fff; }

/* the submit bar and the switch */
.mt-submit { display: flex; align-items: center; gap: 10px; padding: 16px 22px; background: var(--bg); flex-wrap: wrap; }
.mt-submit .sp { flex: 1; }
.mt-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 550; }
.mt-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mt-switch .trk { width: 38px; height: 22px; border-radius: 22px; background: #c7ceda; position: relative; transition: background .15s; flex: 0 0 auto; }
.mt-switch .trk::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.mt-switch input:checked + .trk { background: var(--accent); }
.mt-switch input:checked + .trk::after { transform: translateX(16px); }
.mt-switch input:focus-visible + .trk { outline: 2px solid var(--accent); outline-offset: 2px; }

/* one meeting: hero */
.mt-hero { display: flex; gap: 18px; align-items: center; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; flex-wrap: wrap; }
.mt-hero.void h1 { text-decoration: line-through; color: var(--ink-soft); }
.mt-hero .mt-date { width: 66px; }
.mt-hero .mt-date .dy { font-size: 26px; }
.mt-hero .main { flex: 1; min-width: 240px; }
.mt-hero .top { display: flex; align-items: center; gap: 10px; }
.mt-hero .rel { font-size: 12.5px; color: var(--ink-mute); font-weight: 550; }
.mt-hero h1 { margin: 6px 0 6px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.mt-hero .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-soft); }
.mt-hero .join { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 240px; }
.mt .mt-joinbtn { justify-content: center; background: #128a3e; border-color: #128a3e; box-shadow: 0 2px 6px rgba(18, 138, 62, .3); }
.mt .mt-joinbtn:hover { background: #0e7334; }
.mt-linkrow { display: flex; gap: 6px; align-items: center; }
.mt-linkrow code { flex: 1; min-width: 0; font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-soft); }
.mt-place { font-size: 14px; padding: 10px 14px; border-radius: 10px; background: var(--bg); text-align: center; }
@media (max-width: 700px) { .mt-hero .join { min-width: 0; width: 100%; } }

/* steps */
.mt-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mt-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 11px 14px; font-size: 13px;
  color: var(--ink-mute); font-weight: 600; position: relative; min-width: 0; }
.mt-steps li + li { border-left: 1px solid var(--line-soft); }
.mt-steps .dot { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--panel); }
.mt-steps .lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-steps li.done { color: var(--green); }
.mt-steps li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.mt-steps li.now { color: var(--accent); background: var(--accent-sf); }
.mt-steps li.now .dot { border-color: var(--accent); background: var(--accent); color: #fff; }
@media (max-width: 640px) { .mt-steps .lb { display: none; } .mt-steps li { justify-content: center; padding: 10px 6px; }
  .mt-steps li.now { flex: 2.5; } .mt-steps li.now .lb { display: inline; } }

/* next step */
.mt-next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px;
  border-radius: 12px; background: linear-gradient(135deg, #f1f6ff, #e8f0fd); border: 1px solid #cfe0fa; }
.mt-next .txt { flex: 1; min-width: 240px; }
.mt-next h3 { margin: 0 0 3px; font-size: 15px; }
.mt-next p { margin: 0; font-size: 13.5px; color: #3b4a63; }
.mt-next .do { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-next .do form { margin: 0; }
.mt-inline { display: flex; gap: 8px; width: 100%; }
.mt-inline input { flex: 1; background: #fff; }

/* the two-column body */
.mt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 960px) { .mt-grid { grid-template-columns: 1fr; } }
.mt-col { min-width: 0; }
.mt .mt-card { border-radius: 12px; padding: 18px 20px; }
.mt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.mt-card-head h2 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mt-card-head .cnt { font-size: 12px; background: var(--grey-bg); color: var(--ink-soft); border-radius: 10px; padding: 1px 8px; }
.mt-card-head .acts { display: flex; gap: 6px; }
.mt-card-head .acts form { margin: 0; }
.mt .mt-attn { border-left: 3px solid #d08a00; }
.mt-row-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.mt-row-btns form { margin: 0; }
.mt-sub { margin-top: 12px; }
.mt-sub > summary { list-style: none; }

.mt-add { background: var(--bg); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.mt-add .mt-people { background: var(--panel); }

.mt-guests { list-style: none; margin: 0; padding: 0; }
.mt-guests li { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.mt-guests li:last-child { border-bottom: 0; }
.mt-guests .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-guests .who .nm { font-size: 13.5px; font-weight: 600; }
.mt-guests .who small { font-size: 12px; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-guests form { margin: 0; }
.mt-icon { border: 0; background: none; width: 28px; height: 28px; border-radius: 7px; font-size: 18px; line-height: 1;
  color: var(--ink-mute); cursor: pointer; }
.mt-icon:hover { background: var(--red-bg); color: var(--red); }

/* stars */
.mt-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; position: relative; }
.mt-stars input { position: absolute; opacity: 0; pointer-events: none; }
.mt .mt-stars label { font-size: 28px; line-height: 1; color: #d5dae3; cursor: pointer; margin: 0; transition: color .1s, transform .1s; }
.mt .mt-stars label:hover, .mt .mt-stars label:hover ~ label, .mt .mt-stars input:checked ~ label { color: #f2a900; }
.mt .mt-stars label:hover { transform: scale(1.12); }
.mt-stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.mt [data-state="held"] input[name="rating_note"] { margin-top: 8px; }

/* minutes helpers */
.mt-ai { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 640px) { .mt-ai { grid-template-columns: 1fr; } }
.mt-ai .lane { display: flex; gap: 10px; background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.mt-ai .lane .n { width: 22px; height: 22px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; color: var(--ink-soft); }
.mt-ai strong { font-size: 13.5px; }
.mt-ai .mt-row-btns { margin-top: 8px; }

/* side cards */
.mt-kv { display: flex; flex-direction: column; gap: 1px; margin: 0 0 10px; font-size: 13.5px; }
.mt-kv span { font-size: 11.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.mt-kv .brk { word-break: break-all; }
.mt-agenda { margin: 0; padding-left: 18px; font-size: 13.5px; }
.mt-agenda li { margin: 4px 0; }
.mt-agenda li::marker { color: var(--accent); }
.mt-edit > summary { display: flex; align-items: center; justify-content: space-between; }
.mt-edit > summary h2 { margin: 0; font-size: 15px; }
.mt-edit > summary .chev { color: var(--ink-mute); transition: transform .15s; }
.mt-edit[open] > summary .chev { transform: rotate(180deg); }
.mt-danger { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }

/* Meetings: replies (RSVP) and add to calendar. */
.mt-addcal { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 12.5px; color: var(--ink-mute); }
.mt-addcal a { font-weight: 600; text-decoration: none; }
.mt-addcal a:hover { text-decoration: underline; }

.mt-me { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.mt-me .txt { flex: 1; min-width: 200px; }
.mt-me h3 { margin: 0 0 2px; font-size: 15px; }
.mt-me p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.mt-rsvp { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-rsvp button { font: inherit; font-size: 13.5px; font-weight: 650; padding: 9px 16px; border-radius: 9px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--ink-soft); transition: all .15s; }
.mt-rsvp button:hover { border-color: #b8c6dc; color: var(--ink); }
.mt-rsvp .r-yes.on   { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.mt-rsvp .r-maybe.on { background: var(--amber-bg); border-color: #d08a00; color: var(--amber); }
.mt-rsvp .r-no.on    { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.mt-rsvp button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mt-tally { margin-bottom: 14px; }
.mt-tally .mt-meter { display: flex; height: 8px; border-radius: 8px; overflow: hidden; background: var(--grey-bg); gap: 2px; }
.mt-tally .mt-meter i { display: block; min-width: 6px; }
.mt-tally .mt-meter .yes   { background: #1baf7a; }
.mt-tally .mt-meter .maybe { background: #eda100; }
.mt-tally .mt-meter .no    { background: #e34948; }
.mt-tally .mt-meter .none  { background: #cfd5df; }
.mt-tally .keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.mt-tally .k::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.mt-tally .k b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mt-tally .k.yes::before   { background: #1baf7a; }
.mt-tally .k.maybe::before { background: #eda100; }
.mt-tally .k.no::before    { background: #e34948; }
.mt-tally .k.none::before  { background: #cfd5df; }
.mt-tally .sync { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-mute); }
.mt-tally .sync form { margin: 0; }
.mt-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.mt-link:hover { text-decoration: underline; }

.mt-guests .who small .bad { color: var(--red); font-weight: 600; }
.mt-ans { margin: 0; }
.mt .mt-ans select.mt-badge { appearance: none; -webkit-appearance: none; border: 1px solid transparent; cursor: pointer;
  padding: 4px 24px 4px 10px; font: inherit; font-size: 12px; font-weight: 650; border-radius: 20px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 52%, calc(100% - 8px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
.mt .mt-ans select.mt-badge.green { background-color: var(--green-bg); color: var(--green); }
.mt .mt-ans select.mt-badge.amber { background-color: var(--amber-bg); color: var(--amber); }
.mt .mt-ans select.mt-badge.red   { background-color: var(--red-bg); color: var(--red); }
.mt .mt-ans select.mt-badge.grey  { background-color: var(--grey-bg); color: var(--ink-soft); }
.mt .mt-ans select.mt-badge:hover { border-color: currentColor; }
.mt .mt-ans select option { color: var(--ink); background: #fff; }

/* The budget in the committee's review pop-up (lib/cmblock.php). */
.cmd-budget { width: 100%; font-size: 13px; margin: 0 0 6px; }
.cmd-budget th, .cmd-budget td { padding: 7px 9px; vertical-align: top; }
.cmd-budget td.num, .cmd-budget th:nth-child(2), .cmd-budget th:nth-child(3) { text-align: right; }
.cmd-budget .cmd-sub { display: block; margin-top: 3px; }
/* The committee's line in the budget drawer on Events (assets/grid.js). */
.bqcm { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f4f7fd; border: 1px solid #dbe4f5; font-size: 13px; }
.bqcm.bad { background: #fdf3f3; border-color: #f1d0d0; }
.bqcm.good { background: #eefaf3; border-color: #cdeed9; }

/* The top bar, the same in both portals (lib/ui.php): the desks as tabs, a
   divider, then the actions. Tabs are quiet -- no border, an underline for
   the page you are on -- so the outlined actions read as actions. */
.topbar .topnav { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.topbar .brandmark { flex: 1 1 auto; min-width: 0; }   /* the brand gives way first: its tagline ends in an ellipsis */
.topbar .topnav::-webkit-scrollbar { display: none; }
.topbar .topnav a.btn-top {
  position: relative; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border-color: transparent; background: transparent; color: #c3cee0; padding: 7px 12px; border-radius: 7px;
}
.topbar .topnav a.btn-top:hover { background: #1f2b40; color: #fff; }
.topbar .topnav a.btn-top.on { background: #1f2b40; color: #fff; }
.topbar .topnav a.btn-top.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: #8fb4f5;
}
.topbar a.btn-top .badge {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.topbar .topsep { width: 1px; height: 26px; background: #2e3b52; flex: 0 0 auto; }
.topbar .topacts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar .topacts a.btn-top { white-space: nowrap; }
@media (max-width: 1440px) {
  /* The long tagline goes first; the name ends in an ellipsis rather than being cut. */
  .topbar .brandmark .brandname span { display: none; }
  .topbar .brandmark .brandname { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 1180px) {
  /* Laptops with the menu open, tablets and phones: the brand gives way, the
     actions stay on the first row, and the tabs drop to a second row. */
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar .spacer, .topbar .topsep { display: none; }
  .topbar .brandmark { flex: 1 1 0; min-width: 0; }
  .topbar .brandmark .brandname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .topnav { order: 10; flex: 1 0 100%; margin: 0 -6px; padding-top: 2px; }
  .topbar .topnav a.btn-top { padding: 6px 10px; font-size: 12.5px; }
  .topbar .topacts a.btn-top { padding: 5px 10px; font-size: 12.5px; }
}

/* ================================================================== *
 * Sidebar, modern finish (fabo_nav_decorate() in lib/ui.php): an icon on
 * every main entry, quiet section headings, a soft pill with an accent bar
 * for the page you are on, and the nested desks on a thin guide line.
 * ================================================================== */
.navstrip { gap: 3px; padding-left: 12px; padding-right: 12px; }
.sidelabel { padding: 16px 12px 6px; font-size: 10.5px; letter-spacing: .1em; color: #97a3b6; }
.sidehead + .sidelabel { padding-top: 8px; }
.navstrip a {
  position: relative; gap: 11px; padding: 8px 12px; border-left: 0; border-radius: 10px;
  color: #3b4658; font-weight: 500; text-decoration: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.navstrip a .ni {
  width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; color: #8592a6; transition: color .15s ease, transform .15s ease;
}
.navstrip a .nl { flex: 1 1 auto; min-width: 0; }
.navstrip a:hover { background: #eef2f9; color: #16202f; }
.navstrip a:hover .ni { color: #2f6fe4; }
.navstrip a.on { background: linear-gradient(90deg, #e6eeff, #f2f6ff); color: #1d4fd8; font-weight: 650; }
.navstrip a.on:not(.inc-sub):not(.hr-sub):not(.mk-sub):not(.it-sub) { box-shadow: inset 0 0 0 1px #d4e0fb; }
.navstrip a.on:not(.inc-sub):not(.hr-sub):not(.mk-sub):not(.it-sub)::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 4px;
  border-radius: 0 4px 4px 0; background: #2f6fe4;
}
.navstrip a.on .ni { color: #2f6fe4; }
.navstrip a .badge {
  display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: #e5484d; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.navstrip a .ro {
  padding: 1px 6px; border-radius: 6px; background: #eef1f6; color: #7a8698; font-size: 10.5px; font-weight: 600;
}
/* The desks nested under HR and Incubation, aligned under their module's label. */
nav.navstrip a.inc-sub, nav.navstrip a.hr-sub, nav.navstrip a.it-sub {
  margin-left: 21px; padding: 6px 10px 6px 14px; border-radius: 0 8px 8px 0;
  border-left: 1.5px solid #dbe2ec; font-size: 12.75px; color: #4d5a6d;
}
nav.navstrip a.inc-sub:hover, nav.navstrip a.hr-sub:hover, nav.navstrip a.it-sub:hover { background: #eef2f9; }
nav.navstrip a.inc-sub.on, nav.navstrip a.hr-sub.on, nav.navstrip a.it-sub.on { border-left: 2px solid #2f6fe4; background: #eef3ff; color: #1d4fd8; }
nav.navstrip .hr-grp { margin-left: 21px; padding-left: 14px; color: #97a3b6; }

/* "Marketing Management": a collapsible group of sheets in the sidebar (fabo_nav_group() in lib/ui.php). */
.navgrp { flex: 0 0 auto; }
.navgrp > summary { list-style: none; }
.navgrp > summary::-webkit-details-marker { display: none; }
.navgrp-h {
  display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  color: #3b4658; font-size: 13.5px; font-weight: 500; line-height: 1.3; user-select: none;
  transition: background .15s ease, color .15s ease;
}
.navgrp-h .ni {
  width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; color: #8592a6;
}
.navgrp-h .nl { flex: 1 1 auto; min-width: 0; }
.navgrp-h .chev {
  width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: #97a3b6; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease;
}
.navgrp[open] > .navgrp-h .chev { transform: rotate(90deg); }
.navgrp-h:hover { background: #eef2f9; color: #16202f; }
.navgrp-h:hover .ni { color: #2f6fe4; }
.navgrp-h.has-on { color: #1d4fd8; font-weight: 650; }
.navgrp-h.has-on .ni { color: #2f6fe4; }
.navgrp-h:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.navgrp-b { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
nav.navstrip a.mk-sub {
  margin-left: 21px; padding: 6px 10px 6px 14px; border-radius: 0 8px 8px 0;
  border-left: 1.5px solid #dbe2ec; font-size: 12.75px; color: #4d5a6d; box-shadow: none;
}
nav.navstrip a.mk-sub:hover { background: #eef2f9; color: #16202f; }
nav.navstrip a.mk-sub.on { border-left: 2px solid #2f6fe4; background: #eef3ff; color: #1d4fd8; font-weight: 650; box-shadow: none; }
nav.navstrip a.mk-sub.on::before { display: none; }

/* ---- Committee Dashboard (committee.php): counts that filter, one event list */
.cmx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cmx-due { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: var(--amber-bg); color: var(--amber); font-size: 13px; font-weight: 700; }
.cmx-due.ok { background: var(--green-bg); color: var(--green); }
.cmx-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(167,106,0,.18); }

.cmx-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
.cmx-stat { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 14px 16px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: border-color .15s, box-shadow .15s, transform .15s; font: inherit; color: var(--ink); }
.cmx-stat::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line); }
.cmx-stat.due::before { background: var(--amber); }
.cmx-stat.good::before { background: var(--green); }
.cmx-stat.bad::before { background: var(--red); }
.cmx-stat:hover { border-color: #c4ccd8; box-shadow: 0 4px 12px rgba(16,24,40,.07); transform: translateY(-1px); }
.cmx-stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmx-stat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 12px rgba(29,95,208,.10); }
.cmx-stat .k { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.cmx-stat .v { font-size: 28px; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cmx-stat.due .v { color: var(--amber); }
.cmx-stat.good .v { color: var(--green); }
.cmx-stat.bad .v { color: var(--red); }
.cmx-stat .s { font-size: 12px; color: var(--ink-mute); }

.cmx-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; }
.cmx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft); background: #fafbfc; scroll-margin-top: 80px; }
.cmx-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--grey-bg); border-radius: 9px; }
.cmx-tabs button { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.cmx-tabs button b { margin-left: 5px; padding: 1px 7px; border-radius: 999px; background: rgba(27,34,48,.07); font-size: 11.5px; color: var(--ink-soft); }
.cmx-tabs button:hover { color: var(--ink); }
.cmx-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.cmx-tabs button.on b { background: var(--accent-sf); color: var(--accent); }
.cmx-bar input[type=search] { width: 280px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; }
.cmx-bar input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-sf); }

.cmx-list { list-style: none; margin: 0; padding: 0; }
.cmx-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 150px auto; align-items: center; gap: 16px;
  padding: 14px 16px; border-top: 1px solid var(--line-soft); position: relative; transition: background .12s; }
.cmx-row:first-child { border-top: 0; }
.cmx-row:hover { background: #f8fafd; }
.cmx-row[hidden] { display: none; }
.cmx-row.mine::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--amber); }
.cmx-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 56px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel); line-height: 1.1; }
.cmx-date .dd { font-size: 20px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.cmx-date .mm { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.cmx-row.mine .cmx-date { border-color: #f0d9ab; background: var(--amber-bg); }
.cmx-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cmx-title { font-size: 14.5px; font-weight: 650; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cmx-meta { font-size: 12.5px; color: var(--ink-soft); white-space: pre-wrap; }
.cmx-note { font-size: 12px; color: var(--ink-mute); }
.cmx-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cmx-state small { font-size: 11.5px; color: var(--ink-mute); }
.cmx-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cmx-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cmx-pill.due, .cmx-pill.pending { color: var(--amber); background: var(--amber-bg); }
.cmx-pill.approved { color: var(--green); background: var(--green-bg); }
.cmx-pill.rejected { color: var(--red); background: var(--red-bg); }
.cmx-act { display: flex; justify-content: flex-end; }
.cmx-act .btn { min-width: 128px; justify-content: center; }
.cmx-empty { padding: 36px 16px; text-align: center; color: var(--ink-soft); font-size: 13.5px; }
.cmx-empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

@media (max-width: 1100px) {
  .cmx-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cmx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cmx-stat .v { font-size: 24px; }
  .cmx-stat:last-child { grid-column: 1 / -1; }
  .cmx-bar input[type=search] { width: 100%; }
  .cmx-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .cmx-row { grid-template-columns: 52px minmax(0, 1fr); gap: 10px 12px; }
  .cmx-date { height: 50px; }
  .cmx-state { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .cmx-act { grid-column: 1 / -1; }
  .cmx-act .btn { width: 100%; }
}
