/* ─── TRZ PMS v2 Design System ────────────────────────────────────────
   Palette carried over from TRZ's real brand assets (v1 icons/email
   templates): deep green + near-black green + warm gold, refined with
   a cream surface option for readability improvements over v1. */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Fraunces:wght@500;600&display=swap');

:root {
  color-scheme: dark;

  /* Brand */
  --trz-black-green: #00140b;
  --trz-deep-green:  #073f22;
  --trz-mid-green:   #0d5c2d;
  --trz-gold:        #d6b764;
  --trz-gold-bright: #f1d36b;

  /* Surfaces */
  --bg:         #060e09;
  --bg-2:       #030706;
  --panel:      #0c1a12;
  --panel-2:    #10241a;
  --cream:      #f4efe2;

  /* Text */
  --ink:        #f4efe2;
  --ink-2:      #c8d5ce;
  --muted:      #7a9488;

  /* Lines & shadow */
  --line:       rgba(214, 183, 100, 0.16);
  --line-soft:  rgba(255, 255, 255, 0.06);
  --shadow-card:  0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.32);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);

  /* Accent */
  --accent:     var(--trz-gold);
  --accent-dim: rgba(214, 183, 100, 0.14);

  /* Status colors — used consistently for booking status everywhere (calendar, lists, badges) */
  --status-pending:     #f5b942;
  --status-confirmed:   #5aa9ff;
  --status-checkedin:   #4ade80;
  --status-checkedout:  #7a9488;
  --status-cancelled:   #f87171;

  --danger:     #f87171;
  --success:    #4ade80;
  --warning:    #f5b942;

  --radius:     14px;
  --radius-sm:  10px;
  --radius-xs:  7px;
  --sidebar-w:  232px;
}

* , *::before, *::after { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 120% at 10% -10%, var(--trz-deep-green) 0%, var(--bg) 45%, var(--bg-2) 100%);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-serif {
  font-family: 'Fraunces', 'Inter', serif;
  letter-spacing: 0.01em;
}

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

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

[hidden] { display: none !important; }

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
  margin: 0 0 6px;
}

/* ─── Buttons ────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  padding: 11px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { border-color: var(--accent-dim); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn:focus-visible,
.input:focus-visible,
.nav-item:focus-visible,
.modal-close:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--trz-gold-bright);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--trz-gold-bright), var(--trz-gold));
  border-color: transparent;
  color: var(--trz-black-green);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-block { width: 100%; }

/* ─── Forms ──────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.02em; }

.input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
}
.input:focus { border-color: var(--accent); }

.form-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 16px;
  line-height: 1.5;
  cursor: pointer;
}
/* Native file inputs render their own "Choose File" button + filename
   text with a stubborn intrinsic minimum width the browser won't shrink
   below on its own — max-width alone lets Chrome/Firefox actually clip
   it instead of forcing whatever flex row it sits in wider than the
   viewport (see Settings > Payment Methods' QR upload row). */
input[type="file"] { max-width: 100%; }

.checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--trz-gold);
}

/* ─── Cards ──────────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* ─── Auth / Setup gate screens ─────────────────────────────────── */

.gate-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.gate-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 18px;
  display: block;
  box-shadow: var(--shadow-card);
}

.gate-card h1 { font-size: 20px; margin: 0 0 4px; }
.gate-card p.gate-sub { color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.gate-card .field { text-align: left; }

/* ─── App shell ──────────────────────────────────────────────────── */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* Grid items default to min-width: auto, which sizes them to their
   content's intrinsic minimum — a toolbar full of inputs with hard
   min-width values (e.g. the Bookings search field) can therefore force
   the shared 1fr track wider than the viewport, dragging the sidebar
   along with it and causing page-wide horizontal scroll. min-width: 0
   lets flex-wrap inside .main actually do its job instead. */
.sidebar, .main { min-width: 0; }

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line-soft);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 20px;
}
.sidebar-brand img { width: 34px; height: 34px; border-radius: 9px; }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand span { display: block; font-size: 11px; color: var(--muted); }

.nav-group { margin-top: 14px; }
.nav-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-xs);
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.nav-item:hover { background: var(--line-soft); color: var(--ink); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.manager-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.manager-pill.active { border-color: var(--accent); color: var(--accent); }

.main {
  padding: 28px 32px 60px;
  max-width: 1200px;
}

.main-header { margin-bottom: 24px; }
.main-header h1 { font-size: 24px; margin: 0 0 4px; }
.main-header p { color: var(--muted); margin: 0; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.stat-card .eyebrow { margin-bottom: 10px; }
.stat-card .stat-value { font-size: 30px; font-weight: 700; }

/* ─── Status badges ──────────────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.status-pending    { color: var(--status-pending);    background: color-mix(in srgb, var(--status-pending) 16%, transparent); }
.status-confirmed  { color: var(--status-confirmed);  background: color-mix(in srgb, var(--status-confirmed) 16%, transparent); }
.status-checkedin  { color: var(--status-checkedin);  background: color-mix(in srgb, var(--status-checkedin) 16%, transparent); }
.status-checkedout { color: var(--status-checkedout); background: color-mix(in srgb, var(--status-checkedout) 16%, transparent); }
.status-cancelled  { color: var(--status-cancelled);  background: color-mix(in srgb, var(--status-cancelled) 16%, transparent); }

/* ─── Mobile ─────────────────────────────────────────────────────── */

/* ─── Modals ─────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 6, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}

.modal-card.modal-wide { max-width: 720px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.modal-close:hover { color: var(--ink); }

.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ─── Toolbars & lists ───────────────────────────────────────────── */

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar .input, .toolbar select.input { min-width: 160px; width: auto; }
.toolbar-spacer { flex: 1; }

.operations-actions { margin-bottom: 20px; }
.operations-stats { margin-bottom: 8px; }
.operations-section { margin-top: 24px; }
.operations-section > h2,
.section-title-row h2 { margin: 0; font-size: 18px; }
.operations-section > h2 { margin-bottom: 12px; }
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.table-scroll {
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
}
.table-scroll .list-table { min-width: 720px; }
.empty-cell { padding: 28px 12px !important; text-align: center; color: var(--muted); }
.operation-callout {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: var(--panel-2);
}
.operation-period-card { margin-top: 16px; }
.operation-period-card > .dashboard-grid { margin-top: 16px; }
.operation-period-card .stat-card {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.stat-note,
.muted-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.stat-note { margin-top: 5px; }
.muted-note { margin: 6px 0 0; }
.btn-small { padding: 6px 10px; font-size: 11px; }

.list-table { width: 100%; border-collapse: collapse; }
.list-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.list-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  vertical-align: middle;
}
.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover td { background: var(--line-soft); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 16px 0;
}
.detail-grid .detail-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.detail-grid .detail-value { font-size: 14px; }
.detail-full { grid-column: 1 / -1; }

/* Live price line on the staff New Booking form. */
.quote-note { font-size: 13px; color: var(--ink-2); margin: -4px 0 14px; min-height: 18px; }
.quote-note .quote-warn { color: var(--danger); }

.guest-memory-section {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.guest-memory-preview {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
}
.automation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.automation-card h2 { margin: 0; font-size: 18px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 16px;
  align-items: start;
}
.settings-grid h2 { margin: 0 0 8px; font-size: 18px; }
.manager-lock p { color: var(--muted); margin-top: 0; }
.package-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.audit-filters { align-items: flex-end; }
.audit-filters .field { margin: 0; }
.audit-filters .field > span { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.audit-filters .audit-search { flex: 1 1 220px; }
.audit-filters .audit-search .input { width: 100%; }
.audit-table { min-width: 960px !important; }
.audit-table tbody tr { cursor: default; }
.audit-metadata { margin-top: 16px; }
.audit-metadata summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.audit-metadata pre {
  overflow-x: auto;
  max-width: 100%;
  padding: 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ─── Guests screen ──────────────────────────────────────────────── */

.guest-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.guest-list { max-height: 70vh; overflow-y: auto; padding: 6px; }
.guest-list-item {
  padding: 10px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.guest-list-item:hover, .guest-list-item.active { background: var(--line-soft); }
.guest-list-item strong { display: block; font-size: 13px; }
.guest-list-item span { font-size: 12px; color: var(--muted); }

/* ─── Calendar (v1 visual design: rounded day cards, bookings INSIDE the night) ─── */

.cal { min-width: 0; }
.cal-card { padding: 22px; }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 18px; }
.cal-title { font-size: 17px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cream); }
.cal-nav { display: flex; gap: 8px; align-items: center; }
.cal-nav .btn { padding: 8px 14px; min-height: 40px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

.dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; flex-shrink: 0; }
.dot-available { background: transparent; border: 1px solid var(--muted); }
.dot-pending { background: var(--status-pending); }
.dot-confirmed { background: var(--status-confirmed); }
.dot-checkedin { background: var(--status-checkedin); }
.dot-checkedout { background: var(--status-checkedout); }

.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-weekdays { margin-bottom: 8px; }
.cal-weekdays div { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding-left: 4px; }

.cal-cell {
  position: relative; min-width: 0; min-height: 78px; padding: 9px 10px 8px;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}
.cal-blank { border: 0; background: none; min-height: 0; }
.cal-num { font-size: 13px; font-weight: 800; color: var(--cream); line-height: 1.2; }
.cal-dots { display: none; gap: 3px; }
.cal-available { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: auto; }
.cal-today { border-color: var(--trz-gold); box-shadow: inset 0 0 0 1px rgba(214, 183, 100, 0.55); }
.cal-today .cal-num { color: var(--trz-gold-bright); }
.cal-selected:not(.cal-today) { border-color: rgba(214, 183, 100, 0.45); }

/* The booking sits inside the day card. Names wrap on two lines, then truncate; nothing spills out. */
.cal-booking { display: flex; flex-direction: column; gap: 1px; min-width: 0; margin-top: auto; }
.cal-guest {
  font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--cream);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.cal-meta { font-size: 10.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 10.5px; font-weight: 700; color: var(--muted); }

.cal-has-booking { cursor: pointer; }
.cal-has-booking:hover { filter: brightness(1.12); }
.cal-pending    { background: color-mix(in srgb, var(--status-pending) 17%, var(--bg)); border-color: color-mix(in srgb, var(--status-pending) 42%, transparent); }
.cal-confirmed  { background: color-mix(in srgb, var(--status-confirmed) 17%, var(--bg)); border-color: color-mix(in srgb, var(--status-confirmed) 42%, transparent); }
.cal-checkedin  { background: color-mix(in srgb, var(--status-checkedin) 17%, var(--bg)); border-color: color-mix(in srgb, var(--status-checkedin) 42%, transparent); }
.cal-checkedout { background: color-mix(in srgb, var(--status-checkedout) 16%, var(--bg)); border-color: color-mix(in srgb, var(--status-checkedout) 34%, transparent); }
.cal-today.cal-has-booking { border-color: var(--trz-gold); }
.cal-cell:focus-visible, .agenda-row:focus-visible, .cal-booking:focus-visible { outline: 3px solid var(--trz-gold-bright); outline-offset: 1px; }

.cal-day-detail { display: none; margin-top: 14px; }
.cal-day-detail-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.cal-day-empty { margin: 0; padding: 12px 14px; border: 1px dashed var(--line-soft); border-radius: var(--radius-xs); color: var(--muted); font-size: 13px; }
.agenda-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 14px; min-height: 48px;
  border-radius: var(--radius-xs); border: 1px solid var(--line-soft); margin-bottom: 8px; cursor: pointer;
}
.agenda-row:hover { border-color: var(--accent-dim); }
.agenda-row strong { font-size: 14px; flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; }
.agenda-sub { flex-basis: 100%; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }

/* Dashboard embedding: the Dashboard supplies the card. */
.calendar-embedded-host .cal-head { margin-bottom: 14px; }
.calendar-embedded-host .cal-title { font-size: 16px; }
.calendar-embedded-host .cal-legend { margin-left: 0; flex-basis: 100%; }
.calendar-embedded-host .cal-cell { min-height: 82px; }

@media (max-width: 1280px) { .calendar-embedded-host .cal-legend { flex-basis: 100%; } }

@media (max-width: 700px) {
  .cal-card { padding: 14px; }
  .cal-head { gap: 10px; }
  .cal-title { flex: 1 1 100%; font-size: 15px; }
  .cal-nav { flex: 1 1 100%; }
  .cal-nav .btn { flex: 1; min-height: 44px; padding: 8px 10px; }
  .cal-legend { margin-left: 0; flex-basis: 100%; gap: 4px 12px; font-size: 11px; }
  .cal-weekdays, .cal-grid { gap: 4px; }
  .cal-weekdays div { font-size: 9px; text-align: center; padding-left: 0; letter-spacing: 0.04em; }
  .calendar-embedded-host .cal-cell, .cal-cell { min-height: 52px; padding: 6px 4px 5px; align-items: center; justify-content: flex-start; border-radius: 8px; cursor: pointer; }
  .cal-num { font-size: 13px; }
  .cal-dots { display: flex; justify-content: center; min-height: 9px; }
  .cal-available, .cal-booking, .cal-more { display: none; }
  .cal-day-detail { display: block; }
}

/* ─── Dashboard (operations center) ──────────────────────────────── */

.dash-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dash-header h1 { font-size: 32px; margin: 0; line-height: 1.1; }
.dash-date {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  background: var(--panel); font-weight: 600; font-size: 13px; white-space: nowrap;
}

.dash-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: 22px 26px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(13, 92, 45, 0.5), rgba(7, 63, 34, 0.3) 55%, var(--panel));
  box-shadow: var(--shadow-card);
}
.dash-hero-copy { min-width: 0; }
.dash-hero .eyebrow { margin-bottom: 8px; }
.dash-headline {
  font-family: 'Fraunces', 'Inter', serif; font-size: clamp(20px, 2.3vw, 27px); font-weight: 600;
  line-height: 1.25; margin: 0; color: var(--cream); overflow-wrap: anywhere;
}
.dash-metrics { display: grid; grid-template-columns: repeat(4, minmax(92px, 1fr)); gap: 10px; }
.dash-metric {
  background: rgba(0, 20, 11, 0.55); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 12px 10px; text-align: center; min-width: 0;
}
.dash-metric-label { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dash-metric-value { font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 6px; }

.dash-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dash-stat { padding: 16px 18px; min-width: 0; }
.dash-stat-label { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.dash-stat-value { font-size: 26px; font-weight: 700; line-height: 1.15; margin-top: 8px; display: flex; align-items: center; gap: 9px; }
.dash-stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dash-status-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--success); flex-shrink: 0; }
.dash-stat-value.occupied .dash-status-dot { background: var(--trz-gold-bright); }

.dash-main { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.dash-main > * { min-width: 0; }
.dash-calendar { padding: 18px; }
.dash-side { display: flex; flex-direction: column; gap: 14px; }
.dash-panel { padding: 16px 18px; }
.dash-panel-title { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.dash-empty { color: var(--muted); font-size: 13px; margin: 8px 0 4px; }

.dash-row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line-soft); background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 0;
}
.dash-row:last-child { border-bottom: 0; }
.dash-row-2 { grid-template-columns: 78px minmax(0, 1fr); }
button.dash-row:hover { background: var(--line-soft); }
button.dash-row:focus-visible { outline: 3px solid var(--trz-gold-bright); outline-offset: -2px; }
.dash-row-when { font-size: 11px; color: var(--ink-2); line-height: 1.35; }
.dash-row-when span { color: var(--muted); }
.dash-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-row-main strong { font-size: 13px; overflow-wrap: anywhere; }
.dash-row-main span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .dash-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .dash-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .dash-header h1 { font-size: 26px; }
  .dash-date { padding: 6px 12px; font-size: 12px; }
  .dash-hero { padding: 16px; margin-bottom: 12px; }
  .dash-headline { font-size: 20px; }
  .dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-metric { padding: 10px 8px; }
  .dash-metric-value { font-size: 26px; }
  .dash-summary { gap: 8px; margin-bottom: 12px; }
  .dash-stat { padding: 12px 14px; }
  .dash-stat-value { font-size: 20px; margin-top: 4px; }
  .dash-stat-sub { font-size: 11px; }
  .dash-calendar { padding: 14px; }
  .dash-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .dash-row-2 { grid-template-columns: 64px minmax(0, 1fr); }
  .dash-row .status-badge { font-size: 10px; padding: 3px 8px; }
}

@media (max-width: 700px) {
  .guest-layout { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .operations-actions .btn { flex: 1 1 145px; }
  .section-title-row .btn { width: 100%; }
  .modal-overlay { padding: 10px; }
  .guest-memory-actions .btn { flex: 1 1 150px; }
  .automation-card { padding: 16px; }
  .package-fields { grid-template-columns: 1fr; }
  .audit-filters > .field,
  .audit-filters > .btn { flex: 1 1 145px; }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px;
  }
  .sidebar-brand, .nav-group-label, .sidebar-footer { display: none; }
  .nav-group { margin-top: 0; display: flex; gap: 4px; }
  .main { padding: 20px; }
}

/* ── Staff Access ── */
.staff-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.staff-head h2 { margin: 0; }
.staff-list { display: flex; flex-direction: column; }
.staff-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line, #e3e8e4); flex-wrap: wrap; }
.staff-row.is-inactive .staff-main strong { color: var(--muted); text-decoration: line-through; }
.staff-tags { display: flex; gap: 6px; margin-top: 4px; }
.staff-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.staff-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 12px 0; }
.staff-switch input { width: 20px; height: 20px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.08); color: var(--ink-2); }
.tag-manager { background: rgba(214,183,100,0.18); color: #e6c96f; }
.tag-active { background: rgba(80,180,120,0.18); color: #7fd6a0; }
.tag-off { background: rgba(220,90,90,0.18); color: #f0a0a0; }
.btn-danger-outline { border-color: #c0392b; color: #f0a0a0; }

/* ── Booking & Email Media ── */
.media-group { margin: 22px 0 10px; font-size: 16px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.media-slot { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.media-thumb { width: 100%; overflow: hidden; border-radius: var(--radius-xs); background: var(--panel-2); display: flex; align-items: center; justify-content: center; }
.media-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.media-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-off-soft { background: rgba(255,255,255,0.06); color: var(--muted); }
