@font-face { font-family: 'Carlito'; src: url('/fonts/Carlito-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Carlito'; src: url('/fonts/Carlito-Bold.woff') format('woff'); font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Carlito'; src: url('/fonts/Carlito-Italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Carlito'; src: url('/fonts/Carlito-BoldItalic.woff') format('woff'); font-weight: 600 800; font-style: italic; font-display: swap; }

/* DeployIQ. Brand colours (accent, brand, bar) are defaults here; /brand.css replaces them with each
   customer's colours from Master settings. All colours are tokens so dark mode is a token swap. */
:root {
  --bg: #EDF0F3; --panel: #FFFFFF; --panel2: #F5F7F9; --line: #D3DAE1; --line2: #E4E9EE;
  --ink: #15202B; --muted: #586878; --faint: #8796A5;
  --accent: #0F1E3D; --accent-ink: #FFFFFF; --accent-soft: #E1E4EA;
  --brand: #14B8A6; --brand-ink: #15202B; --brand-text: #0D7A6E; /* brand-text passes contrast for small text on white */
  --ok: #1D7446; --ok-soft: #DBF0E3; --warn: #9A5A00; --warn-soft: #FAEBD3; --crit: #B0271F; --crit-soft: #F7DDDA;
  --wkend: rgba(88,104,120,.08); --scrim: rgba(12,20,28,.45); --hatch: #C6CFD8;
  --bar: #0F1E3D; --bar-ink: #F4F5F8; --bar-strong: #FFFFFF; --bar-muted: #A9B0BF; --bar-line: #3A465F; --bar-highlight: #14B8A6;
  --shadow: 0 18px 48px rgba(0,0,0,.22);
  /* Calibri where installed (Windows/Office), otherwise Carlito — an open-licence font with the same shapes and spacing, served by the app. */
  --f-body: Calibri, Carlito, 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-display: var(--f-body);
  --f-mono: var(--f-body); /* numbers use tabular figures instead of a code font */
  --f-code: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --labelw: 230px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12111D; --panel: #1B1A2B; --panel2: #222134; --line: #36344F; --line2: #2A2940;
    --ink: #E3E9EF; --muted: #94A4B4; --faint: #6C7D8E;
    --accent: #ABA7E6; --accent-ink: #17152B; --accent-soft: #2A2847;
    --brand: #F07A3E; --brand-ink: #1A0E06; --brand-text: #F49766;
    --ok: #5DC78B; --ok-soft: #163525; --warn: #E5A445; --warn-soft: #382A12; --crit: #F17569; --crit-soft: #3C1C1A;
    --wkend: rgba(148,164,180,.06); --scrim: rgba(0,0,0,.6); --hatch: #35434F;
    --bar: #1B1930; --bar-line: #37345A; --shadow: 0 18px 48px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
a { color: var(--accent); }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- app shell ---------- */
.app { display: flex; flex-direction: column; height: 100%; }
.topbar { display: flex; align-items: center; gap: 4px 22px; background: var(--bar); color: var(--bar-ink); padding: 0 24px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand .logo { height: 34px; width: auto; display: block; margin: 12px 0; }
.brand .bsep { width: 1px; align-self: stretch; margin: 16px 0; background: var(--bar-line); }
.product { font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; line-height: 1; }
.product b { color: var(--bar-highlight); font-weight: 700; }
.product.big { font-size: 26px; }
.logo-pair img.on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-pair img.on-light { display: none; } :root:not([data-theme="light"]) .logo-pair img.on-dark { display: block; } }
@media (max-width: 720px) { .topbar { padding: 0 16px; } .topbar .brand .bsep, .topbar .brand .product { display: none; } .topbar .brand .logo { height: 30px; margin: 10px 0; } }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--bar-muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 19px 12px 16px; border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { color: var(--bar-ink); }
.nav a[aria-current="page"] { color: var(--bar-strong); border-bottom-color: var(--bar-highlight); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--crit); color: #fff; font: 600 11px/18px var(--f-mono); text-align: center; }
.who { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--bar-muted); white-space: nowrap; }
.who b { color: var(--bar-ink); font-weight: 600; }
.who .btn, .btn.ghostbar { background: transparent; color: var(--bar-ink); border-color: var(--bar-line); }
.main { flex: 1; min-height: 0; overflow: auto; }
.page { max-width: 1400px; margin: 0 auto; padding: 18px 16px 48px; }
.pageh { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pageh h1 { font-family: var(--f-display); font-weight: 700; font-size: 28px; letter-spacing: -.005em; }
.spacer { flex: 1; }

/* ---------- controls ---------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--crit); border-color: var(--crit); background: var(--panel); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.lg { padding: 12px 18px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.icon { padding: 6px 8px; min-width: 32px; }
.in { width: 100%; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 7px 9px; min-width: 0; }
.in:disabled { background: var(--panel2); color: var(--muted); }
textarea.in { min-height: 70px; resize: vertical; }
.in.err { border-color: var(--crit); box-shadow: 0 0 0 2px var(--crit-soft); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
label.f .hint { font-weight: 400; color: var(--faint); }
.check { display: inline-flex; gap: 7px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 14px; }
.fg .span2 { grid-column: span 2; }
.fg .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .fg .span2 { grid-column: 1 / -1; } }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); }
.seg button { appearance: none; border: 0; background: transparent; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.sect { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; line-height: 18px; white-space: nowrap; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.crit { background: var(--crit-soft); color: var(--crit); border-color: transparent; }
.chip.acc { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.solid { color: #fff; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; }

/* toggle chips (multi-select pills) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { appearance: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 14px; padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pill:hover { border-color: var(--muted); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- panels, tables ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.ph { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; border-bottom: 1px solid var(--line2); }
.ph h2 { font-family: var(--f-display); font-weight: 700; font-size: 19px; }
.pb { padding: 14px; }
.tblw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel2); position: sticky; top: 0; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--panel2); }
.nm { font-weight: 600; }
.nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty h2 { font-family: var(--f-display); font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .in { width: auto; }
.toolbar input[type="search"] { min-width: 200px; flex: 0 1 260px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; border-left: 5px solid var(--c, var(--line)); cursor: pointer; text-align: left; appearance: none; }
.card:hover { border-color: var(--muted); border-left-color: var(--c, var(--muted)); }
.card h3 { font-size: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.kv > div { display: flex; flex-direction: column; min-width: 0; }
.kv span { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kv b { font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- planner ---------- */
.planner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ptools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.ptools .in { width: auto; padding: 6px 8px; }
.ptools input[type="search"] { width: 170px; }
.ptools input[type="date"] { width: 132px; }
.ptools .lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.pwrap { flex: 1; min-height: 0; display: flex; }
.pgrid { flex: 1; min-width: 0; overflow: auto; position: relative; background: var(--panel); overscroll-behavior: contain; }
.pgrid.dragging, .pgrid.dragging * { cursor: grabbing !important; user-select: none; }
.pcanvas { position: relative; min-width: 100%; }
.prow { display: flex; position: relative; }
.plabel { flex: none; width: var(--labelw); position: sticky; left: 0; z-index: 3; background: var(--panel); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line2); padding: 4px 10px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.plabel .t { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.plabel b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plabel small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptrack { position: relative; flex: none; border-bottom: 1px solid var(--line2); }
.prow.lane .ptrack { height: 34px; }
.prow.person .ptrack { height: 32px; }
.prow.person .plabel { cursor: pointer; }
.prow.person .plabel:hover b { color: var(--accent); }
.prow.group .plabel { background: var(--panel2); font-family: var(--f-display); font-size: 15px; font-weight: 700; }
.prow.group .ptrack { height: 36px; background: var(--panel2); opacity: .6; }
.prow.group .plabel .count { font-family: var(--f-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0; text-transform: none; font-weight: 500; line-height: 1.1; }
.prow.group .plabel b { font-size: 14px; line-height: 1.1; }
.prow.addlane .plabel { color: var(--faint); font-size: 12px; font-style: italic; }
.prow.addlane .ptrack { height: 26px; }
.prow.droptarget .ptrack { background: var(--accent-soft); }
.prow.droptarget .plabel { box-shadow: inset 4px 0 0 var(--accent); }

.phead { position: sticky; top: 0; z-index: 5; display: flex; height: var(--pheadh); background: var(--panel2); border-bottom: 1px solid var(--line); box-sizing: border-box; overflow: hidden; }
.pgrid { --pheadh: 53px; }
.phead .plabel { background: var(--panel2); z-index: 6; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 0; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 4px 10px 6px; }
.phead .plabel .cur { font-size: 12px; color: var(--ink); letter-spacing: .06em; }
.pdays { position: relative; flex: none; height: 46px; }
.pmonth { position: absolute; top: 0; height: 20px; font: 700 11px/20px var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); padding-left: 6px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.pday { position: absolute; top: 20px; height: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 10.5px/1.05 var(--f-mono); color: var(--muted); }
.pday i { font-style: normal; font-size: 9px; text-transform: uppercase; }
.pday.we { color: var(--faint); }
.pday.today { background: var(--brand); color: var(--brand-ink); border-radius: 4px; font-weight: 700; }
.pday.today i { color: var(--brand-ink); }

.pforecast { position: sticky; top: var(--pheadh); z-index: 4; display: flex; background: var(--panel); border-bottom: 2px solid var(--line); }
.pforecast .plabel { flex-direction: column; align-items: stretch; justify-content: center; gap: 2px; z-index: 6; border-bottom: 0; }
.pforecast .plabel span { font-size: 11px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pforecast .plabel span i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.fc-track { position: relative; flex: none; height: 54px; }
.fc-col { position: absolute; bottom: 4px; display: flex; flex-direction: column-reverse; align-items: stretch; }
.fc-col .f { background: var(--ok); border-radius: 0 0 2px 2px; }
.fc-col .u { background: var(--crit); opacity: .85; border-radius: 2px 2px 0 0; }
.fc-col .n { font: 600 9.5px/1 var(--f-mono); color: var(--crit); text-align: center; padding-bottom: 2px; }
.fc-free { position: absolute; top: 2px; font: 600 9.5px/1 var(--f-mono); color: var(--ok); text-align: center; }
.i-f { background: var(--ok); } .i-u { background: var(--crit); } .i-a { background: transparent; border: 1.5px solid var(--ok); }

.pbg { position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.pbg .we { position: absolute; top: 0; bottom: 0; background: var(--wkend); }
.pbg .mon { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line2); }
.pbg .today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--brand); opacity: .7; }
.pbg .win { position: absolute; top: 0; bottom: 0; background: var(--accent-soft); opacity: .45; border-left: 1px dashed var(--accent); border-right: 1px dashed var(--accent); }
.prow { z-index: 1; } /* keep rows below the sticky date header (5) and forecast strip (4) */

.blk { position: absolute; top: 4px; height: 26px; border-radius: 5px; background: var(--c); color: #fff; display: flex; align-items: center; padding: 0 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; overflow: clip; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 1px 2px rgba(0,0,0,.18); z-index: 2; }
.blk:hover { box-shadow: 0 0 0 2px var(--ink); z-index: 3; }
.blk .inner, .bk .inner { position: sticky; left: calc(var(--labelw) + 6px); display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.blk .lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.blk .fill { flex: none; font: 600 11px/16px var(--f-mono); padding: 0 5px; border-radius: 3px; background: rgba(0,0,0,.28); }
.blk .fill.full { background: rgba(255,255,255,.95); color: var(--ok); }
.blk .rate { flex: none; font: 500 11px var(--f-mono); opacity: .9; }
.blk .new { flex: none; background: #fff; color: var(--crit); font: 700 10.5px/16px var(--f-mono); padding: 0 5px; border-radius: 8px; }
.blk.draft { background: var(--panel); color: var(--ink); border: 2px dashed var(--c); box-shadow: none; }
.blk.draft .fill { background: var(--panel2); color: var(--muted); }
.blk.draft .tag { font: 700 9.5px var(--f-mono); color: var(--c); letter-spacing: .05em; }
.blk .hdl { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.blk .hdl.l { left: 0; } .blk .hdl.r { right: 0; }
.blk .hdl:hover { background: rgba(255,255,255,.35); }
.blk.moving { opacity: .85; box-shadow: 0 6px 18px rgba(0,0,0,.3); z-index: 10; }
.blk.prog { position: absolute; }
.blk .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.9); }
.dghost { position: absolute; top: 4px; height: 26px; border-radius: 5px; border: 2px dashed var(--accent); background: var(--accent-soft); color: var(--accent); font: 600 11.5px/22px var(--f-mono); padding: 0 6px; white-space: nowrap; overflow: hidden; z-index: 10; pointer-events: none; }
.dghost.unav { border-color: var(--muted); background: var(--panel2); color: var(--muted); }

/* people bookings */
.bk { position: absolute; top: 4px; height: 24px; border-radius: 4px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 600; padding: 0 7px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; overflow: clip; cursor: pointer; z-index: 2; }
.bk:hover { box-shadow: 0 0 0 2px var(--ink); }
.bk.applied { background: var(--panel); color: var(--c); border: 1.5px dashed var(--c); }
.un { position: absolute; top: 5px; height: 22px; border-radius: 3px; background: repeating-linear-gradient(135deg, var(--hatch) 0 3px, transparent 3px 7px); border: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 0 6px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; z-index: 1; }

/* open shifts side panel */
.oside { width: 290px; flex: none; border-left: 1px solid var(--line); background: var(--panel2); display: flex; flex-direction: column; min-height: 0; }
.oside .ph { background: var(--panel); }
.oside .list { overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ocard { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 6px; padding: 8px 10px; cursor: grab; display: flex; flex-direction: column; gap: 2px; }
.ocard:hover { border-color: var(--muted); border-left-color: var(--c); }
.ocard b { font-size: 13px; }
.ocard small { color: var(--muted); font-size: 12px; }
.ocard .row { justify-content: space-between; }
.oside .tip { font-size: 12px; color: var(--muted); padding: 0 12px 10px; margin: 0; }

.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); padding: 6px 16px; border-top: 1px solid var(--line); background: var(--panel); }
.legend .sw { display: inline-block; width: 18px; height: 10px; border-radius: 2px; vertical-align: middle; margin-right: 5px; background: var(--accent); }
.legend .sw.d { background: transparent; border: 1.5px dashed var(--accent); }
.legend .sw.h { background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }

/* multi-select dropdown */
.ms { position: relative; }
.ms > .btn { font-weight: 600; }
.ms > .btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ms-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); width: 260px; max-height: 360px; display: flex; flex-direction: column; }
.ms-pop .in { margin: 8px; width: calc(100% - 16px); }
.ms-pop .opts { overflow: auto; padding: 0 4px 6px; }
.ms-pop label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.ms-pop label:hover { background: var(--panel2); }
.ms-pop input { accent-color: var(--accent); width: 15px; height: 15px; }
.ms-pop .foot { display: flex; justify-content: space-between; padding: 6px 8px; border-top: 1px solid var(--line2); }

/* ---------- drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--panel); z-index: 51; box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: slidein .16s ease-out; }
  @keyframes slidein { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
}
.dh { padding: 16px 18px 0; border-bottom: 1px solid var(--line); border-top: 6px solid var(--c, var(--accent)); }
.dh .top { display: flex; align-items: flex-start; gap: 10px; }
.dh h2 { font-family: var(--f-display); font-weight: 700; font-size: 25px; line-height: 1.15; }
.dh .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dh .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 12px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; }
.tabs button { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 12px 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.db { flex: 1; overflow: auto; padding: 16px 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.df { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel2); }
.df .l { margin-right: auto; }

.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px 24px; overflow: auto; background: var(--scrim); }
.sheet { background: var(--panel); border-radius: 10px; width: 100%; max-width: 760px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sheet.narrow { max-width: 480px; }
.mh { display: flex; align-items: flex-start; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.mh h2 { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1.2; }
.mh .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.mh .x { margin-left: auto; }
.mb { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.mf { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.mf .l { margin-right: auto; }
.problems { margin: 0; padding: 10px 12px 10px 30px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 6px; color: var(--ink); }
.problems li + li { margin-top: 4px; }
.formerr { background: var(--crit-soft); color: var(--crit); border-radius: 6px; padding: 8px 12px; font-weight: 600; font-size: 13px; }
.calc { background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 12px; font-size: 13px; color: var(--muted); display: flex; gap: 6px 18px; flex-wrap: wrap; }
.calc b { color: var(--ink); font-family: var(--f-mono); }

/* people lists (send-out, applicants) */
.plist { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pi { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--line2); flex-wrap: wrap; background: var(--panel); }
.pi:first-child { border-top: 0; }
.pi.dim { background: var(--panel2); }
.pi.dim .who2 { opacity: .7; }
.pi .who2 { flex: 1 1 200px; min-width: 0; }
.pi .who2 b { font-weight: 600; }
.pi .who2 small { display: block; color: var(--muted); font-size: 12px; }
.pi .acts { display: flex; gap: 6px; }
.pi input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.sendbar { position: sticky; bottom: -24px; margin: 0 -18px -24px; padding: 12px 18px; background: var(--panel); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 2; }
.fillbar { display: inline-flex; width: 120px; height: 9px; border-radius: 5px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; }
.fillbar i { background: var(--ok); display: block; }
.fillbar i + i { background: repeating-linear-gradient(135deg, var(--warn) 0 3px, transparent 3px 6px); }

/* review page */
.rgroup { margin-bottom: 16px; }
.rgroup .ph { border-left: 6px solid var(--c); border-radius: 8px 8px 0 0; }
.rgroup .ph .sub { color: var(--muted); font-size: 13px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: min(400px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 6px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); border-left: 4px solid var(--ok); }
.toast.crit { border-left-color: var(--crit); }
.toast.warn { border-left-color: var(--warn); }

/* ---------- login ---------- */
.login { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bar); background-image: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 55%); }
.login .sheet { max-width: 400px; }
.lbrand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border-bottom: 3px solid var(--brand); }
.lbrand .logo { height: 72px; width: auto; }
.lbrand .logo-pair img.on-light { display: block; }
.demo { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 6px; padding: 10px 12px; font-size: 12.5px; }
.demo table { border-collapse: collapse; margin-top: 4px; width: 100%; }
.demo td { padding: 2px 6px 2px 0; font-family: var(--f-mono); font-size: 12px; vertical-align: middle; overflow-wrap: anywhere; }
.demo button { font-size: 11px; white-space: normal; text-align: left; }

/* ---------- worker portal (mobile first) ---------- */
.portal { max-width: 640px; margin: 0 auto; padding: 14px 14px 90px; display: flex; flex-direction: column; gap: 14px; }
.ptop { background: var(--bar); color: var(--bar-ink); padding: 12px 18px; border-bottom: 3px solid var(--brand); display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10; }
.ptabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: var(--panel); border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom, 0); }
.ptabs button { flex: 1; appearance: none; border: 0; background: none; padding: 10px 4px 12px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; border-top: 3px solid transparent; }
.ptabs button[aria-selected="true"] { color: var(--accent); border-top-color: var(--brand); }
.ptabs .badge { font-size: 10px; }
.offer { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; border-top: 6px solid var(--c, var(--accent)); }
.offer .ob { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.offer h3 { font-family: var(--f-display); font-size: 23px; line-height: 1.15; }
.offer .client { color: var(--muted); font-weight: 600; }
.offer .pay { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--ok); }
.offer .pay small { font-size: 16px; color: var(--muted); font-weight: 600; }
.offer .dates { font-weight: 600; font-size: 15px; }
.offer .of { padding: 12px 16px; border-top: 1px solid var(--line2); background: var(--panel2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer .of .btn.lg { flex: 1; }
.status-line { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hello h1 { font-family: var(--f-display); font-size: 28px; }

@media (max-width: 720px) {
  :root { --labelw: 150px; }
  .topbar { padding: 0 10px; }
  .who span { display: none; }
  .oside { position: fixed; right: 0; top: 0; bottom: 0; z-index: 45; box-shadow: var(--shadow); width: min(290px, 85vw); }
}

/* ---------- v0.2: avatars, photos, day grid, forecast, sites ---------- */
.avatar { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; overflow: hidden; letter-spacing: .02em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photobox { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.photobox .pic { width: 96px; height: 128px; border-radius: 8px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; text-align: center; flex: none; }
.photobox .pic img { width: 100%; height: 100%; object-fit: cover; }

.pbg .grid { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background-image: linear-gradient(to right, var(--line) 0 1px, transparent 1px); }
.pbg .hovercol { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .07; }
.pbg .dragband { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .12; border-left: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.pday.hover { background: var(--accent-soft); color: var(--accent); border-radius: 4px; font-weight: 700; }
.pday.inband { background: var(--accent); color: var(--accent-ink); border-radius: 0; }
.pday.inband i { color: var(--accent-ink); }
.pday { border-left: 1px solid var(--line2); }
.plabel .avatar { margin-right: 2px; }

.scope { display: inline-flex; }
.sitebox { background: var(--panel2); border: 1px solid var(--line2); border-left: 4px solid var(--c, var(--accent)); border-radius: 6px; padding: 10px 12px; font-size: 13px; white-space: pre-line; }
.sitebox b { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.pill.locked { opacity: .85; cursor: default; }
.sites { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.siteitem { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.siteitem .t { flex: 1; min-width: 0; }
.siteitem small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi.ok { border-top-color: var(--ok); } .kpi.warn { border-top-color: var(--warn); } .kpi.acc { border-top-color: var(--accent); } .kpi.crit { border-top-color: var(--crit); }
.kpi .lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: var(--f-display); font-weight: 700; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.t tfoot td { font-weight: 700; background: var(--panel2); border-top: 2px solid var(--line); }
.gpbar { display: inline-block; height: 8px; border-radius: 4px; background: var(--ok); vertical-align: middle; }
.gpbar.neg { background: var(--crit); }
.warnbox { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.warnbox ul { margin: 4px 0 0; padding-left: 18px; }
.fgrid { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.oncost .in { text-align: right; }
.oncost .row { flex-wrap: nowrap; }
.oncost .row .in { width: 90px; flex: none; }
.oncost .row span.u { color: var(--muted); font-size: 12px; }

/* ---------- v0.3: notifications card ---------- */
.notifcard { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 12px 14px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.notifcard p { margin: 0; color: var(--ink); }
.notifcard ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.page > .notifcard, .page > div > .notifcard { margin-bottom: 4px; }

/* ---------- v0.4: retention + DNU ---------- */
.dnubox { border: 1px solid var(--crit); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--crit-soft); }
.dnubox .in { background: var(--panel); }
.chip.dnu { background: var(--crit); color: #fff; border-color: transparent; }
.plabel .dnutag { font-size: 10px; font-weight: 700; color: var(--crit); letter-spacing: .04em; }

/* ---------- v0.4: worker month calendar ---------- */
.mcal { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.mcal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 8px; }
.mcal-head b { font-family: var(--f-display); font-size: 21px; }
.cdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cdays.dow span { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-bottom: 2px; }
.cweek { position: relative; }
.cweek > .cdays { position: absolute; inset: 0; }
.cday { border-radius: 6px; background: var(--panel2); padding: 3px 5px; font: 600 12px var(--f-mono); color: var(--ink); }
.cday.out { opacity: .4; }
.cday.past span { color: var(--faint); }
.cday.today { box-shadow: inset 0 0 0 2px var(--brand); }
.cday.off { background: repeating-linear-gradient(135deg, var(--hatch) 0 3px, var(--panel2) 3px 7px); }
.cbar { position: absolute; height: 19px; border-radius: 5px; font-size: 11px; font-weight: 700; padding: 0 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; appearance: none; border: 0; z-index: 1; line-height: 19px; }
.cbar.booked { background: var(--c); color: #fff; }
.cbar.open { background: var(--panel); color: var(--c); border: 2px solid var(--c); line-height: 15px; }
.cbar.applied { background: var(--panel); color: var(--c); border: 2px dashed var(--c); line-height: 15px; }
.cbar.cont { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cbar.more { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mcal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted); padding: 8px 2px 2px; }
.mcal-legend .lg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.lg.booked { background: var(--accent); }
.lg.open { border: 2px solid var(--accent); }
.lg.applied { border: 2px dashed var(--accent); }
.lg.off { background: repeating-linear-gradient(135deg, var(--hatch) 0 2px, transparent 2px 5px); border: 1px solid var(--line); }
.modal .offer { border: 0; }

/* ---------- v0.5: audit trail + reports ---------- */
:root { --c-access: #5B6B7B; --c-cand: #8850AE; --c-book: #1D7446; --c-job: var(--accent); --c-note: #B58310; --c-co: #2F6DB5; --c-admin: #586878; }
.c-access { --cc: var(--c-access); } .c-cand { --cc: var(--c-cand); } .c-book { --cc: var(--c-book); } .c-job { --cc: var(--c-job); }
.c-note { --cc: var(--c-note); } .c-co { --cc: var(--c-co); } .c-admin { --cc: var(--c-admin); }

.feed { display: flex; flex-direction: column; gap: 6px; }
.feedcats { margin-bottom: 4px; }
.fday { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 0 4px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; }
.fitem { display: grid; grid-template-columns: 62px 10px minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 6px 0; }
.fitem.bad .fsum { color: var(--crit); }
.ftime { font: 600 12px var(--f-mono); color: var(--muted); padding-top: 1px; white-space: nowrap; }
.fdot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc, var(--muted)); margin-top: 4px; }
.fsum { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ameta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ameta b { color: var(--ink); font-weight: 600; }
.feedfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0 2px; font-size: 12px; }
.section .feedfoot, .panel .feedfoot { padding: 10px 14px; }
table.chg { border-collapse: collapse; margin-top: 6px; font-size: 12px; max-width: 100%; }
table.chg th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 3px 10px 3px 0; }
table.chg td { padding: 3px 10px 3px 0; border-top: 1px solid var(--line2); vertical-align: top; overflow-wrap: anywhere; }
table.chg td.from { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
table.chg td.to { font-weight: 600; }

.reports .tabs { margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.rbar .in[type="date"] { width: 140px; }
.kpis.rk { margin-bottom: 10px; }
.kpis.rk .val { font-size: 26px; }
.legend { display: inline-flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend .lg { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg.need { background: var(--accent-soft); border: 1px solid var(--accent); }
.lg.got { background: var(--accent); }
.trend { display: flex; gap: 6px; align-items: stretch; padding: 14px 14px 10px; overflow-x: auto; }
.tcol { flex: 1 0 44px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; }
.tbar { position: relative; width: 100%; max-width: 46px; height: 150px; }
.tbar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px 4px 0 0; }
.tbar i.need { background: var(--accent-soft); border: 1px solid var(--accent); border-bottom: 0; }
.tbar i.got { background: var(--accent); left: 5px; right: 5px; }
.tv { font: 600 11px var(--f-mono); color: var(--ink); min-height: 14px; }
.tl { font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tn { font: 500 10.5px var(--f-mono); color: var(--muted); }
.funnel { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.frow { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 110px; gap: 12px; align-items: center; }
.fl { font-size: 13px; font-weight: 600; }
.fb { height: 18px; background: var(--panel2); border-radius: 4px; overflow: hidden; }
.fb i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.fn { font: 700 13px var(--f-mono); text-align: right; }
.fn small { font-weight: 500; color: var(--muted); }
table.rtable th, table.rtable td { padding: 8px 10px; }
table.rtable td.r, table.rtable th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.rtable th.sortable { cursor: pointer; user-select: none; }
table.rtable th.sorted { color: var(--ink); }
table.rtable tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: var(--panel2); }
details.defs { padding: 0; margin-bottom: 14px; }
details.defs summary { padding: 12px 14px; cursor: pointer; font-weight: 600; }
details.defs ul { margin: 0; padding: 0 14px 14px 32px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; }
.note { background: var(--accent-soft); color: var(--ink); border-radius: 8px; padding: 10px 14px; font-size: 12.5px; line-height: 1.5; margin-bottom: 12px; }
table.atable td { vertical-align: top; font-size: 12.5px; }
table.atable td.when { white-space: nowrap; font: 500 12px var(--f-mono); color: var(--muted); }
table.atable td.what { min-width: 320px; max-width: 560px; overflow-wrap: anywhere; }
table.atable td.dev { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
table.atable tr.bad td.what > div:first-child { color: var(--crit); font-weight: 600; }
.cat { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 4px; white-space: nowrap; color: var(--cc); background: var(--panel2); border: 1px solid var(--cc); }
.linkbtn { appearance: none; border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.linkbtn:hover { text-decoration: underline; }
td.what .linkbtn { font-size: 12px; margin-top: 2px; }
@media (max-width: 700px) {
  .frow { grid-template-columns: 1fr 90px; }
  .frow .fb { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- v0.6: companies list ---------- */
.sorth { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sorth .arr { font-size: 9px; opacity: .45; }
.sorth.on { color: var(--ink); }
.sorth.on .arr { opacity: 1; color: var(--brand-text); }
.coname { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.cosw { width: 6px; align-self: stretch; min-height: 30px; border-radius: 3px; background: var(--c); flex: none; }
table.colist tr.archived td { opacity: .6; }

/* ---------- v0.7: planner Select mode ---------- */
.selbox { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); font-weight: 700; font-size: 13px; cursor: pointer; user-select: none; }
.selbox input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; }
.selbox.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand-text); }
.selbar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); font-size: 13px; }
.selbar .muted { color: inherit; opacity: .75; }
.selbar .btn { background: var(--panel); color: var(--ink); border-color: transparent; }
.selbar .btn.ghost { background: transparent; color: var(--accent-ink); border-color: rgba(255,255,255,.35); }
.selbar .btn.danger { background: var(--crit); color: #fff; }
.selbar .btn:disabled { opacity: .45; }
.planner.selecting .blk { cursor: pointer; }
.planner.selecting .blk .hdl { display: none; }
.planner.selecting .ptrack { cursor: default; }
.tick { flex: none; width: 13px; height: 13px; border-radius: 3px; border: 2px solid rgba(255,255,255,.9); background: rgba(0,0,0,.12); display: inline-block; }
.blk.draft .tick { border-color: var(--c); }
.blk.sel, .bk.sel { box-shadow: 0 0 0 3px var(--brand), 0 2px 8px rgba(0,0,0,.25); z-index: 4; }
.blk.sel .tick, .bk.sel .tick { background: #fff; border-color: #fff; position: relative; }
.blk.sel .tick::after, .bk.sel .tick::after { content: ''; position: absolute; left: 3px; top: 0; width: 3px; height: 7px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.planner.selecting .bk:not(.pickable) { opacity: .45; cursor: not-allowed; }
.planner.selecting .bk.pickable { cursor: pointer; }
.blk .subd { flex: none; font: 600 10px var(--f-mono); background: rgba(255,255,255,.22); border-radius: 8px; padding: 1px 6px; }
.bk.submitted { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.18) 6px 9px); }

/* ---------- v0.7: submission stage + reasons ---------- */
.stages { display: flex; align-items: stretch; gap: 6px; margin-bottom: 4px; }
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); text-align: center; }
.stage b { font: 700 22px/1 var(--f-display); }
.stage span { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 2px; }
.stage small { font-size: 11px; color: var(--faint); }
.stages .arrow { align-self: center; color: var(--faint); font-weight: 700; }
.chip.sub, .pi.sub .chip.sub { background: #EDE7F8; color: #5B3D9A; border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.sub { background: #33284C; color: #C9B6F2; } }
.pi.sub { border-left: 3px solid #7E5BC4; }
.pi.contingent { border-left: 3px solid var(--warn); }
.reasons { display: flex; flex-direction: column; gap: 6px; }
.reason { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-weight: 600; }
.reason:hover { border-color: var(--muted); }
.reason input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.reason:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.copybar { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; background: var(--accent-soft); border-left: 4px solid var(--brand); }
.in.flash { animation: flash .7s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: 0 0 0 0 transparent; } }
.status-line.sent { color: #5B3D9A; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status-line.sent { color: #C9B6F2; } }

/* ---------- v0.7: candidates bulk select + schedule email ---------- */
table.t th.ck, table.t td.ck { width: 36px; padding-right: 0; }
table.t td.ck input, table.t th.ck input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
table.t tr.picked td { background: var(--accent-soft); }
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; margin-bottom: 10px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); position: sticky; top: 0; z-index: 3; }
.bulkbar .muted { color: inherit; opacity: .75; }
.bulkbar .btn.ghost { color: var(--accent-ink); border-color: rgba(255,255,255,.35); background: transparent; }
.bulkbar .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.emaillist { max-height: 300px; overflow: auto; }
.jobmini { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); text-align: right; }
.sample { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.sample summary { cursor: pointer; font-weight: 700; }
.sample pre, .emailtext { white-space: pre-wrap; font: 12.5px/1.5 var(--f-mono); background: var(--panel2); padding: 10px 12px; border-radius: 6px; margin: 8px 0 0; }
.sample .subj { margin-top: 8px; font-size: 13px; }
.warnnote { background: var(--warn-soft); border: 1px solid var(--warn); border-radius: 8px; padding: 10px 12px; color: var(--ink); margin-bottom: 10px; font-size: 13px; }
.emailview { margin-top: 10px; }
.emailframe { width: 100%; height: 62vh; border: 1px solid var(--line); border-radius: 8px; background: #F1F0F7; }

/* ---------- v0.7: candidate profile page ---------- */
.cpage { display: flex; flex-direction: column; gap: 12px; }
.crumbs { font-size: 13px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.chead { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "photo main stats" "photo acts acts"; gap: 12px 20px; padding: 18px; border-top: 4px solid var(--brand); }
.cphoto { grid-area: photo; width: 104px; height: 132px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; appearance: none; }
.cphoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cphoto span { font: 700 30px var(--f-display); color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.cphoto small { font: 600 11px var(--f-body); color: var(--accent); margin-top: 4px; }
.cmain { grid-area: main; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cmain h1 { font: 700 32px/1.1 var(--f-display); }
.cmain h1 .pref { font-size: 20px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.csub { font-weight: 600; color: var(--muted); }
.ccontact { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.ccontact a { text-decoration: none; font-weight: 600; }
.cstats { grid-area: stats; display: grid; grid-template-columns: repeat(2, minmax(110px, auto)); gap: 8px; align-self: start; }
.cstat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; background: var(--panel2); }
.cstat b { font: 700 22px/1.1 var(--f-display); }
.cstat span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.cacts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 8px; }
.ctabs { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; overflow-x: auto; }
.cbody { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; }
.ccol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ch { font: 700 17px var(--f-display); color: var(--ink); margin-top: 6px; }
.noteform { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.cnotes { display: flex; flex-direction: column; gap: 8px; }
.cnote { display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel); }
.cnote.pinned { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--panel)); }
.nicon { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nbody { flex: 1; min-width: 0; }
.ntext { white-space: pre-wrap; overflow-wrap: anywhere; }
.nmeta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.nacts { display: flex; gap: 2px; align-self: flex-start; opacity: .6; }
.cnote:hover .nacts { opacity: 1; }
.gennotes { white-space: pre-wrap; padding: 10px 12px; background: var(--panel2); border-radius: 8px; }
.ckv { display: grid; grid-template-columns: 1fr; gap: 6px; }
.ckv > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line2); padding-bottom: 4px; }
.ckv span { color: var(--muted); font-size: 12.5px; }
.ckv b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pform { display: flex; flex-direction: column; gap: 10px; }
.custom { display: flex; flex-direction: column; gap: 6px; }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 10px 0 0; margin-top: 4px; background: var(--panel); border-top: 1px solid var(--line); }
.tcal { display: flex; flex-direction: column; gap: 2px; }
.tcal .cweek .cday { min-height: 30px; }
.tcal .cbar { height: 21px; line-height: 21px; font-size: 11.5px; }
.tcal .cbar.open, .tcal .cbar.applied { line-height: 17px; }
.cbar.gone { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); text-decoration: line-through; line-height: 19px; }
.lg.gone { background: var(--panel2); border: 1px solid var(--line); }
.callist { margin-top: 10px; }
@media (max-width: 900px) {
  .chead { grid-template-columns: auto 1fr; grid-template-areas: "photo main" "stats stats" "acts acts"; }
  .cstats { grid-template-columns: repeat(2, 1fr); }
  .cgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cphoto { width: 76px; height: 96px; }
  .cmain h1 { font-size: 24px; }
}
.kpi.sub { border-top-color: #7E5BC4; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 22px; padding: 12px 16px 16px; }
.rblock { display: flex; flex-direction: column; gap: 6px; }
.rbh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; border-bottom: 1px solid var(--line2); padding-bottom: 4px; }
.rblock .funnel { padding: 0; }

.ptop .brand .logo { height: 32px; margin: 0; }

/* ---------- v0.8: reports — Red / Amber / Green ---------- */
:root { --g: #1D7446; --g-bg: #E6F4EC; --a: #A86400; --a-bg: #FDF1DC; --r: #B0271F; --r-bg: #FBE5E2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --g: #5DC78B; --g-bg: #15301F; --a: #E5A445; --a-bg: #362813; --r: #F17569; --r-bg: #3A1B19; } }
.ksection { font-weight: 700; font-size: 16px; margin: 18px 0 8px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.ksection::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.kpi.rag { border-top-width: 0; border-left: 5px solid var(--line); position: relative; gap: 3px; }
.kpi.rag .khead { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.kpi.rag .val { font-size: 32px; }
.kpi.rag .tgt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.rag-green { border-left-color: var(--g); background: linear-gradient(90deg, var(--g-bg), var(--panel) 75%); }
.kpi.rag-amber { border-left-color: var(--a); background: linear-gradient(90deg, var(--a-bg), var(--panel) 75%); }
.kpi.rag-red { border-left-color: var(--r); background: linear-gradient(90deg, var(--r-bg), var(--panel) 75%); }
.kpi.rag-green .val { color: var(--g); } .kpi.rag-amber .val { color: var(--a); } .kpi.rag-red .val { color: var(--r); }
.pill { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 10px; white-space: nowrap; }
.pill.green { background: var(--g); color: #fff; } .pill.amber { background: var(--a); color: #fff; } .pill.red { background: var(--r); color: #fff; }
.scorestrip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 4px; }
.scorestrip b { font-size: 16px; }
.scorestrip .sc { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.scorestrip .sc i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.sc.green i { background: var(--g); } .sc.amber i { background: var(--a); } .sc.red i { background: var(--r); } .sc.none i { background: var(--line); }
table.rtable td.cell-green { background: var(--g-bg); color: var(--g); font-weight: 700; }
table.rtable td.cell-amber { background: var(--a-bg); color: var(--a); font-weight: 700; }
table.rtable td.cell-red { background: var(--r-bg); color: var(--r); font-weight: 700; }
.tcol.t-green .got { background: var(--g); } .tcol.t-amber .got { background: var(--a); } .tcol.t-red .got { background: var(--r); }
.tcol.t-green .tv { color: var(--g); } .tcol.t-amber .tv { color: var(--a); } .tcol.t-red .tv { color: var(--r); }
.funnel .frow:nth-child(1) .fb i { background: var(--accent); }
.funnel .frow:nth-child(2) .fb i { background: #4A447A; }
.funnel .frow:nth-child(3) .fb i { background: #7E5BC4; }
.funnel .frow:nth-child(4) .fb i { background: #B4552E; }
.funnel .frow:nth-child(5) .fb i { background: var(--brand); }
.rgrid .rblock:nth-child(1) .fb i { background: var(--r); }
.rgrid .rblock:nth-child(2) .fb i { background: var(--a); }
.rgrid .rblock:nth-child(3) .fb i { background: #7E5BC4; }
.rgrid .rblock:nth-child(4) .fb i { background: #56677A; }
.ktable td { vertical-align: middle; }
.ktable .nm small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.tin { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tin span { font-weight: 700; font-size: 13px; min-width: 70px; }
.tin.g span { color: var(--g); } .tin.a span { color: var(--a); }
.tin input { width: 84px; }
.tin em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.xgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 4px 14px 14px; }
.xcard { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; border-top: 4px solid var(--accent); }
.xcard p { margin: 4px 0 0; font-size: 13px; }
.keybox { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.newkey { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: var(--a-bg); border: 1px solid var(--a); border-radius: 8px; }
.newkey code, .linkrow code { font-family: var(--f-code); font-size: 12.5px; overflow-wrap: anywhere; background: var(--panel); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); }
.links { display: flex; flex-direction: column; gap: 6px; }
.linkrow { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; align-items: center; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 700px) { .linkrow { grid-template-columns: 1fr; } }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- v0.9: Job Express + compact review ---------- */
table.jx td { padding-top: 7px; padding-bottom: 7px; }
table.jx td.dt { white-space: nowrap; }
table.jx td.dt small { color: var(--muted); font-size: 12px; margin-left: 6px; }
table.jx td.rate { font-weight: 700; color: var(--ok); white-space: nowrap; }
table.jx tr.done td { color: var(--muted); }
.nmlink { font-weight: 700; text-decoration: none; color: var(--ink); }
.nmlink:hover { color: var(--accent); text-decoration: underline; }
table.rv td { padding-top: 6px; padding-bottom: 6px; vertical-align: middle; }
table.rv tr.grp td { background: var(--panel2); font-weight: 700; border-top: 2px solid var(--line); }
table.rv tr.grp td small { font-weight: 400; color: var(--muted); margin-left: 8px; }
table.rv tr.grp .dot { margin-right: 6px; }
table.rv .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.comp { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.comp.yes { color: var(--ok); } .comp.no { color: var(--crit); }
.comp i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }
.comp small { font-weight: 400; color: var(--muted); }

/* v0.10: access levels */
.who .acc { margin-left: 6px; padding: 1px 6px; border: 1px solid var(--bar-line); border-radius: 999px; font-size: 10.5px; color: var(--bar-ink); }
.accchip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.accchip.admin { background: var(--accent); color: var(--accent-ink); }
.accchip.manager { background: var(--accent-soft); color: var(--accent); }
.accchip.team { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); }
.accgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0 14px 12px; }
.acccard { background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; }
.acccard p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
table.users td { vertical-align: middle; }
table.users tr.done td { color: var(--muted); }
.bk.other { background: repeating-linear-gradient(135deg, #9a9aa8 0 6px, #a9a9b6 6px 12px); cursor: default; font-weight: 500; }

/* v0.11: company page, logos, schedule of rates */
.cobadge { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--c, var(--accent)); color: #fff; font-weight: 700; padding: 0 4px; flex: none; overflow: hidden; }
.cobadge.haslogo { background: #fff; border: 1px solid var(--line2); padding: 2px 4px; }
.cobadge img { display: block; object-fit: contain; }
.pill.swatch { width: 30px; height: 26px; padding: 0; background: var(--sw); border-color: var(--sw); }
.pill.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink); }
.cohead { border-top-color: var(--c); }
.cologo { grid-area: photo; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cologobtn { width: 150px; height: 96px; border-radius: 8px; border: 1px dashed var(--line); background: var(--panel2); padding: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; appearance: none; }
.cologobtn.has { border-style: solid; background: #fff; }
.cologobtn img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.cologobtn span { display: flex; flex-direction: column; align-items: center; color: var(--muted); }
.cologobtn span b { font: 700 28px var(--f-display); color: var(--c); }
.cologobtn small { font: 600 11px var(--f-body); color: var(--accent); margin-top: 2px; }
.linkbtn.sm { font-size: 12px; font-weight: 500; color: var(--muted); }
.tabhead { align-items: center; gap: 10px; }
.tabhead p { margin: 0; }
.codetails { max-width: 760px; display: flex; flex-direction: column; gap: 12px; }
.sitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sitecard { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.sitecard.dim { opacity: .65; }
.sitecard .row { align-items: center; gap: 8px; }
.sitereq { white-space: pre-line; font-size: 13px; }
.sitetix { font-size: 13px; }
.small { font-size: 12px; }
td.notecell { max-width: 260px; font-size: 13px; color: var(--muted); white-space: pre-line; }
.ratehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ratehead > div:first-child { max-width: 760px; }
.multrow { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
table.sor th.c { text-align: center; border-bottom: 2px solid var(--line); }
table.sor th.c.day { color: var(--brand-text); }
table.sor th.c.night { color: var(--accent); }
table.sor tr.grouphead th { padding-bottom: 2px; }
table.sor td.money { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.sor tr.first td { border-top: 2px solid var(--line); }
table.sor tr.siteline td:first-child { border-top-color: transparent; }
table.sor tr.siteline td { background: var(--panel2); }
.ratehint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; min-height: 0; }
.ratehint:empty { display: none; }
.ratehint .ok { color: var(--ok); }
.ratehint .ok b { color: var(--ink); }
.ratehint .warnnote { margin: 0; }
@media (max-width: 700px) {
  .cologobtn { width: 96px; height: 72px; }
}

/* v0.12: white-label branding (DeployIQ) */
.logo-tile { display: inline-flex; align-items: center; background: #fff; border-radius: 6px; padding: 3px 8px; }
.brand .logo-tile { margin: 10px 0; }
.brand .logo-tile .logo { height: 28px; margin: 0; }
.logo-pair .logo-tile.on-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-pair .logo-tile.on-dark { display: inline-flex; } }
.lbrand .logo-pair .logo-tile.on-dark { display: none; }
.lbrand .logo { max-width: 280px; object-fit: contain; object-position: left; }
.lmsg { margin: 0; color: var(--muted); font-size: 14px; }
.lhelp { padding-top: 0; font-size: 13px; color: var(--muted); }
.lhelp p { margin: 0; }
.login { flex-direction: column; gap: 14px; }
.powered { font-size: 12px; color: var(--muted); }
.powered b { font-weight: 700; color: var(--ink); }
.powered b span { color: var(--brand-text); }
.powered.onbar { color: var(--bar-muted); }
.powered.onbar b { color: var(--bar-ink); }
.powered.onbar b span { color: var(--bar-highlight); }
.powered.inpage { display: block; text-align: center; margin-top: 18px; }
.who .acc.owner { border-color: var(--bar-highlight); color: var(--bar-highlight); }
.accchip.owner { background: var(--brand); color: var(--brand-ink); }
.seats.full { color: var(--crit); font-weight: 600; }
.licbar { padding: 8px 24px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); }
.licbar.due { background: var(--warn-soft); color: var(--ink); }
.licbar.expired { background: var(--crit-soft); color: var(--ink); }
.master .pageh { flex-wrap: wrap; }
.msgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.mspreview { overflow: hidden; margin-bottom: 16px; }
.pvbar { background: var(--bar); color: var(--bar-ink); display: flex; align-items: center; gap: 22px; padding: 0 18px; min-height: 56px; flex-wrap: wrap; }
.pvbar .brand { display: flex; align-items: center; gap: 12px; }
.pvbar .logo { height: 30px; width: auto; display: block; margin: 10px 0; }
.pvnav { display: flex; gap: 18px; font-weight: 600; color: var(--bar-muted); align-self: stretch; }
.pvnav span { padding: 16px 0 13px; border-bottom: 3px solid transparent; }
.pvnav .on { color: var(--bar-strong); border-bottom-color: var(--bar-highlight); }
.pvbody { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; flex-wrap: wrap; }
.pvlogin { display: flex; align-items: center; gap: 12px; border-bottom: 3px solid var(--brand); padding-bottom: 8px; }
.pvlogin .logo { height: 44px; width: auto; }
.pvlogin .logo-pair .logo-tile.on-dark { display: none; }
.pvtoday { background: var(--brand); color: var(--brand-ink); border-radius: 4px; padding: 2px 8px; font-weight: 700; font-size: 12px; }
.asgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; padding: 0 14px 14px; }
.astile { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; align-items: center; }
.asprev { width: 150px; height: 84px; border-radius: 6px; display: flex; align-items: center; justify-content: center; padding: 8px; flex: none; border: 1px solid var(--line2); }
.asprev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.asprev.onwhite { background: #fff; }
.asprev.onbar { background: var(--bar); }
.asprev.onicon { background: var(--panel2); }
.asprev.onicon img { width: 64px; height: 64px; border-radius: 14px; }
.astext { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.swatchpick { width: 40px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
@media (max-width: 720px) { .msgrid { grid-template-columns: 1fr; } .licbar { padding: 8px 16px; } }

/* Ticket check chips (review, job drawer, worker job cards) */
.tchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.chip.t { gap: 5px; font-weight: 600; }
.chip.t > b { font-size: 10.5px; }
.chip.t.crit { background: var(--crit-soft); color: var(--crit); }
.chip.t.min { border: 1px dashed currentColor; }
.chip.t .unchk { font-style: normal; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--warn); color: #fff; font-size: 10px; font-weight: 700; }
.tchips.compact .chip.t { font-size: 10.5px; padding: 0 5px; line-height: 16px; }

.pushbox { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); margin-bottom: 6px; }
.pushbox > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pushbox small { color: var(--muted); }
/* Job form: templates, push, GP */
.tplbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.tplbar .in, .tplbar select { flex: 1; }
.tplnone { margin: 0 0 8px; font-size: 12px; }
.pushcheck { margin-top: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); font-weight: 600; align-items: flex-start; }
.calc .gp small.warnnote { font-size: 11px; }
.calc b.neg { color: var(--crit); }
/* Email compose */
.compose .emfrom { padding: 8px 12px; border-radius: 6px; background: var(--panel2); font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.compose .emfrom.ok { background: var(--ok-soft); color: var(--ok); }
.compose .emfrom.warn { background: var(--warn-soft); color: var(--warn); }
.compose .emto { font-size: 13px; margin-bottom: 10px; }
.compose textarea { min-height: 180px; }
.emsig { white-space: pre-line; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: 13px; }
.tkx { display: inline-flex; gap: 4px; align-items: center; flex: none; width: 220px; justify-content: flex-end; }
.btn.warnbtn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
button.chip.chipbtn { cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; }
.msbox { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); }
.msbox > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.msbox small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.msbox.ok { background: var(--ok-soft); border-color: transparent; } .msbox.ok b { color: var(--ok); }
.msbox.warn { background: var(--warn-soft); border-color: transparent; } .msbox.warn b { color: var(--warn); }
/* Worker app: bell, weekly pay, tickets, notifications */
.ptop .bell { position: relative; appearance: none; border: 0; background: transparent; color: var(--bar-ink); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.ptop .bell:hover, .ptop .bell.on { background: rgba(255,255,255,.14); }
.bellicon { width: 22px; height: 22px; background: currentColor; -webkit-mask: url(/icons/bell.svg) center / contain no-repeat; mask: url(/icons/bell.svg) center / contain no-repeat; }
.bellcount { position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #D92D20; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bar); }
.ptabs .badge.warn { background: var(--warn); }
.wkpay { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.wkpay small { font-size: 11.5px; }
.tkwarn { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; }
.tkwarn.soft { background: var(--panel2); color: var(--muted); font-weight: 500; }
.tklist .pi { align-items: flex-start; }
.tklist .tk-expired { border-left: 4px solid var(--crit); }
.tklist .tk-expiring { border-left: 4px solid var(--warn); }
.tklist a.chip { text-decoration: none; }
.nlist { display: flex; flex-direction: column; gap: 6px; }
.nitem { appearance: none; text-align: left; width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; position: relative; }
.nitem.unread { border-color: var(--accent); background: var(--accent-soft); }
.nitem .nic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--panel2); color: var(--muted); }
.nitem .nic.ok { background: var(--ok-soft); color: var(--ok); } .nitem .nic.crit { background: var(--crit-soft); color: var(--crit); }
.nitem .nic.warn { background: var(--warn-soft); color: var(--warn); } .nitem .nic.acc { background: var(--accent-soft); color: var(--accent); }
.nitem .nt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nitem .nt span { font-size: 13.5px; color: var(--ink); }
.nitem .nt small { font-size: 12px; color: var(--muted); }
.nitem .ndot { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: #D92D20; }

.kv .gpval { font-weight: 500; }
.kv .gpval .gpsub { font-size: 12px; color: var(--muted); }
.kv .gpval .gpsub.warnnote { color: var(--warn); }
