/* ═══════════════════════════════════════════════════════
   HotelPro Admin — style.css
═══════════════════════════════════════════════════════ */

/* ─── CSS Variables ──────────────────────────────────── */
:root {
  --primary:       #2ea3dc;
  --primary-dark:  #1e8abf;
  --primary-light: #e8f5fd;
  --primary-glow:  rgba(46, 163, 220, .18);

  --sidebar-bg:    #2ea3dc;
  --sidebar-width: 260px;
  --header-h:      64px;

  --bg:          #f0f4f8;
  --surface:     #ffffff;
  --border:      #e2e8f0;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;

  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #6366f1;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

  --transition: .22s cubic-bezier(.4, 0, .2, 1);
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
button { border: none; cursor: pointer; background: none; font-family: inherit; }
img  { display: block; max-width: 100%; }

/* ─── Scrollbars ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

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

/* ═══════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition), width var(--transition);
  overflow: hidden;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.brand-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.22);
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 18px; color: #fff;
  flex-shrink: 0;
}
.brand-text strong { font-size: 17px; font-weight: 700; color: #fff; display: block; }
.brand-text span   { font-size: 11px; color: rgba(255,255,255,.75); letter-spacing: .5px; text-transform: uppercase; }

/* Scrollable nav */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

/* Nav section labels */
.nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.55);
  padding: 16px 22px 6px;
}

/* Nav links */
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 22px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.2); color: #fff; }
.nav-link.active::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}
[dir="rtl"] .nav-link.active::before {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-radius: 3px 0 0 3px;
}
.nav-link i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }

.nav-badge {
  margin-inline-start: auto;
  background: rgba(255,255,255,.25);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.6;
}
.nav-badge.danger { background: var(--danger); }

/* ─── Dropdown nav ───────────────────────────────────── */
.nav-dropdown-arrow {
  margin-inline-start: auto;
  font-size: 11px;
  color: rgba(255,255,255,.6);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.has-dropdown.open > .nav-link .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height .32s cubic-bezier(.4,0,.2,1);
  background: rgba(0,0,0,.12);
}
.has-dropdown.open > .nav-submenu {
  max-height: 300px;
}

.nav-submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px 9px 52px;
  color: rgba(255,255,255,.68);
  font-size: 13px;
  font-weight: 400;
  transition: background var(--transition), color var(--transition);
}
[dir="rtl"] .nav-submenu-link { padding: 9px 52px 9px 22px; }
.nav-submenu-link::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  flex-shrink: 0;
}
.nav-submenu-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-submenu-link:hover::before { background: #fff; }

/* Hide dropdown arrow when sidebar is collapsed */
.sidebar.collapsed .nav-dropdown-arrow { display: none; }
.sidebar.collapsed .nav-submenu { max-height: 0 !important; }

/* Sidebar footer */
.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user img {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  object-fit: cover;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong { display: block; font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span  { font-size: 11px; color: rgba(255,255,255,.65); }
.sidebar-user-btn { color: rgba(255,255,255,.7); padding: 4px; font-size: 13px; }
.sidebar-user-btn:hover { color: #fff; }

/* Collapsed state */
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user-btn { display: none; }
.sidebar.collapsed .nav-link { padding: 13px; justify-content: center; }
.sidebar.collapsed .nav-link i { width: auto; }
.sidebar.collapsed .brand-icon { margin: 0 auto; }
.sidebar.collapsed .sidebar-user img { margin: 0 auto; }

/* ═══════════════════════════════════════════════════════
   MAIN WRAP
═══════════════════════════════════════════════════════ */
.main-wrap {
  flex: 1;
  margin-inline-start: var(--sidebar-width);
  transition: margin-inline-start var(--transition);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.main-wrap.sidebar-collapsed { margin-inline-start: 64px; }

/* ═══════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  box-shadow: 0 2px 12px rgba(46,163,220,.3);
}

.header-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.85);
  font-size: 18px;
  transition: background var(--transition);
}
.header-toggle:hover { background: rgba(255,255,255,.15); color: #fff; }

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.header-breadcrumb .crumb-active { color: #fff; font-weight: 600; }
.header-breadcrumb i { font-size: 10px; }

.header-spacer { flex: 1; }

/* Search */
.header-search { position: relative; display: flex; align-items: center; }
.header-search input {
  width: 220px;
  padding: 8px 16px 8px 38px;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: width var(--transition), background var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search input:focus { width: 280px; background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); }
.header-search i {
  position: absolute;
  inset-inline-start: 13px;
  color: rgba(255,255,255,.7);
  font-size: 13px;
  pointer-events: none;
}
[dir="rtl"] .header-search input { padding: 8px 38px 8px 16px; }
[dir="rtl"] .header-search i    { inset-inline-start: auto; inset-inline-end: 13px; }

/* Header action buttons */
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: rgba(255,255,255,.85);
  font-size: 16px;
  transition: background var(--transition);
}
.header-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.header-btn .badge {
  position: absolute;
  top: 5px; inset-inline-end: 5px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--sidebar-bg);
}

.rtl-btn {
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  border: 1px solid rgba(255,255,255,.25);
  transition: background var(--transition);
}
.rtl-btn:hover { background: rgba(255,255,255,.25); }

.header-avatar {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 30px;
  transition: background var(--transition);
}
.header-avatar:hover { background: rgba(255,255,255,.12); }
.header-avatar img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  object-fit: cover;
}
.header-avatar span { font-size: 13px; font-weight: 600; color: #fff; }

/* ═══════════════════════════════════════════════════════
   PAGE CONTENT
═══════════════════════════════════════════════════════ */
.page-content { flex: 1; padding: 28px 24px 48px; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left h1 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header-left p  { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.page-header-right   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(46,163,220,.35);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 16px rgba(46,163,220,.45); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Date badge */
.date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.date-badge i { color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   CARD BASE
═══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.card-title    { font-size: 15px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-body     { padding: 20px 22px; }

/* ═══════════════════════════════════════════════════════
   PRIMARY STAT CARDS (top row)
═══════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* Colored top border */
.stat-card::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.c-primary::after { background: var(--primary); }
.stat-card.c-success::after { background: var(--success); }
.stat-card.c-warning::after { background: var(--warning); }
.stat-card.c-info::after    { background: var(--info); }
.stat-card.c-danger::after  { background: var(--danger); }
.stat-card.c-teal::after    { background: #14b8a6; }
.stat-card.c-rose::after    { background: #f43f5e; }
.stat-card.c-amber::after   { background: #d97706; }

/* Icon row */
.stat-icon-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.c-primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.c-success .stat-icon { background: #d1fae5; color: var(--success); }
.c-warning .stat-icon { background: #fef3c7; color: var(--warning); }
.c-info    .stat-icon { background: #ede9fe; color: var(--info); }
.c-danger  .stat-icon { background: #fee2e2; color: var(--danger); }
.c-teal    .stat-icon { background: #ccfbf1; color: #14b8a6; }
.c-rose    .stat-icon { background: #ffe4e6; color: #f43f5e; }
.c-amber   .stat-icon { background: #fef3c7; color: #d97706; }

/* Trend badge */
.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.trend-up   { color: var(--success); background: #d1fae5; }
.trend-down { color: var(--danger);  background: #fee2e2; }
.trend-flat { color: var(--text-muted); background: #f1f5f9; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -.5px;
}
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Progress bar inside stat card */
.stat-progress {
  margin-top: 16px;
}
.stat-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width .8s ease;
}
.c-primary .progress-fill { background: var(--primary); }
.c-success .progress-fill { background: var(--success); }
.c-warning .progress-fill { background: var(--warning); }
.c-info    .progress-fill { background: var(--info); }
.c-danger  .progress-fill { background: var(--danger); }
.c-teal    .progress-fill { background: #14b8a6; }
.c-rose    .progress-fill { background: #f43f5e; }
.c-amber   .progress-fill { background: #d97706; }

/* Stat divider mini row */
.stat-divider { width: 100%; height: 1px; background: var(--border); margin: 14px 0; }

.stat-meta {
  display: flex;
  gap: 16px;
}
.stat-meta-item { flex: 1; }
.stat-meta-item .sm-val  { font-size: 16px; font-weight: 700; color: var(--text); }
.stat-meta-item .sm-lbl  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Star rating */
.star-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 14px;
}
.star-row i { font-size: 14px; color: #fbbf24; }
.star-row i.empty { color: var(--border); }
.star-count { font-size: 12px; color: var(--text-muted); margin-inline-start: 6px; }

/* Pill tags inside stat card */
.stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.stat-tag {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.tag-done    { background: #d1fae5; color: #065f46; }
.tag-pending { background: #fef3c7; color: #92400e; }
.tag-cancel  { background: #fee2e2; color: #991b1b; }

/* ═══════════════════════════════════════════════════════
   SECONDARY STAT CARDS (mini row)
═══════════════════════════════════════════════════════ */
.mini-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.mini-stat {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.mini-stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.mini-stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}
.mini-stat-body .ms-val { font-size: 20px; font-weight: 700; color: var(--text); line-height: 1; }
.mini-stat-body .ms-lbl { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ═══════════════════════════════════════════════════════
   QUICK ACTIONS
═══════════════════════════════════════════════════════ */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.action-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-2px);
}
.action-card:hover .action-icon { background: var(--primary); color: #fff; }
.action-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 20px;
  margin: 0 auto 10px;
  transition: all var(--transition);
}
.action-label { font-size: 13px; font-weight: 600; color: var(--text); }
.action-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════
   TWO-COLUMN GRIDS
═══════════════════════════════════════════════════════ */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-bottom: 24px;
}

.half-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════
   TABS
═══════════════════════════════════════════════════════ */
.tab-pills {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-sm);
}
.tab-pill {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
}
.tab-pill:hover, .tab-pill.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ═══════════════════════════════════════════════════════
   BOOKINGS TABLE
═══════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: start;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--primary-light); }
tbody td { padding: 12px 14px; color: var(--text); vertical-align: middle; white-space: nowrap; }

/* Guest cell */
.guest-cell { display: flex; align-items: center; gap: 10px; }
.guest-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.guest-name { font-weight: 600; font-size: 13px; }
.guest-type { font-size: 11px; color: var(--text-muted); }

/* Status badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.status-confirmed   { background: #d1fae5; color: #065f46; }
.status-confirmed::before   { background: var(--success); }
.status-pending     { background: #fef3c7; color: #92400e; }
.status-pending::before     { background: var(--warning); }
.status-checked-in  { background: var(--primary-light); color: var(--primary-dark); }
.status-checked-in::before  { background: var(--primary); }
.status-cancelled   { background: #fee2e2; color: #991b1b; }
.status-cancelled::before   { background: var(--danger); }
.status-checked-out { background: #f1f5f9; color: #475569; }
.status-checked-out::before { background: #94a3b8; }

/* ═══════════════════════════════════════════════════════
   ACTIVITY FEED
═══════════════════════════════════════════════════════ */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-body p { font-size: 13px; color: var(--text); line-height: 1.4; }
.activity-body p strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-light); margin-top: 3px; display: flex; align-items: center; gap: 4px; }

/* ═══════════════════════════════════════════════════════
   ROOM MAP
═══════════════════════════════════════════════════════ */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: 8px;
}
.room-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1.5px solid transparent;
  gap: 2px;
}
.room-cell:hover { transform: scale(1.07); box-shadow: var(--shadow); }
.room-cell i { font-size: 15px; }
.room-cell.available   { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.room-cell.occupied    { background: var(--primary-light); color: var(--primary-dark); border-color: #bae6fd; }
.room-cell.maintenance { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.room-cell.reserved    { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.room-cell.dirty       { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.rooms-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.rl-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.rl-dot  { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   TOP PERFORMERS
═══════════════════════════════════════════════════════ */
.performer-list { display: flex; flex-direction: column; }
.performer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.performer-item:last-child { border-bottom: none; }
.performer-rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.performer-rank.gold   { background: #fef3c7; color: #d97706; }
.performer-rank.silver { background: #f1f5f9; color: #64748b; }
.performer-rank.bronze { background: #fff7ed; color: #c2410c; }
.performer-info { flex: 1; min-width: 0; }
.performer-info strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.performer-info span   { font-size: 11px; color: var(--text-muted); }
.performer-val { font-size: 13px; font-weight: 700; color: var(--primary); }

/* Booking source bars (no chart) */
.source-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.source-row { display: flex; flex-direction: column; gap: 4px; }
.source-row-top { display: flex; justify-content: space-between; font-size: 12px; }
.source-row-top span:first-child { color: var(--text-muted); font-weight: 500; }
.source-row-top span:last-child  { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   MOBILE OVERLAY
═══════════════════════════════════════════════════════ */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .stat-grid      { grid-template-columns: repeat(2, 1fr); }
  .mini-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .half-grid    { grid-template-columns: 1fr; }
  .actions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrap { margin-inline-start: 0 !important; }
  .page-content { padding: 16px 14px 36px; }

  .stat-grid      { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mini-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .header-search    { display: none; }
  .header-breadcrumb { display: none; }
  .header-avatar span { display: none; }
}

@media (max-width: 480px) {
  .stat-grid      { grid-template-columns: 1fr; }
  .mini-stat-grid { grid-template-columns: 1fr 1fr; }
  .actions-grid   { grid-template-columns: 1fr 1fr; }
  .page-header    { flex-direction: column; align-items: flex-start; }
  .stat-value     { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════
   AUTH PAGES  (login.html / register.html)
═══════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

/* ── Left branding panel ─────────────────────────────── */
.auth-panel {
  width: 44%;
  flex-shrink: 0;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
}

/* decorative circles */
.auth-panel::before,
.auth-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth-panel::before { width: 420px; height: 420px; bottom: -120px; left: -80px; }
.auth-panel::after  { width: 260px; height: 260px; top: -70px;   right: -60px; }

.auth-panel-brand { position: relative; z-index: 1; }
.auth-panel-brand .ap-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,.22);
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px; color: #fff;
  margin-bottom: 16px;
}
.auth-panel-brand strong {
  display: block;
  font-size: 26px; font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}
.auth-panel-brand span {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.auth-panel-body { position: relative; z-index: 1; }
.auth-panel-body h2 {
  font-size: 28px; font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 14px;
}
.auth-panel-body p {
  font-size: 15px;
  color: rgba(255,255,255,.78);
  line-height: 1.65;
  max-width: 340px;
}

.auth-panel-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.ap-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 12px 16px;
}
.ap-feature-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.18);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.ap-feature-text strong { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.ap-feature-text span   { font-size: 12px; color: rgba(255,255,255,.7); }

/* ── Right form area ─────────────────────────────────── */
.auth-form-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}

.auth-box {
  width: 100%;
  max-width: 460px;
}

.auth-box-header { margin-bottom: 32px; }
.auth-box-header h1 {
  font-size: 24px; font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-box-header p { font-size: 14px; color: var(--text-muted); }

/* ── Form elements ───────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-label span { color: var(--danger); margin-inline-start: 2px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap i.inp-icon {
  position: absolute;
  inset-inline-start: 14px;
  font-size: 14px;
  color: var(--text-light);
  pointer-events: none;
  z-index: 1;
}
[dir="rtl"] .input-wrap i.inp-icon { inset-inline-start: auto; inset-inline-end: 14px; }

.form-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
[dir="rtl"] .form-input { padding: 11px 40px 11px 14px; }
.form-input::placeholder { color: var(--text-light); }
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input.has-error { border-color: var(--danger); }

/* password toggle btn */
.inp-toggle {
  position: absolute;
  inset-inline-end: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  padding: 4px;
  transition: color var(--transition);
  z-index: 1;
}
[dir="rtl"] .inp-toggle { inset-inline-end: auto; inset-inline-start: 12px; }
.inp-toggle:hover { color: var(--primary); }
.form-input.has-toggle { padding-inline-end: 40px; }

/* helper / error text */
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger);     margin-top: 5px; display: none; }
.form-input.has-error ~ .form-error { display: block; }

/* two-col form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* checkbox */
.form-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label { font-size: 13px; color: var(--text-muted); user-select: none; }

/* password strength */
.pw-strength { margin-top: 8px; }
.pw-bars { display: flex; gap: 4px; margin-bottom: 5px; }
.pw-bar {
  flex: 1; height: 4px;
  border-radius: 4px;
  background: var(--border);
  transition: background .3s;
}
.pw-bar.weak   { background: var(--danger); }
.pw-bar.fair   { background: var(--warning); }
.pw-bar.good   { background: #60a5fa; }
.pw-bar.strong { background: var(--success); }
.pw-label { font-size: 11px; color: var(--text-muted); }

/* divider */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
  font-size: 12px; color: var(--text-light);
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1;
  height: 1px; background: var(--border);
}

/* social buttons */
.social-btns { display: flex; gap: 10px; margin-bottom: 24px; }
.social-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.social-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); background: var(--primary-light); }
.social-btn img { width: 18px; height: 18px; }

/* submit button */
.btn-auth {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(46,163,220,.4);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn-auth:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(46,163,220,.5); transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0); }

/* footer link row */
.auth-footer-text {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 22px;
}
.auth-footer-text a { color: var(--primary); font-weight: 600; }
.auth-footer-text a:hover { text-decoration: underline; }

/* RTL toggle btn on auth page */
.auth-rtl-btn {
  position: fixed;
  top: 16px; inset-inline-end: 16px;
  padding: 7px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 999;
  transition: all var(--transition);
}
.auth-rtl-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ═══════════════════════════════════════════════════════
   TABLE CARD  (.table-card)
   Reusable table wrapper used across all list pages.

   Structure:
     <div class="table-card">
       <div class="table-card-header">…</div>   ← optional top bar
       <div class="table-responsive">
         <table class="table table-hover align-middle mb-0">…</table>
       </div>
       <div class="table-card-footer">…</div>   ← optional pagination bar
     </div>
═══════════════════════════════════════════════════════ */
.table-card {
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbfc;
}

.table-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

.table-card table thead tr th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
  padding-top: 12px;
  padding-bottom: 12px;
  background: #fff;
}

.table-card table tbody tr td {
  font-size: 0.85rem;
  padding-top: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid #f8fafc;
}

.table-card table tbody tr:last-child td {
  border-bottom: none;
}

.table-card table tbody tr:hover td {
  background: #fafbff;
}

/* ── Responsive auth ─────────────────────────────────── */
@media (max-width: 900px) {
  .auth-panel { display: none; }
  .auth-form-area { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .auth-box { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .auth-box-header h1 { font-size: 20px; }
}



/* ─── Route Loading Overlay ──────────────────────────── */
.route-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: route-loader-spin 0.7s linear infinite;
}

@keyframes route-loader-spin {
  to { transform: rotate(360deg); }
}

.route-loader-fade-enter-active,
.route-loader-fade-leave-active {
  transition: opacity 0.2s ease;
}
.route-loader-fade-enter-from,
.route-loader-fade-leave-to {
  opacity: 0;
}
