/* ==========================================================================
   THEME TOKENS
   Every page shares this one stylesheet, so a theme is just a set of CSS
   custom-property overrides keyed off <html data-theme="...">, set by
   includes/header.php from the signed-in user's `users.theme` column
   (profile menu → "Theme", handled by theme_action.php). The default,
   unscoped :root block below IS "Bold Structured" (data-theme="bold") —
   the other three directions live in assets/css/themes.css, loaded right
   after this file, and only override what differs.
   ========================================================================== */
:root {
  --sidebar-w: 230px;
  --brand: #0E7C7B;
  --brand-dark: #0E2338;
  --brand-2: #123C4A;
  --brand-glow: #4FD1C5;
  --brand-light: #E1F2F1;
  --bg-soft: #EEF2F7;
  --ink: #0F172A;
  --ink-soft: #64748B;
  --border: #E1E7F0;
  --radius: 12px;
  --radius-lg: 14px;
  --font-display: "Space Grotesk", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-md: 0 4px 14px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.14);
}

* { scrollbar-width: thin; scrollbar-color: #c7d0dc transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7d0dc; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

body {
  background: var(--bg-soft);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:not(.btn):not(.nav-link):not(.dropdown-item):not(.property-tab) { color: var(--brand); }

.topbar-title, .auth-card h1, .sidebar-brand span, .stat-card .stat-value, .card-panel h5, .card-panel h6 {
  font-family: var(--font-display);
}

/* ---------- Buttons & form polish (Bootstrap overrides) ---------- */
.btn { border-radius: 8px; font-weight: 600; font-size: .88rem; letter-spacing: .01em; transition: filter .12s ease, transform .05s ease, box-shadow .12s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
  border-color: var(--brand-dark);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-dark) 30%, transparent);
}
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.08); border-color: var(--brand-dark); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }
.btn-sm { border-radius: 7px; }
.form-control, .form-select {
  border-radius: 8px;
  border-color: #d7dde6;
  font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem rgba(74,85,120,.15);
}
label.form-label { font-size: .84rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.table { font-size: .89rem; }
.table thead th {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  font-weight: 700;
  border-bottom-width: 1px;
  background: #f8fafc;
}
.table-responsive { border-radius: 10px; }
.badge { font-weight: 600; letter-spacing: .01em; border-radius: 6px; padding: .38em .6em; }
.modal-content { border-radius: 14px; border: none; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--border); }
.nav-tabs .nav-link { color: var(--ink-soft); font-weight: 600; font-size: .87rem; border: none; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: transparent; }

/* ---------- Auth pages (login/signup/setup) ---------- */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--brand-dark) 0%, var(--brand-2) 55%, var(--brand) 100%);
  padding: 24px;
}
.auth-wrap::before {
  content: ""; position: absolute; top: -160px; right: -140px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-glow) 35%, transparent), transparent 65%);
  pointer-events: none;
}
.auth-wrap::after {
  content: ""; position: absolute; left: -120px; bottom: -140px; width: 360px; height: 360px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-glow) 20%, transparent), transparent 65%);
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
  position: relative;
}
.auth-card h1 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 4px;
}
.auth-card .subtitle { color: var(--ink-soft); margin-bottom: 26px; font-size: .92rem; }
.auth-card .btn-primary { width: 100%; padding: 10px; }

/* ---------- Login page — split brand / form layout ---------- */
.auth-split { min-height: 100vh; min-height: 100dvh; display: flex; }
.auth-split-brand {
  flex: 1 1 45%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 52px 48px;
  color: #fff;
  background-color: var(--brand-dark);
  /* Fine-line dusk illustration (assets/images/auth-scene.svg) with a
     top/bottom scrim layered over it so the logo, tagline and feature
     list stay legible against the scene at any panel height. */
  background-image:
    linear-gradient(180deg, rgba(8,20,28,.78) 0%, rgba(8,20,28,.32) 30%, rgba(8,20,28,.38) 65%, rgba(8,20,28,.88) 100%),
    url('../images/auth-scene.svg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.auth-split-brand::before {
  content: ""; position: absolute; top: -140px; right: -120px; width: 380px; height: 380px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-glow) 22%, transparent), transparent 65%);
  pointer-events: none;
}
.auth-split-brand::after {
  content: ""; position: absolute; left: -100px; bottom: -60px; width: 300px; height: 300px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-glow) 12%, transparent), transparent 65%);
  pointer-events: none;
}
.auth-split-brand-top, .auth-split-brand-bottom { position: relative; }
.auth-split-logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.auth-split-logo .logomark-lg {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: linear-gradient(135deg, var(--brand-glow), var(--brand));
  color: #06251F;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-glow) 40%, transparent);
}
.auth-split-tagline { margin-top: 22px; font-size: 1.05rem; line-height: 1.55; color: rgba(255,255,255,.82); max-width: 380px; }
.auth-split-features { display: flex; flex-direction: column; gap: 20px; }
.auth-split-feature { display: flex; gap: 14px; align-items: flex-start; }
.auth-split-feature .fi-icon {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
  background: rgba(255,255,255,.12); color: var(--brand-glow);
}
.auth-split-feature .fi-title { font-weight: 700; font-size: .92rem; color: #fff; }
.auth-split-feature .fi-sub { font-size: .82rem; color: rgba(255,255,255,.68); margin-top: 2px; }

.auth-split-form {
  flex: 1 1 55%;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background: var(--bg-soft);
}
/* A quiet, thin-line ("pen sketch") flourish echoing the illustration on the
   brand panel — a faint topographic squiggle + a pin/compass mark tucked into
   the bottom corner of the white side, never behind the form fields. */
.auth-split-form::before {
  content: "";
  position: absolute;
  right: -60px; bottom: -40px;
  width: 460px; height: 460px;
  background: url('../images/auth-line-art.svg') no-repeat center / contain;
  opacity: .16;
  pointer-events: none;
}
.auth-split-form-inner { position: relative; width: 100%; max-width: 380px; }
.auth-split-form-inner h1 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.auth-split-form-inner .subtitle { color: var(--ink-soft); margin-bottom: 28px; font-size: .93rem; }
.auth-split-form-inner .btn-primary { width: 100%; padding: 11px; font-size: .92rem; }

.input-icon-group { position: relative; }
.input-icon-group > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); font-size: .95rem; pointer-events: none;
}
.input-icon-group input.form-control { padding-left: 40px; }

@media (max-width: 900px) {
  .auth-split { flex-direction: column; }
  .auth-split-brand { flex: none; padding: 32px 28px; gap: 24px; }
  .auth-split-tagline { font-size: .95rem; margin-top: 14px; }
  .auth-split-features { display: none; }
  .auth-split-form { flex: none; padding: 36px 24px 48px; }
}

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

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(165deg, var(--brand-dark) 0%, var(--brand-2) 65%, var(--brand-dark) 100%);
  color: #dbdde8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh; /* matches the real visible viewport on mobile browsers, where
                     100vh is measured as if the address bar were hidden — this
                     is what left the bottom of the sidebar (and its scroll area)
                     rendered behind the browser's own toolbar. */
  overflow: hidden;
}
/* Soft radial glow in the corner — the signature "Bold Structured" touch,
   pure CSS so every theme's sidebar gets it without extra markup. */
.sidebar::before {
  content: ""; position: absolute; top: -120px; right: -120px; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand-glow) 30%, transparent), transparent 65%);
  pointer-events: none;
}
.sidebar-brand {
  position: relative;
  padding: 20px 18px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* The sidebar-brand icon becomes a small gradient "logomark" chip —
   CSS-only so it needs no HTML change and still themes per data-theme. */
.sidebar-brand i {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; font-size: .85rem;
  background: linear-gradient(135deg, var(--brand-glow), var(--brand));
  color: #06251F;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-glow) 35%, transparent);
}
.sidebar-nav {
  padding: 10px 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* momentum/inertia scrolling on iOS */
  overscroll-behavior: contain; /* a scroll that hits the end of the nav list
                                    doesn't chain into (and drag closed) the page
                                    behind the open mobile sidebar */
  min-height: 0; /* lets this flex item actually shrink to make room for
                     sidebar-brand/sidebar-footer instead of overflowing them */
}
.sidebar-nav { position: relative; }
.sidebar-nav .nav-link {
  position: relative;
  color: #b7c6d9;
  padding: 9px 20px;
  margin: 1px 10px;
  border-radius: 8px;
  font-size: .89rem;
  font-weight: 600;
  transition: background .12s ease, color .12s ease;
}
.sidebar-nav .nav-link i {
  width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; margin-right: 2px; font-size: .92rem; opacity: .85;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active {
  background: rgba(255,255,255,.09);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07);
}
.sidebar-nav .nav-link.active i {
  background: linear-gradient(135deg, var(--brand-glow), var(--brand));
  color: #06251F;
  opacity: 1;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand-glow) 40%, transparent);
}
.sidebar-section {
  padding: 16px 20px 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #6f89a8;
}
.sidebar-footer { padding: 10px 0 16px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer .nav-link { color: #f3d2d2; padding: 10px 20px; font-size: .89rem; }
.sidebar-footer .nav-link:hover { color: #fff; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  /* Item 15 fix: matches Bootstrap's own sticky-top layer (1020) so the profile
     dropdown (item 5) always paints above in-page toolbars — e.g. the dashboard's
     .dash-toolbar/.date-range-panel (z-index 20/30) — which previously could
     cover part of the open dropdown menu on the Dashboard. */
  z-index: 1020;
  flex-wrap: wrap;
}
.topbar-title { font-size: 1.18rem; font-weight: 800; margin: 0; color: var(--ink); flex: 1; min-width: 140px; }
.topbar-user { text-align: right; font-size: .9rem; }
.topbar-user-btn {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: .88rem; line-height: 1.1;
}
.topbar-user-btn:hover, .topbar-user-btn:focus { background: #f8f9fb; }
.topbar-user-btn::after { display: none; } /* hide default bootstrap caret, we render our own chevron */
.topbar-notif-badge { position: absolute; top: -6px; right: -8px; font-size: .62rem; padding: 2px 5px; }
.profile-menu { min-width: 240px; font-size: .9rem; }
.profile-menu .dropdown-header { font-size: .82rem; }
.theme-switch-form { margin: 0; }
.theme-switch-form .dropdown-item {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
}
.theme-switch-form .dropdown-item.active, .theme-switch-form .dropdown-item:active {
  background: var(--brand-light); color: var(--brand-dark);
}
.content {
  padding: 24px; flex: 1;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card::after {
  content: ""; position: absolute; top: -30px; right: -30px; width: 90px; height: 90px;
  border-radius: 50%; background: radial-gradient(circle, var(--stat-accent, var(--brand)) 0%, transparent 70%);
  opacity: .10; pointer-events: none;
}
.stat-card .stat-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-card .stat-value { font-size: 1.65rem; font-weight: 800; color: #111827; position: relative; }
.stat-card .stat-sub { font-size: .78rem; color: #9ca3af; margin-top: 4px; position: relative; }
.stat-card.accent-brand { border-top: 3px solid var(--brand); --stat-accent: var(--brand); }
.stat-card.accent-green { border-top: 3px solid #16a34a; --stat-accent: #16a34a; }
.stat-card.accent-amber { border-top: 3px solid #d97706; --stat-accent: #d97706; }
.stat-card.accent-purple { border-top: 3px solid #7c3aed; --stat-accent: #7c3aed; }
.stat-card.accent-red { border-top: 3px solid #dc2626; --stat-accent: #dc2626; }

.card-panel {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.card-panel h5, .card-panel h6 { font-weight: 700; color: var(--ink); }

.badge-status-Logged { background:#e5e7eb; color:#374151; }
.badge-status-Follow-up { background:#fef3c7; color:#92400e; }
.badge-status-Quoted { background:#e0e7ff; color:#3730a3; }
.badge-status-Confirmed { background:#dcfce7; color:#166534; }
.badge-status-Checked-in { background:#cffafe; color:#155e75; }
.badge-status-Cancelled { background:#fee2e2; color:#991b1b; }
.badge-status-Dropped { background:#f3e8ff; color:#6b21a8; }

/* ---------- Activity timeline (Query Management) ---------- */
.timeline-list { list-style:none; margin:0; padding:0; max-height: 520px; overflow-y:auto; }
.timeline-list li { display:flex; gap:12px; padding:0 0 16px 0; position:relative; }
.timeline-list li:not(:last-child)::before {
  content:''; position:absolute; left:13px; top:26px; bottom:0; width:2px; background:var(--border);
}
.timeline-list li i {
  width:28px; height:28px; flex-shrink:0; border-radius:50%; background:var(--brand-light); color:var(--brand);
  display:flex; align-items:center; justify-content:center; font-size:.85rem; z-index:1;
}
/* A disposition/status change is the highest-signal timeline entry — a light
   accent bar + tint make it (and who made it) impossible to miss when
   scanning a long history. */
.timeline-list li.timeline-item-emphasis {
  background: #fffaf0; border-left: 3px solid #d97706; border-radius: 6px;
  padding: 8px 10px 16px 10px; margin-left: -10px;
}
.nav-tabs-sm .nav-link { padding: 6px 12px; font-size: .82rem; }

/* ---------- Actor chip — "which BDM/Admin did this", used on the Query
   Management timeline and quotation history so the person behind every
   change is always visible, not just implied by a plain name. ---------- */
.actor-chip { display:inline-flex; align-items:center; gap:6px; font-weight:600; color:var(--ink); }
.actor-avatar {
  width:20px; height:20px; border-radius:50%; color:#fff; font-size:.68rem; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; line-height:1;
}
.actor-chip-name { white-space:nowrap; }
.actor-role-badge {
  font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em;
  padding:1px 6px; border-radius:999px; line-height:1.5;
}
.actor-role-badge.actor-role-bdm    { background:#cffafe; color:#0e7490; }
.actor-role-badge.actor-role-admin  { background:#e0e7ff; color:#3730a3; }
.actor-role-badge.actor-role-super  { background:#111827; color:#fff; }
.actor-role-badge.actor-role-patron { background:#f3f4f6; color:#4b5563; }

/* ---------- Quotation builder ---------- */
.quote-total-box {
  background: linear-gradient(135deg, #eef2ff, #f0fdf4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.quote-total-box .grand-total { font-size: 1.55rem; font-weight: 800; color: var(--brand-dark); }

.badge-review-New { background:#dbeafe; color:#1e40af; }
.badge-review-Responded { background:#dcfce7; color:#166534; }
.badge-review-Flagged { background:#fee2e2; color:#991b1b; }

.badge-hold-Hold-Pending { background:#fef3c7; color:#92400e; }
.badge-hold-Hold-Approved { background:#dbeafe; color:#1e40af; }
.badge-hold-Confirmed { background:#dcfce7; color:#166534; }
.badge-hold-Declined { background:#fee2e2; color:#991b1b; }
.badge-hold-Cancelled { background:#e5e7eb; color:#374151; }

.rating-star { color: #f59e0b; }

/* ---------- BDM scrolling ticker (Patron panel) ---------- */
.bdm-ticker {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 0;
}
.bdm-ticker-track {
  display: inline-block;
  padding-left: 100%;
  font-size: .85rem;
  animation: bdm-scroll 22s linear infinite;
}
.bdm-ticker:hover .bdm-ticker-track { animation-play-state: paused; }
.bdm-ticker-shift { opacity: .8; font-weight: 600; }
@keyframes bdm-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- Property tabs (Inventory Allocator) ---------- */
.property-tabs { display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; margin-bottom:16px; -webkit-overflow-scrolling:touch; }
.property-tab {
  flex-shrink:0; padding:9px 18px; border-radius:10px 10px 0 0; background:#e9edf3; color:#4b5563;
  font-size:.85rem; font-weight:700; text-decoration:none; border:1px solid var(--border); border-bottom:none;
  transition: background .12s ease, color .12s ease;
}
.property-tab.active { background:#fff; color:var(--brand-dark); box-shadow: 0 -2px 0 var(--brand) inset; }
.property-tab:hover:not(.active) { background:#f3f5f9; color:#374151; }

.nav-pills-sm .nav-link { padding: 6px 14px; font-size: .84rem; color:#4b5563; font-weight: 600; border-radius: 20px; }
.nav-pills-sm .nav-link.active { background: var(--brand); color: #fff; }

/* ---------- Inventory Allocator grid ---------- */
.allocator-grid { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }
.allocator-grid table { border-collapse: collapse; white-space: nowrap; width:100%; }
.allocator-grid th, .allocator-grid td { border: 1px solid #eef1f5; padding: 6px 4px; font-size: .78rem; text-align:center; }
.allocator-grid th { background:#f8fafc; padding: 6px 8px; }
.allocator-grid th.room-col, .allocator-grid td.room-col { text-align:left; position: sticky; left: 0; background:#fff; z-index:1; font-weight:700; min-width:110px; box-shadow: 1px 0 0 var(--border); }
.allocator-grid th.is-today, .allocator-grid td.is-today { background:#fffbeb; }
.allocator-grid th .dow { display:block; font-size:.65rem; text-transform:uppercase; color:#9ca3af; font-weight:700; }
.allocator-grid th .dnum { display:block; font-size:.95rem; font-weight:800; color:#111827; }
.allocator-grid th .dmon { display:block; font-size:.65rem; color:#9ca3af; }
.allocator-cat-row td { background:#eef2f9 !important; text-align:left; font-weight:700; font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:#4b5563; position:static; }
.allocator-cell-free { background:#f8fafc; cursor:pointer; transition: background .1s ease; }
.allocator-cell-free:hover { background:#e0e7ff; }
.allocator-cell-hold { background:#fef3c7; cursor:pointer; }
.allocator-cell-hold:hover { filter: brightness(.96); }
.allocator-cell-approved { background:#dbeafe; cursor:pointer; }
.allocator-cell-approved:hover { filter: brightness(.96); }
.allocator-cell-confirmed { background:#bbf7d0; cursor:pointer; }
.allocator-cell-confirmed:hover { filter: brightness(.96); }
.legend-dot { display:inline-block; width:12px; height:12px; border-radius:3px; margin-right:4px; vertical-align:middle; }

/* ---------- Recommendation cards ---------- */
.rec-card { border:1px solid var(--border); border-radius:10px; padding:16px; height:100%; box-shadow: var(--shadow-sm); }
.rec-card.rec-paid { border-color:#fbbf24; background:#fffbeb; }

/* ---------- Notification center / toasts ---------- */
.toast { border-radius: 10px; box-shadow: var(--shadow-lg); }
#notifBadge { font-size: .68rem; vertical-align: 2px; }

/* ---------- Tablet / small-desktop ---------- */
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -260px; z-index: 1000; transition: left .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .app-main { width: 100%; }
  .content { padding: 18px; }
  /* Item 15: dimmed backdrop behind the open mobile/tablet sidebar (element is
     appended to <body> by script.js) — hidden and non-interactive until .show. */
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(15,17,26,.45);
    z-index: 999; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  /* Applied to <body> by script.js while the slide-over sidebar is open, so the
     page behind it can't scroll along with a touch that starts on the backdrop. */
  body.sidebar-lock { overflow: hidden; }
}

/* ---------- Phone ---------- */
@media (max-width: 575.98px) {
  .content { padding: 12px; }
  .card-panel { padding: 14px; border-radius: 10px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 1.3rem; }
  .topbar { padding: 10px 14px; }
  .topbar-title { font-size: 1rem; }
  .topbar-user { text-align: left; font-size: .82rem; }
  .auth-card { padding: 28px 20px; border-radius: 12px; }
  .quote-total-box { padding: 12px 14px; }
  .quote-total-box .grand-total { font-size: 1.25rem; }
  .table { font-size: .82rem; }
  .btn { font-size: .84rem; }
  .bdm-ticker-track { font-size: .78rem; }
}
