/* T-Matrix-I - base styles. Mobile-first: everything works at 375px; wider screens add room. */
:root {
  --bg: #f4f6f9; --surface: #fff; --text: #1b2430; --muted: #66727f; --line: #dfe4ea;
  --brand: #0f4c81; --brand-2: #138a8a; --brand-ink: #fff;
  --ok: #1e7b45; --ok-bg: #e7f5ec; --err: #b42318; --err-bg: #fdecea; --info-bg: #e8f1fb;
  --radius: 10px; --hdr: 52px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 15px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
code { font-size: 12px; word-break: break-all; }

/* header */
.hdr { position: sticky; top: 0; z-index: 20; height: var(--hdr); display: flex; align-items: center; gap: 10px;
       padding: 0 12px; background: var(--brand); color: var(--brand-ink); }
.brand { color: inherit; font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap; }
.brand span { color: #8fe3e3; }
.brand.big { font-size: 26px; color: var(--brand); }
.brand.big span { color: var(--brand-2); }
.crumbs { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap;
          font-size: 13px; opacity: .92; }
.crumbs a { color: inherit; }
.crumbs .sep { opacity: .6; }
.crumbs > :not(:last-child):not(.sep) { display: none; }   /* phones: only current page */
.crumbs .sep { display: none; }
.hdr-right { display: flex; align-items: center; gap: 8px; }
.event-chip { color: inherit; text-decoration: none; background: rgba(255,255,255,.15); border-radius: 999px;
              padding: 5px 10px; font-size: 12px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: none; border: 0; color: inherit; font-size: 20px; min-width: 36px; min-height: 36px; cursor: pointer; border-radius: 8px; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.hide-sm { display: none; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); background: var(--surface); z-index: 40;
          transform: translateX(-105%); transition: transform .2s ease; display: flex; flex-direction: column;
          box-shadow: 2px 0 16px rgba(0,0,0,.15); }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px; border-bottom: 1px solid var(--line); }
.drawer-head small { display: block; color: var(--muted); word-break: break-all; }
.drawer-head .icon-btn { color: var(--text); font-size: 16px; }
.drawer-nav { flex: 1; overflow-y: auto; padding: 6px 0; }
.d-group summary { padding: 10px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.d-group summary::after { content: "▸"; float: right; color: var(--muted); }
.d-group[open] summary::after { content: "▾"; }
.d-item { display: flex; justify-content: space-between; align-items: center; padding: 9px 16px 9px 28px;
          color: var(--text); text-decoration: none; min-height: 38px; }
.drawer-nav > .d-item { padding-left: 16px; font-weight: 600; }
.d-item:hover { background: var(--bg); }
.d-item.soon { color: var(--muted); }
.d-item em { font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
             background: var(--bg); border-radius: 4px; padding: 1px 5px; }
.drawer-foot { padding: 12px; border-top: 1px solid var(--line); }

/* layout */
.main { padding: 14px 16px 40px; max-width: 1920px; margin: 0 auto; }   /* user 20-Oct: use the screen width (works from 1440 x 900 up) */
.main.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.main.center > .flash { width: 100%; max-width: 380px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.card.empty { text-align: center; padding: 28px 14px; }
.card.hint { background: var(--info-bg); border-color: #c9dcf2; }
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-head h2 { margin: 0; }

/* forms */
.form { display: grid; gap: 12px; text-align: left; }
.form label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #3d4955; }
input, select, textarea { font: inherit; font-size: 14px; min-height: 38px; padding: 7px 10px; border: 1px solid #c8d0d9;
                          border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc3ea; outline-offset: 0; border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 0; border-top: 1px dashed var(--line); align-items: end; }
.date-row:first-child { border-top: 0; }
.date-row label { font-size: 11px; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.toolbar input { max-width: 360px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 14px;
       border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0b3b65; }
.btn-ghost { background: #fff; color: var(--brand); border-color: #c8d0d9; }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: #fff; color: var(--err); border-color: #f0b8b2; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0; min-height: 0; font-weight: 600; cursor: pointer; font: inherit; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* flash + pills */
.flash { border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: var(--info-bg); }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--err-bg); color: var(--err); }
.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eceff3; color: #45515d; }
.pill-open { background: var(--ok-bg); color: var(--ok); }
.pill-live { background: #fff1d6; color: #8a5a00; }
.pill-closed { background: #fde8e6; color: var(--err); }
.pill-draft { background: #eceff3; }

/* events */
.event-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.event-card { padding: 0; margin: 0; }
.event-card.current { border-color: var(--brand); box-shadow: 0 0 0 2px #cfe0f2; }
.event-card-btn { all: unset; box-sizing: border-box; display: grid; gap: 4px; width: 100%; padding: 14px; cursor: pointer; border-radius: var(--radius); }
.event-card-btn:hover, .event-card-btn:focus-visible { background: #f8fafc; }
.event-card-btn .pill { justify-self: start; }

/* dashboard */
.reg-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reg-link > div { min-width: 0; display: grid; gap: 2px; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 2px;
        text-decoration: none; color: var(--text); }
a.tile:hover { border-color: var(--brand); }
.tile-v { font-size: 26px; font-weight: 700; color: var(--brand); }
.tile-l { font-size: 12px; color: var(--muted); }

/* grids: scroll inside card on tablets; stacked cards on phones */
.table-wrap { padding: 0; overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.grid th { font-size: 12px; color: var(--muted); font-weight: 600; background: #fafbfc; white-space: nowrap; }
/* action cell stays a real table cell (display:flex here broke the row line under the buttons) */
.grid td.actions { white-space: nowrap; text-align: right; width: 1%; }
.grid td.actions > *, .grid td.actions form { display: inline-flex; vertical-align: top; margin: 0 0 0 4px; }
.grid td.actions > :first-child { margin-left: 0; }
@media (max-width: 640px) {
  .stack-sm thead { display: none; }
  .stack-sm tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .stack-sm td { display: flex; gap: 10px; border: 0; padding: 4px 12px; }
  .stack-sm td::before { content: attr(data-l); flex: 0 0 92px; font-size: 12px; color: var(--muted); }
  .stack-sm td.actions { display: block; width: auto; text-align: left; padding-top: 8px; }
  .stack-sm td.actions::before { content: ""; }
}

/* ── shared building blocks ─────────────────────────────────────────────── */
.inline { display: inline; margin: 0; }
.pad { padding: 10px 14px; }
.w-sm { max-width: 110px; }
.bad { color: var(--err); font-weight: 600; }
.dim { opacity: .55; }
.note { color: #6b5600; }
.spacer { flex: 1; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row.wrap { margin-bottom: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.toolbar.wrap { flex-wrap: wrap; align-items: center; }
.toolbar select { max-width: 360px; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 4px 0; }
.chk { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 400 !important; font-size: 13px; cursor: pointer; }
.chk input, .chip input, td input[type=checkbox], .slot-chk input { width: auto; min-height: 0; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
        padding: 4px 10px; font-size: 12px; cursor: pointer; }
.chips.static .chip { cursor: default; }
.form label.chip { display: inline-flex; gap: 6px; font-weight: 400; font-size: 12.5px; color: var(--text); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 1px 6px; background: #eceff3; color: #45515d; text-transform: uppercase; letter-spacing: .02em; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: #fff1d6; color: #8a5a00; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.swatch.over { background: repeating-linear-gradient(45deg, #fdecea, #fdecea 3px, #f3b5ae 3px, #f3b5ae 6px); }
.swatch.none { background: #eef1f4; border: 1px dashed #c8d0d9; }
.flash-info { background: var(--info-bg); }
.pill-cancelled, .pill-declined { background: #fde8e6; color: var(--err); }
.pill-confirmed, .pill-accepted { background: var(--ok-bg); color: var(--ok); }
.pill-tentative, .pill-tbd, .pill-tbc { background: #fff1d6; color: #8a5a00; }
.pill-invited { background: var(--info-bg); color: var(--brand); }
.pill-archived { background: #eceff3; }
h2.inline { display: inline; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.split { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.side-ref h2 { font-size: 14px; }
.form-grid.compact { gap: 8px 10px; }
.form-actions.bottom { align-self: end; }
.form-actions.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 14px 0 6px; z-index: 5; }
.inline-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-add input:not([type=checkbox]), .inline-add select { flex: 1 1 160px; width: auto; }
.inline-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-edit input:not([type=checkbox]) { flex: 1 1 140px; width: auto; }
.inline-lbl { display: inline-flex !important; gap: 6px; align-items: center; font-size: 12px; }
.inline-lbl select { width: auto; }
.rows .win-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; padding: 8px 0; border-top: 1px dashed var(--line); }
.rows .win-row:first-child { border-top: 0; }
.rows .win-row label { font-size: 11px; }
.rows .win-row .win-full-lbl { align-self: center; white-space: nowrap; font-size: 12px; padding-top: 14px; }
.rows .win-row .win-msg { grid-column: 1 / -1; font-size: 12px; }
.rows .win-row .win-msg:empty { display: none; }
.rows .win-row input[readonly] { background: #f3f5f8; }
.rows .win-row input:invalid, .rows .win-row select:invalid { border-color: var(--err); }
.rows .win-row label:first-child:has(select[name=w_corp]) { grid-column: 1 / -1; }
.radio-row { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.radio-row legend { font-size: 12px; font-weight: 600; color: #3d4955; margin-bottom: 4px; width: 100%; }
.seg { display: inline-flex !important; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { border: 1px solid #c8d0d9; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: #3d4955; background: #fff; min-height: 34px; display: inline-flex; align-items: center; }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid #9cc3ea; }
.seg.disabled span { opacity: .45; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.tab { white-space: nowrap; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text); font-size: 13px; }
.tab small { color: var(--muted); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab.active small { color: #cfe0f2; }
.sortable { list-style: none; padding: 0; margin: 0 0 10px; counter-reset: s; }
.sortable li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fff; }
.sortable li > span:first-of-type::before { counter-increment: s; content: counter(s) ". "; color: var(--muted); }
.multi-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
details.multi { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
details.multi summary { padding: 9px 12px; cursor: pointer; font-weight: 600; }
.multi-body { max-height: 260px; overflow: auto; padding: 4px 12px 10px; display: grid; gap: 4px; }
.multi-body.two-col { grid-template-columns: 1fr; max-height: 320px; }
.multi-body.two-col > div { display: grid; gap: 4px; align-content: start; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.steps li a { color: var(--text); }
.steps li.done a { color: var(--muted); text-decoration: line-through; }
.steps li.next a { font-weight: 700; color: var(--brand); }
.d-group.lvl2 > summary { padding-left: 28px; font-weight: 600; font-size: 13px; color: #3d4955; }
.d-group.lvl3 > summary { padding-left: 40px; font-weight: 600; font-size: 12.5px; color: var(--muted); }
.drawer-nav > .d-item.lvl1 { padding-left: 16px; font-weight: 600; }
.d-item.lvl2 { padding-left: 28px; }
.d-item.lvl3 { padding-left: 40px; }
.d-item.lvl4 { padding-left: 52px; }
.d-item.here { background: var(--info-bg); color: var(--brand); font-weight: 600; }
.nav-list a { text-decoration: none; }
.nav-list a.active { font-weight: 700; }

.rm-pick { border: 0; padding: 0; margin: 0; }
.rm-pick legend { font-size: 12px; font-weight: 600; color: #3d4955; margin-bottom: 4px; }
.tmx-dialog { border: 0; border-radius: 12px; padding: 18px 18px 14px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.tmx-dialog::backdrop { background: rgba(0,0,0,.35); }
.tmx-dialog h2 { font-size: 16px; margin: 0 0 8px; }
.tmx-dialog p { margin: 0 0 14px; color: #3d4955; white-space: pre-line; }
.tmx-dialog .btn-row { justify-content: flex-end; }
.field-stack { display: grid; gap: 6px; align-content: start; }
[hidden] { display: none !important; }

/* DD-MMM-YYYY date fields + calendar */
.dmy-wrap { display: flex; gap: 4px; align-items: center; width: 100%; }
.dmy-text { flex: 1 1 130px; min-width: 132px; }
.dmy-text.bad { border-color: var(--err); background: var(--err-bg); }
.dmy-time { flex: 0 1 120px; }
.dmy-cal { border: 1px solid #c8d0d9; background: #fff; border-radius: 8px; min-height: 38px; min-width: 38px; cursor: pointer; }
.cal-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15);
           padding: 8px; width: 260px; font-size: 13px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-head button, .cal-foot button { border: 0; background: var(--bg); border-radius: 6px; min-width: 32px; min-height: 30px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow { font-size: 11px; color: var(--muted); padding: 4px 0; }
.cal-grid button { border: 0; background: none; border-radius: 6px; min-height: 32px; cursor: pointer; }
.cal-grid button:hover { background: var(--info-bg); }
.cal-grid button.today { font-weight: 700; color: var(--brand); }
.cal-grid button.sel { background: var(--brand); color: #fff; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 6px; }

/* slot master */
.slot-grid input[type=time] { min-width: 112px; }
.slot-grid select { min-width: 110px; }
.slot-grid tr.is-blocked td { background: #f1f2f4; }
.slot-grid tr.is-meal td { background: #e9f7f7; }
.slot-grid .mins { color: var(--muted); font-size: 12px; }

/* availability checkbox grid */
.avail { display: grid; gap: 10px; }
.avail-day { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.avail-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.avail-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-chk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #c8d0d9; border-radius: 8px; padding: 5px 8px; font-size: 12.5px; cursor: pointer; background: #fff; min-height: 36px; }
.slot-chk span { display: grid; line-height: 1.1; }
.slot-chk small { color: var(--muted); font-size: 10px; }
.slot-chk:has(input:checked) { border-color: var(--brand); background: #eef5fc; }
.slot-chk.meal { border-style: dashed; }
.slot-chk.blocked { opacity: .45; cursor: not-allowed; }
.avail > [data-toggle-all], .avail-head [data-toggle-row] { justify-self: start; width: auto; flex: none; }   /* only the words are clickable */
.slot-chk.booked { cursor: not-allowed; }

/* demand form */
.corp-search { margin: 8px 0; }
.corp-list { display: grid; gap: 0; margin-top: 6px; }
.corp-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 4px; border-top: 1px solid var(--line); }
.corp-row.picked { background: #f3f8fd; }
.corp-pick { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 13.5px; color: var(--text) !important; cursor: pointer; flex: 0 1 auto; max-width: 100%; }
.corp-row > .corp-opts { margin-left: auto; }   /* the gap between name and options is the row, not the label: clicking it does nothing */
.note-btn { all: unset; cursor: pointer; font-size: 15px; padding: 2px 6px; border-radius: 6px; opacity: .45; }
.note-btn:hover, .note-btn:focus-visible { opacity: 1; background: #eef3f9; }
.note-btn.has-note { opacity: 1; background: #fff4dc; }
.corp-note { flex: 1 1 100%; font-size: 12.5px; min-height: 30px; padding: 4px 8px; }
.corp-pick input { margin-top: 2px; }
.corp-pick.spk { padding: 6px 0; }
.corp-opts { display: flex; gap: 6px; align-items: center; }
.corp-opts select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 12px; }
.corp-opts .seg span { padding: 4px 10px; min-height: 30px; font-size: 12px; }
.day-head { font-size: 13px; margin: 12px 0 4px; color: var(--brand); }
.rep-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rep-chip { display: grid; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); background: #fff; min-width: 120px; }
.rep-chip small { color: var(--muted); }
.rep-chip.active { border-color: var(--brand); box-shadow: 0 0 0 2px #cfe0f2; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* manual allocation grid */
.main.wide { max-width: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; margin-bottom: 10px; color: #3d4955; }
.alloc-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 230px); }
table.alloc { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.alloc th, .alloc td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 3px; }
.alloc thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; font-weight: 600; min-width: 92px; text-align: center; color: #3d4955; }
.alloc .sticky-col { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; min-width: 112px; max-width: 150px; padding: 6px 8px; font-weight: 400; }
.alloc thead .sticky-col { z-index: 3; background: #fafbfc; }
.alloc thead th.meal-col { background: #e9f7f7; }
.alloc thead th.blocked-col { background: #eceff3; }
.alloc td.na { background: repeating-linear-gradient(135deg, #f6f7f9, #f6f7f9 4px, #eef1f4 4px, #eef1f4 8px); }
.cell { all: unset; box-sizing: border-box; display: grid; gap: 1px; width: 100%; min-height: 54px; padding: 4px 6px; border-radius: 6px; cursor: pointer;
        border-left: 4px solid var(--fmt, #999); background: color-mix(in srgb, var(--fmt, #999) 12%, white); }
.cell:hover, .cell:focus-visible { outline: 2px solid var(--brand); }
.cell.empty { background: #fff; }
.cell.over { background: repeating-linear-gradient(45deg, #fdecea, #fdecea 4px, #fbd9d5 4px, #fbd9d5 8px); }
.cell-top { font-size: 10px; color: #45515d; font-weight: 700; }
.cell-n { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1; }
.cell-f { font-size: 10px; color: #45515d; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 120px; }
.note-dot { cursor: help; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: #fff; z-index: 40; transform: translateX(105%);
         transition: transform .2s ease; display: flex; flex-direction: column; box-shadow: -2px 0 16px rgba(0,0,0,.15); }
.panel.open { transform: none; }
.panel-head { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head small { display: block; color: var(--muted); }
.panel-head .icon-btn { color: var(--text); font-size: 16px; }
.panel-body { overflow-y: auto; padding: 12px 14px 30px; }
.panel-body h3 { font-size: 13px; margin: 14px 0 4px; color: #3d4955; }
.panel-set { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.panel-set label { display: grid; gap: 3px; font-size: 11px; font-weight: 600; }
.kv-row { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; }
.kv-row span { color: var(--muted); }
ul.people li { display: flex; justify-content: space-between; gap: 8px; align-items: center; border-bottom: 1px solid #f0f2f5; padding: 6px 0; font-size: 13px; }
ul.people li.current { background: #fff8e6; border-radius: 6px; padding: 6px; }
#cam { width: 100%; max-height: 320px; border-radius: 8px; background: #000; margin-bottom: 8px; }

/* allocation board - compact top bar so the grid gets the screen */
.main.tight { padding-top: 8px; padding-bottom: 8px; }
.board-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.board-top h1 { font-size: 17px; margin: 0; white-space: nowrap; }
.board-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.board-filters input, .board-filters select { width: auto; flex: 1 1 110px; max-width: 170px; min-height: 30px; padding: 3px 8px; font-size: 12.5px; }
.board-actions { margin-left: auto; display: flex; gap: 4px; }
.radio-row.compact .seg span { min-height: 28px; padding: 3px 9px; font-size: 12px; }
.ms { position: relative; }
.ms > summary { list-style: none; cursor: pointer; min-height: 30px; display: flex; align-items: center; padding: 3px 24px 3px 9px; font-size: 12.5px;
                border: 1px solid var(--line); border-radius: 6px; background: #fff; white-space: nowrap; position: relative; }
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after { content: "▾"; position: absolute; right: 8px; color: var(--muted); }
.ms.narrowed > summary { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.ms-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px;
          box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px 10px; min-width: 190px; max-height: 60vh; overflow: auto; display: grid; gap: 4px; }
.ms-pop label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 400; white-space: nowrap; cursor: pointer; }
.ms-pop label input { width: 15px; height: 15px; min-height: 0; flex: none; }
.ms-all { font-size: 12px; padding-bottom: 4px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.legend-pop .ms-pop { min-width: 340px; font-size: 13px; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.legend-pop .ms-pop span { white-space: nowrap; display: flex; align-items: center; }
.legend-pop .ms-pop p { grid-column: 1 / -1; }
.legend-pop .swatch { width: 34px; height: 20px; border-radius: 4px; margin-right: 8px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.board-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 118px); }
.board thead tr.hr1 th { height: 22px; padding: 2px 6px; }
.board thead tr.hr2 th { top: 27px; }
.board thead th.day-h { background: #e8eef5; font-size: 12px; }
.board .day-start { border-left: 3px solid #5b7590 !important; }
.board thead th.slot-h { min-width: 50px; padding: 4px 2px; }
.board td.bc.na.off { opacity: .45; }
table.board { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.board th, .board td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 4px 6px; }
.board thead th { position: sticky; top: 0; z-index: 3; background: #fafbfc; min-width: 50px; text-align: center; font-weight: 600; color: #3d4955; }
.board .c1 { position: sticky; left: 0; z-index: 2; background: #fff; width: 96px; min-width: 96px; max-width: 96px; text-align: left; font-weight: 400; }
.board .c2 { position: sticky; left: 96px; z-index: 2; background: #fff; min-width: 190px; max-width: 230px; }
.board thead .c1, .board thead .c2 { z-index: 4; background: #fafbfc; }
.board td.bc { text-align: center; cursor: pointer; height: 44px; background: color-mix(in srgb, var(--fmt) 32%, white); border-left: 3px solid var(--fmt); }
.board td.bc span { font-size: 11px; color: #45515d; display: block; max-width: 74px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board td.bc.free:hover, .board td.bc.soft:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.board td.bc.here { background: var(--fmt); }
.board td.bc.here span { color: #fff; font-weight: 700; }
.board td.bc.busy { background: #eef0f3; border-left-color: #c8d0d9; cursor: not-allowed; }
.board td.bc.nofit { background: #f6f7f9; border-left-color: #e3e7ec; cursor: not-allowed; opacity: .6; }
.board td.bc.soft { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--fmt) 32%, white), color-mix(in srgb, var(--fmt) 32%, white) 4px, #fff3d6 4px, #fff3d6 8px); }
.board td.bc.na { background: repeating-linear-gradient(135deg, #f6f7f9, #f6f7f9 4px, #eef1f4 4px, #eef1f4 8px); border-left-color: transparent; cursor: default; }
.swatch.here-sw { background: var(--brand); }
.panel.left { left: 0; right: auto; width: min(480px, 100vw); transform: translateX(-105%); box-shadow: 2px 0 16px rgba(0,0,0,.15); }
.panel.left.open { transform: none; }
.linkish { all: unset; cursor: pointer; color: var(--brand); }
.linkish:hover, .linkish:focus-visible { text-decoration: underline; }
.linkish.rep { color: #3d4955; }
.rep-pick { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; white-space: nowrap; }
.rep-pick input { width: 14px; height: 14px; }
.board td.bc.working { opacity: .45; }
.board td.bc.mate { box-shadow: inset 0 0 0 2px var(--brand); }
.board td.bc.mate span::before { content: "★ "; color: var(--brand); }
table.sched td { vertical-align: top; font-size: 12.5px; }
table.sched tr.busyrow td { background: #f3f8fd; }
.swatch.busy-sw { background: #eef0f3; border: 1px solid #c8d0d9; }
/* company panel: wide two-pane dialog, drag & drop */
.panel.left.wide { width: min(1240px, 100vw); }
.sp-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .sp-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .sp-grid > section { max-height: calc(100vh - 120px); overflow-y: auto; } }
.seat { display: inline-flex; align-items: center; gap: 4px; margin: 2px 4px 2px 0; padding: 2px 4px 2px 8px; border: 1px solid #c9d6e3;
        border-radius: 12px; background: #fff; font-size: 12px; cursor: grab; }
.seat .x { all: unset; cursor: pointer; padding: 0 4px; color: var(--muted); font-size: 11px; }
.seat .x:hover, .seat .x:focus-visible { color: var(--err); }
.seat.picked, tr.ud.picked td { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--info-bg); }
tr.ud { cursor: grab; }
.seat, tr.ud { -webkit-user-select: none; user-select: none; }
table.unsat td { font-size: 12.5px; vertical-align: top; }
table.unsat th, table.unsat td { padding-left: 6px; padding-right: 6px; }
table.unsat td:first-child { min-width: 170px; }
table.unsat td:nth-child(n+3) { white-space: nowrap; }
table.unsat .mates { background: var(--err-bg); color: #7a271a; font-size: 11px; padding: 2px 4px; margin-top: 2px; border-radius: 4px; }
.picking tr.slot-row { cursor: pointer; }
.picking tr.slot-row.drop-ok td { background: #d9f2e1; }
.picking tr.slot-row.drop-soft td { background: #fff0c7; }
.picking tr.slot-row.drop-hard td { background: #fbd9d5; cursor: not-allowed; }
.th-sort { all: unset; cursor: pointer; font-weight: 600; white-space: nowrap; }
.th-sort:hover, .th-sort:focus-visible { text-decoration: underline; }
.th-sort.on { color: var(--brand); }
.seat .grip { cursor: grab; color: var(--muted); padding: 0 2px; }
.seat .linkish { color: inherit; }
.sp-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 12px; margin: 0 0 10px; }
.sp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); }
.sw-ok { background: #d9f2e1; } .sw-soft { background: #fff0c7; } .sw-hard { background: #fbd9d5; }
.slot-btn { font: inherit; font-size: 12px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; white-space: nowrap; }
.slot-btn:hover { border-color: var(--brand); }
.slot-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
table.unsat tr.fit-ok td:first-child { box-shadow: inset 4px 0 0 #2e9d5b; }
table.unsat tr.fit-soft td:first-child { box-shadow: inset 4px 0 0 #e0a100; }
.drop-hint { display: none; }
.unsat-zone.drop-out { outline: 2px dashed var(--err); outline-offset: 2px; border-radius: 6px; }
.unsat-zone.drop-out .drop-hint { display: block; color: var(--err); font-weight: 600; font-size: 12px; margin: 0 0 6px; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80; max-width: min(560px, calc(100vw - 32px));
         box-shadow: 0 6px 20px rgba(0,0,0,.15); }
@media (max-width: 640px) {
  .board .c1 { width: 80px; min-width: 80px; max-width: 80px; }
  .board .c2 { left: 80px; min-width: 140px; max-width: 160px; }
  .board-top { flex-wrap: wrap; }
  .board-wrap { max-height: calc(100vh - 200px); }
}

/* matrices (avail bulk, permissions) */
table.matrix td { text-align: center; }
table.matrix th, table.matrix td { padding: 6px 8px; }
table.matrix .sticky-col { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; min-width: 150px; }
/* standing rule: grid headers sort on click */
table.grid:not(.no-sort) thead th:not(.no-sort):not(:empty) { cursor: pointer; user-select: none; }
table.grid:not(.no-sort) thead th:not(.no-sort):not(:empty):hover { text-decoration: underline; }
table.grid thead th[aria-sort="ascending"]::after { content: " ▲"; font-size: 10px; }
table.grid thead th[aria-sort="descending"]::after { content: " ▼"; font-size: 10px; }
table.matrix thead th { position: sticky; top: 0; background: #fafbfc; z-index: 2; }
table.matrix thead .sticky-col { z-index: 3; background: #fafbfc; }
.multi-body.tall { max-height: 420px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }
.ok-txt { color: var(--ok); }
.card.narrow-wide { max-width: 640px; }

/* reports */
tr.ok-row td { background: #f0faf3; }
details.check summary { display: block; }
details.check .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--ok); }
details.check.sev-error .dot { background: var(--err); }
details.check.sev-warn .dot { background: #d49200; }
details.check.sev-info .dot { background: var(--brand); }
table.perm td, table.perm th { text-align: center; }
table.perm td:first-child { text-align: left; }
table.perm tr.grp td { background: #fafbfc; font-weight: 600; }
table.perm .lvl-1 { padding-left: 22px; }
table.perm .lvl-2 { padding-left: 36px; }

@media (min-width: 641px) {
  .rows .win-row { grid-template-columns: 2fr auto 1fr 1fr auto; }
  .rows .win-row:has(select[name=w_corp]) { grid-template-columns: 2fr 2fr auto 1fr 1fr auto; }
  .rows .win-row label:first-child:has(select[name=w_corp]) { grid-column: auto; }
  .multi-row { grid-template-columns: repeat(2, 1fr); }
  .multi-body.two-col { grid-template-columns: 1fr 1fr; }
  .split.even { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr) 300px; }
  .split.even { grid-template-columns: 1fr 1fr; }
  .multi-row { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 641px) {
  .hide-sm { display: inline; }
  .crumbs > :not(:last-child):not(.sep), .crumbs .sep { display: inline; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .date-row { grid-template-columns: 150px 110px 110px 110px 1fr 1fr; }
  .date-row .span-2 { grid-column: 1 / 6; }
  .main { padding: 18px 22px 48px; }
}
@media (min-width: 1000px) {
  .form-grid { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .event-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Online Demands / Add Demand Fund Wise - wide & compact; companies as small blocks */
.dem-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.dem-top h1 { font-size: 18px; margin: 0; }
.dem-link { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.dem-link a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 52vw; }
.dem-pick select { min-width: 220px; }
.compact-form .card { padding: 10px 12px; margin-bottom: 10px; }
.compact-form h2 { font-size: 15px; margin: 0 0 6px; }
.corp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.corp-list > .day-head { grid-column: 1 / -1; margin: 6px 0 0; }
.corp-list .corp-row { display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 4px 6px; padding: 8px; border: 1px solid var(--line);
                       border-radius: 8px; background: #fff; }
.corp-list .corp-row.picked { background: #f3f8fd; border-color: #b9d3ec; }
.corp-list .corp-row.locked { border-color: var(--ok); }
.corp-list .corp-pick { grid-column: 1; min-width: 0; font-size: 13px; }
.corp-list .corp-pick span { min-width: 0; overflow: hidden; }
.corp-list .corp-pick small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corp-list .corp-flags { grid-column: 2; display: flex; gap: 4px; align-items: start; }
.corp-list .corp-opts { grid-column: 1 / -1; margin: 0; flex-wrap: wrap; }
.corp-list .corp-note { grid-column: 1 / -1; }
.corp-row.locked input[name=corp] { accent-color: var(--ok); }
.wide-dialog { width: min(1180px, 96vw); max-height: 92vh; overflow: auto; }
.wide-dialog h3 { font-size: 13px; margin: 12px 0 4px; }
.pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; max-height: 40vh; overflow: auto;
             border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.pick-list label { display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 400; }
.pick-list label.dim { opacity: .55; }
.review-list { margin: 4px 0 8px 18px; font-size: 13px; }
.review-list .bad { font-weight: 400; }

/* STANDING RULE: a checkbox / radio label is only as wide as its text - clicking empty space next to it never ticks it */
label:has(> input[type=checkbox]), label:has(> input[type=radio]) { width: fit-content; max-width: 100%; }
label.seg, label.slot-chk, label.chip { width: auto; }
.req { color: var(--err); }
/* header user menu */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; color: #fff; font-size: 13px;
                       padding: 3px 8px 3px 3px; border-radius: 20px; background: rgba(255,255,255,.12); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu .avatar { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center;
                     font-weight: 700; font-size: 12px; }
.user-menu .um-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--text); border-radius: 8px; z-index: 60;
                     box-shadow: 0 8px 24px rgba(0,0,0,.18); min-width: 220px; padding: 8px; display: grid; gap: 2px; }
.user-menu .um-pop .who { padding: 4px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu .um-pop .who small { display: block; color: var(--muted); }
.user-menu .um-pop a, .user-menu .um-pop button { all: unset; cursor: pointer; padding: 7px 8px; border-radius: 6px; font-size: 13px; }
.user-menu .um-pop a:hover, .user-menu .um-pop button:hover { background: #eef3f9; }
@media (max-width: 640px) { .user-menu .um-name { display: none; } }

/* Allocation board: every slot that can't be allocated for that row = dark grey rgb(129,133,137), no number
   (company not available, rep busy / unavailable, Nx1 taken by another fund, or already booked with this company elsewhere) */
.board td.bc.na, .board td.bc.busy, .board td.bc.nofit, .board td.bc.lock {
  background: rgb(129, 133, 137); border-left-color: rgb(129, 133, 137); cursor: not-allowed; opacity: 1; }
.board td.bc.na.off { opacity: .8; }
.swatch.busy-sw, .swatch.none { background: rgb(129, 133, 137); border: 0; }

/* booked cell: '+N' in a colour that reads on the format colour (set per cell as --on), a little larger */
.board td.bc.here span { color: var(--on, #fff); font-size: 13px; font-weight: 700; }
.legend-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.legend-head .icon-btn { color: var(--text); font-size: 15px; }
#clear-filters { white-space: nowrap; }

/* =====================================================================================================
   THEME - matched to The Market Eye (TME-Dev on this IIS): Outfit / JetBrains Mono, light blue-grey page,
   white rounded cards with a faint orange top line, deep-indigo text, warm orange accent, compact spacing.
   Change the look here (variables first).
   ===================================================================================================== */
:root {
  --bg: #eef1f6; --surface: #fff; --bg3: #f2f4f8; --text: #1e2340; --muted: #5d6482; --line: #dce1eb;
  --ind: #241f52;                       /* headings, header text */
  --brand: #383080;                     /* links, selected states (TME blue-indigo) */
  --accent: #e87018; --accent-2: #c85f10; --accent-glow: rgba(232,112,24,.10);
  --ok: #15803d; --ok-bg: #e8f5ed; --err: #c0392b; --err-bg: #fbeceb; --info-bg: #eceefa;
  --radius: 12px; --hdr: 48px;
  font-family: 'Outfit', "Segoe UI", system-ui, sans-serif;
}
body { font-size: 13px; line-height: 1.4; letter-spacing: .1px; }
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;   /* TME's faint grid */
  background-image: linear-gradient(rgba(232,112,24,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(232,112,24,.025) 1px, transparent 1px);
  background-size: 50px 50px; }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: 18px; font-weight: 600; color: var(--ind); letter-spacing: .2px; }
h2 { font-size: 14px; font-weight: 600; color: var(--ind); }
h3 { color: var(--ind); }
a { color: var(--brand); }

/* header: light, slim, indigo text, orange accent (as TME) */
.hdr { background: rgba(255,255,255,.96); color: var(--ind); border-bottom: 1px solid var(--line);
       box-shadow: 0 1px 0 rgba(30,35,64,.03); backdrop-filter: blur(6px); }
.brand { color: var(--ind); font-weight: 600; font-size: 18px; letter-spacing: .3px; }
.brand span { color: var(--accent); }
.brand.big { color: var(--ind); } .brand.big span { color: var(--accent); }
.crumbs { color: var(--muted); opacity: 1; font-size: 12.5px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.crumbs > span:last-child { color: var(--ind); font-weight: 600; }
.icon-btn { color: var(--ind); } .icon-btn:hover { background: var(--accent-glow); }
.event-chip { background: var(--bg3); color: var(--ind); border: 1px solid var(--line); font-size: 11.5px; padding: 4px 11px; }
.event-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.user-menu > summary { background: var(--bg3); color: var(--ind); border: 1px solid var(--line); }
.user-menu .avatar { background: var(--accent); color: #fff; }

/* layout / cards: compact, TME card with the thin orange line on top */
.main { padding: 10px 12px 32px; }
.card { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; position: relative; overflow: visible;
        box-shadow: 0 1px 2px rgba(30,35,64,.04); }
.card::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; pointer-events: none;
                background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .35; }
.card.hint { background: var(--info-bg); border-color: #d6d9f0; }
.page-head { margin: 2px 0 10px; }

/* controls: 32px, rounded, orange focus */
input, select, textarea { font-size: 13px; min-height: 32px; padding: 5px 9px; border-color: var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-glow); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); }
label { font-size: 12px; }

/* buttons: pill-ish like TME; primary = orange */
.btn { min-height: 32px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 12.5px; letter-spacing: .2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-glow); }
.btn-danger { border-color: rgba(192,57,43,.3); }
.btn-sm { min-height: 28px; padding: 0 10px; font-size: 11.5px; }
.btn-link { color: var(--brand); }
.seg span { border-color: var(--line); border-radius: 8px; padding: 4px 11px; font-size: 12px; min-height: 30px; color: var(--muted); }
.seg input:checked + span { background: var(--ind); border-color: var(--ind); color: #fff; }

/* tables: TME header style (small caps, letter-spaced), tighter rows */
.grid th, .grid td { padding: 7px 10px; }
.grid th { font-size: 10.5px; letter-spacing: .9px; text-transform: uppercase; color: var(--muted); background: var(--bg3); }
.grid td { font-size: 12.5px; }
.grid tbody tr:hover td { background: #fafbfd; }
table.grid thead th:not(.no-sort):hover { color: var(--accent); text-decoration: none; }
.pill { font-weight: 600; font-size: 10.5px; padding: 2px 9px; }
.tag { font-weight: 600; letter-spacing: .4px; background: var(--bg3); color: var(--muted); }
.flash { border-radius: 10px; font-size: 12.5px; }
.tabs .tab.active, .tab.active { border-color: var(--accent); color: var(--accent-2); }

/* drawer */
.drawer { font-size: 13px; }
.d-item:hover { background: var(--accent-glow); }
.d-item.here { color: var(--accent-2); font-weight: 600; }
.d-group summary { color: var(--ind); }

/* numbers read better in a mono face (TME uses JetBrains Mono for figures) */
.board td.bc span, .num, td.num { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* allocation board header strips */
.board thead th { background: var(--bg3); color: var(--muted); }
.board thead th.day-h { background: #e6e9f3; color: var(--ind); letter-spacing: .6px; }
.th-sort.on { color: var(--accent-2); }
.ms > summary { border-color: var(--line); border-radius: 8px; min-height: 30px; font-size: 12px; color: var(--ind); }
.ms.narrowed > summary { border-color: var(--accent); color: var(--accent-2); }

/* Market cap (NSE, cached on the corporate) - small chip in the Online Demands company block */
.corp-list .corp-flags { flex-wrap: wrap; justify-content: flex-end; max-width: 150px; }
.mcap { font: 500 10.5px/1.5 'JetBrains Mono', monospace; color: var(--ind, #241f52); background: #f1effa; border: 1px solid #dcd8f0;
        border-radius: 4px; padding: 0 5px; white-space: nowrap; }


/* Edit / Delete as icons (pencil / bin) in table rows; label on hover (title) */
.row-ic { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; cursor: pointer;
            border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--brand, #383080); text-decoration: none; }
.row-ic::before { content: ""; width: 15px; height: 15px; background: currentColor;
                    -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.row-ic:hover { background: #f1effa; border-color: #cfc9ee; }
.row-ic.ib-edit { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.row-ic.ib-del { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M8 6V4h8v2'/%3E%3Cpath d='M19 6l-1 14H6L5 6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E"); color: var(--err, #c0392b); }
.row-ic.ib-del:hover { background: #fdf0ee; border-color: #f0c4bd; }
.row-ic:disabled { opacity: .4; cursor: not-allowed; }

/* Searchable multiselect in filter forms (macro ms_select) */
.ms-form > summary { min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.ms-form.ms-empty > summary { color: var(--muted); }
.ms-form .ms-pop { min-width: 300px; max-width: min(460px, 92vw); display: grid; gap: 6px; padding: 8px; }
.ms-form .ms-q { width: 100%; }
.ms-form .ms-list { display: grid; gap: 3px; max-height: 300px; overflow: auto; }
.ms-form .ms-list label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Online Demands: company search / sector / MCap / sort tools in one wrapping row */
.corp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.corp-tools .corp-search { margin: 0; flex: 1 1 220px; max-width: 340px; }
.corp-tools select { width: auto; }
.mcap-filter { display: inline-flex; gap: 0; }
.mcap-filter select { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mcap-filter input { width: 110px; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }

/* Broker branding (logo + name in the header / sign-in) and the Super Admin 'working inside a broker' bar */
.tenant-mark { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--line);
               color: var(--ind); font-size: 13px; white-space: nowrap; }
.tenant-mark img { height: 26px; max-width: 110px; object-fit: contain; }
.tenant-login { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 20px; color: var(--ind); margin-bottom: 4px; }
.tenant-login img { height: 44px; max-width: 180px; object-fit: contain; }
.auth-card .muted .brand { font-size: inherit; }
.acting-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 6px 12px; font-size: 13px;
              background: #241f52; color: #fff; position: sticky; top: var(--hdr); z-index: 20; }
.acting-bar form { margin: 0; }
.acting-bar .btn { background: #fff; color: #241f52; border: 0; }
.swatch-lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.1); }
.tenant-logo-sm { height: 22px; max-width: 70px; object-fit: contain; vertical-align: middle; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0;
                     background: var(--bg3, #f2f4f8); color: var(--muted); font-size: 13px; white-space: nowrap; }
.color-pair { display: flex; gap: 6px; }
.color-pair input[type=color] { width: 44px; padding: 2px; flex: none; }
.color-pair input:not([type=color]) { flex: 1; min-width: 0; }
.ok-text { color: var(--ok); }
.err-text { color: var(--err); }
.tmx-dialog p { white-space: pre-line; }
.mail-mode { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.mail-mode.off { background: #fbeceb; color: #a12a1f; }
.mail-mode.allowlist { background: #fff4e5; color: #8a4b08; }
.mail-mode.on { background: #e8f5ed; color: #15803d; }
.radio-col { display: grid; gap: 6px; }

/* Companies & Representatives / Funds & Representatives: one expandable block per group / fund */
.dir-list { display: grid; gap: 6px; }
.dir-item { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; }
.dir-item[open] { border-color: #c9c5e8; box-shadow: 0 1px 4px rgba(36,31,82,.06); }
.dir-head { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
            gap: 10px; align-items: center; padding: 9px 12px 9px 30px; position: relative; }
.dir-head::-webkit-details-marker { display: none; }
.dir-head::before { content: "▸"; position: absolute; left: 12px; top: 10px; color: var(--muted); transition: transform .15s; }
.dir-item[open] > .dir-head::before { transform: rotate(90deg); }
.dir-head:hover { background: #f7f8fc; border-radius: 10px; }
.dir-title { min-width: 0; }
.dir-title small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-body { padding: 4px 12px 12px; border-top: 1px solid var(--line); }
.dir-actions { margin: 8px 0; gap: 6px; }
.dir-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; }
.dir-edit { background: #f7f8fc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.dir-table th, .dir-table td { padding: 6px 8px; }
.dir-tools select { width: auto; }
@media (max-width: 760px) { .dir-head { grid-template-columns: 1fr; gap: 2px; } }

.dir-meta { min-width: 0; overflow-wrap: anywhere; }
.dir-item { min-width: 0; }
.dir-body .table-wrap { overflow-x: auto; }

/* Representatives table on the company / fund page */
.rep-grid th, .rep-grid td { padding: 4px 4px; vertical-align: middle; }
.rep-grid input, .rep-grid select { min-height: 32px; padding: 4px 6px; font-size: 13px; width: 100%; min-width: 110px; }
.rep-grid .rg-xs { width: 52px; min-width: 52px; }
.rep-grid .rg-sm { min-width: 100px; }
.rep-grid select { min-width: 92px; }
.rep-grid .rg-act { white-space: nowrap; width: 1%; }
.rep-grid [data-rg-undo] { display: none; }
.rep-grid tr.rg-removed td { opacity: .45; text-decoration: line-through; }
.rep-grid tr.rg-removed [data-rg-undo] { display: inline; opacity: 1; text-decoration: none; }
.rep-grid tr.rg-removed [data-rg-remove] { display: none; }
.rep-grid tr.rg-removed .rg-act { opacity: 1; text-decoration: none; }
.rep-grid input[type=email] { min-width: 200px; }

.rep-grid .rg-av { min-width: 220px; }
.rep-grid .rg-w { display: flex; gap: 3px; align-items: center; margin-top: 3px; }
.rep-grid .rg-w select { min-width: 74px; width: 74px; }
.rep-grid .rg-w input[type=time] { min-width: 84px; width: 84px; }
.rep-grid .rg-wx { all: unset; cursor: pointer; color: var(--err); padding: 0 4px; }
/* the representatives table scrolls inside its card; the page never gets wider than the screen */
#corp-form, .rep-grid-card, form.form { min-width: 0; max-width: 100%; }
.rep-grid-card .table-wrap { overflow-x: auto; max-width: 100%; }
.rep-grid .rg-av label.chk { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; width: auto; }
.rep-grid .rg-av label.chk input { width: 15px; min-width: 15px; min-height: 0; }

.broker-head { font-size: 14px; margin: 14px 0 6px; color: var(--ind); }

/* FROZEN HEADERS (user rule, 20-Oct-2026): every table's header row stays visible while scrolling.
   Tables inside .table-wrap scroll inside that box (max one screen high) with the header pinned at its top;
   tables directly on the page pin under the app header. */
.table-wrap { max-height: calc(100vh - var(--hdr) - 24px); overflow: auto; }
.table-wrap > table thead th, .table-wrap table.grid thead th { position: sticky; top: var(--stick, 0px); z-index: 3; background: var(--bg3, #f2f4f8); }
table.grid > thead > tr > th { position: sticky; top: var(--hdr); z-index: 3; background: var(--bg3, #f2f4f8); box-shadow: inset 0 -1px 0 var(--line); }
.table-wrap > table.grid > thead > tr > th, .table-wrap table.grid > thead > tr > th { top: var(--stick, 0px); }
@media (max-width: 640px) { .table-wrap { max-height: none; } }
.perm .perm-col { text-align: center; width: 76px; }
.perm tr.grp td { font-weight: 700; background: #f7f8fc; }
.perm td.lvl-2 { padding-left: 26px; } .perm td.lvl-3 { padding-left: 44px; }
.perm input[type=checkbox] { width: 17px; height: 17px; }
.perm tbody tr:hover td { background: #f1effa; }
.perm-key p { margin: 2px 0; }
.inline-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.inline-label select { min-width: 320px; }
/* Generate Schedules: compact */
form.sched { display: grid; gap: 12px; }
.sched-row { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end; }
.sched-ver { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: #3d4955; }
.sched-ver select { min-width: 110px; }
form.sched .who-f, form.sched .who-p { display: grid; gap: 4px; min-width: 200px; }
form.sched .who-p { flex: 1 1 340px; }
form.sched .lbl { font-size: 12px; font-weight: 600; color: #3d4955; }
.sched-notes summary { cursor: pointer; font-size: 13px; color: var(--brand); }
.sched-notes .form-grid { margin-top: 8px; }
form.sched .form-actions { align-items: center; }

.sched-prog { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f4f2fb; border: 1px solid #ddd8f0; border-radius: 8px; padding: 8px 12px; }
.sched-prog progress { width: 220px; height: 10px; accent-color: var(--brand); }
.sched-prog #sched-status { flex: 1 1 260px; overflow-wrap: anywhere; }
.sched-files { flex-basis: 100%; max-height: 180px; overflow: auto; }
.sched-files ol { margin: 4px 0 0; padding-left: 22px; font-size: 12.5px; columns: 2 280px; }
/* directory: an open group / fund has a tinted header, so the frame is clearly one collapsible block */
.dir-item[open] > .dir-head { background: #efedf8; border-bottom: 1px solid #ddd8f0; border-radius: 10px 10px 0 0; }
.dir-item[open] > .dir-head:hover { background: #e8e5f5; }
/* what matched the search */
tr.dir-hit > td { background: #fff8db; }
.dir-hit:not(tr) { background: #ffe9a3; border-radius: 3px; box-shadow: 0 0 0 2px #ffe9a3; }
td.dir-hit { box-shadow: none; }
/* Slot Planner / Room Allocation: compact, Excel-like grids */
.pl-wrap { padding: 0; }
.pl-grid { font-size: 12.5px; border-collapse: separate; border-spacing: 0; }
.pl-grid th, .pl-grid td { padding: 4px 6px; white-space: nowrap; }
.pl-grid .pl-co { position: sticky; left: 0; z-index: 2; background: var(--surface, #fff); min-width: 190px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; box-shadow: inset -1px 0 0 var(--line); }
.pl-grid thead .pl-co { z-index: 4; background: var(--bg3, #f2f4f8); }
.pl-grid .pl-co b { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.pl-grid tr.pl-band th { font-size: 11px; color: var(--muted); text-align: center; border-bottom: 0; }
.pl-grid .pl-cm { max-width: 170px; overflow: hidden; text-overflow: ellipsis; color: #555; }
.pl-grid .pl-t { text-align: center; min-width: 46px; }
.pl-grid .pl-blk { background: #e5e7eb; color: #888; }
.pc { text-align: center; min-width: 46px; border-left: 1px solid #eef0f4; }
.pc-on { background: color-mix(in srgb, var(--fc) 22%, #fff); box-shadow: inset 4px 0 0 var(--fc); font-weight: 600; cursor: pointer; }
.pc-on sup { font-weight: 400; color: #555; margin-left: 2px; }
.pc-open { background: repeating-linear-gradient(45deg, #fff, #fff 5px, #f1f3f7 5px, #f1f3f7 7px); cursor: pointer; }
.pc-open:hover, .pc-on:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.pc-off { background: #f6f7f9; }
.pl-over { background: #fff1cc; font-weight: 700; }
.pl-short { background: #ffe0e0; font-weight: 700; color: #a11; }
.pl-ft { text-align: right !important; color: #3d4955; }
.pl-fmt td { color: #666; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; }
.pl-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.pl-legend .pc-open-key { background: repeating-linear-gradient(45deg, #fff, #fff 3px, #dfe3ea 3px, #dfe3ea 5px); border: 1px solid #ccd; }
.pl-legend .pc-off-key { background: #f6f7f9; border: 1px solid #dde; }
.pl-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
          padding: 8px; display: grid; gap: 4px; min-width: 180px; }
.pl-pop .pl-f { text-align: left; border: 0; background: #f7f8fc; border-left: 6px solid var(--fc, #999); border-radius: 6px; padding: 6px 10px; cursor: pointer; font: inherit; }
.pl-pop .pl-f:hover { background: #ecebf8; }
.pl-pop .pl-rm { border-left-color: #c62828; color: #c62828; }
.ra-c { box-shadow: inset 4px 0 0 var(--fc); padding: 2px 4px !important; }
.ra-c select, .ra-grid .ra-day { font-size: 12px; padding: 2px 4px; min-height: 26px; min-width: 70px; }
.ra-spk .pl-co b { color: #6A1B9A; }
.ra-h { margin: 18px 0 6px; font-size: 16px; }
.ra-board td.ra-on { background: color-mix(in srgb, var(--fc) 18%, #fff); box-shadow: inset 4px 0 0 var(--fc); font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.ra-board td.ra-clash { background: #ffd6d6 !important; color: #a11; }
.ra-board td.ra-over { background: #fff1cc !important; }
.ra-board td.ra-free { background: #f3fbf4; }
/* Slot Planner / Room Allocation: flags, wrapping text, company popup */
.pl-grid .pl-co { min-width: 120px; max-width: 160px; }
.pl-grid .pl-co b { max-width: 150px; }
.pl-name { color: inherit; text-decoration: none; border-bottom: 1px dashed #b9b3e0; }
.pl-name:hover { color: var(--brand); border-bottom-color: var(--brand); }
.pl-grid td.pl-wrap-t { white-space: normal; min-width: 90px; max-width: 170px; line-height: 1.25; }
.pl-grid td.pl-cm { min-width: 140px; max-width: 220px; overflow: visible; }
.pl-grid td.pl-flags { white-space: normal; min-width: 120px; max-width: 190px; }
.pl-flag { display: inline-block; font-size: 10.5px; line-height: 1.3; padding: 1px 6px; margin: 1px 2px 1px 0; border-radius: 9px;
           background: color-mix(in srgb, var(--fl) 14%, #fff); color: color-mix(in srgb, var(--fl) 80%, #000); border: 1px solid color-mix(in srgb, var(--fl) 40%, #fff); white-space: nowrap; }
.pl-flags { margin-top: 4px; }
.pl-filters { margin: 6px 0 8px; gap: 8px; align-items: center; }
.pl-dlg { border: 0; border-radius: 12px; padding: 16px 18px; width: min(860px, 94vw); max-height: 86vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.pl-dlg::backdrop { background: rgba(20, 18, 40, .35); }
.pc-pop-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pc-pop-head h2 { margin: 0 0 2px; font-size: 18px; }
.pc-pop-nums { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.pc-pop-cm { background: #fafaf3; border: 1px solid #eee7c8; border-radius: 8px; padding: 6px 10px; }
.pc-pop-t td, .pc-pop-t th { padding: 5px 8px; }
.ra-c .ra-fmt { display: block; font-size: 10.5px; font-weight: 700; line-height: 1.2; margin: 0 0 1px 2px;
                color: color-mix(in srgb, var(--fc) 75%, #000); white-space: nowrap; }
.ra-c { background: color-mix(in srgb, var(--fc) 10%, #fff); }
.ra-board .ra-bf { font-weight: 600; color: color-mix(in srgb, var(--fc) 70%, #000); }
/* filter highlight: picked flag / format cells pop out, the rest of the grid fades back */
.pl-hl-on td[data-fmt]:not(.pl-hl) { opacity: .35; }
.pl-grid td.pl-hl { outline: 2px solid #e65100; outline-offset: -2px; box-shadow: inset 0 0 0 2px #ffe0b2, inset 4px 0 0 var(--fc, #e65100); opacity: 1; }
.pl-grid td.pl-co.pl-hl { background: #fff3e0; }
.ra-fmt-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; text-align: left; }
.ra-fmt-btn:hover { text-decoration: underline; }
.ra-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ra-find label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.ra-find #rf-out { flex-basis: 100%; }
.rf-list { margin: 4px 0; padding-left: 20px; columns: 2 420px; }
.ra-board td.ra-find-hit { background: #b9f6ca !important; box-shadow: inset 0 0 0 2px #00a152; }
.ra-board th.ra-find-col { background: #c8f5d6 !important; }

/* Online Demands: meal + meeting instructions on one row */
.pref-row { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 10px 14px; align-items: end; margin-top: 8px; }
.pref-row label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
@media (max-width: 640px) { .pref-row { grid-template-columns: 1fr; } }
/* Allocation board (21-Oct): fits 3 event days on 1440px, one vertical scroll only */
.main.fit { height: calc(100vh - var(--hdr)); display: flex; flex-direction: column; overflow: hidden; padding-bottom: 6px; }
.main.fit > .board-wrap { flex: 1 1 auto; min-height: 0; max-height: none; margin-bottom: 0; overflow: auto; }   /* beats .card { overflow: visible } */
.board-top { margin-bottom: 6px; }
.board-filters .ms-items { max-height: 320px; overflow: auto; }
.board-filters .ms-q { width: 100%; margin-bottom: 4px; }
.board thead th, .board thead th.slot-h { min-width: 38px; }
.board thead th.slot-h { padding: 3px 1px; font-size: 11px; }
.board thead th.slot-h .th-sort { font-size: 11px; padding: 0; }
.board td.bc { height: 34px; padding: 2px 1px; min-width: 38px; }
.board td.bc span { font-size: 10px; max-width: 40px; }
.board td.bc.here span { font-size: 11px; }
.board .c1 { width: 84px; min-width: 84px; max-width: 84px; padding: 3px 5px; }
.board .c2 { left: 84px; min-width: 168px; max-width: 200px; padding: 3px 6px; font-size: 11.5px; line-height: 1.25; }
.board td.bc.instr { background-image: radial-gradient(circle at calc(100% - 5px) 5px, #e65100 2.6px, transparent 3.2px); }
/* schedule panel: times on two lines, Type / Format readable, compact Un-satisfied */
@media (min-width: 900px) { .sp-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); } }
table.sched { width: 100%; table-layout: fixed; }
table.sched col.sp-t { width: 92px; } table.sched col.sp-f { width: 110px; }
table.sched td.sp-t .slot-btn { white-space: normal; line-height: 1.25; padding: 3px 6px; text-align: center; font-size: 11.5px; }
table.sched td.sp-f select { width: 100%; font-size: 12px; padding: 2px 4px; min-height: 28px; }
table.sched th { white-space: nowrap; }
table.unsat td:first-child { min-width: 0; }
table.unsat td:nth-child(n+3) { white-space: normal; }
table.unsat td:nth-child(2) { white-space: nowrap; width: 1%; }
table.unsat td:last-child { width: 1%; }

/* Allocation legend: it sits at the right end of the filter bar - open toward the left so it stays on screen */
.legend-pop { position: relative; }
.legend-pop > .ms-pop { left: auto; right: 0; max-width: min(420px, calc(100vw - 24px)); min-width: 300px; }
.legend-pop .ms-pop span { white-space: normal; }

/* '+ New' quick-add next to RM / Analyst */
.qa-new { font-weight: 600; margin-left: 6px; text-decoration: none; }
.qa-dlg { width: min(560px, 94vw); }

/* "Successfully added" popup after saving a company / fund with its reps */
.saved-dlg { width: min(460px, 94vw); text-align: left; }
.saved-tick { width: 44px; height: 44px; border-radius: 50%; background: #1b9e4b; color: #fff; font-size: 26px; font-weight: 700;
              display: grid; place-items: center; margin-bottom: 6px; }
.saved-dlg h2 { margin: 0 0 10px; font-size: 18px; color: #1b7a3d; }
.saved-k { margin: 10px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.saved-v { margin: 0; font-weight: 600; }
.saved-reps { margin: 2px 0 0; padding-left: 18px; max-height: 40vh; overflow: auto; }
.saved-notes { margin-top: 10px; }
