/* Vision Practice Hub – PMA look: black & white with PMA blue (#1470AF), condensed uppercase headings. */
:root {
  --pma-blue: #1470af;
  --pma-blue-ink: #0f5a8f;
  --pma-blue-soft: #e8f1f8;
  --side: #0b0d10;
  --side-ink: #e9edf2;
  --side-dim: #8b95a1;
  --side-hover: #171b21;
  --bg: #f3f5f8;
  --panel: #ffffff;
  --ink: #14181d;
  --ink-2: #3b4450;
  --muted: #6b7684;
  --line: #e4e8ee;
  --line-2: #eef1f5;
  --red: #c2352b;   --red-soft: #fdecea;
  --amber: #a85d00; --amber-soft: #fff3e0;
  --green: #217a3c; --green-soft: #e7f5ec;
  --violet: #5b4bb7; --violet-soft: #efedfb;
  --grey-soft: #eef1f5;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 12px;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Open Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215; --panel: #161a1f; --ink: #e9edf2; --ink-2: #c3cbd5; --muted: #8b95a1;
    --line: #262c33; --line-2: #1d2228; --pma-blue: #3d93d1; --pma-blue-ink: #6db0e0; --pma-blue-soft: #14263a;
    --red: #f07167; --red-soft: #3a1a18; --amber: #f2b45c; --amber-soft: #352710; --green: #63c381; --green-soft: #13301d;
    --violet: #a99cf0; --violet-soft: #241f45; --grey-soft: #1f252c; --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 var(--font); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--pma-blue); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin: 0; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 17px; }
h3 { font-size: 18px; }

/* ---------- Buttons & form controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 13px var(--font); padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--pma-blue); border-color: var(--pma-blue); color: #fff; }
.btn.primary:hover { background: var(--pma-blue-ink); border-color: var(--pma-blue-ink); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.block { width: 100%; padding: 12px 16px; font-size: 14px; }
select, input[type=email], input[type=search], input[type=text] {
  font: 13px var(--font); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 36px;
}
select:focus, input:focus, .btn:focus-visible { outline: 2px solid var(--pma-blue); outline-offset: 1px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--side-hover); }

/* ---------- Brand lock-up: PMA Accountants / [mark] VISION / Practice Hub ----------
   Sized from two numbers: --mark (hexagon width) and --vision (letter size).
   The condensed bold face has a cap height of ~0.73em; the mark is ~1.135x as tall as it is wide. */
.brand { --mark: 34px; --vision: 47px; --brand-line: 12px; display: grid; gap: 2px; color: #fff; text-decoration: none; justify-items: start; }
.brand-firm, .brand-sub { font-family: var(--display); font-weight: 700; font-size: var(--brand-line); letter-spacing: .18em; text-transform: uppercase; color: var(--side-dim); white-space: nowrap; }
.brand-main { display: flex; align-items: center; gap: calc(var(--mark) * .3); margin: calc(var(--brand-line) * .5) 0 calc(var(--brand-line) * .33); }
.brand-main img { display: block; width: var(--mark); height: auto; flex: none; }
.brand-name { display: block; font-family: var(--display); font-weight: 700; font-size: var(--vision); line-height: calc(var(--vision) * .73); letter-spacing: .04em; text-transform: uppercase; transform: translateY(calc(var(--vision) * -.02)); }
.brand.lg { --mark: 64px; --vision: 88px; --brand-line: 17px; gap: 4px; }

/* ---------- Sign in ---------- */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 52%) 1fr; background: var(--bg); }
.signin-brand {
  position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 56px 64px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  background:
    radial-gradient(520px 420px at 108% -8%, rgba(41,171,226,.30), transparent 70%),
    radial-gradient(560px 460px at -12% 112%, rgba(235,34,39,.22), transparent 70%),
    radial-gradient(480px 380px at 55% 120%, rgba(164,205,57,.16), transparent 70%),
    var(--side);
}
/* Large, faint hexagon bleeding off the right edge. */
.signin-brand::after { content: ""; position: absolute; z-index: -1; right: -150px; top: 50%; width: 480px; aspect-ratio: 61.38 / 69.67; transform: translateY(-50%); background: url("/pma-mark.svg") center / contain no-repeat; opacity: .07; }
.signin-hero { display: grid; gap: 28px; margin-top: auto; }
.signin-lede { margin: 0; max-width: 30ch; font-size: 19px; line-height: 1.45; color: #c9d1da; }
.signin-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.signin-points li { display: flex; align-items: center; gap: 12px; color: #aeb8c3; font-size: 14px; }
.signin-points li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--pma-blue)); transform: rotate(45deg); flex: none; }
.signin-foot { margin: 0; font-size: 12px; color: var(--side-dim); letter-spacing: .04em; }
.signin-panel { display: grid; place-items: center; padding: 40px 24px; }
.signin-card { width: 100%; max-width: 400px; display: grid; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 40px 36px; box-shadow: 0 12px 32px rgba(16,24,40,.08); }
.signin-card h1 { font-size: 32px; }
.signin-card .muted { margin: 0; }
.signin-note { margin: 4px 0 0; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
/* Google's own button style: white, with the four-colour G. */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 12px 16px; font: 600 15px var(--font); color: #1f1f1f; background: #fff; border: 1px solid #c7ccd3; border-radius: 10px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.btn-google:hover { background: #f8f9fb; box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.btn-google:focus-visible { outline: 2px solid var(--pma-blue); outline-offset: 2px; }
.btn-google svg { width: 20px; height: 20px; flex: none; }

/* ---------- Messages & toast ---------- */
.msg { margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--grey-soft); font-size: 13px; }
.msg.err { background: var(--red-soft); border-color: transparent; color: var(--red); }
.msg.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--side); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 50; max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 22px; }
.menu-btn { display: none; color: var(--side-ink); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a, .side-dim { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-weight: 500; }
.side-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-nav a:hover { background: var(--side-hover); }
.side-nav a.on { background: var(--pma-blue); color: #fff; }
.side-soon { margin: 18px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-dim); }
.side-dim { color: var(--side-dim); cursor: default; }
.side-foot { border-top: 1px solid #1f242b; padding-top: 14px; display: grid; gap: 12px; }
.sync { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--side-dim); padding: 0 8px; }
.sync .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--side-dim); flex: none; }
.sync.ok .dot { background: #34c46a; box-shadow: 0 0 0 3px rgba(52,196,106,.18); }
.sync.bad .dot { background: #f07167; box-shadow: 0 0 0 3px rgba(240,113,103,.2); }
.me { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.me-text { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.me-text b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 11px; color: var(--side-dim); text-transform: capitalize; }
.me .icon-btn { color: var(--side-dim); }
.me .icon-btn:hover { color: #fff; }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font: 700 11px var(--font); color: #fff; background: var(--pma-blue); flex: none; letter-spacing: .02em; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

.main { min-width: 0; padding: 28px 32px 48px; }
.main > section { max-width: 1280px; margin: 0 auto; display: grid; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head p { margin: 6px 0 0; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head.wrap { flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }

/* ---------- KPI cards ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 14px 18px; cursor: pointer; font: inherit; color: inherit; overflow: hidden; transition: transform .12s, border-color .12s; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--line)); }
.kpi:hover { transform: translateY(-1px); border-color: var(--accent, var(--muted)); }
.kpi.on { border-color: var(--accent, var(--pma-blue)); box-shadow: 0 0 0 2px var(--accent, var(--pma-blue)) inset; }
.kpi b { display: block; font-family: var(--display); font-size: 38px; line-height: 1; color: var(--accent-ink, var(--ink)); }
.kpi span { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi.red { --accent: var(--red); --accent-ink: var(--red); }
.kpi.amber { --accent: var(--amber); --accent-ink: var(--amber); }
.kpi.green { --accent: var(--green); }
.kpi.blue { --accent: var(--pma-blue); }
.kpi.violet { --accent: var(--violet); }
.kpi.zero { --accent-ink: var(--muted); }

/* ---------- By service ---------- */
.svc-list, .load-list { display: grid; gap: 4px; }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) 150px 54px; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.svc:hover { background: var(--line-2); }
.svc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.svc-nums { text-align: right; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.svc-nums b { color: var(--ink); font-size: 14px; }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.bar i { display: block; height: 100%; }
.bar .o { background: var(--red); } .bar .d { background: var(--amber); } .bar .r { background: var(--pma-blue); opacity: .55; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Workload ---------- */
.load { display: grid; grid-template-columns: 24px minmax(0, 1fr) 46px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.load:hover { background: var(--line-2); }
.load-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load .bar { margin-top: 4px; height: 6px; }
.load-n { text-align: right; font-family: var(--display); font-weight: 700; font-size: 20px; }
.load-n small { display: block; font: 600 11px var(--font); color: var(--red); }

/* ---------- Toolbar & chips ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--panel); color: var(--muted); }
.search input { border: 0; padding-left: 0; min-width: 190px; background: transparent; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--pma-blue); }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 34px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.switch input:checked + span { background: var(--pma-blue); }
.switch input:checked + span::after { left: 17px; }
.switch input:focus-visible + span { outline: 2px solid var(--pma-blue); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 99px; background: var(--pma-blue-soft); color: var(--pma-blue-ink); font-size: 12px; font-weight: 600; }
.chip button { border: 0; background: transparent; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1; }
.chip button:hover { background: rgba(20,112,175,.15); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px -18px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { position: sticky; top: 0; background: var(--panel); text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl tbody tr:hover { background: var(--line-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .empty { text-align: center; color: var(--muted); padding: 32px; }
.job-name { font-weight: 600; }
.job-client { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tag-sched { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--violet); background: var(--violet-soft); padding: 1px 6px; border-radius: 4px; vertical-align: 1px; }
.due { display: grid; gap: 2px; white-space: nowrap; }
.due b { font-weight: 600; font-variant-numeric: tabular-nums; }
.due-rel { font-size: 11.5px; font-weight: 600; }
.due-rel.late { color: var(--red); } .due-rel.soon { color: var(--amber); } .due-rel.later { color: var(--muted); }
.stat-dl { font-size: 11.5px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.NotStarted { background: var(--grey-soft); color: var(--ink-2); }
.badge.InProgress { background: var(--pma-blue-soft); color: var(--pma-blue-ink); }
.badge.Blocked { background: var(--amber-soft); color: var(--amber); }
.badge.Completed { background: var(--green-soft); color: var(--green); }
.badge.Skipped { background: var(--grey-soft); color: var(--muted); }
/* Status as a dropdown that still looks like the coloured badge. */
select.badge.badge-select { appearance: none; -webkit-appearance: none; min-height: 0; border: 1px solid transparent; font: 600 12px var(--font); padding: 3px 26px 3px 10px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%236b7684' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 12px; }
select.badge.badge-select::before { display: none; }
select.badge.badge-select:hover { border-color: currentColor; }
select.badge.badge-select:disabled { opacity: .6; cursor: wait; }
select.badge.badge-select option { color: var(--ink); background: var(--panel); font-weight: 500; }
.steps { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.steps .bar { width: 64px; height: 5px; }
.steps .bar i { background: var(--pma-blue); }
.owner { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.owner.none { color: var(--muted); font-style: italic; }
.owner select { padding: 5px 8px; min-height: 30px; font-size: 12px; }
/* An existing owner reads as plain text with a small arrow; the box appears on hover/focus so it's clearly changeable. */
.owner select[data-current]:not([data-current=""]) { font-size: 13px; color: var(--ink); background-color: transparent; border-color: transparent; padding-left: 4px; cursor: pointer; max-width: 180px; }
.owner select[data-current]:not([data-current=""]):hover, .owner select[data-current]:not([data-current=""]):focus { border-color: var(--line); background-color: var(--panel); }
.svc-cell { color: var(--ink-2); max-width: 260px; }
.row-late td:first-child { box-shadow: inset 3px 0 0 var(--red); }

/* ---------- Access page ---------- */
.add-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.field.grow { flex: 1; min-width: 240px; }
.field input { width: 100%; }
#access-msg { margin-top: 12px; }
.roles-help { margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.roles-help summary { cursor: pointer; color: var(--pma-blue); font-weight: 600; }
.roles-help ul { margin: 8px 0 0; padding-left: 18px; }
.person { display: flex; align-items: center; gap: 10px; }
.person b { font-weight: 600; }
.you { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pma-blue-ink); background: var(--pma-blue-soft); padding: 1px 6px; border-radius: 4px; }
tr.off { opacity: .55; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; }
.activity li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-size: 12px; }
.activity .denied { color: var(--red); }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 14px; padding: 22px; background: var(--panel); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(11, 13, 16, .55); }
dialog p { color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ---------- Loading skeleton ---------- */
.skel { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--line-2), var(--line), var(--line-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Morning Brief ---------- */
.page-head .brief-pick { min-width: 220px; }
.brief-hero { background: var(--side); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; position: relative; overflow: hidden;
  background-image: radial-gradient(420px 260px at 105% -20%, rgba(41,171,226,.28), transparent 70%), radial-gradient(420px 260px at -5% 130%, rgba(235,34,39,.18), transparent 70%); }
.brief-hero .headline { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.2; text-transform: none; margin: 0 0 18px; max-width: 46ch; }
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.act { background: rgba(255,255,255,.06); border-radius: 10px; padding: 12px 14px; border-top: 3px solid var(--c, #29abe2); }
.act-0 { --c: #f4811f; } .act-1 { --c: #29abe2; } .act-2 { --c: #a4cd39; }
.act span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #aeb8c3; font-weight: 600; }
.act p { margin: 4px 0 0; color: #e3e8ee; font-size: 13.5px; }
.brief-grid { align-items: start; }
.brief-grid .col { display: grid; gap: 20px; }
.brief-sec .panel-head { margin-bottom: 6px; }
.count-pill { font-size: 12px; font-weight: 700; background: var(--grey-soft); color: var(--ink-2); border-radius: 99px; padding: 2px 10px; }
.brief-sec.attn .count-pill { background: var(--red-soft); color: var(--red); }
.brief-items { list-style: none; margin: 0; padding: 0; }
.brief-items li { padding: 12px 0; border-top: 1px solid var(--line-2); }
.brief-items li:first-child { border-top: 0; }
.bi-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bi-top b { font-weight: 600; }
.src { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pma-blue-ink); background: var(--pma-blue-soft); padding: 1px 7px; border-radius: 4px; }
.brief-items p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.brief-link { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.brief-link:hover { text-decoration: underline; }
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.sched li:first-child { border-top: 0; }
.sched .t { font-weight: 700; color: var(--pma-blue-ink); font-size: 13px; }
.sched small { display: block; color: var(--muted); font-size: 12.5px; }
.clear { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.clear li { margin: 4px 0; }
.clear li::marker { color: var(--green); }
.empty-line { margin: 4px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; height: auto; padding: 12px 16px; z-index: 20; }
  .side-top { padding: 0; }
  .sidebar .brand { --mark: 24px; --vision: 33px; }
  .sidebar .brand-firm, .sidebar .brand-sub { display: none; }
  .sidebar .brand-main { margin: 0; }
  .menu-btn { display: inline-grid; }
  .side-nav, .side-foot { display: none; }
  .sidebar.open .side-nav, .sidebar.open .side-foot { display: flex; }
  .sidebar.open .side-nav { margin-top: 14px; }
  .sidebar.open .side-foot { display: grid; margin-top: 14px; }
  .main { padding: 20px 16px 40px; }
  h1 { font-size: 26px; }
  .signin { grid-template-columns: 1fr; align-content: start; }
  .signin-brand { padding: 32px 24px 36px; gap: 24px; }
  .signin-brand::after { width: 260px; right: -90px; }
  .signin-hero { gap: 18px; }
  .signin-lede { font-size: 16px; }
  .signin-points, .signin-foot { display: none; }
  .brand.lg { --mark: 42px; --vision: 58px; --brand-line: 13px; }
  .signin-panel { padding: 24px 16px 40px; place-items: start center; }
  .signin-card { padding: 28px 22px; }
  .hide-sm { display: none; }
  .acts { grid-template-columns: 1fr; }
  .brief-hero { padding: 20px; }
  .brief-hero .headline { font-size: 22px; }
  .page-head .brief-pick { min-width: 0; width: 100%; }
  .panel-head.wrap > div:first-child { width: 100%; }
  .toolbar { width: 100%; }
  .search { flex: 1 1 100%; }
  .search input { min-width: 0; width: 100%; }
  .toolbar select { flex: 1 1 0; min-width: 0; }
  .switch { flex: 1 1 100%; }
  .svc { grid-template-columns: minmax(0, 1fr) 90px 48px; }
  .activity li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 860px) {
  #register thead { display: none; }
  #register, #register tbody { display: block; }
  #register tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  #register td { padding: 0 !important; border: 0; }
  #register td:nth-child(1) { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  #register td:nth-child(2) { grid-column: 1; grid-row: 1; }
  #register td:nth-child(4) { grid-column: 1; grid-row: 2; }
  #register td:nth-child(5) { grid-column: 1 / -1; grid-row: 3; font-size: 12.5px; }
  #register .row-late { box-shadow: inset 3px 0 0 var(--red); }
  #register .row-late td:first-child { box-shadow: none; }
  #register .empty { display: block; }
}
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi b { font-size: 32px; } }
