/* ============================================================
   Johnny's Hotel — front desk app
   Light theme. Tokens follow the chart chrome spec so pages
   and charts read as one system.
   ============================================================ */

:root {
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --rule: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);

  --accent: #256abf;
  --accent-strong: #1c5cab;
  --accent-soft: #e9f1fb;

  --series-1: #2a78d6;
  --series-2: #1baf7a;

  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05), 0 4px 16px rgba(11, 11, 11, 0.06);
  --shadow-pop: 0 6px 32px rgba(11, 11, 11, 0.18);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.form-note {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
  margin-bottom: 12px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
}

h1, h2, h3 { margin: 0; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Topbar ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 56px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.topnav { display: flex; gap: 4px; align-items: center; }

.topnav a {
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 550;
  font-size: 14px;
}
.topnav a:hover { background: var(--page); text-decoration: none; color: var(--ink); }
.topnav a.active { background: var(--accent-soft); color: var(--accent-strong); }

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-2);
  font-size: 13.5px;
}

/* ---------- Layout ---------- */

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

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

.page-title { font-size: 22px; letter-spacing: -0.015em; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 570;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  white-space: nowrap;
}
.btn:hover { background: var(--page); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }

.btn-danger { color: var(--critical); border-color: rgba(208, 59, 59, 0.35); }
.btn-danger:hover { background: rgba(208, 59, 59, 0.06); }

.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--page); color: var(--ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-plus::before { content: "+"; font-weight: 700; font-size: 15px; line-height: 1; }

/* ---------- Chips, badges, stats ---------- */

.statbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  min-width: 118px;
}
.stat-chip .k { font-size: 12px; color: var(--muted); font-weight: 550; }
.stat-chip .v { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.stat-chip .v small { font-size: 13px; font-weight: 550; color: var(--ink-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 620;
  border-radius: 999px;
  padding: 2.5px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge::before { content: "●"; font-size: 8px; line-height: 1; }
.badge-reserved { background: var(--accent-soft); color: var(--accent-strong); }
.badge-in { background: rgba(12, 163, 12, 0.10); color: var(--good-text); }
.badge-out { background: var(--page); color: var(--ink-2); border-color: var(--border); }
.badge-cancelled { background: rgba(208, 59, 59, 0.08); color: var(--critical); }
.badge-due { background: rgba(236, 131, 90, 0.14); color: #a34a24; }
.badge-plain { background: var(--page); color: var(--ink-2); border-color: var(--border); }
.badge-plain::before, .badge-type::before { content: none; }
.badge-type { background: var(--page); border-color: var(--border); color: var(--ink-2); font-weight: 600; }

/* ---------- Tabs ---------- */

.tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 18px;
}

.tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 570;
  color: var(--ink-2);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--accent); color: #fff; }
.tab .n {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  background: rgba(11, 11, 11, 0.07);
  border-radius: 999px;
  font-size: 12px;
  padding: 0 6px;
  margin-left: 5px;
}
.tab.active .n { background: rgba(255, 255, 255, 0.25); }

/* ---------- Booking cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}

.bcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcard.done { opacity: 0.72; box-shadow: none; }

.bcard-top { display: flex; align-items: flex-start; gap: 10px; }
.bcard-name { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; }
.bcard-ref { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.bcard-badges { margin-left: auto; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }

.bcard-roomno {
  font-size: 13px;
  font-weight: 650;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 3px 9px;
}

.bcard-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 13.5px;
}
.bcard-meta .k { color: var(--muted); font-size: 12px; }
.bcard-meta .v { font-weight: 570; }
.bcard-meta .v.money { font-variant-numeric: tabular-nums; }

.bcard-notes {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--page);
  border-radius: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
}

.bcard-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 4px;
}
.bcard-actions .spacer { flex: 1; }

.due-chip { font-weight: 650; font-size: 13.5px; }
.due-chip.owing { color: #a34a24; }
.due-chip.settled { color: var(--good-text); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--grid);
  border-radius: var(--radius);
  padding: 44px 20px;
  font-size: 14px;
}

/* ---------- Date nav ---------- */

.datenav { display: flex; align-items: center; gap: 8px; }
.datenav input[type="date"] {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 9px;
  padding: 7px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.datenav .today-label { font-size: 13px; color: var(--accent-strong); font-weight: 600; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px 14px; }

.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 620;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.field .hint { color: var(--muted); font-weight: 500; }

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 8px;
  padding: 8.5px 10px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 60px; }
.field input[disabled], .field select[disabled] { background: var(--page); color: var(--muted); }

.field-error { color: var(--critical); font-size: 12.5px; margin-top: 4px; font-weight: 550; }
.form-error {
  background: rgba(208, 59, 59, 0.07);
  border: 1px solid rgba(208, 59, 59, 0.25);
  color: var(--critical);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 550;
  margin-bottom: 12px;
}

.form-summary {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.form-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Guest rows (registration) ---------- */

.guest-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--page);
  display: grid;
  grid-template-columns: 1fr 1fr 130px 92px;
  gap: 10px 12px;
  position: relative;
}
.guest-row .field.addr { grid-column: 1 / -1; }
.guest-row .row-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.guest-row .row-title .rm { margin-left: auto; }
.guest-rows { display: flex; flex-direction: column; gap: 10px; }

/* ID scan block inside a guest row */
.id-scan { grid-column: 1 / -1; }
.id-scan-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.id-scan-btn::before {
  content: "";
  display: inline-block;
  width: 14px; height: 12px;
  margin-right: 2px;
  background: currentColor;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M9 2 7.5 4H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-3.5L15 2H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 20'%3E%3Cpath d='M9 2 7.5 4H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-3.5L15 2H9Zm3 5a5 5 0 1 1 0 10 5 5 0 0 1 0-10Zm0 2a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z'/%3E%3C/svg%3E");
  vertical-align: -1px;
}
.id-scan-status { font-size: 12.5px; color: var(--muted); }
.id-scan-status.ok { color: var(--good-text); }
.id-scan-status.warn { color: #a34a24; }
.id-scan-status.err { color: var(--critical); }
.id-scan-detail { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px; }
.id-thumb {
  width: 96px; height: 62px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--page);
  flex: none;
}
.id-detail-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.id-detail-fields select, .id-detail-fields input {
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 8px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13.5px;
}
.id-detail-fields .id-num { flex: 1; min-width: 130px; }

.id-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 570;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  width: 100%;
  max-width: 560px;
  animation: pop 0.14s ease-out;
}
.modal.modal-lg { max-width: 720px; }
.modal.modal-sm { max-width: 420px; }

@keyframes pop {
  from { transform: translateY(6px) scale(0.985); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  padding: 16px 20px 0;
  gap: 10px;
}
.modal-head h2 { font-size: 17px; letter-spacing: -0.01em; }
.modal-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.modal-x {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.modal-x:hover { background: var(--page); color: var(--ink); }

.modal-body { padding: 16px 20px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 18px;
}

/* ---------- Bill lines (checkout) ---------- */

.bill { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bill-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.bill-row:first-child { border-top: 0; }
.bill-row .amt { font-variant-numeric: tabular-nums; font-weight: 570; }
.bill-row.total { background: var(--page); font-weight: 650; }
.bill-row.balance .amt.owing { color: #a34a24; }
.bill-row.balance .amt.credit { color: var(--good-text); }

/* ---------- Tables ---------- */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

table.table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
}
.table td { padding: 9px 12px; border-top: 1px solid var(--grid); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.table th.num { text-align: right; }
.table tbody tr:hover { background: var(--page); }

.table-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--grid);
}
.table-foot .grow { flex: 1; }

/* ---------- Filter row (reports) ---------- */

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.preset-group {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.preset-group button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 570;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.preset-group button.active { background: var(--accent); color: #fff; }
.preset-group button:hover:not(.active) { color: var(--ink); background: var(--page); }

.filter-row .field { min-width: 140px; }
.filter-row .field input { padding: 7px 9px; font-size: 13.5px; }

/* ---------- Report cards & charts ---------- */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
}
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 570; }
.kpi .v { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; margin-top: 2px; }
.kpi .s { font-size: 12px; color: var(--ink-2); margin-top: 2px; }

.report-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 14px; }
.report-grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 10px;
  position: relative;
}
.chart-card h3 { font-size: 14.5px; font-weight: 650; }
.chart-card .chart-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 4px; }
.chart-card .chart-head { display: flex; align-items: flex-start; }
.chart-card .chart-head .tools { margin-left: auto; display: flex; gap: 6px; }

.chart-box { position: relative; }
.chart-box.loading { opacity: 0.45; transition: opacity 0.15s; }
.chart-box svg { display: block; width: 100%; }

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-pop);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12.5px;
  min-width: 120px;
  z-index: 20;
  display: none;
}
.chart-tip .t { color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.chart-tip .row { display: flex; align-items: center; gap: 7px; }
.chart-tip .key { width: 10px; height: 3px; border-radius: 2px; flex: none; }
.chart-tip .val { font-weight: 650; font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 10px; }

.bytype-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.bytype-row .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.bytype-row .lbl { font-size: 13.5px; font-weight: 570; width: 62px; }
.bytype-row .track { display: block; flex: 1; height: 14px; border-radius: 5px; background: var(--page); overflow: hidden; }
.bytype-row .fill { display: block; height: 100%; border-radius: 5px 4px 4px 5px; }
.bytype-row .amt { font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 76px; text-align: right; }
.bytype-row .sub { color: var(--muted); font-size: 12px; min-width: 66px; text-align: right; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  border-radius: 11px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 550;
  box-shadow: var(--shadow-pop);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
  max-width: min(92vw, 640px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 28px;
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-brand .brand-mark { width: 34px; height: 34px; font-size: 16px; border-radius: 9px; }
.login-brand h1 { font-size: 20px; }
.login-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; font-size: 15px; }

/* ---------- Rooms page ---------- */

.room-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; }
.room-dot.free { background: var(--good); }
.room-dot.busy { background: var(--serious); }
.room-dot.off { background: var(--rule); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .report-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .guest-row { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; }
}

@media print {
  .topbar, .btn, .tabs, .filter-row, .bcard-actions, .modal-overlay, .toast { display: none !important; }
  body { background: #fff; }
}

/* Copy-address helper shown on non-main guest rows */
.btn-copy-addr {
  float: right;
  border: 0;
  padding: 0;
  background: none;
  color: #2a78d6;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.btn-copy-addr:hover { text-decoration: underline; }

/* Availability calendar grid */
#cal-grid { overflow-x: auto; border: 1px solid #e1e0d9; border-radius: 8px; }
.cal-table { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.cal-table th, .cal-table td { border: 1px solid #cfcec5; }
.cal-table thead th { position: sticky; top: 0; background: #f5f5f1; z-index: 3; padding: 5px 4px; }
.cal-room { text-align: center; min-width: 44px; }
.cal-room .rn { display: block; font-weight: 700; font-size: 13px; color: #2c2b28; }
.cal-room .rt { display: block; font-size: 9px; color: #8a8880; text-transform: uppercase; letter-spacing: .05em; }
.cal-corner { text-align: left; }
.cal-date { position: sticky; left: 0; background: #f5f5f1; z-index: 2; text-align: left; white-space: nowrap; padding: 4px 10px 4px 8px; }
.cal-date .dnum { font-weight: 700; margin-right: 6px; color: #2c2b28; }
.cal-date .dow { color: #8a8880; }
.cal-table tr.weekend .cal-date { color: #a34a24; }
.cal-table td.cell { min-width: 44px; max-width: 60px; height: 26px; text-align: center; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell.free { background: #dcf3e3; }
.cell.occ { background: #f6d9cf; color: #7a2c16; font-weight: 600; font-size: 11px; cursor: pointer; }
.cell.occ:hover { background: #efc2b2; }
.cell.occ:focus-visible { outline: 2px solid #b23b1e; outline-offset: -2px; }
.cal-legend { display: flex; gap: 18px; align-items: center; font-size: 12.5px; color: #52514e; }
.cal-legend .sw { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 3px; vertical-align: middle; margin-right: 5px; font-size: 11px; }
.cal-legend .sw.free { background: #dcf3e3; border: 1px solid #b7e3c4; }
.cal-legend .sw.occ { background: #f6d9cf; color: #7a2c16; font-weight: 600; width: auto; padding: 0 6px; font-size: 10px; }
.cal-loading { padding: 26px; color: #8a8880; text-align: center; }

/* Calendar view toggle + week navigator */
.seg { display: inline-flex; border: 1px solid #d9d8d1; border-radius: 8px; overflow: hidden; }
.seg-btn { border: 0; background: #fff; padding: 7px 14px; font-size: 13px; font-weight: 600; color: #52514e; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid #e4e3dc; }
.seg-btn.active { background: #256abf; color: #fff; }
.cal-weeknav { display: inline-flex; align-items: center; gap: 8px; }
.cal-week-label { font-size: 13px; font-weight: 600; color: #2c2b28; min-width: 150px; text-align: center; }
.row-off { opacity: .55; }
.range-month { align-self: center; font-weight: 600; font-size: 13px; color: #52514e; }

/* Booking-details card (calendar popup) */
.booking-card .card-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid #efeee9; font-size: 14px; }
.booking-card .card-row:last-child { border-bottom: 0; }
.booking-card .card-row .k { color: #8a8880; }
.booking-card .card-row .v { font-weight: 600; text-align: right; color: #2c2b28; }
.booking-card .card-notes { margin-top: 10px; padding: 9px 11px; background: #f5f5f1; border-radius: 6px; font-size: 13px; color: #52514e; }
