/* ═══════════════════════════════════════════════════════════
   GRAND PALACE — Light Theme
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Root overrides (light mode) ─────────────────────────── */
:root {
  --bg:        #f4f6fb;
  --surface:   #ffffff;
  --border:    #e8edf5;
  --border2:   #dce3ef;
  --text:      #1a2236;
  --text-muted:#6b7a99;
  --text-dim:  #9aa3b8;
  --shadow-sm: 0 1px 4px rgba(30,50,100,.06), 0 2px 10px rgba(30,50,100,.05);
  --shadow-md: 0 2px 8px rgba(30,50,100,.08), 0 4px 20px rgba(30,50,100,.07);
  --radius:    14px;
  --radius-sm: 9px;
  --sidebar:   #ffffff;

  /* Accent tokens for Gold theme */
  --accent:     #c9973a;
  --accent-bg:  #fff8ee;
  --accent-dim: rgba(201,151,58,.12);
  --accent-dark:#a0742a;
}

/* Blue theme */
body.theme-blue  {
  --accent:#3b7ef8; --accent-bg:#eff5ff;
  --accent-dim:rgba(59,126,248,.12); --accent-dark:#2260d9;
}
/* Green theme */
body.theme-green {
  --accent:#12a060; --accent-bg:#edfaf5;
  --accent-dim:rgba(18,160,96,.12); --accent-dark:#0c7a4a;
}
/* Purple theme */
body.theme-purple{
  --accent:#7c3aed; --accent-bg:#f5f0ff;
  --accent-dim:rgba(124,58,237,.12); --accent-dark:#5c22c9;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* ── Main area ────────────────────────────────────────────── */
.main {
  margin-left: 230px;
  flex: 1;
  padding: 32px 36px;
  min-height: 100vh;
}

/* ── Cards & Stats ────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.stat:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent, var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.stat-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--stat-color, var(--text));
}

/* Stat color variants via data attrs */
.stat[data-color="amber"] { --stat-accent:#f59e0b; --stat-color:#d97706; }
.stat[data-color="rose"]  { --stat-accent:#f43f5e; --stat-color:#e11d48; }
.stat[data-color="green"] { --stat-accent:#10b981; --stat-color:#059669; }
.stat[data-color="blue"]  { --stat-accent:#3b82f6; --stat-color:#2563eb; }
.stat[data-color="orange"]{ --stat-accent:#f97316; --stat-color:#ea580c; }
.stat[data-color="violet"]{ --stat-accent:#8b5cf6; --stat-color:#7c3aed; }
.stat[data-color="teal"]  { --stat-accent:#14b8a6; --stat-color:#0d9488; }
.stat[data-color="indigo"]{ --stat-accent:#6366f1; --stat-color:#4f46e5; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}

/* ── Inputs ───────────────────────────────────────────────── */
.fi {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: border-color .15s;
}
.fi:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
select.fi { padding-right: 28px; }

/* ── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
  background: #f8fafe;
  white-space: nowrap;
}
td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f6f9ff; cursor: pointer; }

/* ── Badges (light versions) ──────────────────────────────── */
.badge, [class^="b-"], [class^="badge-"] {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.b-confirmed, .badge-confirmed    { background: #eff6ff; color: #1d4ed8; }
.b-checked_in, .badge-checked_in  { background: #f0fdf4; color: #15803d; }
.b-checked_out, .badge-checked_out{ background: #f8fafc; color: #64748b; }
.b-cancelled, .badge-cancelled    { background: #fff1f2; color: #be123c; }
.b-tentative, .badge-tentative    { background: #fffbeb; color: #b45309; }
.b-no_show, .badge-no_show        { background: #fdf4ff; color: #7e22ce; }

/* Payment badges */
.pay-badge { display: inline-flex; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.pay-paid    { background: #f0fdf4; color: #15803d; }
.pay-partial { background: #fffbeb; color: #b45309; }
.pay-unpaid  { background: #fff1f2; color: #be123c; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .15s;
  user-select: none;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-badge {
  display: inline-block;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  margin-left: 6px;
}
.tab.active .tab-badge { background: var(--accent); color: #fff; }

/* ── Section label ────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 24px 0 12px;
}

/* ── Page titles ──────────────────────────────────────────── */
.page-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.page-sub   { color: var(--text-muted); font-size: 13px; margin-bottom: 28px; }

/* ── Occupancy bar ────────────────────────────────────────── */
.occ-bar {
  background: var(--border);
  border-radius: 8px;
  height: 10px;
  overflow: hidden;
  margin: 12px 0;
}
.occ-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  transition: width .6s ease;
}
.occ-info { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

/* ── Misc helpers ─────────────────────────────────────────── */
.sub     { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.num     { font-family: 'Courier New', monospace; font-size: 12px; color: var(--accent); font-weight: 700; }
.empty   { padding: 60px; text-align: center; color: var(--text-dim); font-size: 14px; }
.loading { padding: 40px; text-align: center; color: var(--text-dim); font-size: 13px; }

.pages { display: flex; justify-content: center; gap: 8px; margin-top: 16px; align-items: center; }
.page-info { padding: 5px 12px; color: var(--text-muted); font-size: 13px; }

.amount-pending { color: #e11d48; font-weight: 700; }

/* ── Housekeeping status pills ────────────────────────────── */
.hs-clean         { background: #f0fdf4; color: #15803d; }
.hs-dirty         { background: #fffbeb; color: #b45309; }
.hs-cleaning      { background: #eff6ff; color: #1d4ed8; }
.hs-inspected     { background: #f0fdf4; color: #166534; }
.hs-do_not_disturb{ background: #fff1f2; color: #be123c; }
.hs-maintenance   { background: #fdf4ff; color: #7e22ce; }

/* ── Room grid ────────────────────────────────────────────── */
.cell-room {
  background: #f8fafe;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border2);
}
.cell-room.header {
  background: #f1f5fb;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border2);
}
.room-num  { font-size: 16px; font-weight: 800; color: var(--text); }
.room-type { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.room-hs   { font-size: 10px; padding: 2px 6px; border-radius: 4px; width: fit-content; margin-top: 3px; }

.cell-date {
  background: #f8fafe;
  border-bottom: 2px solid var(--border2);
  border-right: 1px solid var(--border);
  color: var(--text-muted);
}
.cell-date.today { background: var(--accent-bg); color: var(--accent); font-weight: 700; }

.map-wrap { border-radius: var(--radius); border: 1px solid var(--border2); background: var(--surface); overflow: hidden; }

/* ── Filters / search bar ─────────────────────────────────── */
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }

/* ── Det btn ──────────────────────────────────────────────── */
.det-btn {
  padding: 4px 12px;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.det-btn:hover { background: #dbeafe; }
.det-btn.open  { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }

/* ── Rooms pill ───────────────────────────────────────────── */
.rooms-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafe;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Top bar / actions ────────────────────────────────────── */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Pending table ────────────────────────────────────────── */
.pending-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pending-table th {
  text-align: left;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: #f8fafe;
}
.pending-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.pending-table tr:last-child td { border-bottom: none; }

/* ── Section info ─────────────────────────────────────────── */
.section-info { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
