/* Reciprocal Pro — design tokens and components (from the Reciprocal Pro design system). */
:root {
  --deep: #133f2e; --deep-2: #1c4d3a; --deep-ink: #d9e6df; --deep-muted: #8fb0a0;
  --brand: #1f5c43; --brand-600: #174a36; --brand-50: #e5efe9; --brand-100: #cfe2d6;
  --brass: #c9a24b; --brass-600: #a9832f; --brass-50: #f7efd9;
  --surface-50: #f5f3ee; --surface-0: #ffffff; --surface-100: #eeebe3; --surface-150: #e7e3d8;
  --line: #e3dfd4; --line-2: #d4cfc2;
  --ink: #1b2420; --ink-2: #454e49; --muted: #737b76;
  --focus: #1f5c43;
  --st-received: #2b5da8; --st-received-bg: #e5edf8;
  --st-pending: #8a6100; --st-pending-bg: #fbefd2;
  --st-reminder: #b0501a; --st-reminder-bg: #fbe5d6;
  --st-accepted: #1c6e45; --st-accepted-bg: #dff1e6;
  --st-rejected: #b1261e; --st-rejected-bg: #fbe2df;
  --st-changed: #6b45b8; --st-changed-bg: #eee6fa;
  --st-cancelled: #5e6461; --st-cancelled-bg: #eceae5;
  --note-bg: #f6ecd6;
  --radius-md: 10px; --radius-sm: 7px; --radius-pill: 999px;
  --shadow-pop: 0 12px 32px rgba(19, 40, 30, .16), 0 2px 6px rgba(19, 40, 30, .08);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sb-w: 228px; --tb-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --deep: #0e2c21; --deep-2: #174032; --brand: #3f9a6f; --brand-600: #54ad83; --brand-50: #173328; --brand-100: #1f4436;
    --brass-50: #3a311b; --surface-50: #121614; --surface-0: #1a1f1c; --surface-100: #222925; --surface-150: #2a322d;
    --line: #2c3530; --line-2: #3a453f; --ink: #e8ece9; --ink-2: #c3cbc6; --muted: #8e9892; --note-bg: #3a311b;
    --st-received: #8fb4ef; --st-received-bg: #1d2a3e; --st-pending: #e7c16a; --st-pending-bg: #3a2f14;
    --st-reminder: #f0a070; --st-reminder-bg: #3d2618; --st-accepted: #7fd1a3; --st-accepted-bg: #173327;
    --st-rejected: #f0918a; --st-rejected-bg: #3d1d1b; --st-changed: #c3a6f3; --st-changed-bg: #2c2240;
    --st-cancelled: #b0b7b3; --st-cancelled-bg: #2a2f2c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --deep: #0e2c21; --deep-2: #174032; --brand: #3f9a6f; --brand-600: #54ad83; --brand-50: #173328; --brand-100: #1f4436;
  --brass-50: #3a311b; --surface-50: #121614; --surface-0: #1a1f1c; --surface-100: #222925; --surface-150: #2a322d;
  --line: #2c3530; --line-2: #3a453f; --ink: #e8ece9; --ink-2: #c3cbc6; --muted: #8e9892; --note-bg: #3a311b;
  --st-received: #8fb4ef; --st-received-bg: #1d2a3e; --st-pending: #e7c16a; --st-pending-bg: #3a2f14;
  --st-reminder: #f0a070; --st-reminder-bg: #3d2618; --st-accepted: #7fd1a3; --st-accepted-bg: #173327;
  --st-rejected: #f0918a; --st-rejected-bg: #3d1d1b; --st-changed: #c3a6f3; --st-changed-bg: #2c2240;
  --st-cancelled: #b0b7b3; --st-cancelled-bg: #2a2f2c; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--surface-50); color: var(--ink); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow, .rp-l { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rp-l { display: block; margin-bottom: 6px; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------- App shell ---------------- */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.sb { background: var(--deep); color: var(--deep-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.brand:hover { text-decoration: none; }
.mark { width: 28px; height: 28px; border-radius: 50%; background: var(--brass); color: var(--deep); display: grid; place-items: center; font: 700 11px/1 var(--serif); flex: none; }
.nav { padding: 6px 10px; flex: 1; }
.nav .grp { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--deep-muted); padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--deep-ink); font-weight: 500; }
.nav a:hover { background: var(--deep-2); text-decoration: none; }
.nav a.on { background: rgba(255, 255, 255, .1); color: #fff; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--brass); color: var(--deep); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.sb-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding: 14px 18px 18px; font-size: 12px; color: var(--deep-muted); }
.sb-foot b { display: block; color: #fff; font-weight: 600; font-size: 12.5px; }
.demo-pill { margin-top: 10px; display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(201, 162, 75, .18); color: var(--brass); font-size: 11px; font-weight: 600; }

.sb-scrim { display: none; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.tb { height: var(--tb-h); background: var(--surface-0); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 20px; position: sticky; top: 0; z-index: 30; }
.hamb { display: none; background: none; border: 0; padding: 6px; border-radius: var(--radius-sm); cursor: pointer; }
.hamb span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
.search { position: relative; flex: 1; max-width: 400px; }
.search input { width: 100%; height: 36px; border: 1px solid var(--line); background: var(--surface-50); border-radius: var(--radius-sm); padding: 0 12px; }
.search input:focus { outline: none; border-color: var(--brand); background: var(--surface-0); }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.seg { display: inline-flex; background: var(--surface-100); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 5px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-0); color: var(--brand); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-weight: 600; }
.svc-select { display: none; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-0); cursor: pointer; display: grid; place-items: center; }
.bell { width: 14px; height: 14px; position: relative; }
.bell i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); left: 1px; bottom: 1px; }
.bell i + i { background: var(--st-reminder); right: 1px; top: 1px; left: auto; bottom: auto; width: 7px; height: 7px; }
.icon-btn .count { position: absolute; top: -6px; right: -6px; height: 18px; min-width: 18px; font-size: 10px; }
.me { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); text-align: left; }
.me:hover { background: var(--surface-50); }
.me b { display: block; font-size: 12.5px; }
.me span.muted { font-size: 11.5px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 10px; }
.crest { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--deep); color: var(--brass); font: 600 15px/1 var(--serif); display: inline-grid; place-items: center; flex: none; }
.crest.lg { width: 50px; height: 50px; font-size: 19px; }
.crest.sm { width: 30px; height: 30px; font-size: 12px; }

.page { padding: 24px 28px 48px; max-width: 1440px; width: 100%; }
.ph { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h1 { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.ph .sub { color: var(--muted); margin-top: 4px; }
.ph .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }

/* ---------------- Buttons & inputs ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--surface-0); color: var(--ink); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-50); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); }
.btn.danger { color: var(--st-rejected); }
.btn.danger.solid { background: var(--st-rejected); border-color: var(--st-rejected); color: #fff; }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; font-size: 13px; }
.link.danger { color: var(--st-rejected); }
.rp-field { display: block; min-width: 0; }
.rp-input, .rp-field input:not([type=checkbox]):not([type=radio]), .rp-field select, .rp-field textarea {
  width: 100%; height: 38px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-0); padding: 0 11px; }
.rp-field textarea, textarea.rp-input { height: auto; min-height: 80px; padding: 9px 11px; resize: vertical; }
.rp-field input:focus, .rp-field select:focus, .rp-field textarea:focus, .rp-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.rp-help { font-size: 12px; color: var(--muted); margin-top: 5px; }
.err { color: var(--st-rejected); font-size: 12.5px; margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .tr { width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch .tr::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .tr { background: var(--brand); }
.switch input:checked + .tr::after { transform: translateX(16px); }
.switch input:focus-visible + .tr { outline: 2px solid var(--focus); outline-offset: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.chip { height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-2); background: var(--surface-0); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-pill); background: var(--surface-100); color: var(--ink-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.tag.dir { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; border-radius: 5px; }

/* ---------------- Status badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-received { color: var(--st-received); background: var(--st-received-bg); }
.t-pending { color: var(--st-pending); background: var(--st-pending-bg); }
.t-reminder { color: var(--st-reminder); background: var(--st-reminder-bg); }
.t-accepted { color: var(--st-accepted); background: var(--st-accepted-bg); }
.t-rejected { color: var(--st-rejected); background: var(--st-rejected-bg); }
.t-changed { color: var(--st-changed); background: var(--st-changed-bg); }
.t-cancelled { color: var(--st-cancelled); background: var(--st-cancelled-bg); }
.ev { display: block; padding: 4px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; line-height: 1.25; margin-bottom: 4px; }
.ev.plain { display: inline-flex; }

/* ---------------- Cards ---------------- */
.card { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 14.5px; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.cols.wide-rail { grid-template-columns: minmax(0, 1fr) 360px; }
.empty { padding: 34px 18px; text-align: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { background: var(--note-bg); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; }
.li .grow { flex: 1; min-width: 0; }
.li b { display: block; font-weight: 600; font-size: 13.5px; }
.li .muted { font-size: 12px; }
.clickable { cursor: pointer; }
.clickable:hover { background: var(--surface-50); }

/* KPI StatCard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; min-width: 0; }
.stat .v { font: 600 32px/1.1 var(--serif); margin: 8px 0 6px; letter-spacing: -.01em; }
.stat .s { font-size: 12.5px; color: var(--muted); }
.stat.hot { background: var(--deep); border-color: var(--deep); color: #fff; }
.stat.hot .eyebrow { color: var(--deep-ink); }
.stat.hot .v { color: var(--brass); }
.stat.hot .s { color: var(--deep-ink); }
.stat.link-card { cursor: pointer; }
.stat .up { color: var(--st-accepted); font-weight: 600; }
.stat .down { color: var(--st-rejected); font-weight: 600; }

/* Booking-window banner */
.banner { display: flex; align-items: center; gap: 14px; background: var(--st-reminder-bg); border-radius: var(--radius-md); padding: 12px 16px; margin-bottom: 16px; }
.banner .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st-reminder); flex: none; }
.banner .txt { flex: 1; min-width: 0; font-size: 13.5px; }
.banner.info { background: var(--st-received-bg); }
.banner.info .dot { background: var(--st-received); }
.banner.warn { background: var(--st-pending-bg); }
.banner.warn .dot { background: var(--st-pending); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { background: none; border: 0; padding: 13px 10px 11px; font-weight: 500; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; font-size: 13.5px; }
.tabs .on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs .n { background: var(--surface-100); color: var(--ink-2); border-radius: var(--radius-pill); padding: 1px 7px; font-size: 11px; font-weight: 600; }

/* ---------------- Request table ---------------- */
.tbl-wrap { overflow-x: auto; }
table.rt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rt th { text-align: left; background: var(--surface-100); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; white-space: nowrap; }
.rt td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.rt tbody tr[data-href] { cursor: pointer; }
.rt tbody tr[data-href]:hover td { background: var(--surface-50); }
.rt tr.sel td { background: var(--brand-50) !important; }
.rt .cb { width: 40px; }
.rt .id { font-weight: 700; letter-spacing: .02em; }
.rt .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rt .who b { font-weight: 600; display: block; }
.rt .sub { color: var(--muted); font-size: 12.5px; }
.rt input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
.bulk { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--brand-50); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.filters .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .sel-sm { height: 32px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-0); padding: 0 10px; font-size: 12.5px; }

/* ---------------- Activity timeline ---------------- */
.tl { list-style: none; margin: 0; padding: 4px 18px 14px; }
.tl li { position: relative; padding: 8px 0 8px 22px; font-size: 13px; }
.tl li::before { content: ''; position: absolute; left: 4px; top: 13px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.tl li:first-child::before { background: var(--surface-0); border: 2px solid var(--brand); width: 5px; height: 5px; }
.tl li::after { content: ''; position: absolute; left: 8px; top: 24px; bottom: -8px; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl b { font-weight: 600; display: block; }

/* Rates */
.rates .ln { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.rates .tot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 600; }
.rates .tot .v { font: 600 26px/1 var(--serif); }

/* ---------------- Directory tiles ---------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tile { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tile .hd { display: flex; gap: 12px; align-items: center; }
.tile .hd b { display: block; font-weight: 600; }
.tile .ft { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.tile .ft .grow { flex: 1; }

/* ---------------- Tee sheet ---------------- */
.sheet-wrap { overflow: auto; max-height: calc(100vh - 250px); min-height: 320px; }
table.sheet { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.sheet th { position: sticky; top: 0; background: var(--surface-100); z-index: 2; text-align: left; padding: 9px 10px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); min-width: 170px; }
.sheet th:first-child, .sheet td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface-0); min-width: 84px; width: 84px; }
.sheet th:first-child { z-index: 3; background: var(--surface-100); }
.sheet td { border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px 6px; vertical-align: top; height: 40px; }
.sheet td.t { font-weight: 600; color: var(--ink-2); padding: 10px; border-left: 0; }
.bk { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: var(--surface-100); margin: 2px 0; cursor: pointer; border: 0; width: 100%; text-align: left; font-size: 12px; }
.bk b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.bk.recip { background: var(--st-accepted-bg); color: var(--st-accepted); }
.bk.tent { background: var(--st-changed-bg); color: var(--st-changed); }
.open-slot { width: 100%; height: 30px; border: 1px dashed transparent; background: none; border-radius: 6px; color: var(--muted); font-size: 12px; cursor: pointer; text-align: left; padding: 0 8px; }
.open-slot:hover { border-color: var(--line-2); background: var(--surface-50); color: var(--brand); }
.assigning .open-slot { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand); font-weight: 600; }
.assigning .open-slot.fit { border-color: var(--brand); border-style: solid; }
.assigning .open-slot:hover { background: var(--brand); color: #fff; }
.slotpick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow: auto; padding: 2px; }
.slotpick .chip.fit { border-color: var(--brand); }

/* ---------------- Schedule grid ---------------- */
.sched { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 860px; }
.sched th { background: var(--surface-100); text-align: left; padding: 10px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sched th.today { color: var(--ink); }
.sched td { border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 8px; vertical-align: top; height: 58px; }
.sched td:first-child { border-left: 0; font-weight: 600; width: 170px; }
.sched td.we { background: var(--surface-50); }
.sched th:first-child { width: 170px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.month .dh { padding: 8px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted); background: var(--surface-100); }
.month .dc { min-height: 110px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; font-size: 11px; min-width: 0; }
.month .dc .d { font-weight: 600; margin-bottom: 4px; color: var(--ink-2); }
.month .dc.out { background: var(--surface-50); }
.month .dc.today .d { color: var(--brand); }
.month .ev { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Reports ---------------- */
.bars { width: 100%; height: 240px; display: block; }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .m { flex: 1; height: 7px; background: var(--surface-100); border-radius: 99px; overflow: hidden; min-width: 60px; }
.meter .m i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------------- Steps (import) ---------------- */
.steps { display: flex; align-items: center; gap: 10px; padding: 14px 18px; }
.steps .st { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.steps .st i { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 600; }
.steps .st.on { color: var(--ink); }
.steps .st.on i { border-color: var(--brand); color: var(--brand); }
.steps .st.done i { background: var(--deep); border-color: var(--deep); color: #fff; }
.steps .bar { flex: 1; height: 1px; background: var(--line); min-width: 20px; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius-md); padding: 28px 18px; text-align: center; background: var(--surface-0); }
.drop.over { border-color: var(--brand); background: var(--brand-50); }

/* ---------------- Permission matrix ---------------- */
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; background: var(--surface-100); text-align: center; font-weight: 600; }
.matrix th:first-child { text-align: left; }
.matrix td { border-top: 1px solid var(--line); padding: 10px 8px; text-align: center; }
.matrix td:first-child { text-align: left; }
.matrix input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------------- Overlays ---------------- */
.pop { position: absolute; background: var(--surface-0); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); z-index: 60; min-width: 260px; overflow: hidden; }
.pop .li { padding: 10px 14px; }
.pop-h { padding: 10px 14px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-50); }
.scrim { position: fixed; inset: 0; background: rgba(10, 25, 18, .45); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .12s ease; }
.modal { background: var(--surface-0); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: rise .15s ease; }
.modal.lg { width: min(760px, 100%); }
.modal-h { padding: 18px 20px 6px; }
.modal-h h2 { font-family: var(--serif); font-size: 21px; }
.modal-b { padding: 12px 20px 16px; overflow-y: auto; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--deep); color: #fff; padding: 11px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); font-size: 13.5px; animation: rise .15s ease; }
.toast.bad { background: var(--st-rejected); }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.spin { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp .7s linear infinite; margin: 0 auto 10px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------------- Login ---------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login .art { background: var(--deep); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login .art h1 { font-family: var(--serif); font-size: 52px; line-height: 1.02; letter-spacing: -.02em; margin: 40px 0 16px; max-width: 520px; }
.login .art p { color: var(--deep-ink); max-width: 460px; font-size: 15px; }
.dots { position: absolute; right: -10px; bottom: -10px; width: 260px; height: 260px; background-image: radial-gradient(var(--brass) 2.2px, transparent 2.4px); background-size: 26px 26px; opacity: .8; }
.login .form { display: flex; flex-direction: column; justify-content: center; padding: 48px; max-width: 520px; width: 100%; margin: 0 auto; }
.login .form h2 { font-family: var(--serif); font-size: 28px; margin-bottom: 6px; }
.demo-list { margin-top: 26px; }
.demo-list .li { padding: 9px 12px; border-radius: var(--radius-sm); }

/* ---------------- Print (reports PDF) ---------------- */
@media print {
  .sb, .tb, .no-print, #toasts { display: none !important; }
  .app { display: block; }
  .page { padding: 0; }
  body { background: #fff; }
  .card, .stat { break-inside: avoid; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .cols, .cols.wide-rail { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s ease; }
  .app.nav-open .sb { transform: none; box-shadow: var(--shadow-pop); }
  .sb-scrim { display: none; }
  .app.nav-open .sb-scrim { display: block; position: fixed; inset: 0; background: rgba(10, 25, 18, .4); z-index: 35; }
  .hamb { display: block; }
  .seg.svc { display: none; }
  .svc-select { display: block; height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-0); padding: 0 8px; font-size: 13px; }
  .me .who { display: none; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login .art { padding: 28px 24px; min-height: 0; }
  .login .art h1 { font-size: 36px; margin: 20px 0 10px; }
  .dots { width: 140px; height: 140px; }
}
@media (max-width: 720px) {
  .page { padding: 16px 16px 40px; }
  .tb { padding: 0 12px; gap: 8px; }
  .ph h1 { font-size: 24px; }
  .kpis { gap: 10px; }
  .stat { padding: 14px; }
  .stat .v { font-size: 26px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .banner { flex-wrap: wrap; }
  .login .form { padding: 28px 20px; }
  /* request table → cards */
  table.rt.stack-sm thead { display: none; }
  table.rt.stack-sm, .rt.stack-sm tbody, .rt.stack-sm tr, .rt.stack-sm td { display: block; width: 100%; }
  .rt.stack-sm tr { padding: 12px 14px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
  .rt.stack-sm td { border: 0; padding: 0; }
  .rt.stack-sm td.c-id { grid-column: 1 / 3; }
  .rt.stack-sm td.c-st { grid-column: 3; grid-row: 1; justify-self: end; }
  .rt.stack-sm td.c-who { grid-column: 1 / -1; }
  .rt.stack-sm td.c-date { grid-column: 1 / -1; }
  .rt.stack-sm td.c-cb { grid-row: 1 / span 3; }
  .rt.stack-sm td.c-pl, .rt.stack-sm td.c-hide { display: none; }
  .rt.stack-sm .c-id .sub { display: inline; margin-left: 8px; }
  .rt.stack-sm .who .av { display: none; }
  .modal-f .btn { flex: 1; }
  .steps .st span { display: none; }
}
.rt .c-inline-pl { display: none; }
@media (max-width: 720px) { .rt.stack-sm .c-inline-pl { display: inline; } }
