/* ── Acadion Hotel Desk — Design System ── */
:root {
  --bg-deep: #0c1222;
  --bg-card: #141c2e;
  --bg-elevated: #1a2540;
  --bg-glass: rgba(20, 28, 46, 0.75);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --text-dim: #5c6678;
  --accent: #c9a227;
  --accent-light: #e8c547;
  --accent-glow: rgba(201, 162, 39, 0.25);
  --blue: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --purple: #a855f7;
  --red: #ef4444;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --sidebar-w: 260px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

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

a { color: var(--accent-light); text-decoration: none; }
code { background: var(--bg-elevated); padding: 2px 8px; border-radius: 6px; font-size: 0.85em; color: var(--accent-light); }

/* ── Utilities ── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a8841a);
  color: #0c1222;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 6px; min-width: 32px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input.input-error,
.form-group select.input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.field-error {
  display: block;
  color: #fca5a5;
  font-size: 0.8rem;
  margin-top: 6px;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 4px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.form-row .form-group { margin-bottom: 0; }
.req { color: var(--red); font-weight: 700; }
.form-summary-error { margin-bottom: 16px; }

/* Modal form layout */
.modal.modal-lg { max-width: 620px; }
.modal-body {
  padding: 20px 28px 24px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.modal-form { display: flex; flex-direction: column; }
.form-section { margin-bottom: 22px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.form-section .form-group { margin-bottom: 16px; }
.form-section .form-group:last-child { margin-bottom: 0; }
.form-section .form-row { margin-bottom: 16px; }
.form-section .form-row:last-child { margin-bottom: 0; }

.login-card .form-group { margin-bottom: 20px; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; margin-bottom: 16px; }
.alert-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }

/* ══════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.login-bg { position: fixed; inset: 0; z-index: 0; }
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}
.shape-1 { width: 500px; height: 500px; background: var(--accent); top: -10%; right: -5%; }
.shape-2 { width: 400px; height: 400px; background: #3b5998; bottom: -10%; left: -5%; }
.shape-3 { width: 300px; height: 300px; background: var(--purple); top: 50%; left: 40%; opacity: 0.2; }

.login-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 960px;
  width: 90%;
  align-items: center;
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 16px 0 8px;
  background: linear-gradient(135deg, var(--text), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-tagline { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 28px; }
.brand-features { list-style: none; }
.brand-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.brand-features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.brand-icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.brand-icon.sm { width: 40px; height: 40px; padding: 8px; }

.login-card {
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.login-subtitle { color: var(--text-muted); margin-bottom: 28px; }
.login-hint { text-align: center; margin-top: 20px; font-size: 0.85rem; color: var(--text-dim); }

/* ══════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════ */
.app-page { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand strong { display: block; font-size: 1rem; }
.sidebar-brand span { font-size: 0.75rem; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-elevated); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(201,162,39,0.15), rgba(201,162,39,0.05));
  color: var(--accent-light);
  border: 1px solid rgba(201,162,39,0.2);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a8841a);
  color: #0c1222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.user-badge strong { display: block; font-size: 0.85rem; }
.user-badge span { font-size: 0.75rem; color: var(--text-muted); }

.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 50;
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}
.page-title { font-size: 1.25rem; font-weight: 700; flex: 1; }
.date-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.content { padding: 28px; flex: 1; }
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-highlight {
  border-color: rgba(34,197,94,0.35);
  background: linear-gradient(135deg, rgba(34,197,94,0.08), var(--bg-card));
}
.stat-highlight .stat-value { color: var(--green); }
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.stat-icon.green { background: rgba(34,197,94,0.15); color: var(--green); }
.stat-icon.amber { background: rgba(245,158,11,0.15); color: var(--amber); }
.stat-icon.purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.stat-icon.teal { background: rgba(20,184,166,0.15); color: #14b8a6; }
.stat-icon.rose { background: rgba(244,63,94,0.15); color: #f43f5e; }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; line-height: 1.2; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card-header { margin-bottom: 16px; }
.card-header h3 { font-size: 1rem; font-weight: 600; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.dashboard-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-wide { grid-column: 1 / -1; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-badge {
  background: rgba(34,197,94,0.15);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.big-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: var(--font-display);
}
.text-center { text-align: center; }

/* Occupancy ring */
.occupancy-ring-wrap { display: flex; justify-content: center; padding: 12px 0; }
.occupancy-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(
    var(--accent) calc(var(--pct, 0) * 1%),
    var(--bg-elevated) 0
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.occupancy-ring::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--bg-card);
}
.occupancy-ring-value {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
}

/* Room status board (dashboard top) */
.room-status-board { margin-bottom: 20px; }
.room-status-board .card-header {
  flex-wrap: wrap;
  gap: 12px;
}
.room-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.available { background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
.legend-dot.occupied { background: var(--red); box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.legend-dot.reserved { background: var(--amber); box-shadow: 0 0 8px rgba(245, 158, 11, 0.5); }

.room-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.room-status-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font: inherit;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.room-status-tile-btn { cursor: pointer; }
.room-status-tile-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.room-status-tile-btn:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.room-status-no {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.room-status-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  margin-top: 2px;
}
.room-status-tile.status-available {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.45);
  color: #4ade80;
}
.room-status-tile.status-occupied {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}
.room-status-tile.status-reserved {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

/* Room chips */
.room-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
}
.room-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  min-width: 90px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.room-chip:hover {
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,197,94,0.12);
}
.room-chip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
.room-chip-no { font-size: 1.2rem; font-weight: 700; color: var(--green); }
.room-chip-type { font-size: 0.75rem; color: var(--text-muted); margin: 2px 0; }
.room-chip-price { font-size: 0.8rem; color: var(--accent-light); font-weight: 600; }

.booking-choice { display: flex; flex-direction: column; gap: 16px; padding: 4px 0; }
.booking-room-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
}
.booking-room-no { font-size: 1.1rem; font-weight: 700; color: var(--green); }
.booking-room-meta { font-size: 0.85rem; color: var(--text-muted); }
.booking-choice-actions { display: flex; flex-direction: column; gap: 10px; }
.booking-choice-actions .btn { justify-content: center; gap: 8px; }
.input-readonly {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: default;
}

/* Guest searchable combobox */
.guest-combobox { position: relative; }
.guest-combobox-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
}
.guest-combobox-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.guest-combobox-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.guest-combobox-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.guest-combobox-option:hover,
.guest-combobox-option:focus-visible {
  background: var(--bg-elevated);
  outline: none;
}
.guest-combobox-name { font-weight: 600; }
.guest-combobox-phone { font-size: 0.85rem; color: var(--text-muted); }
.guest-combobox-empty {
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Reports */
.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.report-type-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.report-tab {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.report-tab.active {
  background: var(--bg-elevated);
  color: var(--text);
}
.report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.report-date-input {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
}
.report-preview-card { margin-bottom: 20px; }
.report-preview { padding: 4px 0; }
.report-empty { padding: 40px 20px; }
.report-document { display: flex; flex-direction: column; gap: 24px; }
.report-doc-header { text-align: center; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.report-doc-header h2 { font-family: var(--font-display); margin-bottom: 4px; }
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.report-stat {
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}
.report-stat.highlight {
  border-color: rgba(201, 162, 39, 0.35);
  background: rgba(201, 162, 39, 0.08);
}
.report-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.report-stat-value { font-size: 1.35rem; font-weight: 700; }
.report-section h4 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--accent-light);
}
.report-actions { display: flex; gap: 8px; }

@media print {
  .sidebar, .topbar, .reports-toolbar, .report-actions, .sidebar-backdrop, .toast { display: none !important; }
  .app-main { margin: 0 !important; }
  .content { padding: 0 !important; }
  .page { display: none !important; }
  #page-reports { display: block !important; }
  .report-preview-card { border: none; box-shadow: none; }
  body { background: #fff; color: #000; }
  .report-stat, .data-table { border-color: #ccc; }
  .report-stat { background: #f9f9f9; }
}

/* Activity lists */
.activity-list { display: flex; flex-direction: column; gap: 10px; max-height: 220px; overflow-y: auto; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.activity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a8841a);
  color: #0c1222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.activity-avatar.depart { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; }
.activity-info { flex: 1; min-width: 0; }
.activity-info strong { display: block; font-size: 0.9rem; }
.activity-info span { font-size: 0.8rem; color: var(--text-muted); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 24px 12px;
}

/* Type status grid */
.type-status-grid { display: flex; flex-direction: column; gap: 14px; }
.type-status-card {
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.type-status-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.type-status-name { font-weight: 600; font-size: 0.9rem; }
.type-status-avail { font-size: 0.8rem; color: var(--green); font-weight: 600; }
.type-status-bar {
  height: 8px;
  background: rgba(34,197,94,0.2);
  border-radius: 4px;
  overflow: hidden;
}
.type-status-occupied {
  height: 100%;
  background: var(--amber);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.type-status-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.meal-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}
.meal-icon { font-size: 1.2rem; }

.data-table.compact th,
.data-table.compact td { padding: 10px 16px; }

.type-bars { display: flex; flex-direction: column; gap: 12px; }
.type-bar-row { display: flex; align-items: center; gap: 12px; }
.type-bar-label { width: 80px; font-size: 0.85rem; color: var(--text-muted); }
.type-bar-track { flex: 1; height: 8px; background: var(--bg-elevated); border-radius: 4px; overflow: hidden; }
.type-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s ease; }
.type-bar-count { width: 30px; text-align: right; font-size: 0.85rem; font-weight: 600; }

/* ── Tables ── */
.page-toolbar { margin-bottom: 20px; display: flex; justify-content: flex-end; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr { transition: background var(--transition); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table .actions { display: flex; gap: 6px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-amber { background: rgba(245,158,11,0.15); color: var(--amber); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--blue); }

/* ── Bill / Invoice ── */
.bill-modal { max-width: 680px; }
.bill-body { padding: 24px 28px; max-height: 60vh; overflow-y: auto; }
.bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border: none;
}
.btn-whatsapp:hover { background: #1ebe57; color: #fff; }

.bill-invoice { color: var(--text); }
.bill-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 18px;
}
.bill-hotel h2 {
  font-family: var(--font-display);
  color: var(--accent-light);
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.bill-hotel p { font-size: 0.85rem; color: var(--text-muted); margin: 2px 0; }
.bill-meta { text-align: right; font-size: 0.85rem; }
.bill-meta p { margin: 4px 0; color: var(--text-muted); }
.bill-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.bill-type-badge.final { background: rgba(34,197,94,0.15); color: var(--green); }
.bill-type-badge.proforma { background: rgba(245,158,11,0.15); color: var(--amber); }

.bill-guest-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  padding: 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.bill-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.bill-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.bill-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.bill-table small { color: var(--text-muted); }
.bill-amount { text-align: right; white-space: nowrap; }
.bill-sub td { color: var(--text-muted); }
.bill-total td { border-top: 2px solid var(--accent); font-size: 1.05rem; }
.bill-stay-dates {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0;
}
.bill-footer { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-top: 12px; }

@media print {
  body * { visibility: hidden; }
  .bill-invoice, .bill-invoice * { visibility: visible; }
  .bill-invoice { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ── Connection banner ── */
.connection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius);
  color: #f87171;
  font-size: 0.9rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 14px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  z-index: 300;
  animation: toastIn 0.3s ease;
}
.toast.success { border-color: rgba(34,197,94,0.4); color: var(--green); }
.toast.error { border-color: rgba(239,68,68,0.4); color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Responsive ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 90;
  backdrop-filter: blur(2px);
}

body.modal-open { overflow: hidden; }

@media (max-width: 1200px) {
  .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid,
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .content { padding: 22px; }
  .topbar { padding: 14px 22px; }
}

@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    gap: 28px;
    width: 92%;
    padding: 24px 0 40px;
  }
  .login-brand { text-align: center; }
  .login-brand h1 { font-size: 2rem; }
  .brand-tagline { font-size: 1rem; margin-bottom: 16px; }
  .brand-features { display: none; }
  .brand-icon { margin: 0 auto; }
  .login-card { padding: 28px 22px; }

  .sidebar-backdrop { display: block; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; }

  .topbar {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .page-title {
    font-size: 1.05rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .date-badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    max-width: 50vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .stats-grid,
  .stats-grid-6 { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
  .stat-card { padding: 16px; gap: 12px; }
  .stat-icon { width: 40px; height: 40px; }
  .stat-icon svg { width: 18px; height: 18px; }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: 0.7rem; }

  .card { padding: 18px 16px; }
  .big-number { font-size: 1.75rem; }
  .dashboard-grid,
  .dashboard-grid-3 { gap: 14px; margin-bottom: 14px; }

  .room-chips { max-height: none; }
  .room-chip { min-width: calc(50% - 8px); flex: 1 1 calc(50% - 8px); }
  .room-status-tile { min-width: calc(25% - 8px); flex: 1 1 calc(25% - 8px); padding: 10px 8px; }
  .room-status-no { font-size: 1.1rem; }
  .room-status-legend { width: 100%; }
  .report-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .reports-toolbar { flex-direction: column; align-items: stretch; }
  .report-controls .btn { width: 100%; }

  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-row .form-group { margin-bottom: 16px; }

  .page-toolbar {
    justify-content: stretch;
    margin-bottom: 14px;
  }
  .page-toolbar .btn { width: 100%; }

  .table-wrap {
    -webkit-overflow-scrolling: touch;
    margin: 0 -16px;
    padding: 0 16px;
  }
  .data-table { min-width: 640px; }
  .data-table th,
  .data-table td { padding: 12px 14px; font-size: 0.85rem; }
  .data-table .actions {
    flex-wrap: wrap;
    gap: 4px;
    min-width: 140px;
  }
  .data-table .actions .btn { white-space: normal; text-align: center; }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal,
  .modal.modal-lg,
  .bill-modal {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    flex-direction: column;
  }
  .modal-body,
  .bill-body {
    max-height: calc(92vh - 140px);
    padding: 16px 18px 20px;
  }
  .modal-header,
  .modal-footer,
  .bill-actions {
    padding-left: 18px;
    padding-right: 18px;
  }
  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .modal-footer .btn { width: 100%; }

  .bill-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .bill-actions .btn { width: 100%; justify-content: center; }
  .bill-header { flex-direction: column; gap: 12px; }
  .bill-meta { text-align: left; }
  .bill-guest-info { grid-template-columns: 1fr; }

  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    text-align: center;
  }

  .btn { min-height: 44px; }
  .nav-item { min-height: 44px; }
  .menu-toggle { min-width: 44px; min-height: 44px; }

  .type-bar-label { width: 64px; font-size: 0.8rem; }
  .activity-list { max-height: none; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }

  .login-container { width: 94%; gap: 20px; }
  .login-brand h1 { font-size: 1.65rem; }
  .login-card { padding: 22px 18px; }

  .stats-grid,
  .stats-grid-6 { grid-template-columns: 1fr; }
  .stat-card { padding: 14px; }

  .room-chip {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .occupancy-ring { width: 100px; height: 100px; }
  .occupancy-ring-value { font-size: 1.25rem; }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .user-badge span { display: none; }
  .sidebar-footer .btn { width: 100%; }
  .date-badge { display: none; }

  .data-table { min-width: 560px; }
  .data-table.compact th,
  .data-table.compact td { padding: 8px 10px; font-size: 0.8rem; }

  .form-group input,
  .form-group select { font-size: 16px; }
}
