/* ============================================================
   HOTEL ADMIN PANEL — GLOBAL STYLESHEET
   Compact ERP style. Font 12–14px. Small buttons. Small tables.
   ============================================================ */

/* ── VARIABLES ──────────────────────────────────────────── */
:root {
  --sidebar-width: 210px;
  --sidebar-collapsed-width: 52px;
  --topbar-height: 44px;
  --sidebar-bg: #1a1f2e;
  --sidebar-hover: #2a3147;
  --sidebar-active: #2563eb;
  --sidebar-text: #adb5c9;
  --sidebar-text-active: #ffffff;
  --sidebar-section: #5a6380;
  --brand-primary: #2563eb;
  --brand-secondary: #64748b;
  --body-bg: #f1f5f9;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 14px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ── RESET / BASE ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  background: var(--body-bg);
  color: #1e293b;
  line-height: 1.5;
  overflow-x: hidden;
}

a { text-decoration: none; }

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1000;
  transition: width 0.22s ease;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #3a4255; border-radius: 3px; }

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: var(--topbar-height);
  background: rgba(0,0,0,.2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand i { font-size: 18px; color: #60a5fa; flex-shrink: 0; }
.sidebar.collapsed .sidebar-brand-text { display: none; }

/* Nav */
.sidebar-nav {
  padding: 8px 0;
  flex: 1;
}

.nav-section-label {
  padding: 10px 14px 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--sidebar-section);
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; overflow: hidden; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  color: var(--sidebar-text);
  font-size: var(--text-sm);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.nav-item.active {
  background: rgba(37,99,235,.18);
  color: var(--sidebar-text-active);
  border-left-color: var(--sidebar-active);
  font-weight: 500;
}

.nav-item i {
  font-size: 15px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item { padding: 9px 0; justify-content: center; }
.sidebar.collapsed .nav-item i { width: auto; }

/* ── MAIN WRAPPER ───────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s ease;
}

.main-wrapper.sidebar-collapsed { margin-left: var(--sidebar-collapsed-width); }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.topbar-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: #1e293b;
}

.sidebar-toggle {
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: #64748b;
  padding: 3px 7px;
  border-radius: var(--radius);
  line-height: 1;
}
.sidebar-toggle:hover { background: #e2e8f0; }

.user-btn {
  font-size: var(--text-sm);
  color: #374151;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius);
}
.user-btn:hover { background: #e2e8f0; }

/* ── CONTENT AREA ───────────────────────────────────────── */
.content-area {
  flex: 1;
  padding: 14px 16px;
  overflow-x: hidden;
}

/* ── FOOTER ─────────────────────────────────────────────── */
.admin-footer {
  padding: 8px 16px;
  background: #fff;
  border-top: 1px solid var(--border-color);
  font-size: var(--text-xs);
  color: #94a3b8;
  text-align: center;
  flex-shrink: 0;
}

/* ── PAGE HEADER ────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.page-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #1e293b;
}

.mini-breadcrumb {
  font-size: var(--text-xs);
  margin: 0;
  padding: 0;
  --bs-breadcrumb-divider-color: #94a3b8;
}
.mini-breadcrumb .breadcrumb-item a { color: #64748b; }
.mini-breadcrumb .breadcrumb-item.active { color: #94a3b8; }

/* ── CARDS ──────────────────────────────────────────────── */
.card { border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.compact-card .card-header {
  padding: 7px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  color: #374151;
}

.compact-card .card-body { padding: 12px; }

/* ── STAT CARDS ─────────────────────────────────────────── */
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.stat-value { font-size: 20px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: var(--text-xs); color: #64748b; margin-top: 1px; }

.stat-primary .stat-icon  { background: #dbeafe; color: #2563eb; }
.stat-success .stat-icon  { background: #dcfce7; color: #16a34a; }
.stat-warning .stat-icon  { background: #fef9c3; color: #ca8a04; }
.stat-info    .stat-icon  { background: #e0f2fe; color: #0284c7; }
.stat-danger  .stat-icon  { background: #fee2e2; color: #dc2626; }
.stat-secondary .stat-icon{ background: #f1f5f9; color: #475569; }

/* ── TABLES ─────────────────────────────────────────────── */
.compact-table { font-size: var(--text-sm); }
.compact-table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  padding: 7px 10px;
  white-space: nowrap;
}
.compact-table tbody td {
  padding: 6px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}
.compact-table tbody tr:last-child td { border-bottom: none; }
.compact-table tbody tr:hover td { background: #f8fafc; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-xs {
  padding: 3px 8px;
  font-size: var(--text-xs);
  border-radius: 4px;
  line-height: 1.6;
}

.btn-group-xs > .btn { padding: 2px 6px; font-size: var(--text-xs); }

/* ── FORMS ──────────────────────────────────────────────── */
.form-control-sm, .form-select-sm {
  font-size: var(--text-sm) !important;
  padding: 4px 8px;
  height: 30px;
}

textarea.form-control-sm { height: auto; }

.form-label { font-size: var(--text-xs); margin-bottom: 3px; color: #4b5563; font-weight: 500; }
.form-label-sm { font-size: var(--text-xs) !important; margin-bottom: 3px !important; }

.form-select-xs {
  font-size: var(--text-xs);
  padding: 3px 24px 3px 6px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background-color: #fff;
}

/* ── MODALS ─────────────────────────────────────────────── */
.compact-modal-header {
  padding: 8px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}
.compact-modal-header .modal-title { font-size: var(--text-md); font-weight: 600; }
.compact-modal-body { padding: 12px 14px; }
.compact-modal-footer {
  padding: 7px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.btn-close-sm { width: 0.65em; height: 0.65em; }

/* ── INFO BLOCKS ────────────────────────────────────────── */
.info-block { margin-bottom: 4px; }
.info-label  { font-size: var(--text-xs); color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
.info-value  { font-size: var(--text-sm); color: #1e293b; }

/* ── SECTION TITLE ──────────────────────────────────────── */
.section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  padding: 4px 0 2px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 6px;
}

/* ── ALERTS ─────────────────────────────────────────────── */
.compact-alert {
  padding: 6px 12px;
  font-size: var(--text-sm);
  margin-bottom: 10px;
  border-radius: var(--radius);
}

/* ── AVAILABILITY BOX ───────────────────────────────────── */
.availability-box {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
}
.availability-box.available {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.availability-box.unavailable {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ── TOAST ──────────────────────────────────────────────── */
.admin-toast {
  min-width: 260px;
  max-width: 340px;
  font-size: var(--text-sm);
  padding: 8px 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border: 1px solid rgba(0,0,0,.08);
}
.admin-toast.show { opacity: 1; transform: translateX(0); }
.admin-toast.hiding { opacity: 0; transform: translateX(20px); }

.admin-toast.toast-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.admin-toast.toast-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.admin-toast.toast-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.admin-toast.toast-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }

/* ── DATATABLES OVERRIDES ───────────────────────────────── */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  font-size: var(--text-xs) !important;
  padding: 3px 6px !important;
  height: 26px !important;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}
.dataTables_wrapper .dataTables_length select { padding-right: 20px !important; }

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  font-size: var(--text-xs) !important;
  padding: 7px 12px !important;
  color: #64748b;
}

.dataTables_wrapper .dataTables_paginate { padding: 6px 12px !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  font-size: var(--text-xs) !important;
  padding: 2px 7px !important;
}

div.dataTables_processing {
  font-size: var(--text-xs);
  color: #64748b;
}

/* ── SELECT2 OVERRIDES ──────────────────────────────────── */
.select2-container--bootstrap-5 .select2-selection {
  font-size: var(--text-sm) !important;
  min-height: 30px !important;
  border-color: var(--border-color) !important;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  font-size: var(--text-sm) !important;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  font-size: 10px !important;
  padding: 1px 6px !important;
  margin: 2px 2px !important;
}
.select2-container--bootstrap-5 .select2-dropdown {
  font-size: var(--text-sm) !important;
  border-color: var(--border-color) !important;
}
.select2-container--bootstrap-5 .select2-results__option {
  padding: 5px 8px !important;
  font-size: var(--text-sm) !important;
}

/* ── LOGIN PAGE ─────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1f2e 0%, #2a3147 50%, #1e3a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper { width: 100%; max-width: 360px; padding: 16px; }

.login-card {
  background: #fff;
  border-radius: 10px;
  padding: 28px 28px 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}
.login-logo i {
  font-size: 36px;
  color: var(--brand-primary);
  display: block;
}
.login-logo h5 { font-size: 16px; font-weight: 700; color: #1e293b; }

/* ── TABLE-XS (inside cards) ────────────────────────────── */
.table-xs td, .table-xs th {
  padding: 4px 6px;
  font-size: var(--text-sm);
}

/* ── BADGE OVERRIDES ────────────────────────────────────── */
.badge { font-size: 10px; font-weight: 600; }

/* ── RESPONSIVE SIDEBAR ─────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .content-area { padding: 10px; }
  .page-header { flex-direction: column; gap: 8px; }
}

/* ── INVOICE PRINT ──────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .admin-footer, .no-print, .page-header { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .content-area { padding: 0 !important; }
  body { background: white !important; }
}

.invoice-print-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.invoice-header-bar {
  background: var(--brand-primary);
  color: white;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.invoice-table th {
  background: #f8fafc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  border: 1px solid var(--border-color);
  padding: 7px 10px;
}
.invoice-table td {
  font-size: var(--text-sm);
  border: 1px solid var(--border-color);
  padding: 7px 10px;
}

/* ── MISC ───────────────────────────────────────────────── */
.spinner-inline { display: inline-flex; align-items: center; gap: 6px; }
.text-rupee::before { content: '₹'; }

.gallery-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.img-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--border-color);
}
.img-card.is-primary { border-color: var(--brand-primary); }
.img-card .img-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,.55);
  padding: 5px 7px;
  display: flex; gap: 4px;
  justify-content: center;
}