/* GenEx PDQ.  GenEx navy and blue, as GenEx Invoice, tuned for wide desktop screens: dense,
   quiet, with colour kept for state.  No inline styles anywhere (CSP style-src 'self'). */

@font-face { font-family: 'Plex'; src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2'); font-weight: 100 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Plex'; src: url('../fonts/ibm-plex-sans-latin-ext.woff2') format('woff2'); font-weight: 100 700; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --navy: #233145; --navy-2: #1a2535; --navy-3: #2d3e57; --navy-4: #3a4d6a;
  --blue: #27789d; --blue-2: #1f6585; --blue-soft: #e8f2f7; --blue-line: #bcd9e7; --sky: #5fb3d6;
  --teal: #13867b; --teal-soft: #e2f4f1;
  --amber: #b5720f; --amber-soft: #fdf1dc;
  --violet: #6b55b5; --violet-soft: #efebfa;
  --ink: #18212d; --ink-2: #445163; --muted: #6b7686; --faint: #98a2b0;
  --line: #e2e7ee; --line-2: #eef1f5; --bg: #f3f5f8; --card: #ffffff; --hover: #f7f9fb;
  --good: #1b7a50; --good-soft: #e2f3ea; --good-line: #b6dfc8;
  --warn: #9a5b00; --warn-soft: #fff2d9; --warn-line: #f2d39a;
  --bad: #b3261e; --bad-soft: #fde8e6; --bad-line: #f1bcb7;
  --held: #6b7686; --held-soft: #eceff3;
  --radius: 10px; --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20, 30, 45, .05), 0 1px 6px rgba(20, 30, 45, .04);
  --shadow-lg: 0 18px 50px rgba(20, 30, 45, .22), 0 2px 8px rgba(20, 30, 45, .08);
  --ring: 0 0 0 3px rgba(39, 120, 157, .28);
  --font: 'Plex', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --rail: 236px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 13.5px/1.5 var(--font); color: var(--ink); background: var(--bg); font-feature-settings: 'tnum' 1; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.strong { font-weight: 600; } .nowrap { white-space: nowrap; } .pre { white-space: pre-line; } .right { text-align: right; }
.bad-text { color: var(--bad); } .warn-text { color: var(--warn); } .good-text { color: var(--good); }
.mono { font-family: Consolas, 'Cascadia Mono', monospace; font-size: .92em; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 14px; height: 14px; } .ic.lg { width: 22px; height: 22px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 12px 14px; }
.rail-brand { display: flex; align-items: flex-end; gap: 9px; padding: 2px 10px 22px; color: #fff; }
.rail-brand:hover { text-decoration: none; }
.rail-brand img { width: 104px; height: auto; display: block; }
.rail-app { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); padding-bottom: 1px; font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #7f8ea3; padding: 16px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 8px; color: #c5cfdc; font-weight: 500; position: relative; }
.nav a:hover { background: var(--navy-3); color: #fff; text-decoration: none; }
.nav a.on { background: var(--navy-3); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 3px 3px 0; background: var(--sky); }
.nav .count { margin-left: auto; background: var(--navy-4); color: #dfe7f0; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 0 7px; min-width: 22px; text-align: center; }
.nav .count.hot { background: var(--bad); color: #fff; }
.rail-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--navy-3); color: #8b99ad; font-size: 11.5px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf8e; box-shadow: 0 0 0 0 rgba(60, 207, 142, .6); animation: live 2.4s infinite; flex: none; }
.live-dot.off { background: #8b99ad; animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(60, 207, 142, .55); } 70% { box-shadow: 0 0 0 7px rgba(60, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 142, 0); } }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 12px 26px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; min-height: 62px; }
.crumbs { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.crumbs .up { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.crumbs .up a { color: var(--muted); }
.page-title { font-size: 19px; font-weight: 600; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted); width: 300px; }
.search input { border: 0; background: transparent; padding: 8px 0; font: inherit; width: 100%; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--blue); background: #fff; box-shadow: var(--ring); }
.search kbd { font: 11px var(--font); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; }
.top-actions { display: flex; align-items: center; gap: 8px; }
#view { padding: 20px 26px 60px; outline: none; width: 100%; }

/* ---------- bell ---------- */
.bell-wrap { position: relative; }
.bell { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; position: relative; }
.bell:hover, .bell[aria-expanded="true"] { border-color: var(--blue-line); background: var(--blue-soft); color: var(--blue-2); }
.bell .ic { width: 19px; height: 19px; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.bell.ring .ic { animation: ring .9s ease; transform-origin: 50% 10%; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.bell-panel { position: absolute; right: 0; top: 46px; width: 400px; max-height: 520px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; z-index: 40; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-head h2 { font-size: 14px; }
.bell-list { overflow-y: auto; flex: 1; }
.bell-foot { border-top: 1px solid var(--line); padding: 9px 14px; text-align: center; font-weight: 500; }
.note { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); position: relative; }
.note:hover { background: var(--hover); text-decoration: none; }
.note.unread { background: #f6fafc; }
.note.unread::after { content: ''; position: absolute; right: 14px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.note-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue-2); }
.note-ic.bad { background: var(--bad-soft); color: var(--bad); } .note-ic.warn { background: var(--warn-soft); color: var(--warn); } .note-ic.good { background: var(--good-soft); color: var(--good); }
.note-title { font-weight: 600; padding-right: 16px; }
.note-body { color: var(--ink-2); font-size: 12.5px; }
.note-when { color: var(--faint); font-size: 11.5px; margin-top: 2px; }

/* ---------- avatar and profile panel ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--blue) 0%, var(--navy-3) 100%); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; overflow: hidden; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; } .avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; } .avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.avatar.c1 { background: linear-gradient(135deg, #27789d, #1f4e6b); } .avatar.c2 { background: linear-gradient(135deg, #13867b, #0f5a53); }
.avatar.c3 { background: linear-gradient(135deg, #b5720f, #7c4c08); } .avatar.c4 { background: linear-gradient(135deg, #6b55b5, #45357e); }
.avatar.c5 { background: linear-gradient(135deg, #b3261e, #7a1913); } .avatar.c0 { background: linear-gradient(135deg, #3a4d6a, #233145); }
.me-btn { display: flex; align-items: center; gap: 9px; border: 1px solid transparent; background: transparent; padding: 3px 10px 3px 3px; border-radius: 22px; cursor: pointer; color: var(--ink); }
.me-btn:hover { border-color: var(--line); background: #fff; text-decoration: none; }
.me-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.me-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.me-name b { font-weight: 600; font-size: 13px; } .me-name span { color: var(--muted); font-size: 11.5px; }
.scrim { position: fixed; inset: 0; background: rgba(18, 28, 44, .38); z-index: 60; }
.profile-panel { position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 100%; background: #fff; box-shadow: var(--shadow-lg); z-index: 61; display: flex; flex-direction: column; transform: translateX(105%); visibility: hidden; transition: transform 240ms cubic-bezier(.2, .8, .2, 1), visibility 0s 240ms; }
.profile-panel.is-open { transform: none; visibility: visible; transition: transform 240ms cubic-bezier(.2, .8, .2, 1); }
.pp-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--blue-2) 100%); color: #fff; padding: 18px 20px 22px; position: relative; }
.pp-hero h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #a9d4e8; font-weight: 600; }
.pp-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: grid; place-items: center; }
.pp-close:hover { background: rgba(255, 255, 255, .18); }
.pp-who { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.pp-who .avatar { box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.pp-name { font-size: 20px; font-weight: 600; }
.pp-role { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 2px 9px; }
.pp-body { flex: 1; overflow-y: auto; padding: 18px 20px 26px; display: flex; flex-direction: column; gap: 16px; }
.photo-drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--blue-line); border-radius: 12px; padding: 14px; cursor: pointer; background: #fbfdfe; transition: background .15s, border-color .15s; }
.photo-drop:hover, .photo-drop.is-over, .photo-drop:focus-visible { border-color: var(--blue); background: var(--blue-soft); outline: none; }
.photo-drop.is-over { transform: scale(1.01); }
.photo-drop.is-busy { opacity: .6; }
.photo-drop .drop-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-2); flex: none; }
.photo-status { min-height: 1.2em; color: var(--muted); font-size: 12px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 14px; margin: 0; }
.facts dt { color: var(--muted); font-size: 12.5px; } .facts dd { margin: 0; overflow-wrap: anywhere; }
.pp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-stat { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.pp-stat b { display: block; font-size: 20px; color: var(--navy); } .pp-stat span { font-size: 11.5px; color: var(--muted); }
.pp-section { border-top: 1px solid var(--line); padding-top: 14px; }
.pp-section h3 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; line-height: 1.35; }
.btn:hover { border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-3); }
.btn.blue { background: var(--blue); border-color: var(--blue); color: #fff; } .btn.blue:hover { background: var(--blue-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--blue-2); }
.btn.ghost:hover { background: var(--blue-soft); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); } .btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--blue-soft); color: var(--blue-2); }
.icon-btn.on { color: var(--bad); background: var(--bad-soft); }
.link-btn { border: 0; background: none; color: var(--blue-2); cursor: pointer; padding: 0; font: inherit; }
.link-btn:hover { text-decoration: underline; }

.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #d5dce5; border-radius: 8px; padding: 7px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 15px; padding-right: 30px; cursor: pointer; }
select.sm, input.sm { padding: 4px 8px; font-size: 12.5px; border-radius: 7px; }
select.sm { padding-right: 26px; background-size: 13px; background-position: right 6px center; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.tight { gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }

/* ---------- cards, panels ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); min-height: 48px; }
.card-head h2 { font-size: 14px; font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card-head h2 .ic { color: var(--blue); }
.card-head .sub { color: var(--muted); font-size: 12px; }
.card-head .end { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 14px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .ic { width: 26px; height: 26px; color: var(--faint); }
.empty.good .ic { color: var(--good); }

.layout { display: grid; gap: 16px; }
.dash { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.span3 { grid-column: span 3; } .span4 { grid-column: span 4; } .span5 { grid-column: span 5; } .span6 { grid-column: span 6; }
.span7 { grid-column: span 7; } .span8 { grid-column: span 8; } .span12 { grid-column: span 12; }
.split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
@media (max-width: 1500px) { .span3 { grid-column: span 6; } .span5, .span7 { grid-column: span 12; } .span4 { grid-column: span 6; } }
@media (max-width: 1180px) { .split, .split-wide { grid-template-columns: minmax(0, 1fr); } .span4, .span6, .span8 { grid-column: span 12; } }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 13px 15px 12px; display: flex; flex-direction: column; gap: 3px; color: var(--ink); position: relative; overflow: hidden; }
.kpi:hover { text-decoration: none; border-color: var(--blue-line); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.kpi.bad::before { background: var(--bad); } .kpi.warn::before { background: #e0a030; } .kpi.good::before { background: var(--good); } .kpi.navy::before { background: var(--navy); }
.kpi-label { font-size: 11.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-label .ic { width: 14px; height: 14px; }
.kpi-value { font-size: 27px; font-weight: 600; color: var(--navy); line-height: 1.1; letter-spacing: -.01em; }
.kpi.bad .kpi-value { color: var(--bad); }
.kpi-sub { font-size: 11.5px; color: var(--muted); }
.kpi-spark { position: absolute; right: 12px; top: 14px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.t td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tbody tr:hover td { background: var(--hover); }
.t tr.is-focus td { background: #fff9e8; }
.t .num { text-align: right; white-space: nowrap; }
.t.compact td { padding: 6px 10px; } .t.compact th { padding: 6px 10px; }
.t tr:last-child td { border-bottom: 0; }
.t a.row-link { color: var(--ink); font-weight: 600; }

/* click-to-sort headings (BACKLOG 41): a button inside the th, two faint arrows, the live one solid */
.sort-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; border-radius: 4px; padding: 2px 4px; margin: -2px -4px; white-space: nowrap; }
.sort-btn:hover { color: var(--ink); background: rgba(39, 120, 157, .08); }
.sort-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
th.num .sort-btn { flex-direction: row-reverse; }
.sort-ar { display: inline-flex; flex-direction: column; gap: 2px; flex: none; }
.sort-ar::before, .sort-ar::after { content: ""; width: 0; height: 0; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; opacity: .35; }
.sort-ar::before { border-bottom: 4px solid currentColor; }
.sort-ar::after { border-top: 4px solid currentColor; }
.sort-btn:hover .sort-ar::before, .sort-btn:hover .sort-ar::after { opacity: .6; }
th.sorted { color: var(--blue-2); }
th.sorted .sort-ar::before { opacity: 1; }
th.sorted .sort-ar::after { opacity: .15; }
th.sorted.desc .sort-ar::before { opacity: .15; }
th.sorted.desc .sort-ar::after { opacity: 1; }
tr.sort-off { display: none; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.who-text b { font-weight: 600; } .who-text span { color: var(--muted); font-size: 11.5px; }

/* ---------- pills, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.pill .ic { width: 12px; height: 12px; }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.blue { background: var(--blue-soft); color: var(--blue-2); }
.pill.held, .pill.muted { background: var(--held-soft); color: var(--held); } .pill.navy { background: var(--navy); color: #fff; }
.pill.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.qual { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 5px; letter-spacing: .02em; white-space: nowrap; border: 1px solid; }
.qual.blue { color: var(--blue-2); background: var(--blue-soft); border-color: var(--blue-line); }
.qual.teal { color: var(--teal); background: var(--teal-soft); border-color: #a9dcd5; }
.qual.amber { color: var(--amber); background: var(--amber-soft); border-color: #f0d09b; }
.qual.violet { color: var(--violet); background: var(--violet-soft); border-color: #d2c8ef; }
.level { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.level::before { content: ''; width: 9px; height: 9px; border-radius: 50%; }
.level.ok { color: var(--good); } .level.ok::before { background: var(--good); }
.level.watch { color: var(--warn); } .level.watch::before { background: #e0a030; }
.level.risk { color: var(--bad); } .level.risk::before { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.level.held { color: var(--held); } .level.held::before { background: var(--held); }
.level.closed { color: var(--faint); } .level.closed::before { background: var(--faint); }
.tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 4px; background: var(--line-2); color: var(--ink-2); margin: 1px 2px 1px 0; white-space: nowrap; }
.tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.warn { background: var(--warn-soft); color: var(--warn); }
.ev { font-size: 10.5px; font-weight: 700; color: var(--blue-2); background: var(--blue-soft); border-radius: 4px; padding: 1px 6px; white-space: nowrap; letter-spacing: .02em; }
.ev.portfolio { color: #fff; background: var(--navy); } .ev.signoff { color: var(--violet); background: var(--violet-soft); }

/* ---------- bars (SVG, sized by attributes) ---------- */
.bar { display: block; width: 100%; height: 7px; border-radius: 4px; overflow: hidden; }
.bar .track { fill: var(--line-2); } .bar .fill { fill: var(--blue); } .bar .fill.good { fill: var(--good); }
.bar .fill.bad { fill: var(--bad); } .bar .fill.warn { fill: #e0a030; } .bar .mark { fill: var(--navy); }
.bar .seg-done { fill: var(--blue); } .bar .seg-over { fill: var(--bad); } .bar .seg-soon { fill: #e8b54f; }
.bar.thick { height: 10px; }
.pct { font-weight: 600; color: var(--navy); font-size: 12px; min-width: 34px; text-align: right; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .bar { flex: 1; }
.ring { display: block; }
.ring .rt { stroke: var(--line-2); } .ring .rf { stroke: var(--blue); stroke-linecap: round; transition: stroke-dasharray .5s; }
.ring.risk .rf { stroke: var(--bad); } .ring.watch .rf { stroke: #e0a030; } .ring.ok .rf { stroke: var(--good); } .ring.held .rf { stroke: var(--held); }
.ring text { font: 600 12px var(--font); fill: var(--navy); }

/* ---------- charts ---------- */
.chart { display: block; width: 100%; }
.chart .grid line { stroke: var(--line-2); }
.chart .axis text { font: 10.5px var(--font); fill: var(--faint); }
.chart .b-done { fill: var(--blue); } .chart .b-due { fill: var(--line); }
.chart .b-done:hover { fill: var(--blue-2); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.legend .l-done { background: var(--blue); } .legend .l-due { background: var(--line); } .legend .l-over { background: var(--bad); } .legend .l-soon { background: #e8b54f; }
.funnel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.funnel-step { background: var(--bg); border-radius: 9px; padding: 10px 12px; position: relative; }
.funnel-step b { display: block; font-size: 22px; color: var(--navy); line-height: 1.15; }
.funnel-step span { font-size: 11.5px; color: var(--muted); }
.funnel-step:not(:last-child)::after { content: ''; position: absolute; right: -7px; top: 50%; width: 10px; height: 10px; background: var(--bg); transform: translateY(-50%) rotate(45deg); z-index: 1; }
.funnel-step.hl { background: var(--blue-soft); } .funnel-step.hl::after { background: var(--blue-soft); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 16px; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; }
.list > li:last-child { border-bottom: 0; }
.list > li.top { align-items: flex-start; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; color: var(--ink); }
a.list-title:hover { color: var(--blue-2); }
.list-sub { color: var(--muted); font-size: 12px; }
.day-head { padding: 7px 16px; background: #fafbfc; border-bottom: 1px solid var(--line-2); font-size: 11.5px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; position: sticky; top: 0; }
.day-head.today { color: var(--blue-2); background: var(--blue-soft); }
.scroll { max-height: 420px; overflow-y: auto; }
.scroll.tall { max-height: 640px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 9px 16px; position: relative; }
.feed li::before { content: ''; position: absolute; left: 28px; top: 34px; bottom: -6px; width: 1px; background: var(--line); }
.feed li:last-child::before { display: none; }
.feed .fi { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue-2); position: relative; z-index: 1; }
.feed .fi .ic { width: 13px; height: 13px; }
.feed .fi.good { background: var(--good-soft); color: var(--good); } .feed .fi.bad { background: var(--bad-soft); color: var(--bad); } .feed .fi.warn { background: var(--warn-soft); color: var(--warn); }
.feed .ft { flex: 1; min-width: 0; font-size: 12.5px; }
.feed .ft b { font-weight: 600; }
.feed .fw { color: var(--faint); font-size: 11px; white-space: nowrap; }
.feed li.fresh { animation: fresh 2.5s ease; }
@keyframes fresh { 0% { background: #fff6d6; } 100% { background: transparent; } }

/* ---------- toolbar, tabs, segmented ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar select { width: auto; min-width: 140px; }
.toolbar .search-in { width: 240px; }
.seg { display: inline-flex; background: #e9edf2; border-radius: 9px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 5px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 500; border: 0; background: transparent; cursor: pointer; font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.seg a:hover, .seg button:hover { color: var(--ink); text-decoration: none; }
.seg .on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20, 30, 45, .1); }
.seg .n { font-size: 11px; color: var(--muted); font-weight: 600; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--blue); }

/* ---------- candidate cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 11px; color: var(--ink); position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ccard:hover { text-decoration: none; border-color: var(--blue-line); box-shadow: 0 6px 20px rgba(20, 30, 45, .08); transform: translateY(-1px); }
.ccard.risk { border-top: 3px solid var(--bad); } .ccard.watch { border-top: 3px solid #e0a030; } .ccard.held { border-top: 3px solid var(--held); }
.ccard-top { display: flex; gap: 12px; align-items: center; }
.ccard-name { font-weight: 600; font-size: 14px; }
.ccard-meta { color: var(--muted); font-size: 12px; }
.ccard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ccard-stats div { background: var(--bg); border-radius: 8px; padding: 6px 8px; }
.ccard-stats b { display: block; font-size: 15px; color: var(--navy); }
.ccard-stats b.bad { color: var(--bad); }
.ccard-stats span { font-size: 11px; color: var(--muted); }
.ccard-next { font-size: 12px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; border-top: 1px dashed var(--line); padding-top: 9px; }

/* ---------- candidate page ---------- */
.hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-bottom: 14px; }
.hero h2 { font-size: 21px; color: var(--navy); font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; margin-top: 4px; align-items: center; }
.hero-meta span { display: inline-flex; gap: 5px; align-items: center; }
.hero-stats { display: flex; gap: 22px; align-items: center; }
.hstat { text-align: center; }
.hstat b { display: block; font-size: 20px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.hstat b.bad { color: var(--bad); }
.hstat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.banner { border-radius: var(--radius); padding: 10px 14px; display: flex; gap: 10px; align-items: center; margin-bottom: 14px; border: 1px solid; }
.banner.held { background: var(--held-soft); border-color: #d6dbe2; color: var(--ink-2); }
.banner.bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.banner.good { background: var(--good-soft); border-color: var(--good-line); color: var(--good); }

.strip { display: flex; gap: 3px; overflow-x: auto; padding: 4px 2px 6px; }
.wk { flex: 1 0 44px; min-width: 44px; border-radius: 7px; background: var(--bg); padding: 5px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; border: 1px solid transparent; }
.wk.past { background: #eef2f6; }
.wk.now { background: var(--blue-soft); border-color: var(--blue); box-shadow: 0 2px 8px rgba(39, 120, 157, .18); }
.wk-n { font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.wk.now .wk-n { color: var(--blue-2); }
.wk-d { font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.wk-dots { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; min-height: 8px; max-width: 40px; }
.wk-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: #c9d2dc; }
.wk-dots .dot.done { background: var(--good); } .wk-dots .dot.overdue { background: var(--bad); } .wk-dots .dot.soon { background: #e8b54f; } .wk-dots .dot.held { background: var(--held); }
.wk-dots .dot.portfolio { border-radius: 2px; }
.wk-gap { flex: 0 0 auto; min-width: 54px; border-radius: 7px; background: repeating-linear-gradient(135deg, #f1f3f6, #f1f3f6 5px, #e6eaef 5px, #e6eaef 10px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 6px; font-size: 9.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.wk-gap.pause { background: repeating-linear-gradient(135deg, #fbf3e3, #fbf3e3 5px, #f5e6c7 5px, #f5e6c7 10px); color: var(--warn); }
.phase-row { display: flex; gap: 3px; margin-top: 2px; }
.phase-row span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }

.checklist { width: 100%; border-collapse: collapse; }
.checklist th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.checklist td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.checklist .unit-row td { background: #f6f8fb; font-weight: 600; color: var(--navy); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.checklist .unit-row .muted { font-weight: 400; }
.checklist tr.task:hover td { background: var(--hover); }
.checklist tr.task.done .t-title { color: var(--muted); }
.checklist tr.task.done .t-title b { text-decoration: line-through; text-decoration-color: #b8c1cc; font-weight: 500; }
.checklist tr.task.overdue td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.checklist tr.task.soon td:first-child { box-shadow: inset 3px 0 0 #e0a030; }
.checklist tr.task.done td:first-child { box-shadow: inset 3px 0 0 var(--good); }
.checklist tr.task.saving { opacity: .6; }
.checklist tr.task.saved td { animation: fresh 1.6s ease; }
.t-title { display: flex; gap: 8px; align-items: center; min-width: 0; }
.t-title b { font-weight: 500; }
.t-due { white-space: nowrap; font-size: 12.5px; }
.t-due.overdue { color: var(--bad); font-weight: 600; } .t-due.soon { color: var(--warn); font-weight: 600; } .t-due.held { color: var(--held); }
.t-state { width: 150px; }
.t-state select { padding: 3px 26px 3px 8px; font-size: 12.5px; border-radius: 6px; }
.t-state select.s-Completed { background-color: var(--good-soft); border-color: var(--good-line); color: var(--good); font-weight: 600; }
.t-state select.s-Blocked { background-color: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); font-weight: 600; }
.t-state select.s-In-progress, .t-state select.s-Scheduled { background-color: var(--blue-soft); border-color: var(--blue-line); }
.t-state select.s-Received, .t-state select.s-Observed { background-color: var(--teal-soft); border-color: #a9dcd5; }
.t-state select.s-Not-applicable { color: var(--faint); }
.t-done input { width: 128px; padding: 3px 6px; font-size: 12px; border-radius: 6px; }
.t-note-text { font-size: 12px; color: var(--ink-2); max-width: 340px; }
.note-row td { background: #fbfcfd; padding: 8px 10px 10px 40px; }
.note-row textarea { min-height: 54px; font-size: 12.5px; }

.rating { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rating label { position: relative; }
.rating input { position: absolute; opacity: 0; }
.rating span { display: block; text-align: center; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--line); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); background: #fff; }
.rating input:focus-visible + span { box-shadow: var(--ring); }
.rating input:checked + span.r-on { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.rating input:checked + span.r-slight { background: var(--warn-soft); border-color: #e0a030; color: var(--warn); }
.rating input:checked + span.r-behind, .rating input:checked + span.r-critical { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.ask { border: 1px solid var(--bad-line); background: var(--bad-soft); border-radius: 9px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.ask strong { color: var(--bad); display: flex; gap: 6px; align-items: center; }
.ask .row label { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; }

.update { padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.update:last-child { border-bottom: 0; }
.update-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.update p { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }

/* ---------- dialogs ---------- */
dialog { border: 0; border-radius: 14px; padding: 0; box-shadow: var(--shadow-lg); width: 480px; max-width: calc(100vw - 32px); color: var(--ink); }
dialog.wide { width: 760px; }
dialog::backdrop { background: rgba(18, 28, 44, .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { font-size: 15px; color: var(--navy); }
.dlg-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.dlg-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-radius: 0 0 14px 14px; }

/* ---------- flashes and toasts ---------- */
.flashes, .toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: 420px; }
.flash, .toast { display: flex; gap: 10px; align-items: flex-start; background: var(--navy); color: #fff; border-radius: 11px; padding: 11px 12px 11px 14px; box-shadow: var(--shadow-lg); animation: slide-in .25s ease; }
.flash.warn { background: #7a4a00; } .flash.good { background: var(--navy); }
.flash .icon-btn, .toast .icon-btn { color: #c8d2de; width: 24px; height: 24px; margin-left: auto; }
.toast { background: #fff; color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.toast .note-title { padding-right: 0; }
@keyframes slide-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: radial-gradient(1200px 600px at 20% 10%, #2f5f80 0%, var(--navy) 45%, var(--navy-2) 100%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; position: relative; overflow: hidden; }
.login-side img { width: 220px; height: auto; }
.login-side h1 { font-size: 34px; font-weight: 600; line-height: 1.2; max-width: 520px; margin-top: 40px; }
.login-side p { color: #b7c8d8; font-size: 15px; max-width: 480px; margin-top: 12px; }
.login-pts { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.login-pts div { display: flex; gap: 12px; align-items: center; color: #dbe6ef; }
.login-pts .ic { color: var(--sky); width: 20px; height: 20px; }
.login-side small { color: #8ea3b8; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 460px; width: 100%; margin: 0 auto; gap: 14px; }
.login-card h2 { font-size: 24px; color: var(--navy); }
.login-host { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.code-in { font-size: 26px !important; letter-spacing: .4em; text-align: center; font-family: Consolas, monospace !important; }
.qr { display: block; margin: 4px auto; border: 1px solid var(--line); border-radius: 10px; }
.key { font-family: Consolas, monospace; text-align: center; background: var(--bg); border-radius: 8px; padding: 8px; letter-spacing: .08em; }
.codes { columns: 2; font-family: Consolas, monospace; background: var(--bg); border-radius: 10px; padding: 12px 12px 12px 30px; margin: 0; }
.login-foot { color: var(--faint); font-size: 12px; margin-top: 20px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-side { display: none; } }

/* ---------- admin ---------- */
.pw-once { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.pw-once code { font-size: 14px; background: #fff; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--warn-line); }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.cat-row td { vertical-align: top; }
.cat-row.off td { opacity: .5; }
.cat-row input, .cat-row select { padding: 4px 8px; font-size: 12.5px; }
.saved-tick { color: var(--good); font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .3s; }
.saved-tick.on { opacity: 1; }
.err-page { max-width: 520px; margin: 80px auto; text-align: center; }
.err-page h1 { font-size: 26px; color: var(--navy); margin-bottom: 8px; }
.section-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 4px 0 10px; }
.kbd { font: 11px var(--font); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); background: #fff; }

/* ---------- polish after the first look in the browser ---------- */
.list > li > .right, .list > li > .pill, .list > li > .qual { flex: none; }
.who-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (min-width: 1440px) { .kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.funnel.two { grid-template-columns: 1fr 1fr; }
.funnel.two .funnel-step::after { display: none; }
.bar-row .bar { min-width: 70px; }
.funnel.kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
/* The profile panel waits off-screen to the right; it must never widen the page. */
body { overflow-x: hidden; }
.t input.sm[type=date] { width: 132px; }
.t select.sm { width: auto; min-width: 110px; }
.t .notes-in { min-width: 180px; }
.t .num-in { width: 110px; }
td > form[data-autosave] { display: none; }
.t input.sm[type=date] { width: 124px; }
.t .notes-in { min-width: 140px; width: 160px; }
.t td .saved-tick { margin-left: 4px; }
.t .notes-in { min-width: 0; width: 130px; }
.t select.sm { min-width: 0; max-width: 156px; }
.t td[data-state-cell] { min-width: 150px; }
.t td .saved-tick { position: absolute; margin: 6px 0 0 -44px; background: #fff; }
.t th { white-space: normal; vertical-align: bottom; line-height: 1.3; }
.t td .pill { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- landing: sign-in and the programme chooser (BACKLOG 29) ----------
   The photo is full-bleed; its GenEx mark sits top right, so the card carries none of its own
   at that size.  The file name carries its date because Caddy caches /static for a year. */
.landing { min-height: 100vh; position: relative; overflow: hidden; display: flex; flex-direction: column; color: var(--ink);
  background: #cfe4f2 url('../img/landing-bg-20261113b.jpg') center / cover no-repeat;
  background-image: image-set(url('../img/landing-bg-20261113b.webp') type('image/webp'), url('../img/landing-bg-20261113b.jpg') type('image/jpeg')); }
.landing::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 30, 52, .38) 0%, rgba(14, 30, 52, .12) 45%, rgba(14, 30, 52, 0) 70%); pointer-events: none; }
.landing > * { position: relative; }
.landing-top { display: flex; align-items: center; gap: 12px; padding: 22px 34px; min-height: 76px; }
.landing-tag { color: #fff; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.landing-main { flex: 1; display: flex; align-items: center; padding: 20px 7vw 60px; }
.landing-foot { padding: 0 34px 20px; color: rgba(255, 255, 255, .85); font-size: 12px; text-shadow: 0 1px 6px rgba(0, 0, 0, .3); }

.glass { background: rgba(255, 255, 255, .78); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 20px; box-shadow: 0 24px 70px rgba(10, 30, 60, .28), 0 2px 8px rgba(10, 30, 60, .08); }
.signin { width: 420px; max-width: 100%; padding: 34px 34px 28px; display: flex; flex-direction: column; gap: 14px; }
.signin-brand { display: flex; align-items: center; gap: 10px; }
.signin-brand img { width: 36px; height: 36px; border-radius: 9px; }
.signin-brand b { font-size: 15px; color: var(--navy); letter-spacing: .02em; }
.signin-brand span { font-size: 11px; color: var(--blue-2); letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.signin h1 { font-size: 26px; color: var(--navy); font-weight: 600; }
.signin .lede { color: var(--ink-2); }
.signin input { background: rgba(255, 255, 255, .92); padding: 10px 12px; font-size: 14px; }
.signin .btn.primary { padding: 11px 16px; font-size: 14px; border-radius: 10px; background: linear-gradient(135deg, var(--navy) 0%, var(--blue-2) 100%); border: 0; }
.signin .btn.primary:hover { filter: brightness(1.08); }
.signin .host { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }
.signin .small-print { color: var(--muted); font-size: 12px; border-top: 1px solid rgba(20, 40, 70, .1); padding-top: 12px; }

/* The chooser: the sign-in card leaves, then two programme cards arrive. */
.chooser { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.chooser-hello { color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); animation: rise .7s .55s both cubic-bezier(.2, .8, .2, 1); }
.chooser-hello h1 { font-size: 34px; font-weight: 600; }
.chooser-hello p { font-size: 15px; opacity: .92; margin-top: 4px; }
.programmes { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.prog { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 30px 30px 26px; min-height: 340px; color: var(--ink); overflow: hidden; text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.prog:hover { text-decoration: none; }
.prog.live { animation: rise .75s .7s both cubic-bezier(.2, .8, .2, 1); }
.prog.soon { animation: rise-grey .75s .88s both cubic-bezier(.2, .8, .2, 1); cursor: default; filter: grayscale(.85); }
.prog.live:hover { transform: translateY(-6px); box-shadow: 0 34px 80px rgba(10, 30, 60, .34), 0 2px 8px rgba(10, 30, 60, .1); }
.prog.live:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(95, 179, 214, .7), 0 24px 70px rgba(10, 30, 60, .28); }
.prog::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 120, 157, .22) 0%, rgba(39, 120, 157, 0) 70%); pointer-events: none; }
.prog-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%); box-shadow: 0 10px 24px rgba(31, 101, 133, .35); }
.prog-icon .ic { width: 28px; height: 28px; stroke-width: 1.7; }
.prog.soon .prog-icon { background: linear-gradient(135deg, #8a96a6 0%, #5d6878 100%); box-shadow: none; }
.prog-kicker { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-2); font-weight: 700; }
.prog.soon .prog-kicker { color: var(--muted); }
.prog h2 { font-size: 30px; line-height: 1.12; color: var(--navy); font-weight: 600; letter-spacing: -.01em; }
.prog.soon h2 { color: #4c5767; }
.prog p { color: var(--ink-2); font-size: 14px; max-width: 440px; }
.prog-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.prog-stats div { background: rgba(255, 255, 255, .7); border: 1px solid rgba(20, 40, 70, .08); border-radius: 12px; padding: 10px 12px; }
.prog-stats b { display: block; font-size: 22px; color: var(--navy); line-height: 1.15; }
.prog-stats b.bad { color: var(--bad); }
.prog-stats span { font-size: 11.5px; color: var(--muted); }
.prog-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #fff; align-self: flex-start;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-2) 100%); padding: 10px 18px; border-radius: 999px; }
.prog.live:hover .prog-go .ic { transform: translateX(3px); }
.prog-go .ic { transition: transform .2s; }
.ribbon { position: absolute; top: 22px; right: -46px; transform: rotate(35deg); background: linear-gradient(135deg, #e0a030, #b5720f);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 54px; box-shadow: 0 6px 14px rgba(0, 0, 0, .15); }
.prog.soon .soon-note { margin-top: auto; display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 600; }
.signin.leaving { position: absolute; left: 7vw; animation: leave .55s both cubic-bezier(.4, 0, .2, 1); pointer-events: none; }
.landing-me { display: flex; align-items: center; gap: 10px; color: #fff; background: rgba(14, 30, 52, .32); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 5px 6px 5px 5px; }
.landing-me .strong { text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
.landing-me .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; backdrop-filter: blur(8px); }
.landing-me .btn:hover { background: rgba(255, 255, 255, .28); }
.landing-me .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }

@keyframes rise { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise-grey { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: .82; transform: none; } }
@keyframes leave { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-16px) scale(.94); visibility: hidden; } }
.prog.soon { opacity: .82; }
@media (prefers-reduced-motion: reduce) {
  .prog.live, .prog.soon, .chooser-hello { animation: none; }
  .signin.leaving { display: none; }
}
@media (max-width: 980px) { .programmes { grid-template-columns: 1fr; } .landing-main { padding: 10px 20px 40px; } }
.rail-app { font-size: 10px; letter-spacing: .14em; line-height: 1.2; }

/* ---------- programme cards with artwork (BACKLOG 30) ---------- */
.prog { padding: 14px 14px 24px; gap: 0; min-height: 0; }
.prog::after { display: none; }
.prog-art { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 1260 / 700; background: #eef4f9;
  box-shadow: inset 0 0 0 1px rgba(20, 40, 70, .06), 0 1px 2px rgba(20, 40, 70, .06); }
.prog-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.prog.live:hover .prog-art img { transform: scale(1.035); }
.prog-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 12px 0; flex: 1; }
.prog-body p { margin: 0; }
/* Only the content goes grey: the sign keeps its colour. */
.prog.soon { filter: none; opacity: 1; }
.prog.soon .prog-art, .prog.soon .prog-body { filter: grayscale(.9); opacity: .66; }
@keyframes rise-grey { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: 1; transform: none; } }
.hang { position: absolute; z-index: 3; top: 4px; right: 8%; display: flex; flex-direction: column; align-items: center;
  transform-origin: 75px 7px; animation: sway 4.5s ease-in-out 1.7s infinite; }
.hang-strings path { stroke: #6b5a3e; stroke-width: 2; fill: none; stroke-linecap: round; }
.hang-strings circle { fill: #c9ced6; stroke: #7d8796; stroke-width: 1.5; }
.hang-board { margin-top: -6px; position: relative; padding: 13px 30px 12px; border-radius: 10px;
  background: linear-gradient(160deg, #f6c453 0%, #e2a228 48%, #c2800f 100%); color: #fff; font-weight: 800; font-size: 16px;
  letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 2px rgba(110, 60, 0, .45); white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, .6); box-shadow: 0 14px 28px rgba(120, 70, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.hang-board::before, .hang-board::after { content: ''; position: absolute; top: -2px; width: 8px; height: 8px; border-radius: 50%;
  background: #8b5d10; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .5); }
.hang-board::before { left: 14px; } .hang-board::after { right: 14px; }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .hang { animation: none; } }
.hang-board::before { left: calc(50% - 63px); } .hang-board::after { right: calc(50% - 63px); }
.prog.soon { overflow: visible; } .hang { top: -34px; right: 5%; }
/* The photo no longer carries the logo (painted out, 2026-11-13): the vector wordmark sits
   top right instead, sharp at any size and always inside the window. */
.landing-top { justify-content: space-between; }
.landing-logo { margin-left: auto; width: 200px; height: auto; display: block; filter: drop-shadow(0 2px 12px rgba(10, 30, 60, .35)); }
@media (max-width: 700px) { .landing-logo { width: 140px; } }
/* Dallas, 2026-11-13: "ensure the login is centered".  The card sits in the middle of the
   page, and its leaving copy on /welcome starts from the same place. */
.landing-main { justify-content: center; }
.signin.leaving { left: 0; right: 0; margin: 0 auto; }
/* Dallas, 2026-11-13: the navy square mark on the white sign-in card. */
.signin-brand img { width: 44px; height: 44px; border-radius: 7px; box-shadow: 0 4px 12px rgba(35, 49, 69, .25); }
.signin-brand { gap: 12px; }

/* ---------- quick polish, 2026-11-13 (BACKLOG 35, 37, 40, 42) ---------- */
/* 35: the four ratings on one line, "Slightly behind" included. */
.rating { display: flex; gap: 6px; }
.rating label { flex: 1 1 auto; }
.rating span { white-space: nowrap; padding: 7px 10px; }
/* 37: catalogue lines as a three-column grid, so the chips, weeks and counts line up. */
.cat-list { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 12px; align-items: center; }
.cat-list .qual { min-width: 64px; justify-content: center; }
/* 40: the programme cards a little smaller. */
.chooser { max-width: 1020px; gap: 18px; }
.programmes { gap: 22px; }
.prog { padding: 12px 12px 20px; }
.prog-body { padding: 16px 10px 0; gap: 12px; }
.prog-stats b { font-size: 20px; }
.chooser-hello h1 { font-size: 30px; }
/* 42: whole candidate rows open the candidate. */
.t tr.row-link-tr { cursor: pointer; }
.t tr.row-link-tr:hover td { background: var(--blue-soft); }
/* BACKLOG 44: the pill around name and Sign out gets more room on the right, and the
   button rounds to match it. */
.landing-me { padding: 5px 9px 5px 5px; gap: 12px; }
.landing-me .btn { border-radius: 999px; padding: 5px 13px; }

/* ---------- overview at a glance (BACKLOG 50 to 54) ---------- */
/* tile trend: sparkline and change since last week, top right of each tile */
.kpi-trend { order: 9; display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; padding-top: 6px; border-top: 1px dashed var(--line-2); cursor: help; }
.kpi-trend .spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--faint); }
.kpi-delta { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kpi-delta small { font-weight: 400; color: var(--faint); font-size: 10.5px; }
.kpi-trend.up-good .kpi-delta { color: var(--good); } .kpi-trend.up-good polyline { stroke: var(--good); } .kpi-trend.up-good circle { fill: var(--good); }
.kpi-trend.up-bad .kpi-delta { color: var(--bad); } .kpi-trend.up-bad polyline { stroke: var(--bad); } .kpi-trend.up-bad circle { fill: var(--bad); }
.kpi-trend.neutral polyline { stroke: var(--blue); } .kpi-trend.neutral circle { fill: var(--blue); }

/* this programme week */
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(230px, 1.5fr); }
.wk-day { padding: 12px 12px 14px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wk-day.today { background: var(--blue-soft); }
.wk-day-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.wk-day-head b { color: var(--navy); font-weight: 600; font-size: 12.5px; }
.wk-day.today .wk-day-head b { color: var(--blue-2); }
.wk-bar .wk-track { fill: var(--line-2); } .wk-bar .wk-done { fill: var(--blue); } .wk-bar .wk-open { fill: #e8b54f; } .wk-bar .wk-open.late { fill: var(--bad); }
.wk-count { font-size: 12px; color: var(--ink-2); }
.wk-names { list-style: none; margin: 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.wk-names a { color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-side { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wk-side h3 { margin: 6px 0 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wk-pct { display: flex; align-items: baseline; gap: 8px; } .wk-pct b { font-size: 26px; color: var(--navy); font-weight: 600; } .wk-pct span { font-size: 12px; color: var(--muted); }
.wk-side .list > li { padding: 5px 0; justify-content: space-between; }
@media (max-width: 1500px) { .wk-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } .wk-side { grid-column: 1 / -1; border-top: 1px solid var(--line-2); } }

/* cohort heat map */
.heat-wrap { padding: 10px 16px 14px; max-height: 460px; overflow: auto; }
.heat-pane + .heat-pane { margin-top: 14px; }
.heat-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.heat { display: block; overflow: visible; font-family: var(--font); }
.heat-phase { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); font-weight: 600; }
.heat-sep { stroke: var(--line); stroke-dasharray: 2 3; }
.heat-name { font-size: 12px; fill: var(--ink); } .heat a:hover .heat-name { fill: var(--blue-2); text-decoration: underline; }
.heat-name.level-risk { fill: var(--bad); font-weight: 600; } .heat-name.level-watch { fill: var(--warn); }
.hc { stroke: rgba(20, 30, 45, .06); } .hc:hover { stroke: var(--navy); stroke-width: 1.5; }
.hc.done { fill: var(--blue); } .hc.soon { fill: #e8b54f; } .hc.bad { fill: var(--bad); } .hc.held { fill: #c9ced6; }
.hc.later { fill: #dfe9f0; } .hc.none { fill: #f4f6f9; }
.hc-now { fill: none; stroke: var(--navy); stroke-width: 2; pointer-events: none; }
.legend .l-later { background: #dfe9f0; } .legend .l-none { background: #f4f6f9; border: 1px solid var(--line); }

/* Cambridge countdown */
.countdown { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: #fafbfc; }
.countdown.good { border-color: var(--good-line); background: var(--good-soft); }
.countdown.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.countdown.bad { border-color: var(--bad-line); background: var(--bad-soft); }
.cd-days { display: flex; align-items: center; gap: 10px; }
.cd-days b { font-size: 34px; line-height: 1; color: var(--navy); font-weight: 700; letter-spacing: -.02em; }
.countdown.bad .cd-days b { color: var(--bad); }
.cd-days span { font-size: 12px; color: var(--ink-2); line-height: 1.3; }
.cd-split { display: flex; gap: 12px; font-size: 12px; flex-wrap: wrap; } .cd-split span { cursor: help; }

/* switchable views on a card (BACKLOG 46): .seg[data-views] buttons show [data-pane] blocks */
[data-pane][hidden] { display: none; }

/* ---------- Cam, the helper bottom right (BACKLOG 48) ---------- */
.has-cam .toasts, .has-cam .flashes { bottom: 88px; }
.cam { position: fixed; right: 22px; bottom: 22px; z-index: 85; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; }
.cam-fab { display: inline-flex; align-items: center; gap: 7px; height: 46px; padding: 0 18px 0 14px; border-radius: 23px; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; font: inherit; font-weight: 600; letter-spacing: .02em; box-shadow: 0 6px 18px rgba(20, 30, 45, .28); transition: transform .15s ease, box-shadow .15s ease; }
.cam-fab .ic { color: var(--sky); width: 18px; height: 18px; }
.cam-fab:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(20, 30, 45, .32); }
.cam-fab[aria-expanded="true"] { background: var(--navy-2); }
.cam-panel { width: 380px; max-width: calc(100vw - 44px); height: 540px; max-height: calc(100vh - 110px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(20, 30, 45, .25); display: flex; flex-direction: column; overflow: hidden; animation: slide-in .2s ease; }
.cam-panel[hidden] { display: none; }
.cam-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; }
.cam-head .icon-btn { color: #c8d2de; } .cam-head .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.cam-avatar { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; flex: none; }
.cam-avatar .ic { color: var(--sky); width: 18px; height: 18px; }
.cam-title { flex: 1; display: flex; flex-direction: column; line-height: 1.25; } .cam-title b { font-size: 14px; } .cam-title span { font-size: 11.5px; color: #b9c6d6; }
.cam-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.cam-msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; }
.cam-msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }
.cam-msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.cam-msg.wait { color: var(--muted); font-style: italic; }
.cam-items { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; white-space: normal; }
.cam-items a { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); line-height: 1.3; }
.cam-items a:hover { border-color: var(--blue-line); background: var(--blue-soft); text-decoration: none; }
.cam-items a b { font-weight: 600; font-size: 12.5px; } .cam-items a span { font-size: 11.5px; color: var(--muted); }
.cam-items a.bad { box-shadow: inset 3px 0 0 var(--bad); } .cam-items a.warn { box-shadow: inset 3px 0 0 #e0a030; } .cam-items a.good { box-shadow: inset 3px 0 0 var(--good); }
.cam-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line-2); background: #fff; }
.cam-chips button { border: 1px solid var(--blue-line); background: var(--blue-soft); color: var(--blue-2); border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 11.5px; cursor: pointer; }
.cam-chips button:hover { background: #d6e8f1; }
.cam-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #fff; }
.cam-form input { flex: 1; }
.cam-switch { align-items: flex-start; gap: 10px; margin-top: 4px; }
.kpi-delta { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1700px) { .kpi-delta small { display: none; } }

/* ---------- admin People: a three-dot menu per row (BACKLOG 43) ---------- */
.people-wrap { overflow: visible; }
.people-wrap .inline-form { flex-wrap: wrap; }
.people-wrap .in-name { flex: 1 1 150px; min-width: 130px; }
.people-wrap .in-email { flex: 1.4 1 200px; min-width: 170px; }
.row-menu-cell { width: 44px; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; cursor: pointer; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu[open] summary { background: var(--blue-soft); color: var(--blue-2); }
.row-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.row-menu-list button { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 10px; border-radius: 7px; cursor: pointer; color: var(--ink); }
.row-menu-list button:hover, .row-menu-list button:focus-visible { background: var(--hover); }
.row-menu-list button .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--muted); flex: none; }
.row-menu-list button span { display: flex; flex-direction: column; line-height: 1.3; }
.row-menu-list button b { font-weight: 600; font-size: 13px; } .row-menu-list button small { font-size: 11.5px; color: var(--muted); }
.row-menu-list button.danger b, .row-menu-list button.danger .ic { color: var(--bad); }

/* ---------- Export menus (BACKLOG 49) ---------- */
.export-menu summary.btn { gap: 7px; }
.export-menu summary.btn .ic.sm { width: 12px; height: 12px; margin-right: -3px; color: var(--muted); }
.export-menu .row-menu-list { width: 300px; z-index: 60; }
.row-menu-list a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 7px; color: var(--ink); }
.row-menu-list a:hover, .row-menu-list a:focus-visible { background: var(--hover); text-decoration: none; }
.row-menu-list a .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--blue); flex: none; }
.row-menu-list a span { display: flex; flex-direction: column; line-height: 1.3; }
.row-menu-list a b { font-weight: 600; font-size: 13px; } .row-menu-list a small { font-size: 11.5px; color: var(--muted); }

/* ---------- printing any page from the browser (BACKLOG 49) ---------- */
@media print {
  @page { size: A4 landscape; margin: 11mm; }
  html, body { background: #fff !important; }
  .shell { display: block; }
  .rail, .search, .bell-wrap, .me-btn, .cam, .toasts, .flashes, .export-menu, .row-menu, .topbar .btn, .seg,
  .toolbar, dialog, .cam-fab, [data-filter-tasks], .icon-btn, .sort-ar { display: none !important; }
  .topbar { position: static; border-bottom: 2px solid var(--blue); backdrop-filter: none; padding: 0 0 6px; min-height: 0; }
  #view { padding: 10px 0 0; }
  .card, .kpi { box-shadow: none !important; break-inside: avoid; }
  .layout.dash { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; }
  .scroll, .table-wrap, .heat-wrap { max-height: none !important; overflow: visible !important; }
  .t th, .checklist th { position: static; }
  .t tr, .checklist tr { break-inside: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
  .sort-btn { pointer-events: none; }
  input, select, textarea { border-color: transparent !important; background: transparent !important; box-shadow: none !important; }
  select { appearance: none; -webkit-appearance: none; }
  [data-pane][hidden] { display: block !important; }
}
