:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece3;
  --ink: #1c2430;
  --ink-soft: #5b6472;
  --ink-faint: #8a92a0;
  --accent: #a6752e;
  --accent-ink: #5c401a;
  --teal: #0e5a56;
  --line: #dfdacd;
  --good: #2f7d4f;
  --good-bg: rgba(47, 125, 79, 0.12);
  --warn: #a6752e;
  --warn-bg: rgba(166, 117, 46, 0.12);
  --crit: #b23b3b;
  --crit-bg: rgba(178, 59, 59, 0.12);
  --shadow: 0 1px 2px rgba(28, 36, 48, 0.06), 0 8px 24px -12px rgba(28, 36, 48, 0.18);
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: 12.5px; }

/* ---------- Auth screens ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1c2430 0%, #232d3c 55%, #1c2430 100%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.auth-card .brand {
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card p.sub { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-secondary { background: var(--surface-2); color: var(--ink); }
.btn-secondary:hover { background: var(--line); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 6px; }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.alert-error { background: var(--crit-bg); color: var(--crit); }
.alert-success { background: var(--good-bg); color: var(--good); }

/* ---------- Impersonation banner ---------- */
.impersonation-banner {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  font-size: 13px;
  text-align: center;
}
.impersonation-banner a { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 12px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #1c2430;
  color: #ece8de;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  padding: 0 20px 20px;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(236, 232, 222, 0.12);
  margin-bottom: 12px;
}
.sidebar .tenant { padding: 0 20px 16px; font-size: 12px; color: #9aa3b0; }
.sidebar nav { padding: 0 10px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: #c9cfd8;
  text-decoration: none;
  font-size: 13.5px;
}
.sidebar .nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.sidebar nav a:hover, .sidebar nav a.active {
  background: var(--accent);
  color: #fff;
}
.sidebar nav .nav-group { margin: 2px 0; }
.sidebar nav .nav-group-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 8px; border: none; background: none; cursor: pointer;
  color: #c9cfd8; font-size: 13.5px; font-family: inherit; text-align: left;
}
.sidebar nav .nav-group-head:hover { background: rgba(236, 232, 222, 0.08); color: #fff; }
.sidebar nav .nav-group-head .nav-label { flex: 1; }
.sidebar nav .nav-chevron { font-size: 10px; transition: transform 0.15s; color: #8a92a0; }
.sidebar nav .nav-group.open .nav-chevron { transform: rotate(180deg); }
.sidebar nav .nav-group-body { display: none; padding-left: 14px; }
.sidebar nav .nav-group.open .nav-group-body { display: block; }
.sidebar nav .nav-group-body a { padding: 8px 12px 8px 20px; font-size: 13px; }
.sidebar .logout {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid rgba(236, 232, 222, 0.12);
}
.sidebar .logout a { color: #c9cfd8; font-size: 13px; }

.main { flex: 1; min-width: 0; }
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar-title { margin: 0; font-size: 18px; flex-shrink: 0; }
.topbar-pills { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.topbar-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px;
  background: var(--surface-2); color: var(--ink-soft); font-size: 12.5px; font-weight: 600;
  text-decoration: none; border: 1px solid var(--line); white-space: nowrap;
}
.topbar-pill:hover { border-color: var(--accent); color: var(--ink); }
.topbar-pill-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 100px; background: var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 700;
}
.topbar-pill-count.has-value { background: var(--accent); color: #fff; }
.topbar-new-btn { width: auto; flex-shrink: 0; text-decoration: none; }
.content { padding: 28px 32px; overflow-x: auto; }
.menu-toggle-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  font-size: 18px; cursor: pointer; color: var(--ink);
}
.sidebar-backdrop { display: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }

/* ---------- Cards / tables ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.stat-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; }
.stat-card .value { font-family: Georgia, serif; font-size: 28px; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Dashboard: headline statistics ---------- */
.section-heading { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-faint); font-weight: 700; margin: 0 0 12px; }
.stat-grid-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stat-card-hero .stat-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-card-hero .stat-body { flex: 1; min-width: 0; }
.stat-card-hero .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); font-weight: 600; }
.stat-card-hero .value-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.stat-card-hero .value { font-family: Georgia, serif; font-size: 26px; font-variant-numeric: tabular-nums; }
.stat-trend { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 100px; }
.stat-trend.up { color: var(--good); background: var(--good-bg); }
.stat-trend.down { color: var(--crit); background: var(--crit-bg); }

.dash-split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; margin-bottom: 24px; align-items: stretch; }
.dash-split-3col { grid-template-columns: 1.1fr 1fr 1fr; }
@media (max-width: 980px) { .dash-split { grid-template-columns: 1fr; } }

.sparkline-wrap { display: flex; align-items: flex-end; gap: 4px; height: 150px; margin-top: 12px; }
.sparkline-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.sparkline-bar { width: 100%; max-width: 34px; background: var(--accent); border-radius: 5px 5px 0 0; opacity: 0.85; transition: opacity 0.15s; }
.sparkline-bar-col:hover .sparkline-bar { opacity: 1; }
.sparkline-bar-col .sparkline-label { font-size: 11px; color: var(--ink-faint); white-space: nowrap; }
.sparkline-bar-col .sparkline-amount { font-size: 10.5px; color: var(--ink-soft); font-weight: 600; }

.dash-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; max-height: 330px; overflow-y: auto; }
.dash-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.dash-row:last-child { border-bottom: none; }
.dash-row-main { min-width: 0; }
.dash-row-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.dash-row-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.dash-row-side { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.source-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.source-badge.src-qr { background: var(--warn-bg); color: var(--warn); }
.source-badge.src-pos { background: var(--surface-2); color: var(--ink-soft); }
.source-badge.src-arrival { background: var(--good-bg); color: var(--good); }
.source-badge.src-departure { background: var(--crit-bg); color: var(--crit); }
.dash-empty { color: var(--ink-faint); font-size: 13px; padding: 20px 4px; text-align: center; }

.sparkline-stack { display: flex; flex-direction: column-reverse; width: 100%; max-width: 34px; border-radius: 5px 5px 0 0; overflow: hidden; }
.sparkline-seg-room { background: var(--teal); }
.sparkline-seg-restaurant { background: var(--accent); }
.chart-legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--ink-soft); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  background: var(--surface-2);
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
table.data td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr.total-row td { background: var(--surface-2); }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.qr-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.qr-card img { width: 100%; max-width: 140px; height: auto; }
.qr-card .qr-title { font-weight: 600; margin-top: 8px; font-size: 13.5px; }
.qr-card .qr-subtitle { font-size: 12px; color: var(--ink-faint); }
.qr-card .qr-download { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 600; }
.qr-card .qr-download:hover { text-decoration: underline; }

.attention-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }
.attention-row:last-child { border-bottom: none; }
.attention-text { font-size: 13.5px; color: var(--ink); }
.attention-actions { display: flex; gap: 8px; flex-shrink: 0; }

.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
}
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-crit { background: var(--crit-bg); color: var(--crit); }
.pill-neutral { background: var(--surface-2); color: var(--ink-soft); }

.table-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .two-col-grid { grid-template-columns: 1fr; } }

/* ---------- Alert bell ---------- */
.alert-bell-wrap { position: relative; }
.alert-bell-btn {
  position: relative; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer;
}
.alert-bell-btn.has-alerts { border-color: var(--crit); animation: bell-pulse 1.2s infinite; }
@keyframes bell-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(178,59,59,0.35); } 50% { box-shadow: 0 0 0 6px rgba(178,59,59,0); } }
.alert-bell-count {
  position: absolute; top: -6px; right: -6px; background: var(--crit); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 100px;
  align-items: center; justify-content: center; padding: 0 4px;
}
.alert-bell-panel {
  position: absolute; top: 48px; right: 0; width: 320px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 30; overflow: hidden;
}
.alert-bell-panel-head { padding: 12px 16px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.alert-bell-empty { padding: 20px 16px; color: var(--ink-faint); font-size: 13px; text-align: center; }
.alert-bell-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.alert-bell-item:last-child { border-bottom: none; }
.alert-bell-qr { display: block; color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- Housekeeping board ---------- */
.hk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.hk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.hk-card.hk-good { border-top-color: var(--good); }
.hk-card.hk-warn { border-top-color: var(--warn); }
.hk-card.hk-crit { border-top-color: var(--crit); }
.hk-card-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 15px; }
.hk-status-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 12px; }
.hk-form { display: flex; gap: 8px; }
.hk-form select { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; min-width: 0; }

/* ---------- Tape chart / calendar ---------- */
.tape-wrap { overflow-x: auto; border-radius: 10px; box-shadow: var(--shadow); background: var(--surface); }
table.tape { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
table.tape th, table.tape td { border: 1px solid var(--line); padding: 0; text-align: center; }
table.tape th { background: var(--surface-2); padding: 8px 6px; font-weight: 600; white-space: nowrap; }
table.tape th.room-col, table.tape td.room-col {
  position: sticky; left: 0; z-index: 1; background: var(--surface-2);
  padding: 8px 12px; text-align: left; font-weight: 600; white-space: nowrap;
}
table.tape th.today-col { background: var(--accent); color: #fff; }
table.tape td.today-col { background: rgba(166,117,46,0.1); box-shadow: inset 1px 0 0 var(--accent), inset -1px 0 0 var(--accent); }
table.tape td.cell { width: 72px; height: 40px; cursor: default; }
table.tape td.cell.booked { background: rgba(14,90,86,0.14); color: var(--teal); font-weight: 600; }
table.tape td.cell.hold { background: rgba(166,117,46,0.14); color: var(--accent); font-weight: 600; }
table.tape td.cell .guest-fragment { display: block; font-size: 11px; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-legend { display: flex; gap: 18px; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); align-items: center; }
.tape-legend .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Calendar toolbar ---------- */
.cal-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-range-label { font-family: Georgia, serif; font-size: 22px; color: var(--ink); }
.cal-toolbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cal-window-toggle { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.cal-window-toggle a { padding: 7px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--surface); text-decoration: none; border-right: 1px solid var(--line); }
.cal-window-toggle a:last-child { border-right: none; }
.cal-window-toggle a:hover { background: var(--surface-2); }
.cal-window-toggle a.active { background: var(--accent); color: #fff; }
.cal-jump { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.cal-jump input[type="date"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; font-family: inherit; }
.cal-nav-arrows { display: flex; gap: 6px; }
.cal-nav-arrows .btn { width: auto; }

/* ---------- Quick reservation (guest picker / check-in toggle) ---------- */
.qr-guest-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 220px; overflow-y: auto;
}
.qr-guest-dropdown-item { padding: 10px 12px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid var(--line); }
.qr-guest-dropdown-item:last-child { border-bottom: none; }
.qr-guest-dropdown-item:hover { background: var(--surface-2); }
.qr-guest-dropdown-add { color: var(--accent); font-weight: 600; }
.qr-checkin-toggle {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 14px;
  background: var(--surface-2); border-radius: 8px; font-size: 13px; color: var(--ink-soft); cursor: pointer;
}
.qr-checkin-toggle input { margin-top: 3px; }

/* ---------- Reports: tab nav + shared date filter ---------- */
.report-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.report-tab {
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.report-tab:hover { color: var(--ink); }
.report-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.report-filter-form { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 24px; }

.report-bar-row { display: flex; align-items: center; gap: 10px; }
.report-bar-track { flex: 1; height: 8px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.report-bar-fill { height: 100%; background: var(--accent); border-radius: 100px; }
.report-bar-pct { font-size: 12px; color: var(--ink-faint); width: 42px; text-align: right; flex-shrink: 0; }

.print-btn { width: auto; flex-shrink: 0; text-decoration: none; }

/* Safety net if a regular app page (not a dedicated print view) is sent to Ctrl+P. */
@media print {
  .sidebar, .sidebar-backdrop, .menu-toggle-btn, .topbar, .impersonation-banner { display: none !important; }
  .app-shell { display: block; }
  .main { width: 100%; }
  .content { padding: 0; overflow-x: visible !important; }
  body { background: #fff; }
  .card, .stat-card, .stat-card-hero { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  table.data { box-shadow: none; border: 1px solid #ccc; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  table.data, table.data tr { break-inside: avoid; }
}

/* ---------- Pagination (CI4's default pager markup, restyled) ---------- */
.pagination { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.pagination li a, .pagination li span {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px;
  text-decoration: none; color: var(--ink-soft); font-size: 13px; background: var(--surface);
}
.pagination li a:hover { border-color: var(--accent); color: var(--ink); }
.pagination li.active a { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination li.disabled span { color: var(--ink-faint); cursor: default; }

/* ---------- Mobile: off-canvas sidebar drawer + narrow-screen adjustments ---------- */
/* Placed last so these overrides win over same-specificity component rules earlier in the file. */
@media (max-width: 860px) {
  .menu-toggle-btn { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 210;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(20, 24, 32, 0.45);
    z-index: 200;
  }
  .sidebar-backdrop.open { display: block; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
}

@media (max-width: 640px) {
  .topbar-title { font-size: 16px; }
  .topbar-pills { justify-content: flex-start; width: 100%; order: 3; }
  table.data { font-size: 12.5px; }
  table.data th, table.data td { padding: 8px 10px; }
  .report-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .report-filter-form { flex-wrap: wrap; }
}
