/* =====================================================================
   RULES FOR EDITING THE STYLESHEETS  (added build 128 â€” read before changing any colour)

   WHY THIS EXISTS: app.css was written light-only and hard-codes light colours; this file re-skins it for the
   dark theme, one selector at a time. Every selector nobody remembered to re-skin stayed light â€” that is where
   "white on white" and "grey on grey" kept coming from, and each page fix added another patch instead of
   removing the cause. Examples fixed at the root in build 128: a global  code{background:#eef1f5}  (light pill,
   light text), and --gray (never redefined for the dark theme, so 28 rules kept #5f6368 on navy).

   1. NEVER hard-code a colour in app.css or in a view. Use a variable. If none fits, ADD a variable to BOTH theme
      blocks below (dark + light) â€” never to one only.
   2. Text on a tinted surface uses the matching pair:  background:var(--tint-X-bg); color:var(--tint-X-fg).
      (X = neutral, warn, info, blue, green, red, purple.)  Semantic text: --danger-fg --warn-fg --good-fg.
      Links: --link.  Muted text: --muted / --gray.  Code: --code-bg / --code-fg (opaque, so it works anywhere).
   3. Do not create a new .css file for a feature, and do not append a "FIX" block that re-colours one page.
      Change the variable or the base rule that is actually wrong.
   4. A variable must never reference itself (var(--x) inside --x) â€” the browser then drops it silently.
   5. Check BOTH themes. The light theme is NOT just "the same thing with different variables": the brand orange
      is deliberately deeper there (--blue / --link) so text in it passes contrast.
   6. (build 141) Buttons, page titles, headings, text fields, badges, cards and tables are defined ONCE, in the "UI KIT" block near the top of
      this file. If one looks different on one page, fix the kit â€” never add a page-specific copy of it. Spacing on an element is a utility class
      (.mt-8, .mb-12, .m-0 â€¦), not an inline style="marginâ€¦".
   ===================================================================== */
/* =====================================================================
   Rampart Garrison â€” theme (DARK default + LIGHT toggle).
   Navy + safety orange, hex logo, KPI cards, dropdown nav.
   MUST be at index/assets/css/rampart-theme.css (header links it,
   loaded AFTER app.css so these rules win).

   CLEANED: de-duplicated (was defined 2â€“4Ã— for fb-lookup, cat-*, badge-cat,
   nav-link, dropdown). One authoritative copy of each block below.
   ===================================================================== */
/* ---------- Theme variables ---------- */
:root, html[data-theme="dark"]{
  --blue:#EA5B2B; --blue-d:#C4451A; --hivis:#FDB515;
  --navy-900:#0b1524; --navy-850:#0e1a2e; --navy-800:#152740; --navy-700:#1c3350;
  --bg:#0b1524; --card:#152740; --card-2:#12213a;
  --text:#e7edf5; --text-soft:#aebcce; --muted:#8fa0b6; --line:#25395a;
  --shadow:0 2px 8px rgba(0,0,0,.35); --ink:#e7edf5;
  /* BUILD 128: app.css (a light-only stylesheet) uses var(--gray) 28 times and this theme never redefined it, so
     every one of them stayed #5f6368 on navy (2.5:1 â€” "dark gray on dark"). Defined here for both themes now. */
  --gray:#9aa9bd;
  /* Opaque code pill: carries BOTH its background and its text colour, so it stays legible on any surface. */
  --code-bg:#0b1524; --code-fg:#ffd8c8; --code-line:#33496b;
  --accent-wash:rgba(234,91,43,.13); --accent-rgb:234,91,43;   /* 3.0.1: the accent as r,g,b so rules can tint it: rgba(var(--accent-rgb),.12) - a colour theme (themes.css) replaces it */
  --field-bg:#0e1a2e; --field-line:#34507d;
  /* Semantic text colours for use ON tinted surfaces (dark theme: light text on a translucent tint). */
  --danger-fg:#ff9d90; --warn-fg:#ffb596; --good-fg:#7fe3a0; --link:#F47A4D;
  --tint-neutral-bg:rgba(255,255,255,.07); --tint-neutral-fg:#c4d0e0;
  --tint-warn-bg:rgba(249,171,0,.15);  --tint-warn-fg:#ffd37a;  --tint-warn-line:rgba(249,171,0,.38);
  --tint-info-bg:rgba(167,119,227,.17); --tint-info-fg:#dcc3fd;  --tint-info-line:rgba(167,119,227,.38);
  --tint-blue-bg:rgba(110,160,255,.17); --tint-blue-fg:#b3cdff;
  --tint-green-bg:rgba(76,193,111,.16); --tint-green-fg:#8fe6ab;
  --tint-red-bg:rgba(229,83,75,.20);    --tint-red-fg:#ff9d90;
  --tint-purple-bg:rgba(167,119,227,.17); --tint-purple-fg:#dcc3fd;
  /* UI kit (build 141): buttons, table headers, row hover â€” one set of values per theme */
  --btn-bg:rgba(255,255,255,.07); --btn-bg-h:rgba(255,255,255,.13); --btn-line:rgba(255,255,255,.20); --btn-line-h:rgba(255,255,255,.32);
  --danger-line:rgba(229,83,75,.55); --info-line:rgba(110,160,255,.5);
  --th-bg:rgba(255,255,255,.03); --hover-row:rgba(255,255,255,.04);
}
html[data-theme="light"]{
  --navy-800:#1b2a44; --bg:#f4f6f8; --card:#ffffff; --card-2:#e9ebee;
  --text:#16233b; --text-soft:#41506a; --muted:#5f6b7a; --line:#e3e6ea;
  --shadow:0 1px 3px rgba(0,0,0,.08); --ink:#16233b;
  --gray:#5f6368;
  --code-bg:#eef1f5; --code-fg:#16233b; --code-line:#d6dbe2;
  --accent-wash:rgba(196,69,26,.09); --accent-rgb:234,91,43;
  --field-bg:#ffffff; --field-line:#c3ccd8;
  /* Light theme: the brand orange is too pale for TEXT on white (3.4:1). Everything that uses --blue as a text,
     border or fill colour gets the deeper shade (5:1+), so links, chips and primary buttons all pass. */
  --blue:#C4451A; --blue-d:#A33612; --link:#B33C14;
  --danger-fg:#c5221f; --warn-fg:#a15600; --good-fg:#137333;
  --tint-neutral-bg:#eef1f5; --tint-neutral-fg:#3c4043;
  --tint-warn-bg:#fef7e0;  --tint-warn-fg:#8a4b00;  --tint-warn-line:#f3dfa0;
  --tint-info-bg:#f3e8fd;  --tint-info-fg:#6b21a8;  --tint-info-line:#e0c8fa;
  --tint-blue-bg:#e8f0fe;  --tint-blue-fg:#1558b0;
  --tint-green-bg:#e6f4ea; --tint-green-fg:#137333;
  --tint-red-bg:#fce8e6;   --tint-red-fg:#b3261e;
  --tint-purple-bg:#f3e8fd; --tint-purple-fg:#6b21a8;
  --btn-bg:#ffffff; --btn-bg-h:#f1f3f4; --btn-line:#c3ccd8; --btn-line-h:#98a5b8;
  --danger-line:#f0b4ae; --info-line:#b9cdf6;
  --th-bg:#f8f9fa; --hover-row:rgba(0,0,0,.035);
}
/* =====================================================================
   UI KIT â€” the ONE definition of every shared control (build 141, Bug Tracker #53 "CSS - Unification")
   ---------------------------------------------------------------------
   Every page uses these and only these. If something looks different on one page, it is a bug â€” fix the kit, never add a page-specific copy.

   PAGE TITLE     .page-head  >  h1 (+ optional  p.page-sub )  and  .head-actions   â€” the same on every page. No hero banners, no per-page title styles.
   HEADINGS       h2  = a section / card title (16px)      h3 = a sub-section (14px)      .group-title = small capitals label above a list
   BUTTONS        .btn (neutral)   .btn-primary (the action)   .btn-danger (delete / remove)   .btn-info (test / preview / open)   + .btn-sm (smaller)
                  .link-btn = a text-only action inside a card      .icon-btn = a small square icon button (â–² â–¼ âœ•)
   TEXT FIELDS    every text box, number box, date box and drop-down is a rounded pill (the look of the search box on the What's-new page);
                  a text area is the same with softer corners. Set by --field-radius below; a field with its own class may change the size, never the look.
   BADGES         .badge (neutral)  .badge-green / -yellow / -red / -blue  (also -low / -high / -urgent / -normal)      .count-pill = a number in a pill
   TABLES         .data-table (inside a card)   .tasks-table (stand-alone, with its own border)
   SPACING        utilities  .m-0  .mt-4 â€¦ .mt-28  .mb-6 â€¦ .mb-20  (replace inline style="marginâ€¦" in the views)
   ===================================================================== */
:root{--field-radius:999px}
textarea{--field-radius:16px}
/* the same look, softer corners for a multi-line box */
/* ---------- Page title ---------- */
.page-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 16px;margin-bottom:18px}
.page-head h1{margin:0;font-size:24px;font-weight:700;line-height:1.2}
.page-head .page-sub{margin:4px 0 0;font-size:14px;color:var(--muted)}
.head-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* ---------- Headings ---------- */
h2{font-size:16px;font-weight:700;line-height:1.3}
h3{font-size:14px;font-weight:700;line-height:1.3}
.card h2{margin:0 0 12px}
.card h3{margin:14px 0 8px}
.panel-head h2{margin:0 0 4px}
.chart-head h2{margin:0}
.group-title,.settings-subhead,.cf-section-title,.fs-group-title{margin:0 0 10px;padding-bottom:6px;border-bottom:1px solid var(--line);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.section-title{display:flex;align-items:center;margin:22px 0 12px;color:var(--text);font-weight:700;font-size:16px}
.section-title span{position:relative;padding-left:12px}
.section-title span::before{content:"";position:absolute;left:0;top:2px;bottom:2px;width:4px;background:var(--blue);border-radius:2px}
/* ---------- Buttons ---------- */

















/* ---------- Badges & pills ---------- */
.badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);text-transform:capitalize;white-space:nowrap}
.entity-badges .badge,.wd-fb .badge,.health-group .badge{text-transform:none}
.badge-urgent,.badge-red,.badge-block{background:var(--tint-red-bg);color:var(--tint-red-fg)}
.badge-high,.badge-yellow{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.badge-low,.badge-green,.badge-done{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.badge-normal,.badge-blue{background:var(--tint-blue-bg);color:var(--tint-blue-fg)}
.badge-stage,.badge-gray{background:var(--tint-neutral-bg);color:var(--tint-neutral-fg)}
.count-pill{padding:1px 9px;border-radius:999px;font-size:13px;font-weight:600;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg)}
/* ---------- Cards ---------- */
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:18px;box-shadow:var(--shadow);color:var(--text)}
/* ---------- Tables ---------- */
.data-table,.tasks-table{width:100%;border-collapse:collapse;font-size:14px}
.data-table th,.data-table td,.tasks-table th,.tasks-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line)}
.tasks-table th,.tasks-table td{vertical-align:top}
.data-table th,.tasks-table th{color:var(--muted);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.tasks-table th{background:var(--th-bg)}
.data-table tr:hover td{background:var(--hover-row)}
.tasks-table{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.data-table,.data-table td{overflow:visible}
/* ---------- Spacing utilities (these replace inline  style="marginâ€¦"  in the views) ---------- */
.m-0{margin:0 !important}
.mt-0{margin-top:0 !important}
.mt-4{margin-top:4px !important}
.mt-6{margin-top:6px !important}
.mt-8{margin-top:8px !important}
.mt-10{margin-top:10px !important}
.mt-12{margin-top:12px !important}
.mt-14{margin-top:14px !important}
.mt-16{margin-top:16px !important}
.mt-18{margin-top:18px !important}
.mt-22{margin-top:22px !important}
.mt-26{margin-top:26px !important}
.mt-28{margin-top:28px !important}
.mb-0{margin-bottom:0 !important}
.mb-6{margin-bottom:6px !important}
.mb-8{margin-bottom:8px !important}
.mb-10{margin-bottom:10px !important}
.mb-12{margin-bottom:12px !important}
.mb-14{margin-bottom:14px !important}
.mb-18{margin-bottom:18px !important}
.mb-20{margin-bottom:20px !important}
.w-100{width:100% !important}
.text-right{text-align:right !important}
.no-underline{text-decoration:none !important}
.d-inline{display:inline !important}
/* ---------- Base surfaces (re-skin app.css via variables) ---------- */
body{background:var(--bg);color:var(--text)}
.stat,.login-card{background:var(--card);border-color:var(--line);color:var(--text);box-shadow:var(--shadow)}
.muted{color:var(--muted)}
h1,h2,h3{color:var(--text)}
a{color:var(--link)}
hr{border-color:var(--line)}
input,select,textarea{background:var(--card);color:var(--text);border-color:var(--line)}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
/* BUILD 129: "All of these text boxes are kind of ugly." Any text box / number box / select / text area that has NO
   class of its own (nobody styled it on purpose) was falling back to the browser's raw look â€” a thick dark inset
   border and a 2px-padded box (e.g. "Delete after [30] days"). 18 such controls were found across the app. They now
   get one consistent look. :where() keeps this at zero specificity, so every deliberately styled control (anything
   with a class: the notes editor, sticky notes, the kanban searchâ€¦) is untouched. */
:where(input:not([class]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]),
       select:not([class]), textarea:not([class])){
  font:inherit;font-size:14px;line-height:1.35;color:var(--text);background:var(--field-bg);
  border:1px solid var(--field-line);border-radius:var(--field-radius);padding:8px 16px;
  transition:border-color .12s,box-shadow .12s}
:where(input[type=number]:not([class])){padding-right:10px}
input:not([class]):focus,select:not([class]):focus,textarea:not([class]):focus,
.task-form :is(input,select,textarea):focus,.card form :is(input,select,textarea):focus,.filters :is(input,select,textarea):focus{
  outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.tasks-table td{border-color:var(--line)}
/* BUILD 133: the line above out-ranked app.css's .badge-urgent / -high / -low (same specificity, loaded later), so every coloured pill
   outside the Task Board rendered grey â€” including the Auto PO "Vendors needing POs" pills. The colour variants are restated here,
   after it, using the theme's tint variables so they read in both themes.  red = urgent, yellow = high, green = low. */
.preview,.due{color:var(--muted)}
.flash-success{background:#12351f;color:#9be7b4;border-color:#1f5133}
.flash-error{background:#3a1512;color:#ffb4a8;border-color:#5b241f}
html[data-theme="light"] .flash-success{background:#e6f4ea;color:#137333;border-color:#ceead6}
html[data-theme="light"] .flash-error{background:#fce8e6;color:#c5221f;border-color:#f5c6c3}
/* ---------- Header ---------- */
.topbar{background:var(--navy-800);border-bottom:3px solid var(--blue);gap:18px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
/* BUILD 183: the logo is a transparent PNG (just the lettering and the R, no navy box behind it), so it sits on whatever colour the theme gives the header. It used to be a 2172x724 picture with its
   own navy background, drawn 30px high (the artwork itself only ~16px of that, the rest was the box). The new file is cropped to the artwork, so the height below is the artwork's own height. */
.brand-logo{height:20px;width:auto;display:block}
/* ---------- Nav + dropdowns (single authoritative copy) ---------- */
.nav{display:flex;gap:4px;align-items:center;margin-left:6px}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:6px}







.caret{font-size:10px;opacity:.9}
.avatar{width:26px;height:26px;border-radius:50%;border:2px solid var(--blue)}
.user-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Dropdown: visibility/opacity + hover "bridge" so the 6px gap stays hoverable */







/* BUILD 133: "Add Bug" / "Add Feature" are indented under "Development" in the user menu. */


/* NEW (build 72): thin divider row inside a .dropdown â€” separates grouped
   items (e.g. CRM actions vs. read-only Fishbowl views under Customer). */

/* NEW (build 72): Auto PO â€” "highlight anything where the net amount is
   below zero in red." Same dark/light split already used by .trend-down. */
.net-negative{background:rgba(229,83,75,.16);color:var(--danger-fg);border-radius:6px}
html[data-theme="light"] .net-negative{background:#fce8e6;color:#c5221f}

/* FIXED (build 93, bug fix): "The 'Role' in the drop down for the user
   breaks if they are a Global Admin." Root cause: .role-chip had no
   white-space:nowrap/display, so the two-word label "global admin" wrapped
   onto two lines inside the small rounded-pill chip the moment the
   dropdown wasn't quite wide enough. A pill shape with border-radius:20px
   only looks right on a SINGLE line â€” wrapped, it renders as two stacked
   half-pills, exactly the "broken" look in the screenshot. .dd-name is
   now a wrapping flex row (name + chip side by side, wrapping the WHOLE
   chip to its own line on a narrow dropdown rather than wrapping WITHIN
   the chip), and the chip itself is inline-flex + white-space:nowrap so
   its own text can never wrap internally. */
.dd-name{font-weight:600;color:var(--text);font-size:14px;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.dd-email{color:var(--muted);font-size:12px}
.role-chip{background:var(--blue);color:#fff;border-radius:20px;padding:0 7px;font-size:10px;vertical-align:middle;display:inline-flex;align-items:center;white-space:nowrap}
.theme-toggle{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);color:#fff;width:34px;height:32px;border-radius:8px;cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center}
.theme-toggle:hover{background:rgba(255,255,255,.16)}
html[data-theme="dark"] .tt-light{display:none}
html[data-theme="light"] .tt-dark{display:none}
/* FIXED (build 85, bug fix): with a fixed 3-column CSS Grid, any KPI
   section whose card count isn't a multiple of 3 (e.g. the Customer
   Dashboard's 5-card grid, or the new "Combined across all locations"
   4-card grid) left a big empty gap on the last row instead of the lone
   card(s) filling it â€” see the "Combined Open Orders" card in that
   screenshot, stranded alone on the left with dead space to its right.
   Switched to Flexbox: each row's items now share out whatever width is
   actually available in THAT row (Grid's column tracks are shared across
   every row, which is what caused the gap; Flexbox rows are independent).
   Visually identical for the common case (an exact multiple of 3), and
   fills the gap gracefully everywhere else â€” used on 16 pages app-wide, so
   this is a strict improvement everywhere .kpi-grid appears, not just here. */
.kpi-grid{display:flex;flex-wrap:wrap;gap:16px;margin-bottom:8px}
@media  (max-width:760px){
  .kpi-grid{flex-direction:column}
}
.kpi-card{background:var(--card-2);border:1px solid var(--line);border-radius:10px;padding:18px 20px;flex:1 1 240px}
.kpi-card.highlight{border-left:5px solid var(--blue)}
/* BUILD 150: the orange accent line marks the FIRST card in a row. A tile the person has moved to second place (My Dashboard lets you reorder them) or a
   second highlighted card on a page used to carry it too, which looked like a mistake â€” only the first card keeps it. */
.kpi-grid > .kpi-card.highlight:not(:first-child){border-left:1px solid var(--line)}
/* BUILD 150: the goal bar â€” a tick where the pace says we should be today (goals for the whole year) */
.goal-pace{position:absolute;top:0;bottom:0;width:3px;margin-left:-1px;background:#fff;box-shadow:0 0 0 1px rgba(11,21,36,.55);z-index:2}
/* BUILD 150: Department page > KPI goals â€” one card per goal */
.goal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,380px),1fr));gap:16px;margin-top:14px}
.goal-item{background:var(--card-2);border:1px solid var(--line);border-radius:14px;padding:16px 18px;display:flex;flex-direction:column;gap:12px;min-width:0}
.goal-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.goal-head h3{margin:0 0 2px;font-size:15px;line-height:1.3}
.goal-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.goal-stats > div{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 10px;min-width:0}
.gs-l{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted)}
.gs-v{display:block;font-size:18px;font-weight:700;margin-top:2px;overflow-wrap:anywhere;line-height:1.25}
.goal-item .goal-bar{margin-top:0}
.goal-now{margin:0;font-size:13px;color:var(--text-soft)}
.goal-form{margin:0;padding-top:12px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:10px}
.goal-fields{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:10px}
.goal-fields label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted);min-width:0}
.goal-fields select,.goal-fields input{width:100%;max-width:none}
.goal-input{display:flex;flex-direction:column;gap:3px;min-width:0}
.goal-suffix{font-size:11px;color:var(--muted);line-height:1.25}
.goal-preview{margin:0;min-height:18px}
.goal-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
@media   (max-width:520px){.goal-fields{grid-template-columns:1fr}}
.kpi-title{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
.kpi-value{color:var(--ink);font-size:30px;font-weight:800;line-height:1.1}
.kpi-subtext{margin-top:8px;color:var(--muted);font-size:12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.trend-badge{display:inline-block;padding:1px 8px;border-radius:20px;font-weight:700;font-size:11px}
.trend-up{background:#12351f;color:var(--good-fg)}
.trend-down{background:#3a1512;color:var(--danger-fg)}
html[data-theme="light"] .trend-up{background:#e6f4ea;color:#137333}
html[data-theme="light"] .trend-down{background:#fce8e6;color:#c5221f}
.kpi-offline{border-left:4px solid var(--hivis);display:flex;gap:10px;flex-wrap:wrap;align-items:baseline}
/* ---------- Charts ---------- */
.chart-card{padding:16px 18px}
.chart-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:6px;gap:10px}
.chart-svg{width:100%;height:auto;display:block}
.chart-empty{color:var(--muted);font-size:13px;padding:20px;text-align:center}
html[data-theme="dark"] .chart-svg line{stroke:#263a5c !important}
html[data-theme="dark"] .chart-svg text{fill:#8fa0b6 !important}
/* ---------- Clickable stat cards ---------- */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
@media  (max-width:760px){
  .stat-grid{grid-template-columns:repeat(2,1fr)}
}
.stat-link{display:flex;flex-direction:column;align-items:center;justify-content:center;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:18px;text-align:center;text-decoration:none;color:var(--text);transition:transform .08s,box-shadow .12s,border-color .12s}
.stat-link:hover{transform:translateY(-2px);box-shadow:0 6px 18px rgba(0,0,0,.35);border-color:var(--blue);text-decoration:none}
.stat-link .num{display:block;font-size:30px;font-weight:800;color:var(--blue)}
.stat-link .lbl{color:var(--muted);font-size:13px;margin-top:2px}
/* ---------- Rows / data tables ---------- */
.row{border-color:var(--line);color:var(--text)}
.row:hover{background:rgba(255,255,255,.04)}
html[data-theme="light"] .row:hover{background:#f8f9fa}
.tlink{color:var(--link)}
.num-cell{text-align:right;font-variant-numeric:tabular-nums}
/* ---------- Login ---------- */
.login-wrap{background:linear-gradient(135deg,#12233b,#0b1524)}
.login-card .tagline{color:var(--blue);font-weight:600;margin:-2px 0 14px;font-size:14px}
.login-card h1 .accent{color:var(--blue)}
/* ---------- Settings (left-nav + panels) ---------- */
.settings-shell{display:grid;grid-template-columns:240px 1fr;gap:20px;align-items:start}
@media  (max-width:720px){
  .settings-shell{grid-template-columns:1fr}
}
.settings-nav{display:flex;flex-direction:column;gap:4px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:8px;box-shadow:var(--shadow)}
.snav-item{display:flex;gap:10px;padding:10px 12px;border-radius:10px;color:var(--text);text-decoration:none}
.snav-item:hover{background:rgba(255,255,255,.05)}
html[data-theme="light"] .snav-item:hover{background:#f4f6f8}
.snav-item.active{background:rgba(var(--accent-rgb),.14)}
.snav-item.active .snav-title{color:var(--blue)}
.snav-icon{font-size:18px}
.snav-text{display:flex;flex-direction:column}
.snav-title{font-weight:600;font-size:14px}
.snav-desc{font-size:12px;color:var(--muted)}
.settings-panel{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:var(--shadow);min-height:280px}
/* Toggle switch + widget rows */
.widget-list{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}
.widget-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card-2);cursor:pointer}
.widget-row input{position:absolute;opacity:0;width:0;height:0}
.widget-label{font-weight:500}
.switch-track{width:38px;height:22px;border-radius:20px;background:#8894a5;position:relative;flex:none;transition:background .15s}
.switch-thumb{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .15s}
.widget-row input:checked + .switch-track,.switch input:checked + .switch-track{background:#34a853}
.widget-row input:checked + .switch-track .switch-thumb,.switch input:checked + .switch-track .switch-thumb{transform:translateX(16px)}
.switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-size:12px;color:var(--muted)}
.switch-label{font-weight:600}
/* Bucket list (settings) */
.bucket-list{list-style:none;margin:0 0 16px;padding:0;display:flex;flex-direction:column;gap:8px}
.bucket-row{display:flex;align-items:center;gap:12px;background:var(--card-2);border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:12px;padding:10px 12px}
.bucket-row.is-done{border-left-color:#34a853}
.bucket-reorder form{display:flex;flex-direction:column;gap:2px;margin:0}
.bucket-dot{width:12px;height:12px;border-radius:50%;background:var(--blue);flex:none}
.bucket-dot.new{background:#8894a5}
.bucket-main{display:flex;align-items:center;gap:12px;flex:1;margin:0;flex-wrap:wrap}
.bucket-label{flex:1;min-width:160px;padding:8px 11px;border:1px solid var(--line);border-radius:9px;font-size:14px;font-weight:500;background:var(--card);color:var(--text)}
.bucket-del{margin:0}
/* NEW (build 93, feature): My Dashboard drag-and-drop layout editor â€”
   "move them around like the Task Board where it is a drag and drop ...
   ability to [add] section headers." Reuses .bucket-list/.bucket-row
   (same rows as Board columns/Field Sections) but swaps the old â–²â–¼
   up/down-arrow controls for an actual drag handle + native HTML5 drag
   events (see dashboard-layout.js), matching the Task Board's own
   drag-and-drop interaction model instead of click-to-swap arrows.
   Still used by the Settings > My Dashboard editor list. */
.dash-layout-list .bucket-row{cursor:grab}
.dash-layout-list .bucket-row.dragging{opacity:.4}
.dash-layout-list .drag-handle{cursor:grab;color:var(--muted);font-size:16px;line-height:1;flex:none;padding:0 2px}
.dash-layout-list .drag-handle:active{cursor:grabbing}
/* Section headers get a visually distinct row (no colored dot, bold
   label, slightly different left-border accent) so they read as a
   structural divider even while sitting in the SAME draggable list as
   ordinary widget rows. */
.dash-layout-header{border-left-color:var(--hivis,#FDB515)}
.dash-header-label{color:var(--text)}
/* NEW (build 96, feature): "I want to be able to rename the headers." The
   header label is now an <input> (see settings/index.php) instead of a
   plain <span> â€” sized/styled to still read as a bold section title, not
   like an ordinary form field, even though it's editable. */
input.dash-header-label{font-weight:700;color:var(--text)}
/* TRIED then REVERTED (build 95 â†’ build 96): a set of .dash-card /
   .dash-board rules briefly made every widget on the LIVE My Dashboard
   page directly draggable, mirroring the Task Board. Removed â€” see
   dashboard-layout.js and dashboard/index.php's build 96 doc comments for
   why (nested links inside widgets fought with native browser drag).
   Reordering now lives only in the .dash-layout-list rows above, inside
   Settings > My Dashboard, where there's no competing interactive content. */
.bucket-add{display:flex;align-items:center;gap:12px;padding:12px;border:1px dashed var(--line);border-radius:12px;flex-wrap:wrap}
.bucket-add input[type=text]{flex:1;min-width:200px;padding:8px max(11px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);background:var(--field-bg);color:var(--text)}
/* Settings misc */
.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
@media  (max-width:640px){
  .mini-grid{grid-template-columns:1fr}
}
.mini-card{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:var(--card-2)}
.integ-card{display:flex;gap:14px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--card-2);margin-bottom:12px}
.integ-icon{font-size:28px}
.integ-body h3{margin:0 0 4px;font-size:15px}
.ro-list{margin:0;padding-left:18px}
.ro-list li{padding:3px 0}
.cf-list .cf-item{display:flex;justify-content:space-between;padding:7px 0;border-bottom:1px solid var(--line)}
.cf-item dt{font-weight:600;color:var(--muted)}
/* Goal progress bar (Warehouse KPI) */
.goal-bar{position:relative;height:22px;border-radius:12px;background:var(--card-2);border:1px solid var(--line);margin-top:12px;overflow:hidden}
.goal-fill{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,rgb(var(--accent-rgb)),var(--hivis))}
.goal-label{position:relative;z-index:1;display:inline-block;margin:2px 6px;font-size:12px;font-weight:700;color:#fff;line-height:16px;padding:0 9px;border-radius:9px;background:rgba(11,21,36,.68)}
/* ===================================================================
   Kanban board (theme-aware; wins over app.css light styles)
   =================================================================== */
.board{display:flex;gap:14px;align-items:flex-start;overflow-x:auto;padding-bottom:14px}
.board .column{flex:0 0 300px;max-width:300px;background:var(--card-2,#12213a);border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;max-height:calc(100vh - 220px)}
.board .col-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line);border-top-left-radius:12px;border-top-right-radius:12px;background:transparent;border-left:3px solid var(--blue)}
.board .col-head.col-done{border-left-color:#34a853}
.board .done-flag{color:var(--good-fg)}
.board .col-title{color:var(--text);font-weight:700;font-size:12px;letter-spacing:.04em;text-transform:uppercase}
.board .col-count{background:rgba(255,255,255,.10);color:var(--text-soft,#aebcce);border-radius:20px;padding:1px 9px;font-size:12px;font-weight:600;min-width:22px;text-align:center}
html[data-theme="light"] .board .col-count{background:#eef1f5;color:#5f6b7a}
.board .col-body{padding:10px;display:flex;flex-direction:column;gap:10px;overflow-y:auto;min-height:60px;flex:1}
.board .col-body.drag-over{outline:2px dashed var(--blue);outline-offset:-6px;border-radius:8px;background:rgba(var(--accent-rgb),.06)}
.board .kcard{background:var(--card,#152740);border:1px solid var(--line);border-radius:10px;padding:11px 12px;cursor:grab;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:box-shadow .12s,transform .05s,border-color .12s}
.board .kcard:hover{box-shadow:0 4px 12px rgba(0,0,0,.35);border-color:var(--blue)}
.board .kcard.dragging{opacity:.55;transform:rotate(1.5deg);cursor:grabbing}
.board .kcard.is-blocked{border-left:3px solid #e5534b}
.board .kcard.card-done .kcard-title{text-decoration:line-through;color:var(--muted)}
.board .kcard-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;gap:6px}
.board .kcard-icons{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px}
.board .kcard-title{display:block;color:var(--text);font-weight:600;font-size:14px;line-height:1.3;text-decoration:none}
.board .kcard-title:hover{color:var(--blue)}
.board .kcard-notes{color:var(--muted);font-size:12px;margin:6px 0 0;line-height:1.4}
.board .kcard-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.board .chip{display:inline-flex;align-items:center;gap:4px;background:rgba(255,255,255,.06);color:var(--text-soft,#aebcce);border-radius:20px;padding:2px 8px;font-size:11.5px}
html[data-theme="light"] .board .chip{background:#f1f3f4;color:#3c4043}
.board .chip-overdue{background:rgba(229,83,75,.18);color:var(--danger-fg)}
html[data-theme="light"] .board .chip-overdue{background:#fce8e6;color:#c5221f}
.board .lock{color:var(--danger-fg)}
.filters .hint{color:var(--muted)}
/* ---------- Category badges + group header rows ---------- */
.badge-cat{font-weight:600}
/* color set inline per option */
tr.group-row td{background:rgba(255,255,255,.05);font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
html[data-theme="light"] tr.group-row td{background:#f4f6f8;color:#5f6b7a}
tr.group-row .count-pill{margin-left:6px}
/* ---------- Fishbowl order-lookup panel (task form) ---------- */
.fb-lookup{border-radius:8px;padding:8px 10px;line-height:1.5}
.fb-lookup.ok{background:rgba(52,168,83,.12);border:1px solid rgba(52,168,83,.35);color:var(--text)}
.fb-lookup.warn{background:rgba(253,181,21,.14);border:1px solid rgba(253,181,21,.4);color:var(--text)}
.fb-lookup.muted{color:var(--muted)}
.fb-card b{color:var(--blue)}
.warn-txt{color:var(--warn-fg)}
/* ---------- Footer version chip ---------- */
.build-chip{opacity:.75;font-variant-numeric:tabular-nums;color:inherit;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}
.build-chip:hover{opacity:1;color:var(--blue)}
/* ---------- Categories management page ---------- */
.cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.cat-row{display:flex;align-items:center;gap:10px;background:var(--card-2);border:1px solid var(--line);border-radius:12px;padding:8px 12px;flex-wrap:wrap}
.cat-swatch{width:16px;height:16px;border-radius:50%;flex:none;box-shadow:0 0 0 3px rgba(255,255,255,.06)}
.cat-form{display:flex;align-items:center;gap:8px;margin:0}
.cat-label{padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--text);min-width:180px}
.cat-color{width:38px;height:32px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--card)}
.cat-del{margin:0}
.cat-preview{margin-left:auto}
.cat-add{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.cat-add input[type=text]{flex:1;min-width:200px;padding:8px max(11px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);background:var(--field-bg);color:var(--text)}
.cat-add input[type=color]{width:38px;height:36px;border:1px solid var(--line);border-radius:8px}
/* ---------- Custom Fields â€” list + single-field editor ---------- */
.field-section{margin-bottom:22px}
.fs-head{display:flex;align-items:center;gap:8px;margin:0 0 10px}
.field-list{display:flex;flex-direction:column;gap:8px}
.field-item{display:flex;align-items:center;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px;box-shadow:var(--shadow)}
.field-item:hover{border-color:var(--blue)}
.fi-icon{font-size:20px;width:26px;text-align:center}
.fi-main{flex:1;min-width:0}
.fi-label{font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px}
.fi-meta{color:var(--muted);font-size:12.5px;text-transform:capitalize;margin-top:2px}
.fi-actions{display:flex;gap:8px;align-items:center}
.fi-actions form{margin:0}
.req-chip{background:rgba(var(--accent-rgb),.15);color:var(--link);border-radius:20px;padding:1px 8px;font-size:11px;font-weight:600;text-transform:none}
.field-empty{padding:16px;border:1px dashed var(--line);border-radius:12px;text-align:center}
.field-editor .chk-row{display:flex;align-items:center;gap:8px;margin:6px 0 16px;font-weight:500}
.opt-builder{border:1px solid var(--line);border-radius:12px;padding:16px 18px;margin-top:6px;background:var(--card-2)}
.opt-builder legend{font-weight:600;padding:0 8px}
.opt-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.opt-row{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.opt-grip{color:var(--muted);cursor:default;user-select:none;font-size:13px;letter-spacing:-2px}
.opt-color{width:38px;height:32px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--card);flex:none}
.opt-input{flex:1;min-width:120px;padding:8px max(10px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);background:var(--field-bg);color:var(--text)}
.opt-preview{min-width:90px}

/* FIXED (v62, bug fix): previously ".nav{display:none}" alone â€” hiding EVERY
   nav link on mobile with NOTHING to replace it (Trends, KPI, Tasks,
   Notebooks, Sticky Notes, Orders, Admin all became unreachable on a phone).
   Now the desktop nav + admin/user dropdown cluster are hidden and replaced
   by the hamburger + #mobile-drawer (full styles further down this file,
   Build 62 section) which contains the exact same links in a touch-friendly
   vertical list. */
@media  (max-width:820px){
  .nav{display:none}
  .topbar-right{display:none}
}
/* =====================================================================
   Rampart Garrison â€” Custom Field editor layout FIX
   APPEND this to the END of index/assets/css/rampart-theme.css.

   Problem: app.css has ".task-form input{width:100%}" which made the little
   color swatch stretch full-width (a big bar) and pushed the text input +
   preview off the row. These selectors are more specific so they win, and
   we also clear the inherited margin-top:5px.
   ===================================================================== */
/* Row container: keep everything on one line, wrap gracefully if narrow */
.field-editor .opt-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}
/* Kill the inherited top margin from .task-form input */
.field-editor .opt-row input{ margin-top:0; }
/* Color swatch: small fixed square (beats .task-form input width:100%) */
.field-editor .opt-row input[type=color].opt-color{
  width:38px;
  height:32px;
  flex:0 0 38px;      /* fixed, never grow/shrink */
  padding:0;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--card);
  cursor:pointer;
}
/* Label input: take the remaining space, not 100% */
.field-editor .opt-row input[type=text].opt-input{
  width:auto;
  flex:1 1 auto;
  min-width:120px;
  padding:8px 10px;
}
/* Preview + buttons stay compact on the right */
.field-editor .opt-row .opt-preview{ flex:0 0 auto; min-width:90px; }

.field-editor .opt-row .opt-grip{ flex:0 0 auto; }
/* The Required checkbox row was floating oddly â€” align it left, normal size */
.field-editor .chk-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 16px;
}
.field-editor .chk-row input[type=checkbox]{
  width:auto;          /* was stretching via .task-form input */
  margin:0;
  flex:0 0 auto;
}
/* Fishbowl order info panel (task detail) */
.order-info-card h2{margin:0 0 12px;font-size:16px}
.oi-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
@media  (max-width:640px){
  .oi-grid{grid-template-columns:1fr 1fr}
}
.oi-item{display:flex;flex-direction:column;gap:3px;background:var(--card-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px}
.oi-k{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.oi-v{color:var(--text);font-weight:600;font-size:15px}
/* Rampart Garrison â€” WYSIWYG rich text editor (Build 33) */









/* Warden mail composers need no generic notes prompt. */

/* Content styling inside the editor */








/* When the RTE takes over, drop the old side-by-side markdown grid */


/* Rendered rich text on the task DETAIL page (.markdown-body reused) */
.markdown-body h1{font-size:22px;margin:.5em 0 .3em}
.markdown-body h2{font-size:18px;margin:.5em 0 .3em}
.markdown-body h3{font-size:16px;margin:.5em 0 .3em}
.markdown-body blockquote{border-left:3px solid var(--blue);margin:.4em 0;padding:2px 12px;color:var(--muted)}
.markdown-body a{color:var(--blue);text-decoration:underline}
.markdown-body ul,.markdown-body ol{padding-left:22px}
/* =====================================================================
   Rampart Garrison â€” WYSIWYG editor SIZE FIX (Build 34)
   APPEND to the END of index/assets/css/rampart-theme.css (after the
   Build-33 _wysiwyg block). Higher specificity so the tiny surface grows.
   Cause: the editor sits inside the old ".md-editor" grid (2 columns),
   which squeezed the surface. These rules force a full-width block layout
   and a tall, drag-resizable editing area.
   ===================================================================== */
/* Neutralize the old markdown 2-column grid when the RTE is active */

/* The editor wrapper takes the full width */

/* The editable surface: tall + resizable (this is the key fix) */

/* Make sure the textarea + old preview are truly hidden in RTE mode */

/* Toolbar shouldn't shrink or wrap oddly */

/* =====================================================================
   Rampart Garrison â€” Notes CSS (Build 44, consolidated & de-duplicated)
   Merges Build 41 (layout) + 42 (canvas) + 43 (fixes) into ONE clean file.
   Removed duplicates: .note-canvas, .note-box, .nb-handle/.nb-del, .nb-body,
   .notes-editor .md-editor, and the notebook â‹¯ menu popover. Dropped the dead
   flowing-editor (.rte) rules â€” Notes pages use the free-form canvas now.
   Layout: full-screen Â· notebook TABS on top Â· pages LEFT Â· canvas fills rest.
   ===================================================================== */
/* ---------- Toggle switch fix (hide raw checkbox, keep the pill) ---------- */
.switch{display:inline-flex;align-items:center;gap:8px;cursor:pointer;position:relative}
.switch input[type="checkbox"]{
  position:absolute !important;opacity:0 !important;width:0 !important;height:0 !important;
  margin:0 !important;pointer-events:none;
}
.switch input[type="checkbox"]:checked + .switch-track{background:#34a853}
.switch input[type="checkbox"]:checked + .switch-track .switch-thumb{transform:translateX(16px)}
/* ---------- Full-screen shell ---------- */
.notes-app{
  position:fixed;left:0;right:0;top:56px;bottom:0;   /* top = app header height */
  display:flex;flex-direction:column;background:var(--bg);z-index:5;
}
body:has(.notes-app) .footer{display:none}
/* ---------- Notebook tabs (top bar) ---------- */
.nb-tabs{display:flex;align-items:center;gap:6px;padding:8px 10px;
  background:var(--card);border-bottom:1px solid var(--line);min-height:48px}
.nb-tabs-toggle{background:transparent;border:1px solid var(--line);color:var(--text);
  width:30px;height:30px;border-radius:8px;cursor:pointer;flex:none;font-size:14px}
.nb-tabs-toggle:hover{background:rgba(255,255,255,.06)}
.nb-tabs-scroll{display:flex;gap:6px;overflow-x:auto;flex:1;align-items:center}
.nb-tab{position:relative;display:flex;align-items:center;border:1px solid var(--line);
  border-radius:10px 10px 0 0;background:var(--card-2);white-space:nowrap}
.nb-tab.active{border-bottom-color:transparent;background:var(--card);
  box-shadow:inset 0 3px 0 var(--nb, var(--blue))}
.nb-tab-link{display:flex;align-items:center;gap:8px;padding:8px 12px;color:var(--text);text-decoration:none;font-size:14px}
.nb-tab-link:hover{text-decoration:none}
.nb-tab .nb-dot{width:10px;height:10px;border-radius:50%;flex:none}
.nb-tab .nb-title{font-weight:600;max-width:200px;overflow:hidden;text-overflow:ellipsis}
.nb-tab .nb-count{color:var(--muted);font-size:11px;background:rgba(255,255,255,.08);border-radius:20px;padding:0 7px}
/* per-notebook options (â‹¯) trigger */
.nb-menu{margin-right:6px;position:static}
.nb-menu summary{list-style:none;cursor:pointer;color:var(--muted);padding:2px 6px;border-radius:6px}
.nb-menu summary::-webkit-details-marker{display:none}
.nb-menu[open] summary{background:rgba(255,255,255,.08)}
/* â‹¯ popover â€” pinned below the tab, escapes the scrolling strip */
.nb-tab .nb-menu-body{
  position:absolute;top:44px;left:auto;right:auto;z-index:1000;min-width:260px;
  background:var(--card);border:1px solid var(--line);border-radius:10px;
  box-shadow:0 12px 34px rgba(0,0,0,.5);padding:12px;
  display:flex;flex-direction:column;gap:10px;
}
.nb-tab .nb-menu-body .nb-rename{display:flex;gap:6px;align-items:center}
.nb-tab .nb-menu-body input[type=text]{flex:1;min-width:0;padding:7px max(9px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);background:var(--field-bg);color:var(--text)}
.nb-tab .nb-menu-body input[type=color]{width:34px;height:32px;border:1px solid var(--line);border-radius:8px;padding:0}

/* Don't let the tab strip clip an open menu (with a :has() fallback) */
.nb-tabs:has(.nb-menu[open]),
.nb-tabs-scroll:has(.nb-menu[open]){overflow:visible}
@supports   not (selector(:has(*))){
  .nb-tabs,.nb-tabs-scroll{overflow:visible}
}
/* add-notebook popover */
.nb-add-wrap{position:relative;flex:none}
.nb-add{list-style:none;cursor:pointer;width:30px;height:30px;border:1px solid var(--line);border-radius:8px;
  display:flex;align-items:center;justify-content:center;color:var(--text);font-size:16px}
.nb-add::-webkit-details-marker{display:none}
.nb-add:hover{background:rgba(255,255,255,.06);border-color:var(--blue);color:var(--blue)}
.nb-new{position:absolute;top:100%;right:0;z-index:20;margin-top:4px;display:flex;gap:8px;align-items:center;
  background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.4);padding:10px}
.nb-new input[type=text]{padding:7px max(9px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);background:var(--field-bg);color:var(--text);min-width:180px}
.nb-new input[type=color]{width:34px;height:32px;border:1px solid var(--line);border-radius:8px;padding:0}
/* collapse the tabs strip */
.notes-app.tabs-collapsed .nb-tabs-scroll,
.notes-app.tabs-collapsed .nb-add-wrap{display:none}
/* ---------- Body: pages (left) + editor (right) ---------- */
.notes-body{flex:1;display:flex;min-height:0}
.notes-pages{width:270px;flex:none;background:var(--card);border-right:1px solid var(--line);
  display:flex;flex-direction:column;overflow:hidden}
.np-head{display:flex;align-items:center;gap:8px;padding:12px 14px;border-bottom:1px solid var(--line)}
.pages-toggle{background:transparent;border:1px solid var(--line);color:var(--text);width:26px;height:26px;
  border-radius:7px;cursor:pointer;flex:none}
.pages-toggle:hover{background:rgba(255,255,255,.06)}
.np-title{flex:1;font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.np-add{background:transparent;border:1px solid var(--line);color:var(--text);width:26px;height:26px;border-radius:7px;cursor:pointer;font-size:15px}
.np-add:hover{background:rgba(255,255,255,.06);border-color:var(--blue);color:var(--blue)}
.pg-list{list-style:none;margin:0;padding:6px;overflow:auto;flex:1}
.pg-item{border-radius:9px}
.pg-item.active{background:rgba(var(--accent-rgb),.10)}
.pg-link{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:10px;border-radius:9px;color:var(--text);text-decoration:none}
.pg-link:hover{background:rgba(255,255,255,.05);text-decoration:none}
.pg-item.active .pg-link{border-left:3px solid var(--blue);padding-left:7px}
.pg-title{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pg-date{color:var(--muted);font-size:12px;flex:none}
/* collapsed rail to reopen pages */
.pages-rail{display:none;width:24px;flex:none;background:var(--card);border:none;border-right:1px solid var(--line);
  color:var(--muted);cursor:pointer;font-size:16px}
.pages-rail:hover{background:rgba(255,255,255,.05);color:var(--text)}
.notes-app.pages-collapsed .notes-pages{display:none}
.notes-app.pages-collapsed .pages-rail{display:block}
/* ---------- Editor pane ---------- */
.notes-editor{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--card)}
.ed-head{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.ed-title{flex:1;font-size:20px;font-weight:700;background:transparent;border:none;color:var(--text);outline:none;padding:4px 2px}
.ed-title:focus{border-bottom:2px solid var(--blue)}
.ed-actions{display:flex;align-items:center;gap:12px}
.save-status{font-size:12px}
.save-status.ok{color:var(--good-fg)}
.save-status.err{color:var(--danger-fg)}
.ed-empty{padding:40px;text-align:center}
.notes-editor .md-editor{flex:1;display:flex;flex-direction:column;min-height:0;padding:0;margin:0}
/* ---------- Canvas toolbar ---------- */







/* ---------- Canvas surface ---------- */
.note-canvas{position:relative;flex:1;min-height:0;height:100%;overflow:auto;cursor:text;
  background:radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:22px 22px}
/* Floating text box (compact, auto-height, resizable both directions) */
.note-box{position:absolute;width:320px;min-width:140px;min-height:40px;height:auto;max-height:none;
  background:var(--card);border:1px solid var(--line);border-radius:10px;
  box-shadow:0 2px 10px rgba(0,0,0,.25);resize:both;overflow:hidden;padding:0}
.note-box.dragging{opacity:.9;box-shadow:0 10px 26px rgba(0,0,0,.5)}
.note-box.sel,.note-box:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.20)}
/* Handle + delete */
.note-box .nb-handle{position:absolute;top:4px;left:6px;z-index:3;color:var(--muted);cursor:grab;
  font-size:12px;user-select:none;opacity:.72;transition:opacity .1s}
.note-box .nb-del{position:absolute;top:2px;right:4px;z-index:3;width:20px;height:20px;border:none;border-radius:6px;
  background:transparent;color:var(--muted);cursor:pointer;font-size:12px;line-height:1;opacity:.72;transition:opacity .1s}
.note-box:hover .nb-handle,.note-box:focus-within .nb-handle,
.note-box:hover .nb-del,.note-box:focus-within .nb-del{opacity:1}
.note-box .nb-del:hover{background:rgba(229,83,75,.15);color:var(--danger-fg)}
/* Editable body */
.note-box .nb-body{outline:none;padding:22px 12px 12px;min-height:24px;height:auto;
  color:var(--text);font-size:14px;line-height:1.55;overflow-wrap:anywhere}
.note-box .nb-body:empty::before{content:"Typeâ€¦";color:var(--muted)}
.note-box .nb-body h1{font-size:20px;margin:.3em 0}
.note-box .nb-body h2{font-size:17px;margin:.3em 0}
.note-box .nb-body ul,.note-box .nb-body ol{padding-left:20px;margin:.3em 0}
.note-box .nb-body a{color:var(--blue);text-decoration:underline}
/* ---------- Responsive ---------- */
@media  (max-width:820px){
  .notes-pages{width:210px}
}
/* Images inside boxes */
.note-box .nb-body img{max-width:100%;height:auto;border-radius:8px;display:block;margin:6px 0}
/* Callout box */
.note-box .cn-callout{border-left:4px solid var(--blue);background:rgba(var(--accent-rgb),.10);
  border-radius:8px;padding:10px 12px;margin:6px 0;color:var(--text)}
/* Quote */
.note-box blockquote{border-left:3px solid var(--line);margin:6px 0;padding:4px 12px;color:var(--muted)}
/* Code block */
.note-box .cn-code,.note-box pre{background:#0e1a2e;border:1px solid var(--line);border-radius:8px;
  padding:10px 12px;margin:6px 0;overflow:auto}
.note-box .cn-code code,.note-box pre code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;color:#e7edf5;white-space:pre;line-height:1.5}
html[data-theme="light"] .note-box .cn-code,html[data-theme="light"] .note-box pre{background:#f6f8fa}
html[data-theme="light"] .note-box .cn-code code{color:#1f2933}
/* Tables */
.note-box .cn-table{border-collapse:collapse;width:100%;margin:6px 0;font-size:13px}
.note-box .cn-table td,.note-box .cn-table th{border:1px solid var(--line);padding:6px 8px;min-width:40px;
  vertical-align:top;color:var(--text)}
.note-box .cn-table th{background:rgba(255,255,255,.05);font-weight:600}
.note-box .cn-table tr:hover td{background:rgba(255,255,255,.03)}
/* Video embeds (responsive 16:9) */
.note-box .cn-video{position:relative;width:100%;padding-top:56.25%;margin:6px 0;border-radius:8px;overflow:hidden;background:#000}
.note-box .cn-video iframe,.note-box .cn-video video{position:absolute;inset:0;width:100%;height:100%;border:0}
/* Drag-drop highlight */
.note-box.drop{outline:2px dashed var(--blue);outline-offset:-4px}
.note-canvas.drop{outline:2px dashed var(--blue);outline-offset:-8px;border-radius:10px}
/* Inline assignee dropdown in the Tasks list */
.assignee-inline{margin:0}
.assignee-inline select{
  padding:6px max(8px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);
  background:var(--field-bg);color:var(--text);font-size:13px;max-width:170px;
}
.assignee-inline select:hover{border-color:var(--blue)}
/* Unassigned pill (task detail) */
.pill-unassigned{background:rgba(255,255,255,.06);color:var(--muted)}
html[data-theme="light"] .pill-unassigned{background:#f1f3f4;color:#5f6368}
/* Global Custom Fields â€” section grouping (task detail) */
.cf-section{margin-bottom:16px}
.cf-section:last-child{margin-bottom:0}
/* Field reorder buttons (Custom Fields list) */
.field-item{align-items:center}
.fi-reorder{display:flex;flex-direction:column;gap:2px;flex:none}
.fi-reorder form{display:flex;flex-direction:column;gap:2px}
/* ---- item 15: note boxes auto-scale height. 3.1.10: and the grip at the bottom-right drags both ways again (assets/js/notes-canvas.js keeps the height you drag to as a minimum) ---- */
.note-box{ resize:both !important; }
/* ---- item 6: field-list grouped-by-section on /fields ---- */
.fs-group{ margin-bottom: 18px; }
.fs-group:last-child{ margin-bottom: 0; }
/* ---- field editor: section pickers (global vs personal) ---- */
.section-picker{ display:contents; }
/* NOTE (v61 cleanup): the old plain-checkbox ".job-duties-list .chk" rule
   that lived here was DEAD CSS â€” team/index.php was already switched to the
   toggle-switch markup (class="switch") back in Build 55, so ".chk" was
   never actually applied to job duties anymore. Removed to avoid confusion;
   the active rules are ".job-duties-list" + ".job-duties-list .switch..."
   further down this file (Build 55 section). */
/* ---- misc ---- */
.nowrap{ white-space:nowrap; }
/* =====================================================================
   FIX: notebook code block was white-on-white.
   Root cause candidates: either the append that themed .cn-code never made
   it into the deployed stylesheet, or the <pre>/<code> lost their class
   during sanitization on some notes. This version is BULLETPROOF: it themes
   <pre>/<code> INSIDE a note box by ELEMENT, not just by class, so it can
   never again depend on a class surviving intact. The class-based rules are
   kept too (belt & suspenders) and both agree on the same colors.
   ===================================================================== */
.note-box .nb-body pre,
.note-box .cn-code{
  background:#0e1a2e !important;
  border:1px solid var(--line);
  border-radius:8px;
  padding:10px 12px;
  margin:6px 0;
  overflow:auto;
}
.note-box .nb-body pre code,
.note-box .nb-body code,
.note-box .cn-code code{
  background:transparent !important;
  color:#e7edf5 !important;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12.5px;
  white-space:pre;
  line-height:1.5;
}
html[data-theme="light"] .note-box .nb-body pre,
html[data-theme="light"] .note-box .cn-code{ background:#f6f8fa !important; }
html[data-theme="light"] .note-box .nb-body pre code,
html[data-theme="light"] .note-box .nb-body code,
html[data-theme="light"] .note-box .cn-code code{ color:#1f2933 !important; }
/* =====================================================================
   Bug Tracker
   ===================================================================== */
/* =====================================================================
   Sticky Notes â€” Keep-style masonry-ish grid
   ===================================================================== */
.sticky-composer{max-width:600px;margin:0 auto 24px;border:1px solid var(--line);border-radius:10px;
  background:var(--card);box-shadow:var(--shadow);padding:12px 14px}
.sticky-composer-title{width:100%;border:none;background:transparent;color:var(--text);font-weight:700;
  font-size:15px;margin-bottom:6px;outline:none}
.sticky-composer textarea{width:100%;border:none;background:transparent;color:var(--text);resize:none;
  outline:none;font-size:14px;min-height:24px;overflow:hidden;display:block;line-height:1.45;font-family:inherit}
.sticky-composer-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
.sticky-grid{columns:4 240px;column-gap:16px}
@media  (max-width:1100px){
  .sticky-grid{columns:3 220px}
}
@media  (max-width:760px){
  .sticky-grid{columns:2 200px}
}
@media  (max-width:480px){
  .sticky-grid{columns:1}
}
.sticky-card{break-inside:avoid;margin-bottom:16px;border:1px solid rgba(0,0,0,.12);border-radius:10px;
  padding:12px 14px;box-shadow:0 1px 4px rgba(0,0,0,.2);position:relative;color:#20242b;display:flex;flex-direction:column}
.sticky-card > .sticky-body,.sticky-card > .sticky-checklist{flex:1 1 auto}
.sticky-card-top{display:flex;justify-content:flex-end;align-items:center;margin-bottom:2px}
.sticky-pin{background:transparent;border:none;cursor:pointer;font-size:14px;opacity:.6}
.sticky-pin.active{opacity:1}
.sticky-title{width:100%;border:none;background:transparent;font-weight:700;font-size:14px;margin-bottom:4px;outline:none;color:inherit}
.sticky-body{width:100%;border:none;background:transparent;resize:none;outline:none;font-size:13.5px;
  min-height:60px;color:inherit;font-family:inherit;overflow:hidden;display:block}
.sticky-card-actions{display:flex;align-items:center;gap:8px;margin-top:8px;opacity:0;transition:opacity .1s}
.sticky-card:hover .sticky-card-actions,.sticky-card:focus-within .sticky-card-actions{opacity:1}
.sticky-colors{display:flex;gap:4px;flex:1;flex-wrap:wrap}
.sticky-swatch{width:16px;height:16px;border-radius:50%;border:1px solid rgba(0,0,0,.2);cursor:pointer;padding:0}
/* =====================================================================
   Rampart Garrison â€” Team "Job" popover layout FIX (v52, bug 5)
   APPEND to the end of index/assets/css/rampart-theme.css.

   ROOT CAUSE: the Team page's Job popover reuses ".nb-menu-body" (the same
   class the Notebook tab-options popover uses), but its absolute-positioning
   rule was scoped specifically to ".nb-tab .nb-menu-body" (the notebook
   context) â€” it never matched ".job-menu .nb-menu-body" on the Team page.
   With no positioning at all, the popover rendered INLINE inside the table
   cell instead of floating, pushing every column sideways and blowing up
   the whole row â€” exactly what the screenshot showed.

   FIX: give the Team page's popover its OWN correctly-scoped absolute
   positioning, anchored to the <details class="job-menu"> element (which is
   made position:relative so the popover anchors to IT, not the whole row).
   ===================================================================== */
/* Bug Tracker stat cards are now <a> links (were <div>s) â€” reset link
   styling so they look/feel identical to before, plus a clear hover/active
   affordance now that they're clickable. */
.stat-link-card{
  text-decoration:none;
  color:inherit;
  cursor:pointer;
  transition:transform .08s ease, box-shadow .12s ease;
}
.stat-link-card:hover{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.stat-link-card.active{
  outline:2px solid var(--blue,#EA5B2B);
  outline-offset:-2px;
}
/* FIXED (v68, bug fix): "Job Roles â€” the toggle switches overlap the text
   for the job descriptions." ROOT CAUSE: app.css has a broad rule,
   ".card form label{display:block; margin-bottom:14px; ...}", which
   matches ANY <label> inside a <form> inside a .card â€” including
   <label class="switch"> here, since the Job popover form lives inside a
   .card (the Team page's table). By CSS specificity math, that rule
   (0,1,2 â€” one class + two type selectors) actually BEATS ".switch"'s own
   "display:inline-flex" (0,1,0 â€” one class only), since b(1)=b(1) ties and
   c(2) > c(0) decides it. That silently broke the switch's flex layout
   (no more inline-flex/align-items/gap), so the 22px-tall toggle track sat
   right up against the label text with no spacing and no vertical
   alignment â€” exactly the "overlap" reported.
   FIX: re-declare display/align-items/gap on THIS more specific selector
   (".job-duties-list .switch" = 0,2,0 â€” two classes â€” which beats the
   .card form label rule's 0,1,2 since b(2) > b(1)), so the switch's flex
   layout can never again be silently overridden by an unrelated, broader
   label rule elsewhere in the stylesheet. */
/* FIXED (build 93, bug fix): "On the Job drop down in the teams page, the
   'save' button is a little too high." .job-menu-body is a flex column
   with a single gap:10px applied uniformly between EVERY child (job title
   select, the job-duties-list block, and the Save button) â€” fine between
   the title and the duties list, but visually cramped between the last
   toggle switch and the Save button once the duties list itself already
   has its own internal 8px gaps making that section look "tall" and the
   final 10px gap look comparatively tight right above the button. Adding
   a bit of extra top margin on the Save button specifically (rather than
   increasing the shared gap, which would also push the duties list itself
   further from the title dropdown) gives the button proper breathing room
   without changing spacing anywhere else in the popover. */
/* FIXED (v61, bug fix): ".tag" was used already on the Task list (the
   "delegated" badge) but had NO styling defined anywhere â€” it rendered as
   plain unstyled text. Adding base styling here also makes the NEW
   ".tag-subtask" badge (below) actually visible. */
.tag{
  display:inline-block; font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:.03em; padding:2px 7px; border-radius:20px; margin-left:6px;
  vertical-align:middle; white-space:nowrap;
}
.tag-deleg{background:rgba(var(--accent-rgb),.15); color:var(--link); border:1px solid rgba(var(--accent-rgb),.35)}
/* NEW (v61, bug fix): "Task View - Sub Tasks" â€” a small badge so a sub-task
   is immediately recognizable in the Task list (previously nothing
   distinguished it from a regular task). Hover shows which task it belongs
   to via the title attribute set in tasks/index.php. */
.tag-subtask{background:rgba(143,160,182,.18); color:var(--muted); border:1px solid var(--line)}
/* =====================================================================
   Rampart Garrison â€” Build 62: Mobile UX overhaul + PWA
   APPEND to the end of index/assets/css/rampart-theme.css.

   Covers: hamburger button + slide-out mobile nav drawer (replaces the
   dead "hide .nav entirely" rule above), horizontally-scrollable tables
   (paired with the new .table-scroll wrapper div added around every
   <table> in the views), touch-friendly form/filter/button sizing,
   popover/dropdown width containment on small screens, and safe-area
   padding for notched phones (iPhone) now that the PWA can run edge-to-edge.
   ===================================================================== */
/* ---- Hamburger button ----
   FIXED (v64, bug fix): "still have the hamburger menu in full screen" (i.e.
   visible on desktop). ROOT CAUSE: this rule used to set "display:flex"
   UNCONDITIONALLY, with no media query. Meanwhile, the desktop-hide rule
   ("@media(min-width:821px){.hamburger{display:none}}") lives EARLIER in
   this file (see the "Mobile" section above). Both rules have IDENTICAL CSS
   specificity (a single class selector) â€” so per the cascade, whichever
   rule appears LATER in the file wins, regardless of a media query being
   present. Since this unconditional rule was appended near the end of the
   file (Build 62), it always won and overrode the earlier desktop
   "display:none", showing the hamburger at every screen width, including
   full desktop.
   FIX: "display" is no longer set here at all â€” it's controlled ONLY by
   the two media queries below (flex on mobile, none on desktop), so there
   is exactly one rule in effect for any given viewport width and no
   cascade-order ambiguity is possible, no matter where in the file either
   rule physically lives. */
.hamburger{
  margin-left:auto; background:transparent; border:1px solid rgba(255,255,255,.18);
  border-radius:8px; width:40px; height:40px; flex-direction:column;
  align-items:center; justify-content:center; gap:5px; cursor:pointer; flex:none;
}
@media  (max-width:820px){
  .hamburger{display:flex}
}
@media  (min-width:821px){
  .hamburger{display:none}
}
.hamburger span{display:block; width:20px; height:2px; background:#fff; border-radius:2px; transition:transform .18s ease, opacity .18s ease}
.hamburger[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger[aria-expanded="true"] span:nth-child(2){opacity:0}
.hamburger[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
/* ---- Mobile drawer + backdrop ---- */
.mobile-drawer-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:300;
  opacity:0; visibility:hidden; transition:opacity .2s ease, visibility .2s ease;
}
.mobile-drawer-backdrop.open{opacity:1; visibility:visible}
.mobile-drawer{
  position:fixed; top:0; right:0; bottom:0; width:min(82vw, 320px); z-index:310;
  background:var(--navy-800, #0a1a33); border-left:1px solid var(--line);
  transform:translateX(100%); transition:transform .22s ease;
  display:flex; flex-direction:column; overflow-y:auto;
  /* Safe-area padding so the drawer content isn't obscured by an iPhone notch/home-indicator. */
  padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom);
}
.mobile-drawer.open{transform:translateX(0)}
.mdr-head{display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--line); flex:none}
.mdr-title{font-weight:700; color:var(--text); font-size:15px}
.mdr-body{padding:8px 8px 24px; display:flex; flex-direction:column}
.mdr-link{
  display:block; padding:12px 14px; border-radius:8px; color:var(--text); text-decoration:none;
  font-size:15px; font-weight:500; min-height:44px; line-height:20px; box-sizing:border-box;
}
.mdr-link:hover, .mdr-link:active{background:rgba(255,255,255,.08); text-decoration:none}
.mdr-link.on{color:var(--blue); background:rgba(var(--accent-rgb),.12)}
.mdr-sub{padding-left:26px; font-size:14px; font-weight:400; color:var(--text-soft, #aebcce)}
.mdr-group-label{padding:14px 14px 4px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--muted)}
.mdr-sep{height:1px; background:var(--line); margin:10px 10px}
.mdr-danger{color:var(--danger-fg)}
.mdr-btn{
  background:transparent; border:none; text-align:left; width:100%; font-family:inherit; cursor:pointer;
}
/* Lock background scroll while the drawer is open. */
body.drawer-open{overflow:hidden}
/* ---- Responsive tables: pairs with the new .table-scroll wrapper div
   (added around every <table> in the views) so wide tables scroll
   horizontally on narrow screens instead of squeezing columns unreadably
   small or breaking the page layout. ---- */
.table-scroll{width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch}
.table-scroll > table{min-width:100%}
@media  (max-width:760px){
  /* Give table content a sane minimum width so columns don't crush into
     unreadable slivers â€” the wrapper scrolls instead. */
  .tasks-table, .data-table{min-width:640px}
}
/* EXCEPTION (Team page): the "job-menu" popover (job title/duties editor)
   is a <details> that floats ABOVE the table via position:absolute â€” but
   .table-scroll's overflow-x:auto would clip it vertically the instant it's
   open (setting overflow-x to anything but visible forces overflow-y to
   compute to 'auto' too, per the CSS spec). This releases the clip ONLY
   while a popover is actually open, using the same :has() pattern already
   used elsewhere in this file (see ".nb-tabs:has(.nb-menu[open])"). */
.table-scroll:has(.job-menu[open]){overflow:visible}
/* ---- General small-screen layout tightening ---- */
@media  (max-width:760px){
  .container{padding:0 14px; margin:16px auto}
  .page-head h1{font-size:20px}
  .head-actions{flex-wrap:wrap; gap:8px; width:100%}
  
  /* Filter bars: stack into a full-width column instead of a cramped
     wrapping row of tiny controls. */
  .filters{flex-direction:column; align-items:stretch}
  .filters input, .filters select, .filters .field-inline{width:100%}
  .filters .field-inline select{width:100%}
  
  /* Touch targets: bump tap-target height to ~44px (Apple HIG / Material
     guidance) and bump form font-size to 16px, which also stops iOS Safari
     from auto-zooming the page when a field is focused. */
  
  .filters input, .filters select,
  .task-form input, .task-form select, .task-form textarea,
  .card form input, .card form select, .card form textarea{
    font-size:16px; min-height:44px;
  }
  .task-form textarea, .card form textarea{min-height:88px}
  /* Popovers/dropdowns: constrain to the viewport instead of a fixed
     min-width that can push off-screen on a narrow phone. */
  
  .nb-tab .nb-menu-body{min-width:0; width:min(88vw, 280px)}
  /* Kanban board columns: slightly narrower so at least a column-and-a-bit
     is visible on a phone screen, hinting that it scrolls horizontally. */
  .board .column{flex:0 0 78vw; max-width:78vw}
  /* Stat grids already collapse to 2 columns at 760px (existing rule) â€”
     drop to a single column below 420px so numbers/labels don't crush. */
}
@media  (max-width:420px){
  .stat-grid{grid-template-columns:1fr}
  /* .kpi-grid is Flexbox now (see main rule above), not Grid â€” already
     stacks to one column below 760px via flex-direction:column, so no
     duplicate override is needed here anymore. */
}
/* ---- Safe-area padding for notched phones, now that this runs as an
   installed PWA (standalone display mode can render edge-to-edge). ---- */
.topbar{padding-left:max(16px, env(safe-area-inset-left)); padding-right:max(16px, env(safe-area-inset-right)); padding-top:max(10px, env(safe-area-inset-top))}
.footer{padding-bottom:max(12px, env(safe-area-inset-bottom))}
/* ---- "Install app" banner (see assets/js/pwa.js) ---- */
.pwa-install-banner{
  position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom));
  z-index:250; background:var(--card); border:1px solid var(--line); border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.35); padding:12px 14px; display:flex; align-items:center;
  gap:12px; flex-wrap:wrap; max-width:520px; margin:0 auto;
}
.pwa-install-text{color:var(--text); font-size:13px; flex:1 1 200px}
.pwa-install-actions{display:flex; gap:8px; flex:none}
/* =====================================================================
   Rampart Garrison â€” Build 65: Customer Dashboard + Sales CRM
   APPEND to the end of index/assets/css/rampart-theme.css.
   ===================================================================== */
/* ---- Print / share stylesheet (Customer Dashboard "ðŸ–¨ Print / share
   summary" button) â€” hides internal-only chrome so what a rep shows a
   customer (or hands them a printout of) is clean and customer-appropriate.
   Note: the underlying data on this page is ALREADY customer-safe (no
   cost/margin is ever fetched â€” see FishbowlCustomerView.php) â€” this print
   rule additionally hides internal-only ELEMENTS (nav, buttons, internal
   notes, credit-hold flags) that are fine for a rep to see on-screen but
   shouldn't appear on a printed/shared page. ---- */
@media   print{
  .topbar, .footer, .flash, .no-print{display:none !important}
  main.container{margin:0; max-width:none; padding:0}
  body{background:#fff; color:#000}
  .card{border:1px solid #ccc; box-shadow:none; break-inside:avoid}
}
/* ---- CRM: quick-action buttons + contact log timeline ---- */
.crm-quick-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:flex-start; margin-bottom:16px}
.crm-log-toggle{position:static}
.crm-log-toggle summary{list-style:none; cursor:pointer}
.crm-log-toggle summary::-webkit-details-marker{display:none}
.crm-log-body{
  margin-top:12px; padding:14px; border:1px solid var(--line); border-radius:10px;
  background:var(--card-2, #12213a); display:flex; flex-direction:column; gap:12px; max-width:560px;
}
.crm-log-body label{display:block; font-size:13px; font-weight:500; margin-bottom:0}
.crm-log-body select, .crm-log-body textarea{
  width:100%; margin-top:5px; padding:9px max(11px,14px); border:1px solid var(--field-line); border-radius:var(--field-radius);
  font-size:14px; font-family:inherit; background:var(--field-bg); color:var(--text);
}
.crm-timeline{display:flex; flex-direction:column; gap:12px; margin-top:16px}
.crm-timeline-item{padding:10px 14px; border-left:3px solid var(--blue); background:var(--card-2, #12213a); border-radius:0 8px 8px 0}
.crm-timeline-head{display:flex; flex-wrap:wrap; gap:8px; align-items:baseline}
.crm-timeline-notes{margin-top:6px; font-size:14px; color:var(--text-soft, #aebcce)}
.crm-timeline-notes p{margin:0 0 6px}
/* ---- Sub-tasks: richer row layout (v68, feature) â€” see tasks/show.php.
   The base .dep-row rule uses justify-content:space-between, which only
   makes sense for exactly two children; a sub-task row now has a checkbox,
   title, priority badge, due date, AND assignee, so it needs its own
   flex-start + gap layout instead. ---- */
.subtask-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-start}
.subtask-check-form{margin:0; display:flex; align-items:center}
.subtask-check{width:18px; height:18px; cursor:pointer; accent-color:var(--blue,#EA5B2B)}
.subtask-title{color:var(--text); text-decoration:none; font-weight:500}
.subtask-title:hover{color:var(--blue); text-decoration:underline}
.subtask-title.done{text-decoration:line-through; color:var(--muted)}
.subtask-assignee{margin-left:auto}
.subtask-overdue{color:var(--danger-fg); font-weight:600}
/* ============================================================
   NEW (build 76, feature): "Rampart Warden" Phase 1 styles.
   APPEND this block to the END of index/assets/css/rampart-theme.css
   (do not replace the file â€” just add these rules after the existing
   content, same as every other feature's CSS additions in this file).
   ============================================================ */
.row-unread{font-weight:600}
.dot-unread{color:var(--blue,#EA5B2B); font-size:10px}
.gh-msg{border-left:3px solid var(--line,#26364f); padding:10px 14px; border-radius:0 8px 8px 0; margin-bottom:12px; background:var(--card-2,#12213a)}
.gh-msg-inbound{border-left-color:var(--blue,#EA5B2B)}
.gh-msg-outbound{border-left-color:#3ba776}
.gh-msg-head{display:flex; flex-wrap:wrap; gap:8px; align-items:baseline; margin-bottom:6px}
.gh-msg-when{margin-left:auto}
.gh-msg-body{font-size:14px; color:var(--text,#e8edf5); line-height:1.5; overflow-wrap:anywhere}
.gh-msg-body img{max-width:100%}
.gh-msg-attachments{margin-top:8px; display:flex; gap:6px; flex-wrap:wrap}
.gh-note{padding:8px 12px; border-left:3px solid #7a8aa0; background:var(--card-2,#12213a); border-radius:0 8px 8px 0; margin-bottom:8px; font-size:14px}
.gh-note strong{margin-right:8px}
/* ============================================================
   FIXED (build 78, bug fix): file upload inputs (Task Attachments,
   etc.) were hard to read â€” app.css hard-codes a near-white
   background (#fafbfc) and never sets an explicit text color, so it
   relies entirely on the browser's own low-contrast gray "No file
   chosen" text, and never restyles the native "Choose Files" button
   to match the app at all. Give both the button and the filename
   text real, theme-matched contrast in dark AND light mode.
   APPEND to the END of index/assets/css/rampart-theme.css.
   ============================================================ */
.task-form input[type=file],
.att-upload input[type=file]{
  background:var(--card); color:var(--text); border:1px solid var(--line);
  border-radius:8px; padding:8px 10px; font-size:13px;
}
.task-form input[type=file]::file-selector-button,
.att-upload input[type=file]::file-selector-button,
.task-form input[type=file]::-webkit-file-upload-button,
.att-upload input[type=file]::-webkit-file-upload-button{
  background:var(--blue); color:#fff; border:none; border-radius:6px;
  padding:7px 12px; margin-right:10px; font-size:13px; font-weight:600;
  cursor:pointer;
}
.task-form input[type=file]::file-selector-button:hover,
.att-upload input[type=file]::file-selector-button:hover,
.task-form input[type=file]::-webkit-file-upload-button:hover,
.att-upload input[type=file]::-webkit-file-upload-button:hover{
  background:var(--blue-d,#C4451A);
}
/* ============================================================
   FIXED (build 78, bug fix): Team + Audit Log (and any future Admin
   page under .settings-shell) looked "stretched" now that their
   tables carry more columns (Job Title/Duties on Team; Details/IP on
   Audit Log) squeezed into the site-wide 1080px .container â€” the
   extra columns forced tall, cramped, wrapped rows instead of a clean
   layout. Widen ONLY pages using the settings-shell layout (Team,
   Audit Log, Custom Fields, Email/SMTP, Automation, Warden admin,
   etc.) â€” every other page keeps the normal 1080px container.
   :has() is already used elsewhere in this file for the same kind of
   "only when this specific child is present" targeting (see
   .nb-tabs:has(.nb-menu[open]) and .table-scroll:has(.job-menu[open])
   above), so this follows the same established pattern.
   APPEND to the END of index/assets/css/rampart-theme.css.
   ============================================================ */
main.container:has(.settings-shell){ max-width:1400px; }
/* ============================================================
   FIXED (build 80, bug fix): "The view looks smooshed too" â€” the
   order-mentioned panel on a Warden thread reused .crm-log-body for
   convenience, but that class carries max-width:560px (sized for the
   CRM's narrow contact-log FORM it was originally built for), which
   squeezed the order card's 3-column .oi-grid down into a single
   cramped column. Give the order-mentioned panel its own class,
   full-width, with a bit more breathing room per card.
   APPEND to the END of index/assets/css/rampart-theme.css.
   ============================================================ */
/* FIXED (build 80, bug fix): "Claim it and release look bad" â€” these two
   buttons sat in their OWN forms with a bare "align-self:flex-end" hack,
   which bottom-anchored them against the Status/Priority/Owner fields
   (each of which is a full label+select STACKED group, taller than a
   bare button) â€” the visual result was a jagged, inconsistent row.
   Wrapping both buttons in one labeled group (.wd-quick-actions, same
   "label above content" shape as every other field in this row) instead
   of the old per-button align-self hack lines everything up on the same
   baseline as Status/Priority/Owner. */
.wd-quick-actions{ display:flex; flex-direction:column; gap:4px; }
.wd-quick-actions > span{ font-size:14px; font-weight:500; }
.wd-quick-actions-row{ display:flex; gap:8px; }
.wd-quick-actions-row form{ margin:0; }
/* =====================================================================
   Sticky Notes â€” Keep-style features (sidebar, labels, checklists, reminders, search, trash, undo toast).
   MERGED into this file in build 128; it used to be a separate sticky-keep.css. A second stylesheet per
   feature is exactly how the same colour bugs kept coming back, so there is one theme file now.

   Two real fixes were made while merging:
   1. The reminder/label popovers used var(--card-bg,#fff) â€” --card-bg has never existed, so it silently fell back
      to white. That happened to be right (the card text is dark), but only by accident; it is now an explicit
      white background with explicit dark text.
   2. Placeholders inside a note card now use a dark tint â€” the global placeholder colour is for the navy cards
      and was unreadable on the card's pastel colours.
   ===================================================================== */
/* ---------------- Page layout: sidebar + main ---------------- */
.sticky-layout{display:flex;gap:24px;align-items:flex-start}
.sticky-sidebar{width:180px;flex:0 0 180px;display:flex;flex-direction:column;gap:2px;position:sticky;top:16px}
.sticky-main{flex:1;min-width:0}
@media  (max-width:760px){
  .sticky-layout{flex-direction:column}
  .sticky-sidebar{width:100%;flex-direction:row;flex-wrap:wrap;position:static}
}
.sticky-nav-item{display:block;padding:8px 12px;border-radius:8px;text-decoration:none;color:var(--text);
  font-size:14px;border:none;background:transparent;text-align:left;cursor:pointer;width:100%}
.sticky-nav-item:hover{background:rgba(127,127,127,.12)}
.sticky-nav-item.active{background:rgba(var(--accent-rgb),.14);font-weight:700}
.sticky-sidebar-divider{height:1px;background:var(--line);margin:8px 4px}
.sticky-label-name{display:inline-block;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.sticky-new-label{color:var(--muted,#888);font-style:italic}
/* ---------------- Search ---------------- */
.sticky-search{display:flex;gap:8px;align-items:center;margin-left:auto}
.sticky-search input[type=text]{padding:7px max(12px,14px);border:1px solid var(--field-line);border-radius:var(--field-radius);
  background:transparent;color:var(--text);min-width:220px}
/* ---------------- Trash view ---------------- */
.sticky-trash-note{margin-bottom:16px}
.sticky-card[data-id] .sticky-title[readonly],
.sticky-card[data-id] .sticky-body[readonly],
.sticky-card[data-id] .sticky-check-text[readonly]{opacity:.75;cursor:default}
/* ---------------- Reminders ---------------- */
.sticky-reminder-badge{font-size:11px;background:rgba(0,0,0,.08);border-radius:10px;padding:2px 8px;
  margin-right:auto;white-space:nowrap}
.sticky-reminder-popover,.sticky-label-popover{position:relative;z-index:5;margin-top:8px;padding:10px;
  border-radius:8px;background:#fff;color:#20242b;border:1px solid rgba(0,0,0,.18);box-shadow:0 4px 14px rgba(0,0,0,.18)}
.sticky-popover-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
.sticky-reminder-input{width:100%;padding:6px;border:1px solid var(--line);border-radius:6px;background:transparent;color:inherit}
/* ---------------- Labels ---------------- */
.sticky-label-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.sticky-label-chip{font-size:11px;background:rgba(0,0,0,.08);border-radius:10px;padding:2px 8px}
.sticky-label-popover-list{display:flex;flex-direction:column;gap:4px;max-height:160px;overflow-y:auto;margin-bottom:8px}
.sticky-label-popover-row{display:flex;align-items:center;gap:6px;font-size:13px;cursor:pointer}
.sticky-label-popover-add{width:100%;padding:6px;border:1px solid var(--line);border-radius:6px;
  background:transparent;color:inherit;font-size:13px}
/* ---------------- Checklists ---------------- */
.sticky-checklist{display:flex;flex-direction:column;gap:2px;margin:4px 0}
.sticky-check-item{display:flex;align-items:center;gap:6px}
.sticky-check-item.checked .sticky-check-text{text-decoration:line-through;opacity:.55}
.sticky-check-box{background:none;border:none;cursor:pointer;font-size:15px;padding:0;line-height:1}
.sticky-check-text{flex:1;border:none;background:transparent;outline:none;font-size:13.5px;color:inherit}
.sticky-check-del{background:none;border:none;cursor:pointer;opacity:0;font-size:12px;color:inherit;padding:0}
.sticky-check-item:hover .sticky-check-del{opacity:.6}
.sticky-check-item[draggable=true]{cursor:grab}
.sticky-check-item.dragging{opacity:.4}
.sticky-check-add{width:100%;border:none;background:transparent;outline:none;font-size:13.5px;
  color:inherit;opacity:.7;margin-top:2px}
.sticky-check-add:focus{opacity:1}
/* BUILD 181: the Sticky Notes undo bar is gone â€” Undo is a button on the one toast (toast.css) */
.sticky-card ::placeholder{color:rgba(32,36,43,.62);opacity:1}
/* =====================================================================
   BUILD 129 â€” My Dashboard: display modes + the section/tile editor
   ===================================================================== */
/* ---- the live dashboard ---- */
.dash-halves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:14px 0 18px;align-items:start}
.dash-halves > .card{margin-bottom:0}
@media  (max-width:820px){
  .dash-halves{grid-template-columns:1fr}
}
.dash-list h2{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.row-title .row-sub{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:1px}
.kpi-value.tone-urgent{color:var(--danger-fg)}
.kpi-value.tone-warn{color:var(--warn-fg)}
/* ---- the editor (Settings > My Dashboard) ---- */
.dash-legend{display:flex;flex-wrap:wrap;gap:10px 24px;align-items:center;padding:10px 14px;margin:0 0 16px;
  border:1px dashed var(--line);border-radius:10px;font-size:13px;color:var(--text-soft)}
.dash-legend-item{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.dash-mode-demo{display:inline-flex;align-items:center;gap:4px;margin-left:6px}
.dash-sec-tag,.dash-w-tag{display:inline-block;padding:2px 9px;border-radius:6px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.dash-sec-tag{background:var(--blue-d);color:#fff}
.dash-sec-tag-top{background:var(--tint-neutral-bg);color:var(--tint-neutral-fg)}
.dash-w-tag{background:var(--tint-blue-bg);color:var(--tint-blue-fg)}
.dash-editor{display:flex;flex-direction:column;gap:14px}
.dash-sec{border:1px solid var(--line);border-left:5px solid var(--blue);border-radius:12px;background:var(--card-2);overflow:hidden}
/* BUILD 130: the first section looks like any other (it used to be a quiet grey strip); only its handle is inert. */
.dash-sec-handle-fixed{cursor:not-allowed}
.dash-sec-first{margin-left:auto}
.dash-sec.dragging{opacity:.5}
.dash-sec-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;background:var(--accent-wash);border-bottom:1px solid var(--line)}
.dash-sec-handle{cursor:grab;font-size:20px;line-height:1;color:var(--muted);padding:0 4px;user-select:none}
.dash-sec-rename{display:flex;gap:8px;align-items:center;flex:1;min-width:220px;margin:0}
.dash-sec-label{flex:1;min-width:140px;font-weight:700;font-size:15px;color:var(--text);background:var(--field-bg);border:1px solid var(--field-line);border-radius:8px;padding:7px 11px}
.dash-sec-label:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.dash-sec-remove{margin:0}
.dash-sec-list{list-style:none;margin:0;padding:10px 12px 12px 34px;display:flex;flex-direction:column;gap:8px;min-height:48px;transition:background .15s}
.dash-sec-list.drag-over{background:var(--accent-wash);outline:2px dashed var(--blue);outline-offset:-6px;border-radius:8px}
.dash-w{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--card);cursor:grab}
.dash-w:hover{border-color:var(--blue)}
.dash-w.dragging{opacity:.45}
.dash-w-label{flex:1;min-width:160px;font-weight:600}
.dash-w-remove{margin:0}
.dash-modes{display:inline-flex;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.dash-mode-btn{background:transparent;border:0;border-right:1px solid var(--line);padding:5px 10px;font:inherit;font-size:12px;color:var(--text-soft);cursor:pointer;display:inline-flex;gap:5px;align-items:center}
.dash-mode-btn:last-child{border-right:0}
.dash-mode-btn:hover:not(.active){background:var(--tint-neutral-bg);color:var(--text)}
.dash-mode-btn.active{background:var(--blue-d);color:#fff;font-weight:700}
.dash-mode-fixed{font-size:12px;color:var(--muted);white-space:nowrap}
.dash-drop-hint{display:none;text-align:center;font-size:12px;color:var(--muted);border:1px dashed var(--line);border-radius:8px;padding:10px}
/* shown only while a list is empty â€” never added to other lists on drag start, so nothing shifts under the pointer */
.dash-sec-list.is-empty .dash-drop-hint{display:block}
.dash-save-note{font-size:13px;color:var(--text-soft);margin:0 0 8px}
.dash-add-section{display:flex;gap:8px;margin:0 0 14px;max-width:480px}
.dash-add-section input{flex:1}
.dash-add-where{margin:8px 0 4px}
.dash-add-where label{display:flex;gap:10px;align-items:center;font-size:13px;color:var(--text-soft)}
@media  (max-width:720px){
  .dash-sec-list{padding-left:12px}
  .dash-w{gap:8px}
}
/* =====================================================================
   BUILD 129 â€” admin menu groups, Development area, standalone "What's new" page
   ===================================================================== */
/* ---- grouped admin menu ---- */
.snav-group{font-size:11px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);padding:14px 14px 4px}
.snav-group:first-child{padding-top:4px}
.snav-switch{display:flex;gap:4px;padding:4px;margin:0 0 8px;border:1px solid var(--line);border-radius:10px;background:var(--card-2)}
.snav-switch a{flex:1;text-align:center;padding:7px 6px;border-radius:7px;font-size:13px;font-weight:600;color:var(--text-soft);text-decoration:none;white-space:nowrap}
.snav-switch a:hover{background:var(--tint-neutral-bg);color:var(--text);text-decoration:none}
.snav-switch a.active{background:var(--blue-d);color:#fff}
/* ---- Development overview ---- */
.dev-status{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:20px}
.dev-stat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card-2)}
.dev-stat-k{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.dev-stat-v{font-size:18px;font-weight:700;color:var(--text)}
.dev-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.dev-tool{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--card);text-decoration:none;color:var(--text);transition:border-color .12s,transform .06s}
.dev-tool:hover{border-color:var(--blue);text-decoration:none;transform:translateY(-1px)}
.dev-tool-icon{font-size:26px;line-height:1}
.dev-tool-title{font-weight:800;font-size:16px}
.dev-tool-desc{font-size:13px;color:var(--text-soft);line-height:1.45}
/* ---- "What's new" (release notes) ---- */
.rel-page{max-width:900px;margin:0 auto}
.rel-current{display:inline-block;background:var(--blue-d);color:#fff;font-weight:800;font-size:13px;padding:6px 14px;border-radius:999px}
.rel-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:18px}
.rel-search{flex:1;min-width:240px;max-width:460px;font:inherit;font-size:14px;color:var(--text);background:var(--field-bg);border:1px solid var(--field-line);border-radius:var(--field-radius);padding:8px 16px}
.rel-search:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.rel-tools-spacer{flex:1}
.rel-timeline{list-style:none;margin:0;padding:0 0 0 28px;position:relative}
.rel-timeline::before{content:"";position:absolute;left:7px;top:8px;bottom:8px;width:2px;background:var(--line)}
.rel-item{position:relative;margin:0 0 14px}
.rel-dot{position:absolute;left:-28px;top:21px;width:16px;height:16px;border-radius:50%;background:var(--card);border:3px solid var(--blue)}
.rel-item.is-latest .rel-dot{background:var(--blue);box-shadow:0 0 0 5px var(--accent-wash)}
.rel-card{border:1px solid var(--line);border-radius:14px;background:var(--card);box-shadow:var(--shadow)}
.rel-item.is-latest .rel-card{border-color:var(--blue)}
.rel-item.is-draft .rel-card{border-style:dashed}
.rel-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 18px;cursor:pointer;list-style:none}
.rel-head::-webkit-details-marker{display:none}
.rel-head::before{content:"â–¸";color:var(--muted);transition:transform .15s}
.rel-card[open] > .rel-head::before{transform:rotate(90deg)}
.rel-build{font-weight:800;font-size:12px;letter-spacing:.04em;text-transform:uppercase;padding:3px 10px;border-radius:7px;background:var(--tint-blue-bg);color:var(--tint-blue-fg);white-space:nowrap}
.rel-title{font-weight:700;font-size:16px;flex:1;min-width:200px;color:var(--text)}
.rel-badges{display:flex;gap:6px;flex-wrap:wrap}
.rel-pill{font-size:11.5px;font-weight:700;padding:2px 9px;border-radius:999px;white-space:nowrap}
.rel-pill-latest{background:var(--blue-d);color:#fff}
.rel-pill-here{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.rel-pill-draft{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.rel-pill-feat{background:var(--tint-blue-bg);color:var(--tint-blue-fg)}
.rel-pill-fix{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.rel-date{font-size:12.5px;color:var(--muted);white-space:nowrap}
.rel-body{padding:0 20px 16px;border-top:1px solid var(--line)}
.rel-sec{margin-top:14px}
.rel-sec h3{margin:0 0 6px;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-soft);display:flex;gap:8px;align-items:center}
.rel-sec-feat h3{color:var(--tint-blue-fg)}
.rel-sec-fix h3{color:var(--tint-green-fg)}
.rel-sec ul{margin:0;padding-left:20px}
.rel-sec li{margin:5px 0;line-height:1.5}
.rel-sec p{margin:6px 0;color:var(--muted);font-size:13px}
.rel-foot{margin:14px 0 0;font-size:13px}
@media  (max-width:720px){
  .rel-timeline{padding-left:22px}
  .rel-dot{left:-22px}
  .rel-date{width:100%}
}
/* =====================================================================
   BUILD 129 â€” SKU Decoder page
   ===================================================================== */
.sku-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.sku-decode-row{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin-bottom:16px}
.sku-decode-input-group{flex:1 1 320px;min-width:260px}
.sku-decode-input-group label{display:block;margin-bottom:5px;font-size:13px;font-weight:600}
.sku-decode-input,.sku-ref-filter{width:100%;font:inherit;font-size:14px;color:var(--text);background:var(--field-bg);border:1px solid var(--field-line);border-radius:var(--field-radius);padding:8px max(12px,14px)}
.sku-decode-input:focus,.sku-ref-filter:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.sku-decode-btn{height:40px}
.sku-decode-table td:nth-child(2){font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.sku-ref{padding:0}
.sku-ref > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 18px}
.sku-ref > summary::-webkit-details-marker{display:none}
.sku-ref > summary::before,.sku-sec > summary::before,.sku-vendor > summary::before{content:"â–¸";color:var(--muted);transition:transform .15s;display:inline-block}
.sku-ref[open] > summary::before,.sku-sec[open] > summary::before,.sku-vendor[open] > summary::before{transform:rotate(90deg)}
.sku-ref-title{font-weight:800;font-size:16px}
.sku-ref-body{padding:0 18px 18px;border-top:1px solid var(--line)}
.sku-ref-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0}
.sku-ref-filter{flex:1;min-width:240px;max-width:440px;width:auto}
.sku-ref-h{margin:18px 0 8px;font-size:12px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.sku-sec{border:1px solid var(--line);border-radius:10px;margin:0 0 8px;background:var(--card-2)}
.sku-sec > summary,.sku-vendor > summary{cursor:pointer;display:flex;gap:10px;align-items:center;flex-wrap:wrap;list-style:none;padding:10px 14px}
.sku-sec > summary::-webkit-details-marker,.sku-vendor > summary::-webkit-details-marker{display:none}
.sku-sec-name{font-weight:700}
.sku-sec-body{padding:6px 14px 14px;border-top:1px solid var(--line)}
.sku-vendor{border:1px solid var(--line);border-radius:8px;margin:8px 0;background:var(--card)}
.sku-vendor > summary{padding:8px 12px}
.sku-vendor-name{font-weight:600}
.sku-vendor-body{padding:8px 12px 12px;border-top:1px solid var(--line)}
.sku-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:700}
.sku-cat{margin:10px 0 4px}
.sku-cat-head{font-weight:700;margin:0 0 4px}
.sku-field-h{margin:14px 0 6px;font-size:13px;color:var(--text-soft)}
.sku-models td,.sku-codes td{vertical-align:top}
.sku-chip{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--text);background:var(--card-2);border:1px solid var(--line);border-radius:6px;padding:2px 8px;margin:2px 4px 2px 0;cursor:pointer}
.sku-chip:hover{border-color:var(--blue);color:var(--link)}
/* BUILD 129 â€” Account tab: signature preview + Fishbowl link form */
.sig-preview{display:inline-block;max-width:100%;padding:14px 18px;border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:10px;background:var(--card-2);line-height:1.6;font-size:14px}
.fb-link-form{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.fb-link-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
/* BUILD 129 â€” DigitalVMI part details */
.vmi-part-info{margin:-4px 0 14px}
.vmi-part-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:4px;font-size:13px;color:var(--text-soft)}
/* =====================================================================
   BUILD 130 â€” Admin overview
   ===================================================================== */
.ov-group{margin:22px 0 10px;font-size:12px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.ov-status{margin-top:4px;font-size:12.5px;font-weight:700;color:var(--tint-blue-fg);background:var(--tint-blue-bg);border-radius:6px;padding:3px 9px;align-self:flex-start}
/* BUILD 130 â€” Export: "Download it as" choice */
.export-saveas{border:1px solid var(--line);border-radius:10px;padding:10px 14px 4px;margin:0 0 14px;background:var(--card-2)}
.export-saveas legend{padding:0 8px;font-size:12px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
/* =====================================================================
   BUILD 131 â€” Sticky Notes: rearrange + resize, nav icon
   ===================================================================== */
.sticky-handle{margin-right:auto;cursor:grab;font-size:17px;line-height:1;color:#20242b;opacity:.55;padding:0 4px;user-select:none}
.sticky-card:hover .sticky-handle{opacity:.85}
.sticky-handle:active{cursor:grabbing}
.sticky-card.dragging{opacity:.4;outline:2px dashed rgba(0,0,0,.45)}
.sticky-grip{position:absolute;right:0;bottom:0;width:22px;height:22px;cursor:ns-resize;touch-action:none;opacity:.6}
/* the whole 22px square is the grab area; only the little diagonal-lines triangle in its corner is drawn */
.sticky-grip::after{content:"";position:absolute;right:3px;bottom:3px;width:14px;height:14px;pointer-events:none;
  background:repeating-linear-gradient(135deg,transparent 0 3px,rgba(0,0,0,.5) 3px 4px);clip-path:polygon(100% 0,100% 100%,0 100%)}
.sticky-card:hover .sticky-grip{opacity:1}
.nav-ico{height:1.15em;width:auto;vertical-align:-.22em;margin-right:.15em}
/* =====================================================================
   BUILD 131 â€” Warden header, wider search
   ===================================================================== */
.filters input.search-wide{flex:1 1 420px;min-width:260px;max-width:680px;width:auto}
@media  (max-width:700px){
  .filters input.search-wide{min-width:0;width:100%;max-width:none}
}
/* =====================================================================
   BUILD 131 â€” Dev > Scheduled tasks
   ===================================================================== */
.sched-cron{margin-bottom:14px;border-left:4px solid var(--line)}
.sched-cron.is-ok{border-left-color:var(--good-fg)}
.sched-cron.is-bad{border-left-color:var(--danger-fg)}
.sched-cron-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sched-counts{margin-left:auto}
.sched-failing{color:var(--danger-fg)}
.sched-crontab{margin-top:10px}
.sched-crontab > summary,.sched-edit > summary,.sched-hist > summary{cursor:pointer;font-weight:600;color:var(--text-soft)}
.sched-pre{margin:6px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--code-bg);color:var(--code-fg);
  font:12.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word;overflow:auto;max-height:340px}
.sched-task{margin-bottom:14px;border-left:4px solid var(--line)}
.sched-task.is-on{border-left-color:var(--blue)}
.sched-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.sched-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1;min-width:220px;font-size:15px}
.sched-when{font-size:12.5px;color:var(--muted);font-weight:600}
.sched-toggle{margin:0}
.sched-switch{width:46px;height:26px;border-radius:999px;border:1px solid var(--line);background:var(--tint-neutral-bg);padding:2px;cursor:pointer;position:relative;transition:background .15s}
.sched-switch .sched-knob{display:block;width:20px;height:20px;border-radius:50%;background:var(--muted);transition:transform .15s,background .15s}
.sched-switch.on{background:var(--blue-d);border-color:var(--blue-d)}
.sched-switch.on .sched-knob{transform:translateX(20px);background:#fff}
.sched-desc{margin:6px 0 4px 58px}
.sched-warn{margin:4px 0 4px 58px;color:var(--warn-fg)}
.sched-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:6px 0 0 58px}
.sched-msg{margin:4px 0 0 58px;font-size:13px;color:var(--text-soft)}
.sched-more{margin:10px 0 0 58px;display:flex;flex-direction:column;gap:6px}
.sched-form{display:flex;flex-direction:column;gap:12px;margin-top:10px;max-width:620px}
.sched-form fieldset{border:1px solid var(--line);border-radius:10px;padding:8px 14px 10px;margin:0}
.sched-form legend{padding:0 8px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.sched-field,.card form label.sched-field{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;margin-bottom:0}
/* (".card form label" in app.css sets display:block with higher specificity than a lone class, hence the longer selector above) */
.sched-inline{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.sched-inline input,.sched-inline select,.card form .sched-inline input,.card form .sched-inline select{width:auto;margin:0;display:inline-block}

.sched-form .check-row{margin-bottom:6px!important}
.sched-field input[type=text],.sched-field input[type=email],.sched-field input[type=url],.sched-field select,.sched-field textarea{max-width:480px}
.sched-test{margin-top:14px;padding:12px 14px;border:1px dashed var(--line);border-radius:10px;background:var(--card-2)}
.sched-run{margin:4px 0}
.sched-run > summary{cursor:pointer;display:flex;gap:10px;align-items:center}
.sched-add{margin-top:18px}
@media  (max-width:720px){
  .sched-desc,.sched-warn,.sched-status,.sched-msg,.sched-more{margin-left:0}
}
/* =====================================================================
   BUILD 131 â€” E-mail signature editor
   ===================================================================== */
.sig-editor{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px;align-items:start}
@media  (max-width:980px){
  .sig-editor{grid-template-columns:1fr}
}
.sig-form{display:flex;flex-direction:column;gap:14px}
.sig-label,.card form label.sig-label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:13px;margin-bottom:0}
.sig-textarea{font:12.5px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;width:100%;min-height:280px;resize:vertical}
.sig-settings{display:flex;flex-direction:column;gap:12px}
.sig-buttons{display:flex;gap:10px;flex-wrap:wrap}
.sig-preview-col{position:sticky;top:12px}
.sig-preview-head{margin-bottom:6px}
.sig-frame{width:100%;height:300px;border:1px solid var(--line);border-radius:10px;background:#fff}
.sig-warn{margin:0 0 8px;padding:8px 12px;border-radius:8px;background:var(--tint-warn-bg);color:var(--tint-warn-fg);font-size:13px}
.sig-chip{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--text);background:var(--card-2);border:1px solid var(--line);border-radius:6px;padding:2px 8px;cursor:pointer}
.sig-chip:hover{border-color:var(--blue);color:var(--link)}
.sig-rules{margin:6px 0 0;padding-left:20px;font-size:13px;line-height:1.6;color:var(--text-soft)}
.sig-rules code{font-size:12px}
.sig-preview{background:#fff;color:#222;border-left-color:var(--blue)}
.sig-preview a{color:#1a5fb4}
/* =====================================================================
   Rampart Garrison â€” Bug Tracker form (Build 132): WYSIWYG fields, picture box, category sections.
   ===================================================================== */
/* Description / Steps are WYSIWYG editors here: a label-like heading, and a shorter editing area than the 260px notes default */
.bug-form .bug-field{margin:0 0 16px}
.bug-form .bug-label{font-size:14px;font-weight:500;margin:0 0 2px}



.bug-form > label{margin-bottom:14px}
/* Picture box */
.bug-drop{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;margin-top:5px;padding:14px 16px;
  border:2px dashed var(--line);border-radius:12px;background:var(--card-2);color:var(--text);line-height:1.5}
.bug-drop:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.bug-drop.is-over{border-color:var(--blue);background:var(--accent-wash)}
.bug-drop.is-flash{border-color:#34a853;background:rgba(52,168,83,.12)}
.bug-drop-icon{font-size:22px}
.bug-pic-info{margin:6px 0 0;min-height:1em}
.bug-pic-warn{margin:6px 0 0;padding:8px 12px;border-radius:8px;font-size:13px;
  background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.bug-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px;margin-top:12px}
.bug-thumbs:empty{display:none}
.bug-thumb{margin:0;padding:8px;border:1px solid var(--line);border-radius:12px;background:var(--card);
  display:flex;flex-direction:column;gap:8px}
.bug-thumb img{display:block;width:100%;height:150px;object-fit:contain;border-radius:8px;
  background:repeating-conic-gradient(rgba(127,127,127,.14) 0% 25%, transparent 0% 50%) 50% / 16px 16px}
.bug-thumb .bug-thumb-cap{margin:0 !important;padding:6px 9px !important;font-size:13px !important}
.bug-thumb-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.bug-thumb .bug-remove{display:inline-flex !important;align-items:center;margin:0 !important;font-size:12px !important;font-weight:500 !important;color:var(--danger-fg,#d93025);cursor:pointer}
.bug-thumb-new{border-color:var(--blue)}
.bug-thumb.is-removed{opacity:.45}
.bug-thumb.is-removed img{filter:grayscale(1)}
/* Category sections (Groups & Categories page) */
.bucket-list .bug-section-head{list-style:none;margin:14px 0 4px;padding:4px 2px;font-size:12px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--muted);border-bottom:1px solid var(--line)}
.bucket-list .bug-section-head:first-child{margin-top:2px}
.bucket-list .bug-section-head .count-pill{margin-left:6px;letter-spacing:0;text-transform:none}
.bug-drop[hidden],.bug-pic-warn[hidden]{display:none !important}
/* =====================================================================
   Rampart Garrison â€” Build 133: collapsible dashboard sections, tile names, a tidier "Add a tile" picker.
   ===================================================================== */
/* ---- My Dashboard sections: the heading is a button that collapses / expands its tiles ---- */
.dash-section{margin:0 0 6px}
.dash-sec-toggle{display:flex;align-items:center;gap:12px;width:100%;margin:22px 0 12px;padding:0;background:none;border:0;cursor:pointer;
  color:var(--text);font:inherit;font-weight:700;font-size:15px;text-align:left}
.dash-sec-toggle:hover > span:first-child{color:var(--link)}
.dash-sec-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:6px}
/* .section-title decorates every span with a left bar; only the name keeps it */
.dash-sec-toggle .dash-sec-meta,.dash-sec-toggle .dash-chev{padding-left:0}
.dash-sec-toggle .dash-sec-meta::before,.dash-sec-toggle .dash-chev::before{content:none}
.dash-sec-meta{font-weight:500;font-size:12px;color:var(--muted)}
.dash-chev{margin-left:auto;font-size:16px;color:var(--muted);transition:transform .15s ease}
.dash-section.is-collapsed .dash-chev{transform:rotate(-90deg)}
.dash-section.is-collapsed .dash-sec-toggle{margin-bottom:4px}
.dash-section-body[hidden]{display:none}
.dash-collapse-all{display:inline-flex;gap:6px;flex-wrap:wrap}

/* ---- list rows on the dashboard are links: orange like every other link ---- */
.dash-list a.row .row-title{color:var(--link)}
.dash-list .row-sub{display:block;font-size:12px;color:var(--muted);font-weight:400}
.dash-list a.count-pill{text-decoration:none}
.dash-list a.count-pill:hover{background:var(--accent-wash);color:var(--link)}
.dash-list.chart-card{padding-bottom:10px}
/* tile name: shown as the tile's label, with a pencil that turns it into a text box */
.dash-w-label{display:inline-flex;align-items:baseline;gap:6px;flex:1;min-width:0}
.dash-w-name{font-weight:600}
.dash-w-orig{font-size:12px;color:var(--muted)}
.dash-w-rename{display:none;gap:6px;align-items:center;margin:0}
.dash-w-rename input{margin:0 !important;padding:5px 9px !important;font-size:13px !important;min-width:180px}
.dash-w.is-renaming .dash-w-rename{display:inline-flex}
.dash-w.is-renaming .dash-w-name,.dash-w.is-renaming .dash-w-orig,.dash-w.is-renaming .dash-w-edit{display:none}
.dash-w-edit{background:none;border:0;cursor:pointer;color:var(--muted);padding:0 4px;font-size:13px}
.dash-w-edit:hover{color:var(--link)}
.dash-w-gate{font-size:12px;color:var(--muted)}
/* "Add a tile": one search box, groups that fold, two columns of compact rows */
.dash-picker-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:6px 0 12px}
.dash-picker-bar input[type=search]{flex:1;min-width:220px;margin:0 !important}

.dash-pick-group{border:1px solid var(--line);border-radius:12px;background:var(--card);margin:0 0 10px;overflow:hidden}
.dash-pick-group > summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:11px 14px;font-weight:700;color:var(--text)}
.dash-pick-group > summary::-webkit-details-marker{display:none}
.dash-pick-group > summary::before{content:"â–¸";display:inline-block;color:var(--muted);transition:transform .12s ease}
.dash-pick-group[open] > summary::before{transform:rotate(90deg)}
.dash-pick-group > summary .count-pill{margin-left:auto}
.dash-pick-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px;padding:4px 14px 14px;margin:0;list-style:none}
@media  (max-width:900px){
  .dash-pick-list{grid-template-columns:1fr}
}
.dash-pick{display:flex;align-items:center;gap:8px;padding:6px 8px;border:1px solid var(--line);border-radius:9px;background:var(--card-2);min-width:0}
.dash-pick[hidden]{display:none}
.dash-pick-name{flex:1;min-width:0;font-size:13px;line-height:1.3;overflow-wrap:anywhere}
.dash-pick form{margin:0;display:flex;gap:6px;align-items:center}
.dash-pick select{margin:0 !important;padding:4px 6px !important;font-size:12px !important;width:auto !important}

.dash-pick-empty{padding:10px 2px;color:var(--muted)}
.dash-pick-gated{font-size:11px;color:var(--muted)}
/* =====================================================================
   Rampart Garrison â€” Build 133: the fuller WYSIWYG editor (wysiwyg.js).
   ===================================================================== */










/* pop-up menus (snippets, slash commands) */










/* what the editor can hold: tables, pictures, rules, headings 4-6, sub / super script â€” in the editor AND in the rendered note */











/* touch screens: bigger buttons, toolbar still wraps */

/* BUILD 133: a counter that is a link (dashboard tiles, the Sales Order and Purchase Order cards) reads as a link on hover */
a.kpi-card{color:var(--text);text-decoration:none;transition:border-color .12s ease,transform .12s ease}
a.kpi-card:hover{border-color:var(--blue);transform:translateY(-1px)}
a.kpi-card .kpi-subtext{color:var(--muted)}
/* =====================================================================
   Rampart Garrison â€” Build 134: ONE button system, and "stacked" record cards for Team / Departments / Mailboxes.
   ===================================================================== */
/* ---------- Buttons: what each kind is for (use these everywhere, add no one-off colours) ----------
   .btn-primary   ORANGE â€” the main action of a page or form:  Save settings, Create, Add, + New â€¦
   .btn           NEUTRAL â€” everything else, incl. a row's own Save / Edit / Rename / Back / presets
   .btn-danger    NEUTRAL BUTTON WITH RED TEXT + RED EDGE â€” Delete / Remove / Roll back
   .btn-test      BLUE â€” Test connection / Send test e-mail (checks something, changes nothing)
   .btn-sm        any of the above, smaller (inside a row or next to a field)
   The neutral button used to be the same colour as the card it sits on, so it read as bare text ("basic white"); it now has its own
   fill and edge in the dark theme (the light theme already had one). */
/* a row of fields with a button: everything lines up on the bottom edge (the old forms pushed the button down by the label's margin) */
.inline-form{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:flex-end;margin:0}
.inline-form > label,.card form.inline-form > label{display:flex !important;flex-direction:column;gap:5px;margin:0 !important;font-size:13px;font-weight:600;color:var(--text-soft)}
.inline-form > label input,.inline-form > label select{margin:0 !important}

.inline-form .grow{flex:1 1 220px}
.card form.inline-form input,.card form.inline-form select{margin-top:0}
/* Save / Test buttons that sit together under a form */
.form-actions-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.form-actions-row .muted{margin-left:4px}
/* ---------- Stacked record cards (Team, Departments, Mailboxes): one card per record, its details laid out DOWN the card ---------- */
.entity-list{display:flex;flex-direction:column;gap:14px;margin-top:10px}
.entity-card{border:1px solid var(--line);border-radius:14px;background:var(--card-2);overflow:hidden}
.entity-card.is-off{opacity:.72}
.entity-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:14px 18px;border-bottom:1px solid var(--line)}
.entity-title{font-size:16px;font-weight:700;color:var(--text);min-width:0}
.entity-sub{font-size:13px;color:var(--muted);overflow-wrap:anywhere}
.entity-badges{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto;align-items:center}
.entity-body{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px 22px;padding:16px 18px}
.entity-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.entity-k{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.entity-v{font-size:14px;color:var(--text);overflow-wrap:anywhere}
.entity-field.wide{grid-column:1/-1}
.entity-field select,.entity-field input[type=text]{width:100% !important;margin:0 !important}
.entity-field form{margin:0}
.entity-chips{display:flex;flex-wrap:wrap;gap:6px}
.entity-foot{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:12px 18px;border-top:1px solid var(--line);background:rgba(255,255,255,.02)}
.entity-foot form{margin:0;display:inline-flex}
.entity-foot .spacer{margin-left:auto}
.entity-more{border-top:1px dashed var(--line);padding:0 18px}
.entity-more > summary{cursor:pointer;list-style:none;padding:11px 0;font-size:13px;font-weight:600;color:var(--link)}
.entity-more > summary::-webkit-details-marker{display:none}
.entity-more > summary::before{content:"â–¸";display:inline-block;margin-right:6px;color:var(--muted);transition:transform .12s ease}
.entity-more[open] > summary::before{transform:rotate(90deg)}
.entity-more-body{padding:0 0 16px;display:flex;flex-direction:column;gap:14px}
.entity-more-body .toggles{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px 16px}
.entity-reorder{display:inline-flex;gap:4px}
.entity-reorder form{margin:0}
.entity-rename{display:flex;gap:8px;align-items:center;flex:1 1 260px;min-width:0;margin:0}
.entity-rename input{flex:1;min-width:0;margin:0 !important;font-weight:600}
@media  (max-width:640px){
  .entity-badges{margin-left:0}
  .entity-head,.entity-body,.entity-foot{padding-left:14px;padding-right:14px}
}
/* ---------- Sticky notes: pointer-based dragging (mouse AND touch) ---------- */
.sticky-handle{touch-action:none;-webkit-user-select:none;user-select:none}
.sticky-handle:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
.sticky-card.is-lifted{opacity:.35;outline:2px dashed rgba(0,0,0,.45)}
.sticky-card.drop-before{box-shadow:0 -5px 0 0 var(--blue)}
.sticky-card.drop-after{box-shadow:0 5px 0 0 var(--blue)}
.sticky-ghost{position:fixed;z-index:9999;pointer-events:none;opacity:.88;transform:rotate(1.5deg);box-shadow:0 14px 32px rgba(0,0,0,.45);margin:0 !important}
body.sticky-dragging,body.sticky-dragging *{cursor:grabbing !important}
/* the generic ".card form label" rule (block + bottom margin) must not stretch the toggle switches inside a record card */
.entity-card label.switch{display:inline-flex !important;margin:0 !important;font-size:13px;color:var(--text)}
.entity-card .inline-form{align-items:flex-start}

/* the Active switch on a .task-form (Automation rule form) keeps its flex layout */
.task-form label.widget-row,.card form label.widget-row{display:flex;margin-bottom:14px}
/* full-width rule-name box and the like on the Automation form */
.task-form fieldset.custom-fields{margin-bottom:16px}
/* =====================================================================
   Rampart Garrison â€” Build 135: Dev > Secrets
   ===================================================================== */
.secret-once{border-left:4px solid #34a853;background:rgba(52,168,83,.10)}
.secret-once-value{width:100%;box-sizing:border-box;margin:0 !important;padding:10px 12px !important;font:15px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace !important;letter-spacing:.02em}
.entity-card .entity-more-body .inline-form{align-items:flex-end}
.entity-card .entity-more-body .form-actions-row form.spacer{margin-left:auto !important}
.entity-badges .badge{text-transform:none}
/* =====================================================================
   Rampart Garrison â€” Build 136
   ===================================================================== */
/* Dev > Scheduled tasks: the result of a "Try it" test, shown inside the task's own card */
.sched-testresult{margin:10px 0;padding:12px 14px;border-radius:10px;border:1px solid var(--line);background:var(--card-2)}
.sched-testresult.is-ok{border-color:rgba(52,168,83,.55);background:rgba(52,168,83,.10)}
.sched-testresult.is-bad{border-color:rgba(229,83,75,.6);background:rgba(229,83,75,.10)}
.sched-testresult-msg{margin:6px 0 4px;font-size:14px;overflow-wrap:anywhere}
/* Bug Tracker: the Notes / History editor and the notes it produces */
.bug-note-form{display:block;margin-top:14px}

.bug-note-form .form-actions-row{margin-top:0}
.dep-row .bug-note-body{margin-top:4px;overflow-wrap:anywhere}
.bug-note-body p{margin:.3em 0}
.bug-note-body ul,.bug-note-body ol{margin:.3em 0 .3em 1.4em}
.bug-note-body table{border-collapse:collapse;margin:.5em 0;max-width:100%}
.bug-note-body th,.bug-note-body td{border:1px solid var(--line);padding:4px 8px}
.bug-note-body img{max-width:100%;height:auto;border-radius:6px}
.bug-note-body pre{background:var(--card-2);border:1px solid var(--line);border-radius:8px;padding:8px 10px;overflow:auto}
.bug-note-body blockquote{margin:.4em 0;padding-left:10px;border-left:3px solid var(--line);color:var(--text-soft)}
/* =====================================================================
   Rampart Garrison â€” Build 137: Dev > Environment, gateway status
   ===================================================================== */
.gw-card{border-left:4px solid var(--line)}
.gw-card.is-up{border-left-color:#34a853}
.gw-card.is-down{border-left-color:var(--red,#c5221f)}
.gw-card.is-fallback{border-left-color:#d9822b}
.gw-log{margin:8px 0 0;padding:10px 12px;border-radius:8px;background:var(--card-2);border:1px solid var(--line);font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:auto;max-height:220px;white-space:pre-wrap;overflow-wrap:anywhere}
.gw-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px 18px;margin:10px 0}
.gw-facts .k{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
/* =====================================================================
   Rampart Garrison â€” Build 139: System health, Warden Fishbowl panel, Automation form
   ===================================================================== */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* ---------- Dev > System health ---------- */
.health-banner{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;justify-content:space-between;border-left:4px solid var(--line)}
.health-banner.is-ok{border-left-color:#34a853}
.health-banner.is-warn{border-left-color:#d9822b}
.health-banner.is-fail{border-left-color:var(--red,#c5221f)}
.health-banner-main{display:flex;flex-direction:column;gap:3px;font-size:15px}
.health-group{padding-bottom:6px}
.health-row{display:flex;gap:12px;align-items:flex-start;padding:9px 0;border-top:1px solid var(--line)}
.health-row:first-of-type{border-top:0}
.health-ico{flex:none;width:22px;text-align:center;font-size:16px;line-height:1.4}
.health-body{flex:1 1 auto;min-width:0}
.health-label{font-weight:600;font-size:14px}
.health-msg{margin-top:2px;overflow-wrap:anywhere;line-height:1.45}
.health-fix{flex:none;align-self:center}
.health-row.health-fail .health-label{color:var(--danger-fg)}
.health-row.health-warn .health-label{color:var(--tint-warn-fg)}
.badge.health-ok{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.badge.health-warn{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.badge.health-fail{background:var(--tint-red-bg);color:var(--tint-red-fg)}
.badge.health-info{background:var(--tint-neutral-bg,rgba(255,255,255,.08));color:var(--tint-neutral-fg,var(--text-soft))}
@media  (max-width:640px){
  .health-row{flex-wrap:wrap}
  .health-fix{margin-left:34px}
}
/* ---------- Warden thread: Fishbowl side panel ---------- */
.wd-fb > summary{cursor:pointer;list-style:none}
.wd-fb > summary::-webkit-details-marker{display:none}
.wd-fb-body{margin-top:10px}
.wd-fb-block{border:1px solid var(--line);border-radius:10px;background:var(--card-2);padding:10px 12px;margin:0 0 10px}
.wd-fb-h{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:4px}
.wd-fb-table{margin:8px 0 0;font-size:13px}
.wd-fb-table th,.wd-fb-table td{padding:5px 8px}
/* ---------- Admin > Automation form ---------- */
.auto-form [hidden]{display:none !important}
.auto-form .auto-sec{margin-top:8px}
.auto-form .auto-who{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 14px;margin-bottom:10px;align-items:end}
.auto-form .auto-who > label{margin:0}
.auto-form code{font-size:12px}
.wd-fb .badge{text-transform:none}
/* ---------- Settings rows â€” Dev > Environment and Dev > Secrets (build 141, Bug Tracker #52 / #50) ----------
   One row = what it is on the left (name, code name, one line of help), its control on the right (field + one status line). */
.env-section[hidden],.kv-row[hidden]{display:none !important}
.group-card{margin-bottom:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--card);box-shadow:var(--shadow)}
.group-card > summary{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:12px 18px;cursor:pointer;list-style:none}
.group-card > summary::-webkit-details-marker{display:none}
.group-card > summary::before{content:"â–¸";color:var(--muted);transition:transform .12s}
.group-card[open] > summary::before{transform:rotate(90deg)}
.group-card-title{font-size:16px;font-weight:700}
.group-card > form,.group-card > .kv-list{padding:0 18px 16px;border-top:1px solid var(--line)}
.kv-list{display:flex;flex-direction:column}
.kv-row{display:grid;grid-template-columns:minmax(220px,2fr) minmax(260px,3fr);gap:6px 28px;padding:14px 0;border-top:1px solid var(--line)}
.kv-row:first-child{border-top:0}
.kv-label{margin-right:8px;font-size:14px;font-weight:600;color:var(--text)}
.kv-name{font-size:11px}
.kv-help{margin-top:4px;font-size:13px;line-height:1.45;color:var(--muted)}
.kv-control{display:flex;flex-direction:column;gap:6px;min-width:0}
.kv-control > input,.kv-control > select{width:100%;margin:0 !important}
.kv-meta,.kv-status{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:12px}
.kv-status{font-size:13px}
.kv-note{font-size:12px;line-height:1.45;color:var(--warn-fg)}
.kv-inline{display:flex;gap:8px;align-items:center;margin:0}
.kv-inline input{flex:1;min-width:0;margin:0 !important}
.kv-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.kv-actions-end{margin-left:auto !important}
.kv-card .kv-row:first-child{padding-top:0}
.kv-card .kv-row:last-child{padding-bottom:0}
.kv-card.is-bad{border-left:4px solid var(--danger-fg)}
.kv-tally{display:flex;flex-wrap:wrap;gap:6px 16px;margin:8px 0 0;font-size:13px}
.src{font-size:12px;font-weight:600;white-space:nowrap}
.src-database{color:var(--tint-green-fg)}
.src-env{color:var(--warn-fg)}
.src-default{color:var(--muted)}
.src-none{color:var(--danger-fg)}
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 16px}
.toolbar input[type=search]{flex:1 1 280px;max-width:420px;margin:0 !important}
.toolbar-spacer{flex:1}
.notice-bad{background:var(--tint-red-bg);border-color:var(--danger-line);color:var(--tint-red-fg)}
.mr-8{margin-right:8px}
@media  (max-width:760px){
  .kv-row{grid-template-columns:1fr}
  .kv-inline{flex-wrap:wrap}
}

/* Rampart Garrison â€” developer toolbar (build 141, Bug Tracker #51). Loaded only when a Dev has switched the toolbar on. Uses the theme variables. */
.gdbg{position:fixed;left:0;right:0;bottom:0;z-index:99999;font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--text);pointer-events:none}
.gdbg > *{pointer-events:auto}
.gdbg-bar{display:flex;align-items:center;gap:16px;width:100%;margin:0;padding:7px 14px;border:0;border-top:3px solid var(--blue);background:var(--navy-800,#152740);color:#e7edf5;
  font:inherit;text-align:left;cursor:pointer;overflow-x:auto;white-space:nowrap;box-shadow:0 -4px 16px rgba(0,0,0,.35)}
.gdbg-bar:hover{background:var(--navy-700,#1c3350)}
.gdbg-warn .gdbg-bar{border-top-color:#d9822b}
.gdbg-bar small{opacity:.7}
.gdbg-logo{font-size:16px}
.gdbg-route{margin-left:auto;opacity:.75;max-width:40vw;overflow:hidden;text-overflow:ellipsis}
.gdbg-badge{padding:1px 9px;border-radius:999px;font-weight:700;font-size:12px}
.gdbg-badge.is-ok{background:rgba(76,193,111,.2);color:#8fe6ab}
.gdbg-badge.is-warn{background:rgba(249,171,0,.2);color:#ffd37a}
.gdbg-badge.is-bad{background:rgba(229,83,75,.3);color:#ffb4a8}
.gdbg-panel{max-height:58vh;display:flex;flex-direction:column;background:var(--card);border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(0,0,0,.35)}
.gdbg-panel[hidden]{display:none}
.gdbg-tabs{display:flex;gap:2px;padding:6px 10px 0;overflow-x:auto;border-bottom:1px solid var(--line);flex:none}
.gdbg-tab{padding:7px 14px;border:0;border-bottom:3px solid transparent;background:none;color:var(--muted);font:inherit;font-weight:700;cursor:pointer;white-space:nowrap}
.gdbg-tab:hover{color:var(--text)}
.gdbg-tab.on{color:var(--text);border-bottom-color:var(--blue)}
.gdbg-pane{display:none;padding:10px 14px;overflow:auto;flex:1 1 auto;min-height:60px}
.gdbg-pane.on{display:block}
.gdbg-pane table{width:100%;border-collapse:collapse}
.gdbg-pane th{padding:4px 8px;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);border-bottom:1px solid var(--line)}
.gdbg-pane td{padding:4px 8px;vertical-align:top;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.gdbg-pane code{background:none;border:0;padding:0;font-size:12px;color:var(--text)}
.gdbg-pane tr.is-slow td{background:rgba(249,171,0,.10)}
.gdbg-pane tr.is-err td{background:rgba(229,83,75,.14)}
.gdbg-num{white-space:nowrap;text-align:right}
.gdbg-sub{margin-top:2px;font-size:12px;color:var(--muted)}
.gdbg-bad{color:var(--danger-fg)}
.gdbg-list{margin:4px 0 10px 18px;padding:0;font-size:12px}
.gdbg-foot{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 14px;border-top:1px solid var(--line);flex:none;background:var(--card-2)}
.gdbg-btn{display:inline-block;padding:5px 11px;border:1px solid var(--btn-line);border-radius:8px;background:var(--btn-bg);color:var(--text);font:inherit;font-weight:700;cursor:pointer;text-decoration:none}
.gdbg-btn:hover{background:var(--btn-bg-h);text-decoration:none}
@media   print{.gdbg{display:none}}

/* =====================================================================
   Rampart Garrison â€” Build 142: wide pages, status tabs, Bug Tracker list, Release-notes list, Deploy
   ===================================================================== */
/* a page that wants the full width of the screen wraps itself in  <div class="page-wide">  (no template change needed) */
main.container:has(.page-wide){max-width:1680px}

/* status tabs: a row of links that are also filters, each with a count */
.seg{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}
.seg-item{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border:1px solid var(--btn-line);border-radius:999px;background:var(--btn-bg);color:var(--text);font-size:14px;font-weight:600;text-decoration:none}
.seg-item:hover{background:var(--btn-bg-h);text-decoration:none}
.seg-item.on{background:var(--blue);border-color:var(--blue);color:#fff}
.seg-n{padding:0 8px;border-radius:999px;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);font-size:12px;font-weight:700}
.seg-item.on .seg-n{background:rgba(255,255,255,.25);color:#fff}

/* Bug Tracker list */
.bug-toolbar select{max-width:230px}
.bug-toolbar input[type=search]{flex:1 1 260px;max-width:460px}
.bug-table{table-layout:auto}
.bug-table .bt-x{width:36px;padding-right:0}
.bug-table .bt-id{width:48px;text-align:right}
.bug-table .bt-title{min-width:320px;width:44%}
.bug-table .bt-cat{min-width:200px}
.bug-table .bug-item:hover > .bug-row td{background:var(--hover-row)}
.bug-kind{margin-right:6px}
.bug-prev{margin-top:3px;font-size:13px;line-height:1.4;color:var(--muted);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
.bug-table tbody.bug-item > tr:last-child > td{border-bottom:1px solid var(--line)}
.bug-detail > td{padding-top:4px;padding-bottom:14px;background:var(--card-2)}
.bug-detail-h{margin:6px 0 2px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.bug-detail-body{max-width:980px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.bug-detail-body img{max-width:min(100%,640px);height:auto;border-radius:8px;border:1px solid var(--line)}
.bug-detail-body p{margin:.3em 0}
.bug-detail-body ul,.bug-detail-body ol{margin:.3em 0 .3em 1.4em}
.bug-detail-foot{margin-top:8px}
.bug-detail[hidden]{display:none}

/* Release notes â€” the Development list */
.rn-table .rn-build{width:1%;white-space:nowrap}
.rn-table .rn-title{min-width:300px}
.rn-table .rn-chips{white-space:nowrap}
.rn-table tr.is-current > td{background:var(--accent-wash)}
.rn-chip{display:inline-block;margin-right:6px;padding:1px 8px;border-radius:999px;font-size:12px;font-weight:600;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);white-space:nowrap}
.rn-table tr[hidden]{display:none}

/* Deploy â€” the change-log link card */
.deploy-last{display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center}
.deploy-last .grow{flex:1 1 320px;min-width:0}
.deploy-log{max-width:760px;max-height:260px;overflow:auto;white-space:pre-wrap}

/* =====================================================================
   Rampart Garrison â€” Build 143: purple badge, collapsible group cards, searchable drop-down, audit log, export page
   ===================================================================== */
.badge-purple{background:var(--tint-purple-bg);color:var(--tint-purple-fg)}
.seg-item .badge-purple{margin-left:2px}

/* collapsible card sections (details.group-card â€” also used by Dev > Environment) */
.group-card > .group-card-body{padding:14px 18px 16px;border-top:1px solid var(--line)}
.group-card > summary .group-card-hint{margin-left:auto;font-size:13px;color:var(--muted)}
.group-card > summary:hover{background:var(--hover-row)}
.group-card > summary:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;border-radius:var(--radius)}
.group-card.is-warn{border-left:4px solid var(--tint-warn-fg)}
.group-card.is-bad{border-left:4px solid var(--danger-fg)}
.page-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 14px}

/* searchable drop-down (select[data-combo]) */
.combo{position:relative;display:block;flex:0 1 330px;min-width:240px;width:100%;max-width:520px}
.task-form .combo,.card form .combo{max-width:none}
.combo-native{display:none !important}
.combo-input{width:100%;margin:0;padding:8px 16px;font:inherit;font-size:14px;line-height:1.35;color:var(--text);background:var(--field-bg);border:1px solid var(--field-line);border-radius:var(--field-radius)}
.task-form .combo-input,.card form .combo-input{margin-top:5px}
.combo-input:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--accent-wash)}
.combo-panel{position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);max-height:340px;overflow:auto;padding:6px;background:var(--card);border:1px solid var(--field-line);border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.4)}
.combo-panel[hidden]{display:none}
.combo-group{position:sticky;top:-6px;margin:0 -6px;padding:7px 14px 4px;background:var(--card);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.combo-group[hidden],.combo-opt[hidden],.combo-none[hidden]{display:none}
.combo-opt{padding:7px 12px;border-radius:9px;font-size:14px;line-height:1.35;color:var(--text);cursor:pointer}
.combo-opt.in-group{padding-left:22px}
.combo-opt.is-active{background:var(--accent-wash)}
.combo-opt.is-selected{font-weight:700}
.combo-opt.is-selected::after{content:" âœ“";color:var(--blue)}
.combo-none{padding:10px 12px;font-size:13px;color:var(--muted)}

/* Audit log */
.audit-table td{vertical-align:top}
.audit-table .au-when{white-space:nowrap}
.audit-table .au-when small{display:block;color:var(--muted);font-size:12px}
.audit-table .au-who{white-space:nowrap}
.audit-table .au-what small{display:block;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.audit-table .au-what{min-width:220px}
.audit-table .au-ip{white-space:nowrap;font-size:12px;color:var(--muted)}
.au-chips{display:flex;flex-wrap:wrap;gap:4px 6px}
.au-chip{display:inline-flex;gap:5px;align-items:baseline;padding:1px 9px;border-radius:999px;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);font-size:12px;line-height:1.5}
.au-chip b{font-weight:600;color:var(--muted)}
.au-chip.is-move{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.au-pager{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;margin-top:14px}
.au-pager .on{background:var(--blue);border-color:var(--blue);color:#fff}
.au-summary{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0 0 12px;font-size:13px;color:var(--muted)}

/* Export page */
.xp-checks label.check-row{margin:0 0 8px}
.xp-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.xp-fine{margin:10px 0 0;font-size:13px;color:var(--muted)}

/* Tidy report (Bug Tracker > Groups & Categories) */
.tidy-list{margin:6px 0 0 18px;padding:0;font-size:13px}
.tidy-list li{margin:2px 0}
.xp-ico{width:34px}

/* =====================================================================
   Rampart Garrison â€” Build 144: Fishbowl reports (Reports hub + the seven report pages)
   ===================================================================== */
.rp-bad{color:var(--danger-fg)}
.rp-warn{color:var(--warn-fg)}
.stat .num.rp-bad{color:var(--danger-fg)}
.stat .num.rp-warn{color:var(--warn-fg)}
.rp-note{margin-top:0}
.rp-group td{padding:9px 12px;background:var(--th-bg);font-weight:700;border-bottom:1px solid var(--line)}
.rp-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px;margin-bottom:6px}
.rp-card{display:block;margin:0;color:var(--text);transition:border-color .12s,transform .12s}
.rp-card:hover{border-color:var(--blue);transform:translateY(-1px);text-decoration:none}
.rp-card-title{font-size:16px;font-weight:700;margin:0 0 6px}
.rp-card-ico{margin-right:4px}
.rp-card-text{margin:0 0 8px;font-size:14px;line-height:1.5;color:var(--text-soft)}
.rp-card-from{margin:0}
.toolbar .chk{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--text-soft);white-space:nowrap}
.toolbar .chk input{margin:0;width:auto}
@media   print{
  .toolbar,.seg,.head-actions,.rp-note{display:none !important}
  .data-table{font-size:11px}
}
/* build 144: a page title with a long subtitle keeps its actions on the same row when there is room (the left block may shrink) */
.page-head > div:not(.head-actions):first-child{flex:1 1 360px;min-width:0}

/* =====================================================================
   BUILD 151 â€” PHONE LAYOUT PASS
   Found with an audit that opened every page's markup at 390 px wide (114 pages). Three faults caused almost everything:
     1. STRETCHED CARDS. On a phone .kpi-grid is a column, and .kpi-card is "flex:1 1 240px" â€” in a column that 240px is a minimum HEIGHT, so every
        counter card was 240px tall with a third of it empty. (Trends, KPI, Stats, Customer, Vendor, VMI pages and My Dashboard.)
     2. SIDEWAYS SCROLL. A grid with "1fr" cannot shrink below its content, so one wide table (or long word) in a card made the whole page wider than the
        screen. Every Admin page did this through .settings-shell, as did the Task page, Trends > Sales Orders, templates and more.
     3. A 640px minimum width on EVERY table, so even a three-column table scrolled sideways.
   Everything below is phone-only (or harmless on a desktop) and is the last thing in this file on purpose.
   ===================================================================== */

/* a note inside a section heading ("â€” waiting to be converted") is not the heading: no accent bar of its own (it showed as a second orange line when the heading wrapped) */
.section-title span span { padding-left: 0; }
.section-title span span::before { content: none; }

/* grid children may shrink below their content (this is what stops one wide thing widening the page) */
.settings-shell > *, .cols > *, .grid-2 > *, .detail-grid > *, .dash-halves > *, .md-editor > *, .mini-grid > *, .oi-grid > *, .sig-editor > *,
.kv-row > *, .goal-grid > *, .stat-grid > *, .dash-pick-list > *, .sticky-layout > *, .wp-fgrid > * { min-width: 0; }
fieldset { min-width: 0; }
.muted, .small, p, li, dd, dt, h1, h2, h3, td, th { overflow-wrap: break-word; }
/* check boxes and radio buttons were being given the 44px tall, 16px text size meant for text boxes */
.card form input:is([type=checkbox], [type=radio], [type=file], [type=range], [type=color]) { min-height: 0; font-size: inherit; }

@media   (max-width: 980px) { .sig-editor { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 900px) { .dash-pick-list { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 860px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 820px) { .dash-halves { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 760px) { .cols, .grid-2, .md-editor { grid-template-columns: minmax(0, 1fr); } .kv-row { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 720px) { .settings-shell { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 640px) { .mini-grid { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 480px) { .oi-grid { grid-template-columns: minmax(0, 1fr); } }

/* a table that has no scroll wrapper around it (nav.js wraps them; this is for the moment before it runs, or with scripts off) scrolls by itself instead of widening the page */
@media   (max-width: 980px) {
  main table:not(.table-scroll table) { display: block; max-width: 100%; min-width: 0 !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media   (max-width: 760px) {
  /* 1. counter cards are as tall as what is in them */
  .kpi-grid { gap: 12px; }
  .kpi-card { flex: 0 0 auto; min-width: 0; padding: 16px 18px; }
  .kpi-value { font-size: 28px; overflow-wrap: anywhere; }
  .kpi-title { margin-bottom: 6px; }
  .stat .num, .stat-link .num { font-size: 26px; }
  .stat, .stat-link { padding: 14px 10px; }

  /* 3. only a table with many columns scrolls sideways; a short one just fits and wraps */
  .tasks-table, .data-table { min-width: 0; }
  .tasks-table:has(th:nth-child(6)), .data-table:has(th:nth-child(6)) { min-width: 640px; }
  .data-table th, .data-table td, .tasks-table th, .tasks-table td { padding: 9px 10px; }
  /* tables that sit directly in a panel without a scroll wrapper (the Warden Fishbowl panel) */
  .wd-fb-table { display: block; max-width: 100%; overflow-x: auto; min-width: 0; }
  /* a hint that a table scrolls: a soft edge on the side that has more */
  .card .table-scroll {
    background:
      linear-gradient(to right, var(--card) 30%, rgba(0,0,0,0)) 0 0 / 36px 100% no-repeat local,
      linear-gradient(to left,  var(--card) 30%, rgba(0,0,0,0)) 100% 0 / 36px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%,   rgba(0,0,0,.38), rgba(0,0,0,0)) 0 0 / 12px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.38), rgba(0,0,0,0)) 100% 0 / 12px 100% no-repeat scroll;
  }

  /* a filter bar is a column on a phone, and "flex: 1 1 420px" on its search box then means "420px TALL" (a giant oval) */
  .filters > * { flex: 0 0 auto; }
  .filters > input.search-wide, .filters > input[type=search] { flex: 0 0 auto; min-height: 44px; }

  /* a text box, drop-down or text area is never wider than the screen */
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=color]), select, textarea { max-width: 100%; }
  input[style*="min-width"], select[style*="min-width"] { min-width: 0 !important; }

  /* the Warden inbox has fourteen counters; stacked they filled three screens before the first e-mail. On a phone they are one strip you swipe along. */
  .stat-grid:has(> a[href^="/warden?tab="]) { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; margin-bottom: 14px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .stat-grid:has(> a[href^="/warden?tab="]) > .stat { flex: 0 0 116px; min-width: 0; padding: 10px 8px; scroll-snap-align: start; }
  .stat-grid:has(> a[href^="/warden?tab="]) > .stat .num { font-size: 22px; }
  .stat-grid:has(> a[href^="/warden?tab="]) > .stat .lbl { font-size: 11px; line-height: 1.25; }

  /* My Dashboard: the little counter tiles go two to a row (they are a label and a number), so a dashboard of 20 tiles is not 20 screens long */
  .kpi-grid.dash-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-grid.dash-stats > .kpi-card { padding: 12px 14px; }
  .kpi-grid.dash-stats .kpi-value { font-size: 24px; }
  .kpi-grid.dash-stats .kpi-title { font-size: 11px; }

  /* cards and the page header a little tighter */
  .card { padding: 14px; margin-bottom: 14px; }
  .page-head { margin-bottom: 14px; }
  .section-title { margin: 18px 0 8px; }
  .chart-card { padding: 12px 12px; }

  /* a long label inside a badge wraps (a pill that can only be one line was running off the screen) */
  .badge, .status-pill { white-space: normal; max-width: 100%; }
  .kpi-offline > * { min-width: 0; max-width: 100%; }

  /* forms made of a row of controls wrap instead of running off the screen */
  .opt-row, .add-dep, .dash-sec-rename, .dash-add-section, .bucket-row, .att-upload, .warden-bulk-bar, .fi-actions, .field-item, .sticky-card, .sticky-card-actions, .integ-card,
  form[style*="display:flex"], form[style*="display: flex"] { flex-wrap: wrap; }
  form[style*="flex"] > input:not([type=checkbox]):not([type=radio]):not([type=hidden]), form[style*="flex"] > select { min-width: 0; flex: 1 1 120px; }
  .dash-add-section > input { min-width: 0; flex: 1 1 140px; }
  .integ-body, .field-item > div:first-child, .sticky-card > * { min-width: 0; }
  .integ-body { flex: 1 1 200px; }
  .opt-row > input, .opt-row > select, .add-dep > input, .add-dep > select, .dash-sec-rename > input, .bucket-row > *, .att-upload > input { min-width: 0; }
  .add-dep > input, .dash-sec-rename > input { flex: 1 1 140px; }
  .field-editor .opt-row { flex-wrap: wrap; }
  .field-editor .opt-row .opt-input, .opt-input { flex: 1 1 140px; min-width: 0; }
  .opt-preview { display: none; }
  .cat-form, .bucket-del { flex-wrap: wrap; }
  .cat-label { min-width: 0; flex: 1 1 140px; }
  .bucket-label { min-width: 0; max-width: 100%; }
  .opt-builder { padding: 12px; }
}

@media   (max-width: 720px) {
  /* Admin / Settings menu: a long column of 20 items (each with a description) pushed the page 1,000px down. On a phone it is one row you swipe along. */
  .settings-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .settings-nav .snav-group { display: none; }
  .settings-nav .snav-item { flex: 0 0 auto; padding: 8px 12px; white-space: nowrap; align-items: center; }
  .settings-nav .snav-desc { display: none; }
  .settings-nav .snav-icon { font-size: 16px; }
  .settings-panel { padding: 14px; min-height: 0; }
}

@media   (max-width: 340px) { .kpi-grid.dash-stats { grid-template-columns: minmax(0, 1fr); } }
@media   (max-width: 520px) {
  .card { padding: 12px; }
  .container { padding: 0 10px; }
  .page-head h1 { font-size: 19px; }
  
}

/* =====================================================================
   OUTLOOK LAYOUT  (build 155) â€” the Warden screens: inbox (folders Â· list Â· reading pane), the conversation, the new-email window, and the module bar
   ---------------------------------------------------------------------
   Same palette as the rest of the app: ONLY the theme variables above (navy surfaces, safety-orange accent via --blue / --link / --accent-wash, the tints for
   avatars and chips). No colour is written out here, so the dark and the light theme both work. Every selector starts with .ox- (or is scoped by .ox-app /
   .ox-thread / html.ox-embedded), so nothing here can touch another page. Markup: app/Views/warden/index.php, show.php, compose.php, _plus_head.php.
   ===================================================================== */
main.container:has(.ox-app){max-width:none;margin:0;padding:0}
body:has(.ox-app) .footer{display:none}
.ox-app [hidden],.ox-thread [hidden],.ox-compose [hidden]{display:none !important}
html[data-theme="dark"] .ox-app,html[data-theme="dark"] .ox-thread,html[data-theme="dark"] .ox-compose{color-scheme:dark}
html[data-theme="light"] .ox-app,html[data-theme="light"] .ox-thread,html[data-theme="light"] .ox-compose{color-scheme:light}

/* ---------- the window ---------- */
.ox-app{--ox-folder-w:248px;--ox-list-w:400px;--ox-r:6px;
  display:grid;grid-template-columns:var(--ox-folder-w) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"cmd cmd" "folders main";
  height:calc(100vh - var(--ox-top,64px));height:calc(100dvh - var(--ox-top,64px));min-height:440px;background:var(--card);color:var(--text);position:relative}
.ox-app.ox-fold-hidden{grid-template-columns:0 minmax(0,1fr)}
.ox-app.ox-fold-hidden .ox-folders{display:none}
html.ox-embedded .ox-app{display:none}

/* ---------- command bar ---------- */
.ox-cmd{grid-area:cmd;display:flex;align-items:center;gap:6px;padding:6px 10px;min-height:48px;background:var(--card-2);border-bottom:1px solid var(--line);position:relative;z-index:6}
.ox-cbtn,.ox-iconbtn,.ox-act{font:inherit;cursor:pointer}
.ox-cbtn,.ox-iconbtn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 10px;border:1px solid transparent;border-radius:var(--ox-r);background:transparent;color:var(--text);font-size:13px;font-weight:600;white-space:nowrap}
.ox-iconbtn{width:34px;padding:0;color:var(--muted)}
.ox-cbtn:hover,.ox-iconbtn:hover{background:var(--btn-bg-h);color:var(--text)}
.ox-cbtn:focus-visible,.ox-iconbtn:focus-visible,.ox-act:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.ox-cmd .ox-new{height:32px;padding:0 14px;border-radius:var(--ox-r);gap:7px}
.ox-sync{display:contents}
.ox-lastsync{color:var(--muted);font-size:12px;white-space:nowrap;margin-left:2px}
.ox-search{position:relative;display:flex;align-items:center;gap:6px;flex:1 1 380px;min-width:0;max-width:600px;margin:0 0 0 auto}
.ox-search-box{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;height:34px;padding:0 12px;border:1px solid var(--field-line);border-radius:var(--ox-r);background:var(--field-bg);color:var(--muted)}
.ox-search-box:focus-within{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue)}
.ox-app .ox-search-box input#wp-search{flex:1 1 auto;width:auto;min-width:0;max-width:none;height:100%;padding:0;border:0;outline:0;border-radius:0;background:transparent;color:var(--text);font-size:14px;box-shadow:none}
.ox-cmd .wp-fcount{margin-left:2px}
.ox-panes{display:flex;gap:2px;margin-left:auto}
.ox-app[data-pane="right"] .ox-iconbtn[data-ox-pane="right"],.ox-app[data-pane="bottom"] .ox-iconbtn[data-ox-pane="bottom"],.ox-app[data-pane="off"] .ox-iconbtn[data-ox-pane="off"]{background:var(--accent-wash);color:var(--link)}
.ox-app .ox-filter-panel{position:absolute;top:calc(100% + 8px);right:0;left:auto;flex:none;order:0;width:min(780px,92vw);z-index:30;padding:16px;background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.45)}

/* ---------- folder pane ---------- */
.ox-folders{grid-area:folders;min-height:0;overflow-y:auto;padding:8px 6px 18px;background:var(--card-2);border-right:1px solid var(--line)}
.ox-fsec{margin:0 0 4px}
.ox-fhead{display:flex;align-items:center;gap:6px;padding:8px 8px 6px;color:var(--text);font-size:13px;font-weight:700;text-decoration:none;border-radius:var(--ox-r)}
.ox-fhead .ox-ic{flex:none;color:var(--muted)}
.ox-fhead-link:hover{background:var(--hover-row);text-decoration:none}
.ox-fhead-static{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding-left:12px}
.ox-fhead-t{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ox-fsub{margin-left:auto;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:400;color:var(--muted)}
.ox-flist{display:flex;flex-direction:column;gap:1px;padding:0 0 2px}
.ox-folder{position:relative;display:flex;align-items:center;gap:10px;height:34px;padding:0 10px 0 16px;border-radius:var(--ox-r);color:var(--text);font-size:14px;text-decoration:none}
.ox-folder:hover{background:var(--hover-row);text-decoration:none}
.ox-folder.on{background:var(--accent-wash);font-weight:700}
.ox-folder.on::before{content:"";position:absolute;left:3px;top:7px;bottom:7px;width:3px;border-radius:2px;background:var(--blue)}
.ox-folder .ox-ic{flex:none;color:var(--muted)}
.ox-folder.on .ox-ic{color:var(--link)}
.ox-fl{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ox-fcount{flex:none;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.ox-t-attn .ox-fl{font-weight:600}
.ox-t-attn .ox-fcount{color:var(--link);font-weight:700}
.ox-t-danger .ox-fl{font-weight:600}
.ox-t-danger .ox-fcount{color:var(--danger-fg);font-weight:700}
.ox-fsep{height:1px;margin:6px 10px;background:var(--line)}
.ox-tools{margin-top:10px;padding-top:6px;border-top:1px solid var(--line)}

/* ---------- list + reading pane ---------- */
.ox-main{grid-area:main;display:grid;grid-template-columns:var(--ox-list-w) 6px minmax(0,1fr);min-width:0;min-height:0}
.ox-app[data-pane="bottom"] .ox-main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,var(--ox-list-h,42%)) 6px minmax(0,1fr)}
.ox-app[data-pane="off"] .ox-main{grid-template-columns:minmax(0,1fr)}
.ox-app[data-pane="off"] .ox-read,.ox-app[data-pane="off"] .ox-split{display:none}
.ox-split{position:relative;z-index:2;background:transparent;cursor:col-resize;touch-action:none}
.ox-split::after{content:"";position:absolute;top:0;bottom:0;left:2px;right:2px;border-radius:2px;background:transparent;transition:background .12s}
.ox-split:hover::after,.ox-split:focus-visible::after,.ox-split.drag::after{background:var(--blue)}
.ox-split:focus-visible{outline:0}
.ox-app[data-pane="bottom"] .ox-split{cursor:row-resize}
.ox-app[data-pane="bottom"] .ox-split::after{left:0;right:0;top:2px;bottom:2px}

.ox-list{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--card);border-right:1px solid var(--line)}
.ox-app[data-pane="bottom"] .ox-list{border-right:0;border-bottom:1px solid var(--line)}
.ox-list-head{flex:none;position:relative;padding:10px 12px 4px;border-bottom:1px solid var(--line)}
.ox-lh-row{display:flex;align-items:center;gap:10px;min-height:34px}
.ox-selall{display:grid;place-items:center;width:20px;margin:0;cursor:pointer}
.ox-selall input,.ox-check input{width:16px;height:16px;margin:0;accent-color:var(--blue);cursor:pointer}
.ox-title{margin:0;font-size:18px;font-weight:700;line-height:1.2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ox-total{flex:none;color:var(--muted);font-size:12px}
.ox-seg{display:inline-flex;gap:14px;margin:0 0 0 auto}
.ox-seg a{padding:5px 1px;border-bottom:2px solid transparent;color:var(--muted);font-size:13px;font-weight:600;text-decoration:none}
.ox-seg a:hover{color:var(--text);text-decoration:none}
.ox-seg a.on{color:var(--text);border-bottom-color:var(--blue)}
.ox-seg-sent{margin:2px 0 4px}
.ox-lh-note{display:flex;align-items:center;gap:6px;padding:2px 0 6px 30px;color:var(--muted);font-size:12px}
.ox-chips{margin:0 0 6px;padding:0 0 0 30px;display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.ox-pulse{flex:none;margin:0;padding:7px 12px;border-width:0 0 1px;border-radius:0;font-size:13px}

.ox-rows{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;outline:0}
.ox-group{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:4px;padding:9px 12px 5px;background:var(--card);color:var(--muted);font-size:12px;font-weight:700}
.ox-row{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;padding:9px 12px 9px 14px;border-bottom:1px solid var(--line);cursor:pointer}
.ox-row:hover{background:var(--card-2)}
.ox-row.ox-active{background:var(--accent-wash)}
.ox-row.ox-unread::before,.ox-row.ox-active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--blue)}
.ox-row.wp-row-on{outline:2px solid var(--blue);outline-offset:-2px}
.ox-lead{position:relative;width:36px;height:36px;margin-top:2px}
.ox-avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;font-size:13px;font-weight:700;letter-spacing:.02em;user-select:none}
.ox-av-0{background:var(--tint-blue-bg);color:var(--tint-blue-fg)}
.ox-av-1{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.ox-av-2{background:var(--tint-purple-bg);color:var(--tint-purple-fg)}
.ox-av-3{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.ox-av-4{background:var(--accent-wash);color:var(--link)}
.ox-av-5{background:var(--tint-neutral-bg);color:var(--tint-neutral-fg)}
.ox-check{position:absolute;inset:0;display:grid;place-items:center;margin:0;border-radius:50%;background:var(--card-2);opacity:0;cursor:pointer}
.ox-row:hover .ox-check,.ox-check:focus-within,.ox-check:has(input:checked),.ox-app:has(.warden-select-row:checked) .ox-check{opacity:1}
.ox-body{min-width:0;display:flex;flex-direction:column;gap:1px}
.ox-top{display:flex;align-items:center;gap:6px;min-width:0}
.ox-from{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:var(--text)}
.ox-unread .ox-from{font-weight:700}
.ox-replied{display:inline-flex;flex:none;color:var(--muted)}
.ox-meta{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto}
.ox-when{color:var(--muted);font-size:12px;white-space:nowrap}
.ox-unread .ox-when{color:var(--link);font-weight:600}
.ox-star{display:inline-flex;color:var(--hivis)}
.ox-star .ox-ic{fill:currentColor}
.ox-sub{display:flex;align-items:center;gap:6px;min-width:0}
.ox-app .ox-subject{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-soft);font-size:13.5px;text-decoration:none}
.ox-app .ox-subject:hover{text-decoration:none;color:var(--text)}
.ox-unread .ox-subject{color:var(--link);font-weight:600}
.ox-count{flex:none;min-width:18px;padding:0 5px;border-radius:9px;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);font-size:11px;line-height:18px;text-align:center}
.ox-has-att{flex:none;display:inline-flex;align-items:center;color:var(--muted)}   /* 3.2.6: the paperclip next to a conversation's subject in the list pane */
.ox-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12.5px}
.ox-tags{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin-top:4px;color:var(--muted);font-size:12px}
.ox-tags .badge{padding:1px 8px;font-size:11px}
.ox-owner{display:inline-flex;align-items:center;gap:4px}
.ox-none{font-style:italic}
.ox-wait{color:var(--warn-fg);font-weight:600}
.ox-actions{position:absolute;right:10px;top:50%;display:flex;gap:4px;padding:3px;border-radius:var(--ox-r);background:var(--card-2);box-shadow:var(--shadow);opacity:0;transform:translateY(-50%);pointer-events:none}
.ox-row:hover .ox-actions,.ox-row:focus-within .ox-actions{opacity:1;pointer-events:auto}
.ox-act{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--btn-line);border-radius:var(--ox-r);background:var(--btn-bg);color:var(--muted)}
.ox-act:hover{background:var(--btn-bg-h);color:var(--text)}
.ox-act-danger:hover{color:var(--danger-fg);border-color:var(--danger-line)}
.ox-empty{display:grid;justify-items:center;gap:6px;padding:56px 24px;color:var(--muted);text-align:center}
.ox-empty .ox-ic{opacity:.55}
.ox-empty p{margin:6px 0 0;font-size:14px}
.ox-pager{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-top:1px solid var(--line);background:var(--card)}

/* ---------- reading pane ---------- */
.ox-read{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--card)}
.ox-frame{flex:1 1 auto;width:100%;min-height:0;border:0;background:var(--card)}
.ox-read-empty{margin:auto;display:grid;justify-items:center;gap:6px;padding:24px;color:var(--muted);text-align:center}
.ox-read-empty .ox-ic{opacity:.5}
.ox-read-empty h2{margin:8px 0 0;color:var(--text);font-size:18px;font-weight:600}
.ox-read-empty p{margin:0;font-size:14px}
.ox-read-empty kbd,.ox-app kbd{padding:0 6px;border:1px solid var(--btn-line);border-bottom-width:2px;border-radius:4px;font-size:12px}

/* ---------- module bar (every other Warden page) ---------- */
.wp-nav{display:flex;flex-wrap:wrap;gap:2px;margin:0 0 16px;border-bottom:1px solid var(--line)}
.wp-nav a{display:inline-flex;align-items:center;gap:7px;margin-bottom:-1px;padding:9px 13px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--text-soft);font-size:14px;font-weight:600;text-decoration:none}
.wp-nav a:hover{background:var(--hover-row);color:var(--text);text-decoration:none}
.wp-nav a.on{background:transparent;color:var(--text);border-bottom-color:var(--blue)}
.wp-nav a .ox-ic{color:var(--muted)}
.wp-nav a.on .ox-ic{color:var(--link)}
.wp-nav .wp-count{margin:0;min-width:18px;padding:0 6px;border-radius:9px;background:var(--blue);color:#fff;font-size:11px;line-height:18px;text-align:center}

/* ---------- the conversation (in the reading pane, or as a page of its own) ---------- */
html.ox-embedded body{background:var(--card)}
html.ox-embedded .topbar,html.ox-embedded .footer,html.ox-embedded .wp-nav,html.ox-embedded #mobile-drawer,html.ox-embedded #mobile-drawer-backdrop,html.ox-embedded .ox-only-page{display:none !important}
html.ox-embedded main.container{max-width:none;margin:0;padding:0}
.ox-thread{max-width:1000px;margin:0 auto}
html.ox-embedded .ox-thread{max-width:none;padding:0 22px 32px}
.ox-thread .card{padding:0;margin:0 0 14px;border:0;border-radius:0;background:transparent;box-shadow:none}
.ox-thread > section.card,.ox-thread > details.card{padding-top:12px;border-top:1px solid var(--line)}
.ox-thread .wp-banner{margin:0 0 8px;border-radius:var(--ox-r,6px)}
html.ox-embedded .ox-thread .wp-banner:first-child{margin-top:10px}
.ox-read-head{padding:18px 0 6px}
.ox-read-head h1{margin:0 0 4px;font-size:21px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.ox-read-sub{display:flex;flex-wrap:wrap;gap:4px 12px;color:var(--muted);font-size:13px}
.ox-read-cmd{position:sticky;top:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:0 0 4px;padding:6px 0;background:var(--card);border-bottom:1px solid var(--line)}
.ox-read-cmd form{margin:0}

.ox-read-cmd .badge{display:inline-flex;align-items:center}




.ox-read-cmd .ox-sp{flex:1 1 auto}
.ox-read-cmd .ox-star-on .ox-ic{color:var(--hivis);fill:currentColor}
.ox-thread > section.card.wp-actionbar{padding:8px 0;border-top:0}
.ox-thread .wp-pop > summary.btn{border-color:var(--btn-line)}
.ox-thread .ox-props .grid-2{display:flex;flex-wrap:wrap;gap:6px 28px;margin:0 0 4px}
.ox-thread .ox-props .cf-item{display:flex;gap:8px;padding:0;border:0}
.ox-thread .ox-props dt{color:var(--muted);font-size:12px}
.ox-thread .ox-props dd{margin:0;font-size:13px}
.ox-thread .wd-fb > summary{cursor:pointer}
.ox-thread .ox-props .field-inline{margin:0}
.ox-thread .ox-props .field-inline label{display:flex;flex-direction:column;gap:3px;color:var(--muted);font-size:12px}
.ox-thread .ox-props select,.ox-thread .wp-tplbar select{height:32px;padding:0 28px 0 10px;border-radius:var(--ox-r,6px);font-size:13px}
.ox-conv-head{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.ox-conv-head h2{margin:0;font-size:14px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.ox-conv-tools{margin-left:auto;display:inline-flex;gap:10px}
.ox-msg{margin:0 0 10px;border:1px solid var(--line);border-left:3px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card)}
.ox-msg-inbound{border-left-color:var(--blue)}
.ox-msg-outbound{border-left-color:var(--tint-green-fg)}
.ox-msg > summary{list-style:none;display:flex;align-items:flex-start;gap:12px;padding:12px 14px;cursor:pointer}
.ox-msg > summary::-webkit-details-marker{display:none}
.ox-msg > summary:hover{background:var(--card-2)}
.ox-msg .ox-avatar{flex:none;width:36px;height:36px}
.ox-msg-who{flex:1 1 auto;min-width:0}
.ox-msg-from{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:14px}
.ox-msg-to{margin-top:1px;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.ox-msg-prev{margin-top:1px;color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ox-msg[open] .ox-msg-prev{display:none}
.ox-msg:not([open]) .ox-msg-to{display:none}
.ox-msg-when{flex:none;color:var(--muted);font-size:12px;white-space:nowrap}
.ox-msg-body{padding:2px 16px 14px 62px;font-size:14px;line-height:1.55;color:var(--text);overflow-wrap:anywhere}
.ox-msg-body img{max-width:100%;height:auto}
.ox-msg-body blockquote{margin:8px 0;padding-left:12px;border-left:3px solid var(--line);color:var(--muted)}

/* 3.2.6 ("make the attachment a bar that goes across, slightly lighter"): one full-width strip between the header and the body (moved there in 3.2.4), not a row
   of separate pill-shaped chips. color-mix() lightens THIS CARD'S OWN background by mixing in a little of the theme's own text colour â€” in a dark theme the
   text is light, so this reads as "slightly lighter than the card", exactly as asked; in a light theme the card is already white (nothing can be lighter than
   white), so the same rule instead gives the soft light-grey Outlook itself uses there â€” the two modes cannot both get a strictly LIGHTER bar (white has no
   lighter shade), but one rule, with no theme-by-theme values to hand-maintain across the nine colour palettes, gives the right-looking result in both. */
.ox-msg .gh-att-bar{display:flex;align-items:flex-start;gap:10px;margin:0;padding:10px 16px 10px 62px;background:color-mix(in srgb, var(--text) 6%, var(--card));border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.gh-att-bar-ic{flex:none;margin-top:2px;color:var(--muted)}
.gh-att-bar-list{flex:1 1 auto;min-width:0;display:flex;flex-wrap:wrap;align-items:center;row-gap:4px}
.gh-att-item{display:inline-flex;align-items:baseline;gap:6px;padding:2px 10px;color:var(--link);text-decoration:none;font-size:13px;font-weight:600;border-right:1px solid var(--line)}
.gh-att-item:first-child{padding-left:0}
.gh-att-item:last-child{border-right:0}
.gh-att-item:hover{text-decoration:underline}
.gh-att-item:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}
.gh-att-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.gh-att-size{color:var(--muted);font-weight:400;font-size:11.5px;white-space:nowrap}
@media   (max-width:640px){.gh-att-name{max-width:160px}}   /* the file-wide 860px/760px phone blocks below already narrow this bar's left padding */

/* 3.2.5 ("dark text like a signature is unreadable on dark themes"): a sender's own HTML (a real formatted email, almost always with a signature) is composed
   assuming a plain white page â€” a dark grey signature, a company logo with a baked-in white background, "dark blue" links â€” all of that only reads correctly
   on white. Garrison's dark theme used to put that straight onto its own dark card, so any colour a sender chose which was merely "dark enough to read on
   white" (grey signatures are the classic case) became close to unreadable. gh-msg-body-paper gives sender HTML its own always-light "paper" surface â€”
   exactly what Outlook and Gmail do with a message's reading pane â€” so it looks right regardless of which theme Garrison itself is in. Plain-text messages
   (no colours to begin with) are untouched by this class and keep following Garrison's own theme. Written as the full ".ox-msg-body.gh-msg-body-paper" pair
   (not the shorter ".gh-msg-body-paper" alone) so this always outranks the plain ".ox-msg-body ..." rules above by specificity, not by which happens to come
   later in the file. An element with no inline colour of its own simply INHERITS this card's dark text, the ordinary way; a sender's own inline colour always
   wins over any stylesheet rule regardless of what is written here, so a signature's own chosen colours are never touched â€” only the parts that had none. */
.ox-msg-body.gh-msg-body-paper{
  --gh-paper-bg:#ffffff; --gh-paper-text:#1a1a1a; --gh-paper-muted:#595959; --gh-paper-link:#1a56db; --gh-paper-line:#e2e2e2; --gh-paper-code:#f3f3f3;
  margin:0 16px 14px 62px; padding:14px 16px; border:1px solid var(--line); border-top:0; border-radius:0 0 8px 8px;
  background:var(--gh-paper-bg); color:var(--gh-paper-text);
}
.ox-msg-body.gh-msg-body-paper a{color:var(--gh-paper-link)}
.ox-msg-body.gh-msg-body-paper blockquote{border-left-color:var(--gh-paper-line);color:var(--gh-paper-muted)}
.ox-msg-body.gh-msg-body-paper code,.ox-msg-body.gh-msg-body-paper pre{background:var(--gh-paper-code);color:var(--gh-paper-text)}
.ox-msg-body.gh-msg-body-paper table,.ox-msg-body.gh-msg-body-paper td,.ox-msg-body.gh-msg-body-paper th{border-color:var(--gh-paper-line)}
.gh-att-bar + .ox-msg-body.gh-msg-body-paper{border-radius:0 0 8px 8px}   /* the bar sits right above it: no gap, and only the paper's bottom corners round */
@media   (max-width:860px){.ox-msg-body.gh-msg-body-paper{margin-left:16px}}
.ox-msg-head-check{margin-right:2px}
.ox-thread #wp-reply{margin-top:6px;padding:14px 16px 16px;border:1px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card)}
.ox-thread .wp-reply-head h2{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:14px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.ox-thread .wp-fields,.ox-compose .wp-fields{gap:0;margin:0 0 10px}
.ox-thread .wp-frow,.ox-compose .wp-frow{padding:2px 0;border-bottom:1px solid var(--line)}
.ox-thread .wp-frow input,.ox-thread .wp-frow select,.ox-compose .wp-frow input,.ox-compose .wp-frow select{border:0;border-radius:0;background:transparent;box-shadow:none;padding:6px 4px}
.ox-thread .wp-frow input:focus,.ox-compose .wp-frow input:focus{outline:0;box-shadow:inset 0 -2px 0 var(--blue)}
.ox-thread .wp-flabel,.ox-compose .wp-flabel{flex:0 0 62px;color:var(--muted);font-size:13px}


/* ---------- the new-email window ---------- */
.ox-compose{max-width:1000px;margin:0 auto}
.ox-compose .wp-linkbtn{white-space:nowrap}
main.container:has(.ox-thread) > .wp-nav,main.container:has(.ox-compose) > .wp-nav{max-width:1000px;margin-left:auto;margin-right:auto}
.ox-compose-head{display:flex;align-items:center;gap:10px;margin:0 0 6px;padding:2px 0 8px;border-bottom:1px solid var(--line)}
.ox-compose-head h1{margin:0;font-size:20px;font-weight:600}
.ox-compose-head .ox-sp{flex:1 1 auto}
.ox-compose .card{padding:14px 16px 16px;margin:0 0 14px;border:1px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card);box-shadow:none}
.ox-compose .wp-sendbar{margin:0 0 12px;padding:0 0 12px;border-bottom:1px solid var(--line)}

/* ---------- build 156: tabs (Organize Â· Fishbowl Â· Details), per-message fold, reading options ---------- */
.ox-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin:0 0 10px}
.ox-tab{display:inline-flex;align-items:center;gap:7px;height:34px;max-width:100%;padding:0 12px;border:0;border-bottom:2px solid transparent;border-radius:var(--ox-r,6px) var(--ox-r,6px) 0 0;background:transparent;color:var(--text-soft);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.ox-tab:hover{background:var(--hover-row);color:var(--text)}
.ox-tab:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.ox-tab .ox-ic{color:var(--muted)}
.ox-tab.on{background:var(--accent-wash);color:var(--text);border-bottom-color:var(--blue)}
.ox-tab.on .ox-ic{color:var(--link)}
.ox-tab-fish{font-size:14px;line-height:1}
.ox-tab-badge{min-width:18px;padding:0 6px;border-radius:9px;background:var(--blue);color:#fff;font-size:11px;line-height:18px;text-align:center}
.ox-tab-sub{display:inline-flex;align-items:center;min-width:0;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px;font-weight:400}
.ox-thread .ox-tabpanels{margin:0}
.ox-thread .ox-tabpanel{margin:0 0 12px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card-2)}
.ox-thread .ox-tabpanel.wp-actionbar{padding:10px 14px}
.ox-thread .ox-tabpanel .grid-2{margin-top:0}
.ox-msg-chev{flex:none;display:inline-flex;align-items:center;align-self:flex-start;margin:2px 0 0 2px;color:var(--muted)}
.ox-msg-chev .ox-ic{transition:transform .15s}
.ox-msg:not([open]) .ox-msg-chev .ox-ic{transform:rotate(-90deg)}
.ox-msg > summary:hover .ox-msg-chev{color:var(--text)}
.ox-msg-foot{padding:0 16px 12px 62px}
@media   (prefers-reduced-motion:reduce){.ox-msg-chev .ox-ic{transition:none}}
@media   (max-width:860px){.ox-msg-foot{padding-left:16px}.ox-tab-sub{max-width:140px}}

/* ---------- build 157: the selection bar (several conversations ticked) ---------- */
/* An ordinary block under the title (not an overlay): count and Clear on the first line, the actions on the next, wrapping if the list is narrow. */
.ox-list-head .warden-bulk-bar{position:static;inset:auto;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:6px 0 6px;padding:6px 8px 8px 10px;border:1px solid var(--line);border-left:4px solid var(--blue);border-radius:8px;background:var(--card-2)}
.ox-bulk-count{order:1;flex:none;font-size:13px}
.ox-bulk-actions{order:3;flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.warden-bulk-bar > .ox-bbtn-quiet{order:2;margin-left:auto}
.ox-bbtn{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--btn-line);border-radius:var(--ox-r,6px);background:var(--btn-bg);color:var(--text);font:inherit;font-size:13px;font-weight:600;white-space:nowrap;cursor:pointer;list-style:none}
.ox-bbtn:hover{background:var(--btn-bg-h);border-color:var(--btn-line-h)}
.ox-bbtn:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.ox-bbtn .ox-ic{color:var(--muted)}
.ox-bbtn-danger,.ox-bbtn-danger .ox-ic{color:var(--danger-fg)}
.ox-bbtn-danger{border-color:var(--danger-line)}
.ox-bbtn-quiet{border-color:transparent;background:transparent;color:var(--muted)}
.ox-bulkmenu{position:relative}
.ox-bulkmenu > summary::-webkit-details-marker{display:none}
.ox-bulkmenu[open] > summary{border-color:var(--blue)}
.ox-bulkmenu .wp-pop-panel{width:250px;padding:6px;z-index:70}
.ox-menu > button{display:flex;align-items:center;gap:9px;width:100%;padding:7px 10px;border:0;border-radius:var(--ox-r,6px);background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.ox-menu > button:hover{background:var(--hover-row)}
.ox-menu > button .ox-ic{color:var(--muted)}
.ox-menu .ox-menu-go{justify-content:center;margin:2px 0 4px;border:1px solid var(--btn-line);background:var(--btn-bg);font-weight:600}
.ox-menu .ox-menu-go:hover{background:var(--btn-bg-h)}
.ox-menu-field{display:flex;flex-direction:column;gap:4px;padding:6px 10px;color:var(--muted);font-size:12px}
.ox-menu-field input,.ox-menu-field select{width:100%;max-width:none;height:32px;padding:0 8px;font-size:13px}
.ox-menu-sep{height:1px;margin:6px 4px;background:var(--line)}
.ox-menu-note{margin:2px 10px 4px;color:var(--muted);font-size:12px}
.ox-tab-sub{max-width:320px}

/* ---------- build 158: label search box, labels as folders, Gmail's automatic labels ---------- */
.ox-lblist[hidden]{display:none}
.ox-lblist{list-style:none;margin:6px 0 0;padding:4px;max-height:220px;overflow-y:auto;border:1px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card)}
.ox-lbitem{display:block;padding:6px 8px;border-radius:var(--ox-r,6px);color:var(--text);font-size:13px;line-height:1.3;cursor:pointer;overflow-wrap:anywhere}   /* block, not flex: the highlighted part is its own <span> and must stay inside the word */
.ox-lbitem:hover,.ox-lbitem.is-active{background:var(--accent-wash)}
.ox-lbitem.is-active{box-shadow:inset 2px 0 0 var(--blue)}
.ox-lbitem.is-applied{color:var(--muted);cursor:default}
.ox-lbitem.is-applied:hover{background:transparent}
.ox-lbitem.is-new{display:flex;align-items:center;gap:8px;color:var(--link);font-weight:600}
.ox-lbm{color:var(--link);font-weight:700}
.ox-lbtag{float:right;margin-left:8px;padding:0 7px;border-radius:9px;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);font-size:11px}
.ox-lbplus{flex:none;display:inline-grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--blue);color:#fff;font-size:13px;line-height:1}
.ox-lbempty{padding:8px;color:var(--muted);font-size:12px}
.ox-lbfoot{display:flex;align-items:center;gap:8px;min-height:20px;margin:8px 0 8px}
.ox-lbstatus{color:var(--muted);font-size:12px}
.ox-lbadd{margin-top:8px}
.ox-lblsec{margin-top:6px}
.ox-lbl{padding-left:calc(16px + var(--depth,0) * 14px)}
.ox-lbl-empty{margin:2px 10px 6px 16px;color:var(--muted);font-size:12px}
.ox-lbl-refresh{display:inline-flex;align-items:center;gap:6px;margin:4px 8px 2px 14px;padding:3px 8px;border:0;border-radius:var(--ox-r,6px);background:transparent;color:var(--muted);font:inherit;font-size:12px;cursor:pointer}
.ox-lbl-refresh:hover{background:var(--hover-row);color:var(--text)}
.ox-lbl-refresh:disabled{opacity:.6;cursor:default}
.ox-lbl-status{display:block;margin:0 10px 6px 14px}
.ox-lbl-gm{margin-left:4px}
.ox-lbl-sys{background:transparent;border:1px dashed var(--line);cursor:help}
.ox-order{margin-left:2px}

/* ---------- build 159: grammar check (grammar-check.js) and the Notes tab ---------- */
.ox-gc-pill{position:fixed;z-index:99990;display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 9px;border:1px solid var(--btn-line);border-radius:999px;background:var(--card);color:var(--muted);font:inherit;font-size:12px;font-weight:700;line-height:1;box-shadow:var(--shadow);cursor:pointer;opacity:.92}
.ox-gc-pill[hidden]{display:none}
.ox-gc-pill:hover,.ox-gc-pill[aria-expanded="true"]{opacity:1;background:var(--btn-bg-h);color:var(--text)}
.ox-gc-pill:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.ox-gc-pill.ox-gc-ok{color:var(--good-fg)}
.ox-gc-pill.ox-gc-warn{border-color:var(--blue);color:var(--link);background:var(--accent-wash)}
.ox-gc-panel{position:fixed;z-index:99991;width:360px;max-width:calc(100vw - 16px);display:flex;flex-direction:column;background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px rgba(0,0,0,.45);font-size:13px}
.ox-gc-panel[hidden]{display:none}
.ox-gc-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--line)}
.ox-gc-x{width:26px;height:26px;border:0;border-radius:var(--ox-r,6px);background:transparent;color:var(--muted);font-size:18px;line-height:1;cursor:pointer}
.ox-gc-x:hover{background:var(--hover-row);color:var(--text)}
.ox-gc-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:4px 0}
.ox-gc-none{margin:0;padding:18px 14px;color:var(--muted);text-align:center}
.ox-gc-item{padding:10px 12px;border-bottom:1px solid var(--line)}
.ox-gc-item:last-child{border-bottom:0}
.ox-gc-top{margin-bottom:4px}
.ox-gc-cat{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px;font-weight:700;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg)}
.ox-gc-cat.c-g{background:var(--tint-purple-bg);color:var(--tint-purple-fg)}
.ox-gc-cat.c-w{background:var(--tint-blue-bg);color:var(--tint-blue-fg)}
.ox-gc-cat.c-c{background:var(--tint-green-bg);color:var(--tint-green-fg)}
.ox-gc-cat.c-p{background:var(--tint-warn-bg);color:var(--tint-warn-fg)}
.ox-gc-cat.c-s{background:var(--tint-red-bg);color:var(--tint-red-fg)}
.ox-gc-msg{margin:2px 0 6px;color:var(--text);line-height:1.4}
.ox-gc-ctx{display:block;width:100%;margin:0 0 8px;padding:6px 8px;border:1px solid var(--line);border-radius:var(--ox-r,6px);background:var(--card-2);color:var(--muted);font:inherit;font-size:12px;line-height:1.45;text-align:left;cursor:pointer;overflow-wrap:anywhere}
.ox-gc-ctx:hover{border-color:var(--btn-line-h)}
.ox-gc-ctx mark{padding:0 2px;border-radius:3px;background:var(--accent-wash);color:var(--text);font-weight:700;box-shadow:inset 0 -2px 0 var(--blue)}
.ox-gc-acts{display:flex;flex-wrap:wrap;gap:6px}
.ox-gc-fix,.ox-gc-ign{height:28px;padding:0 10px;border:1px solid var(--btn-line);border-radius:var(--ox-r,6px);background:var(--btn-bg);color:var(--text);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.ox-gc-fix{border-color:var(--blue);background:var(--accent-wash);color:var(--text)}
.ox-gc-fix:hover{background:var(--blue);color:#fff}
.ox-gc-ign{color:var(--muted)}
.ox-gc-ign:hover{background:var(--btn-bg-h);color:var(--text)}
.ox-gc-fix:focus-visible,.ox-gc-ign:focus-visible,.ox-gc-ctx:focus-visible,.ox-gc-off:focus-visible,.ox-gc-x:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.ox-gc-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}
.ox-gc-off{border:0;background:transparent;color:var(--link);font:inherit;font-size:11px;text-decoration:underline;cursor:pointer;white-space:nowrap}
::highlight(ox-gc){text-decoration:underline wavy;text-decoration-color:var(--blue);text-decoration-thickness:1.5px;text-underline-offset:3px}
@media   (max-width:599px){.ox-gc-panel{width:auto}}
@media   print{.ox-gc-pill,.ox-gc-panel{display:none !important}}
.ox-thread #ox-tp-notes .gh-note{padding:8px 0;border-bottom:1px solid var(--line)}
.ox-thread #ox-tp-notes .gh-note:last-of-type{border-bottom:0}

/* ---------- smaller windows ---------- */
@media   (max-width:1280px){
  .ox-lastsync{display:none}
}
@media   (max-width:1180px){
  .ox-app,.ox-app.ox-fold-hidden{grid-template-columns:minmax(0,1fr);grid-template-areas:"cmd" "main"}
  .ox-app .ox-folders{grid-area:auto;position:absolute;display:none;top:48px;left:0;bottom:0;width:min(290px,86vw);z-index:20;box-shadow:12px 0 32px rgba(0,0,0,.45)}
  .ox-app.ox-fold-open .ox-folders{display:block}
  .ox-main{grid-template-columns:min(var(--ox-list-w),46vw) 6px minmax(0,1fr)}
}
@media   (max-width:860px){
  .ox-app{min-height:0}
  .ox-main,.ox-app[data-pane="bottom"] .ox-main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
  .ox-read,.ox-split,.ox-panes{display:none !important}
  .ox-cmd .ox-cbtn span,.ox-cmd .ox-new span{display:none}
  .ox-cmd .ox-new{width:36px;padding:0}
  .ox-search{flex:1 1 auto}
  .ox-app .ox-filter-panel{position:fixed;left:8px;right:8px;top:calc(var(--ox-top,64px) + 52px);width:auto;max-height:calc(100dvh - var(--ox-top,64px) - 64px);overflow:auto}
  .ox-actions{display:none}
  .ox-msg-body,.ox-msg .gh-att-bar{padding-left:16px}   /* 3.2.6: was .gh-msg-attachments, renamed with the move to a single bar */
}
@media   (max-width:1180px) and (min-width:861px){
  .ox-app .ox-filter-panel{position:fixed;left:12px;right:12px;top:calc(var(--ox-top,64px) + 52px);width:auto;max-height:calc(100dvh - var(--ox-top,64px) - 64px);overflow:auto}
}
@media   (prefers-reduced-motion:reduce){.ox-split::after{transition:none}}
@media   print{.ox-app .ox-folders,.ox-cmd,.ox-list,.ox-split{display:none !important}.ox-app{display:block;height:auto}}

/* 3.0.1 (Feature Request #74): the reply box is hidden until Reply / Reply all / Forward is pressed, and has its own Discard button */
.ox-thread #wp-reply[hidden]{display:none}
.ox-thread .wp-reply-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ox-thread .wp-reply-head h2{margin-bottom:0}
.ox-thread .wp-reply-close{margin-left:auto}

/* 3.0.3: rows that just arrived in the open list (assets/js/warden-live.js) are tinted for a few seconds */
.ox-row.ox-row-new{animation:ox-row-new 6s ease-out 1}
@keyframes ox-row-new{0%,35%{background:var(--accent-wash)}100%{background:transparent}}
@media   (prefers-reduced-motion:reduce){.ox-row.ox-row-new{animation:none;background:var(--accent-wash)}}

/* 3.0.3: the Drafts folder - a draft row says "Draft" in red like Outlook's, and scheduled mail says "To:" */
.ox-row.ox-draft .ox-draft-tag{color:var(--danger-fg);font-weight:700;margin-right:4px}
.ox-row.ox-draft .ox-subject{font-weight:600}


/* =====================================================================
   3.0.5 - the conversation page (the reading pane), decluttered. Markup: app/Views/warden/show.php.
   One quiet line under the title, a short toolbar (Reply / Reply all / Forward / Quick Steps / Archive / Delete / More), tabs that carry only their name, and a layout that
   stays on ONE line each at any width. Breakpoints use the width of the pane itself (the reading pane is an iframe, so its window IS the pane).
   ===================================================================== */
/* the line under the title: neutral, small, no orange pill */
.ox-read-head{padding:14px 0 4px}
.ox-read-head h1{font-size:20px}
.ox-read-sub{align-items:center;gap:4px 10px;font-size:12.5px}
.ox-read-sub .ox-mbx-chip{padding:0;background:transparent;color:var(--muted);font-weight:500;min-width:0}
.ox-read-sub .ox-mbx-chip .ox-ic{color:var(--muted)}
.ox-read-sub .ox-mbx-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:240px}
.ox-read-sub .ox-status{display:inline-flex;align-items:center;padding:1px 8px;border-radius:999px;background:var(--tint-neutral-bg);color:var(--tint-neutral-fg);font-weight:600}
.ox-read-sub .ox-star-flag{display:inline-flex;color:var(--hivis)}
.ox-read-sub .ox-star-flag .ox-ic{fill:currentColor}

/* the toolbar: a row that does not wrap; Reply keeps its word, the rest lose theirs when the pane is narrow */
.ox-read-cmd{flex-wrap:nowrap;gap:2px;padding:5px 0;min-width:0}
.ox-read-cmd > *{flex:none}
.ox-read-cmd .ox-sp{flex:1 1 0;min-width:0}


.ox-read-cmd summary.btn{display:inline-flex;align-items:center;gap:0;list-style:none}
.ox-read-cmd summary.btn::-webkit-details-marker{display:none}
.ox-read-cmd .wp-pop[open] > summary.btn{background:var(--btn-bg-h)}
.ox-read-cmd .wp-pop > summary.btn{border-color:transparent}
.ox-read-cmd .wp-pop-panel{width:auto;min-width:210px;max-width:min(300px,calc(100vw - 24px));padding:6px;z-index:60}
.ox-read-cmd .ox-moremenu > summary.btn{padding:0 8px}
/* menu items that are forms (Star, Mark as read, Spam) look like the other menu items */
.ox-menu > form > button{display:flex;align-items:center;gap:9px;width:100%;padding:7px 10px;border:0;border-radius:var(--ox-r,6px);background:transparent;color:var(--text);font:inherit;font-size:13px;text-align:left;cursor:pointer}
.ox-menu > form > button:hover{background:var(--hover-row)}
.ox-menu > form > button .ox-ic{color:var(--muted)}

/* the tabs: names only; a number where there is one; the old grey sub-text is the tooltip */
.ox-tabs{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;margin:0 0 8px;gap:0}
.ox-tabs::-webkit-scrollbar{display:none}
.ox-tab{flex:none;gap:6px;padding:0 11px}
.ox-tab .ox-tab-sub{display:none}
.ox-tab-ind{display:inline-flex;align-items:center;color:var(--muted)}
.ox-tab-hit .ox-tab-fish{position:relative}
.ox-tab-hit .ox-tab-fish::after{content:"";position:absolute;top:-3px;right:-5px;width:7px;height:7px;border-radius:50%;background:var(--good-fg);box-shadow:0 0 0 2px var(--card)}

/* a conversation with several messages keeps a slim heading; with one message there is none (the markup is not drawn) */
.ox-conv-head{margin-bottom:6px}
.ox-msg-when .ox-when-short{display:none}

@media   (max-width:760px){
  .ox-read-head{padding:10px 0 2px}
  .ox-read-head h1{font-size:18px;line-height:1.3}
  /* toolbar: icons (Reply keeps its word: it is the main action) */
  .ox-read-cmd .ox-lbl{display:none}
  
  
  .ox-read-cmd .wp-pop-panel{min-width:200px}
  /* tabs: only the open one keeps its name */
  .ox-tab:not(.on) .ox-tab-l{display:none}
  .ox-tab{padding:0 10px}
  /* messages: no avatar, a short date, the address only in the open message */
  .ox-msg > summary{padding:9px 10px;gap:8px}
  .ox-msg .ox-avatar{display:none}
  .ox-msg-body,.ox-msg .gh-att-bar,.ox-msg-foot{padding-left:12px;padding-right:12px}   /* 3.2.6: was .gh-msg-attachments, renamed with the move to a single bar */
  .ox-msg-when{font-size:11.5px}
  .ox-msg-when .ox-when-full{display:none}
  .ox-msg-when .ox-when-short{display:inline}
  .ox-msg:not([open]) .ox-from-addr{display:none}
  .ox-msg-chev{display:none}
  .ox-msg-to{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px}
  .ox-conv-head .ox-order{display:none}
  .ox-conv-head{flex-wrap:nowrap}
  .ox-conv-tools{margin-left:auto;white-space:nowrap}
}
@media   (max-width:420px){
  
  
  .ox-read-sub .ox-mbx-name{max-width:150px}
}
/* 3.0.5: the phone rule that makes every .btn 40px tall is for fingers; with a mouse the toolbar keeps its compact height even in a narrow pane */



/* 3.1.1: a link inside a conversation's More menu looks like the buttons next to it */
.ox-menu > a.ox-menu-link{display:flex;align-items:center;gap:9px;width:100%;box-sizing:border-box;padding:7px 10px;border-radius:var(--ox-r,6px);color:var(--text);font-size:13px;text-decoration:none}
.ox-menu > a.ox-menu-link:hover{background:var(--hover-row);text-decoration:none}
.ox-menu > a.ox-menu-link .ox-ic{color:var(--muted)}

/* 3.1.4: "Numbers as of 2:41 PM  Refresh" next to the dashboard buttons */
.dash-asof{display:inline-flex;align-items:center;gap:8px;margin-right:4px}
@media   (max-width:640px){.dash-asof .muted{display:none}}

/* =====================================================================
   3.1.6 - a calmer dashboard header and footer
   ===================================================================== */
/* the refresh icon next to Customize: a square icon button, not a stretched one */
.head-actions .dash-refresh{display:inline-flex;margin:0;flex:0 0 auto}

   /* as tall as the buttons beside it */

.dash-stale{color:var(--warn-fg);font-size:12.5px;font-weight:600}
@media   (max-width:640px){.head-actions .dash-refresh{flex:0 0 auto}.head-actions .dash-stale{flex:1 0 100%}}
/* the footer is just the name and the version now */
.footer-line{line-height:1.7}
/* the Sync Google Tasks entry of the user menu: the time sits under the words */



/* 3.2.7: the "Entire mailbox / This folder" drop-down beside the Warden search box */
.ox-search .ox-scope{flex:0 0 auto;height:34px;width:auto;max-width:150px;padding:0 26px 0 10px;border-radius:var(--ox-r);font-size:13px;color:var(--text);cursor:pointer}
@media   (max-width:860px){.ox-search .ox-scope{max-width:106px;padding:0 20px 0 8px;font-size:12px}}

/* =====================================================================
   Warden 3.2.8: readable mail composer + attachment top bar / drop target
   ===================================================================== */
/* An email can contain an inline dark text color copied from the sender.
   Warden's dark app background made that text unreadable while composing.
   Give the email canvas a normal white-paper surface and suppress inline
   background fills in the editable body, while leaving the HTML submitted by
   the editor intact. Text color tools still work; the white canvas provides
   the expected email-composer contrast. */







/* Outlook/Gmail-style strip immediately above the email body. It is also the
   visible drop target. Selected files are compact chips with their own remove
   button; wrapping keeps the strip usable on a phone. */
.gh-compose-attachments{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:42px;margin-top:10px;padding:6px 8px;
  border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:var(--card-2);transition:border-color .15s,background .15s,box-shadow .15s}
.gh-compose-attachments+.wp-mail-editor{margin-top:0;border-radius:0 0 10px 10px}
.gh-compose-attachments-hint{display:inline-flex;align-items:center;gap:6px;padding:4px 7px;color:var(--muted);font-size:12px;white-space:nowrap}
.gh-compose-attachments.has-files .gh-compose-attachments-hint{font-size:0;padding-right:0}
.gh-compose-attachments.has-files .gh-compose-attachments-hint svg{width:16px;height:16px}
.gh-compose-attachments-list{display:flex;align-items:center;gap:6px;flex:1;flex-wrap:wrap;list-style:none;margin:0;padding:0;min-width:0}
.gh-compose-attachment{display:inline-flex;align-items:center;gap:7px;max-width:min(320px,100%);padding:5px 6px 5px 9px;border:1px solid var(--line);
  border-radius:8px;background:var(--card);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.gh-compose-attachment-icon{flex:0 0 auto}
.gh-compose-attachment-words{display:flex;min-width:0;flex-direction:column;line-height:1.15}
.gh-compose-attachment-words strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:650}
.gh-compose-attachment-words small{color:var(--muted);font-size:10px;margin-top:2px}
.gh-compose-attachment-remove{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:24px;height:24px;padding:0;border:0;border-radius:6px;
  background:transparent;color:var(--muted);font:20px/1 Arial,sans-serif;cursor:pointer}
.gh-compose-attachment-remove:hover,.gh-compose-attachment-remove:focus-visible{background:rgba(var(--accent-rgb),.16);color:var(--text);outline:2px solid var(--blue);outline-offset:1px}
.gh-compose-attachments.is-over{border-color:var(--blue);background:var(--accent-wash);box-shadow:inset 0 0 0 2px var(--blue)}
.gh-compose-attachments.is-over .gh-compose-attachments-hint{color:var(--link);font-weight:700}
@media  (max-width:640px){
  .gh-compose-attachments{align-items:stretch}
  .gh-compose-attachments-list{width:100%;flex-basis:100%}
  .gh-compose-attachment{max-width:100%;width:100%}
  .gh-compose-attachment-words{flex:1}
}

/* =====================================================================
   Garrison 3.2.9: sign-in page follows every palette and mode
   =====================================================================
   The original login background was permanently navy while the card used the
   selected theme's variables. Switching to Ember, Graphite, light mode, etc.
   therefore produced unrelated black/navy/white surfaces. The login view also
   sat inside the ordinary 1080px content container, leaving large strips of
   the body background around it. Make the page full-width and use only the
   active palette's semantic colors. */
main.container:has(.login-wrap){max-width:none;width:100%;margin:0;padding:0}
body:has(.login-wrap) .footer{display:none}
.login-wrap{
  width:100%;min-height:calc(100dvh - 59px);padding:24px;
  background:
    radial-gradient(circle at 50% 20%,var(--accent-wash),transparent 42%),
    linear-gradient(135deg,var(--bg),var(--card-2));
}
.login-card{
  background:var(--card);color:var(--text);border:1px solid var(--line);
  box-shadow:var(--shadow);isolation:isolate
}
.login-card h1{color:var(--text)}
.login-card h1 .accent,.login-card .tagline{color:var(--link)}
.login-card .sub{color:var(--text-soft)}
.login-card .features{color:var(--text-soft)}


@media  (max-width:560px){
  .login-wrap{align-items:flex-start;min-height:calc(100dvh - 55px);padding:16px 10px}
  .login-card{padding:26px 18px;border-radius:12px}
  .login-card h1{font-size:28px}
}

/* Garrison 3.2.10: pinned mail and recipient suggestions */
.ox-pin,.ox-pin-flag{flex:0 0 auto;font-size:13px;line-height:1}
.wp-address-menu{position:absolute;z-index:80;top:calc(100% + 3px);left:0;right:0;max-height:270px;overflow:auto;padding:5px;background:var(--card);border:1px solid var(--line);border-radius:9px;box-shadow:0 12px 30px rgba(0,0,0,.35)}
.wp-address-menu[hidden]{display:none}
.wp-address-option{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:1px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.wp-address-option:hover,.wp-address-option.on{background:var(--accent-wash)}
.wp-address-option span{font-size:13px;font-weight:650}.wp-address-option small{font-size:11px;color:var(--muted)}

.wp-address-empty{padding:10px;color:var(--muted);font-size:12px;text-align:left}

/* 3.2.16: an email document has its own readable color context. Sender
   black-on-transparent and white-on-dark HTML must both remain legible.
   Display normalization is scoped to message bodies and quoted history;
   original stored message HTML is unchanged. */
.ox-msg-body.gh-msg-body-paper{
  color-scheme:light;background:#fff !important;color:#172033 !important;
  --text:#172033;--text-soft:#374151;--muted:#4b5563;--link:#0b57d0;--line:#cbd5e1;
}




/* 3.2.17: fields.css loads after this file and its .rte .rte-surface
   rule previously replaced the mail editor's white writing surface.
   This mail-only boundary must win regardless of stylesheet order.
   The toolbar and all other editors retain the selected theme. */


/* Shared settings navigation: area switch above the section strip on phones. */
.snav-sections{display:flex;flex-direction:column;gap:4px;min-width:0}
#ox-os-row[hidden],#ox-os-row [hidden]{display:none!important}
@media  (max-width:720px){
 .settings-nav{flex-direction:column;overflow:visible;min-width:0;max-width:100%}
 .settings-nav .snav-switch{margin:0;flex:none}
 .settings-nav .snav-switch a{min-height:44px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}
 .settings-nav .snav-sections{flex-direction:row;overflow-x:auto;gap:6px;max-width:100%;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-padding:6px}
 .settings-nav .snav-item{min-height:44px;box-sizing:border-box}
}

/* Shared rich-text actions: preserve theme styling and scroll only the toolbar. */





