/* Light motif — hotel-rm / Dash UI inspired */
:root {
  --bg: #f4f6f9;
  --bg-subtle: #eef1f6;
  --surface: #ffffff;
  --surface-hover: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #94a3b8;
  --accent: #dc2626;
  --accent-hover: #b91c1c;
  --accent-soft: #fef2f2;
  --success: #00b070;
  --success-soft: #e6f9f1;
  --warn: #f5a623;
  --warn-soft: #fef6e8;
  --danger: #f03a3a;
  --danger-soft: #fef0f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
}

.brand h1 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.brand .subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.dot.ok {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  animation: pulse 2s infinite;
}

.dot.warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Layout */
.wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
}

.account-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  box-shadow: var(--shadow-sm);
}

.account-banner strong {
  color: var(--text);
}

/* Tabs */
.tabs-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.3);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.card .label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.card .sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card.accent .value {
  color: var(--accent);
}

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  color: var(--text);
}

.panel-head .meta {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

.steps {
  margin: 0;
  padding: 16px 18px 16px 34px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.88rem;
}

.steps code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* Tables */
.table-wrap {
  overflow: auto;
}

.room-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.room-table th,
.room-table td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.room-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-subtle);
}

.room-table tbody tr:hover {
  background: var(--surface-hover);
}

.room-table td strong,
.room-table .mono {
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
}

.empty,
.placeholder {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.email-snippet {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Alerts */
.alert-banner {
  background: var(--warn-soft);
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.alert-banner.success {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: #007a50;
}

.alert-banner.error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #b91c1c;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 9px 16px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

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

.btn-primary:hover,
.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  font-weight: 500;
  padding: 6px 10px;
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-ok {
  background: var(--success-soft);
  color: #007a50;
}

/* Views */
.view { display: none; }
.view.active { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.inventory-meta {
  padding: 10px 18px 0;
  font-size: 0.82rem;
}

table.matrix { border-collapse: collapse; font-size: 0.78rem; min-width: 100%; }
table.matrix th, table.matrix td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}
table.matrix th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.7rem;
}
table.matrix th.sticky-col,
table.matrix td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  min-width: 120px;
}
table.matrix th.sticky-col { z-index: 2; background: var(--bg-subtle); }
.cell-remain { font-weight: 700; font-variant-numeric: tabular-nums; }
.cell-remain.low { color: var(--danger); background: var(--danger-soft); }
.cell-remain.ok { color: #007a50; }
.cell-booked { color: var(--text-secondary); font-size: 0.72rem; }

@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .wrap { padding: 16px; }

  .tabs-bar {
    width: 100%;
    overflow-x: auto;
  }

  .tab-btn {
    padding: 10px 14px;
    white-space: nowrap;
  }
}

/* Legal pages */
.brand-link {
  text-decoration: none;
  color: inherit;
}

.legal-wrap {
  max-width: 860px;
}

.legal-doc {
  margin-bottom: 32px;
}

.legal-body {
  padding: 24px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.legal-body p {
  margin-bottom: 16px;
}

.legal-body h2 {
  margin: 28px 0 10px;
  font-size: 1rem;
  color: var(--text);
}

.legal-body ul {
  margin: 0 0 16px 20px;
}

.legal-body li {
  margin-bottom: 6px;
}

.legal-links {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.legal-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.legal-links a:hover {
  color: var(--accent-hover);
}

.site-footer {
  margin-top: 8px;
  padding: 0 0 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}
