﻿/* ─── Cabo Adventures — main.css ───────────────────────────────────────────── */

/* Smooth in-page anchor scrolling (reference-link buttons → sections). */
html { scroll-behavior: smooth; }

/* CSS Custom Properties (overridable by theme.js) */
:root {
  --color-primary:     #0369A1;
  --color-accent:      #EA580C;
  --color-navy:        #0F172A;
  --color-teal:        #0891B2;
  --color-gold:        #D97706;
  --font-heading:      'Poppins', sans-serif;
  --font-body:         'Inter', sans-serif;
}

/* ─── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); }
.line-clamp-2 {
  display:            -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:           hidden;
}

/* ─── Navbar ─────────────────────────────────────────────────────────────────── */
#navbar {
  background: var(--site-navbar-bg, transparent);
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: var(--site-navbar-bg, rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* ─── Hero section ───────────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
#hero .hero-content { position: relative; z-index: 2; }

/* ─── Tour filter buttons ─────────────────────────────────────────────────────── */
.filter-btn {
  background: #f1f5f9;
  color: #475569;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.filter-btn:hover {
  background: #e0f2fe;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.filter-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ─── Tour card animations ─────────────────────────────────────────────────────── */
.product-card { transition: transform 0.3s, box-shadow 0.3s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }

/* ─── Admin: Sidebar Layout ─────────────────────────────────────────────────── */
.admin-layout {
  display:     grid;
  grid-template-columns: 260px 1fr;
  min-height:  100vh;
}
/* Desktop */
.admin-sidebar {
  background:  #0F172A;
  color:       #e2e8f0;
  position:    sticky;
  top:         0;
  height:      100vh;
  overflow-y:  auto;
  padding:     1.5rem 0;
}

/* Mobile push layout */
@media (max-width: 768px) {
  .admin-layout {
    display: block;
    overflow-x: hidden;
  }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 50;
    width: 260px;
    transform: translateX(-260px);
    transition: transform 0.3s ease;
    padding-top: 1.5rem;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-layout.sidebar-open > main {
    transform: translateX(260px);
    transition: transform 0.3s ease;
  }
}

/* Mobile topbar */
.mobile-topbar {
  display: none;
}
@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
    background: #0F172A;
    height: 56px;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.08);
    margin: -1.5rem -1.5rem 1.5rem;   /* cancel main's padding at top */
  }
  .mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
  }
  main.p-6  { padding-top: 0 !important; }
  main      { transition: transform 0.3s ease; }
}

/* ─── Sidebar: Tours dropdown ───────────────────────────────────────────────── */
.sidebar-dropdown-btn {
  display:         flex;
  align-items:     center;
  gap:             0.75rem;
  padding:         0.65rem 1.5rem;
  color:           #94a3b8;
  font-size:       0.9rem;
  font-weight:     500;
  width:           100%;
  background:      none;
  border:          none;
  border-left:     3px solid transparent;
  cursor:          pointer;
  text-align:      left;
  transition:      all 0.2s;
}
.sidebar-dropdown-btn:hover {
  background:   rgba(var(--adm-ink-rgb,255,255,255),0.06);
  color:        #fff;
  border-color: var(--color-primary);
}
.sidebar-dropdown-btn.expanded {
  background:   rgba(3, 105, 161, 0.10);
  color:        #7dd3fc;
  border-color: #0891b2;
}

.products-sub-nav { display: none; }
.products-sub-nav.open { display: block; }

.products-sub-nav a {
  display:         flex;
  align-items:     center;
  gap:             0.5rem;
  padding:         0.5rem 1.5rem 0.5rem 2.75rem;
  font-size:       0.82rem;
  font-weight:     500;
  color:           #7dd3fc;
  text-decoration: none;
  background:      rgba(8, 145, 178, 0.06);
  border-left:     3px solid rgba(8, 145, 178, 0.2);
  transition:      all 0.2s;
}
.products-sub-nav a:hover {
  background:   rgba(8, 145, 178, 0.15);
  color:        #e0f2fe;
  border-color: #0891b2;
}
.products-sub-nav a.active {
  background:   rgba(8, 145, 178, 0.22);
  color:        #e0f2fe;
  border-color: #22d3ee;
  font-weight:  600;
}

/* ─── Week picker ────────────────────────────────────────────────────────────── */
.week-picker-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(var(--ds-ink-rgb,15,23,42),0.14);
}
/* Calendar cells adapt to the theme (were hardcoded white) so times/days/table
   stay readable on a light OR dark admin. */
.week-cell {
  background:  var(--ds-surface-1, #fff);
  min-height:  34px;
  display:     flex;
  align-items: center;
  justify-content: center;
  font-size:   0.72rem;
  border:      1px solid rgba(var(--ds-ink-rgb,15,23,42),0.10);
  color:       rgba(var(--ds-ink-rgb,15,23,42),0.85);
  user-select: none;
}
.week-cell.half { min-height: 17px; }
.week-cell.hdr {
  background:  rgba(var(--ds-ink-rgb,15,23,42),0.05);
  font-weight: 700;
  font-size:   0.7rem;
  color:       rgba(var(--ds-ink-rgb,15,23,42),0.72);
  min-height:  28px;
}
.week-cell.time-lbl {
  background:    rgba(var(--ds-ink-rgb,15,23,42),0.04);
  color:         rgba(var(--ds-ink-rgb,15,23,42),0.60);
  font-size:     0.65rem;
  padding:       0 6px;
  justify-content: flex-end;
  cursor:        pointer;
  white-space:   nowrap;
  min-width:     60px;
}
.week-cell[data-day]:not(.hdr) {
  cursor: pointer;
  transition: background 0.1s;
}
.week-cell[data-day]:not(.hdr):hover { background: #bfdbfe; }
.week-cell[data-day].sel             { background: #0369a1 !important; }
.week-cell[data-day].sel-start       { background: #0284c7 !important; border-radius: 4px 4px 0 0; }
.week-cell[data-day].sel-end         { background: #0284c7 !important; border-radius: 0 0 4px 4px; }

/* ─── Toggle button (select/deselect) ───────────────────────────────────────── */
.toggle-chip {
  display:     inline-flex;
  align-items: center;
  gap:         0.35rem;
  padding:     0.35rem 0.85rem;
  border-radius: 9999px;
  border:      2px solid #e2e8f0;
  font-size:   0.8rem;
  font-weight: 500;
  cursor:      pointer;
  transition:  all 0.15s;
  background:  #f8fafc;
  color:       #475569;
}
.toggle-chip:hover {
  border-color: #0369a1;
  color:        #0369a1;
}
.toggle-chip.active,
.toggle-chip.selected {
  background:   #0369a1;
  border-color: #0369a1;
  color:        #fff;
}

/* ─── Product cards (inline) ─────────────────────────────────────────────────── */
.product-card {
  background:   #fff;
  border:       2px solid #e2e8f0;
  border-radius: 1rem;
  overflow:     hidden;
  transition:   border-color 0.2s;
}
.product-card:focus-within { border-color: #0369a1; }
.product-card-header {
  display:       flex;
  align-items:   center;
  gap:           0.75rem;
  padding:       0.85rem 1.25rem;
  background:    #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.product-card-body { padding: 1.25rem; }
.product-card-body.hidden { display: none; }

.product-sub-card {
  background:    #f0f9ff;
  border:        1.5px solid #bae6fd;
  border-radius: 0.75rem;
  overflow:      hidden;
}
.product-sub-card-header {
  display:       flex;
  align-items:   center;
  gap:           0.5rem;
  padding:       0.65rem 1rem;
  background:    #e0f2fe;
  border-bottom: 1px solid #bae6fd;
}
.product-sub-card-body { padding: 1rem; }
.product-sub-card-body.hidden { display: none; }

.sidebar-nav a {
  display:         flex;
  align-items:     center;
  gap:             0.75rem;
  padding:         0.65rem 1.5rem;
  color:           #94a3b8;
  font-size:       0.9rem;
  font-weight:     500;
  text-decoration: none;
  border-left:     3px solid transparent;
  transition:      all 0.2s;
}
.sidebar-nav a:hover {
  background:  rgba(var(--adm-ink-rgb,255,255,255),0.06);
  color:       #fff;
  border-color: var(--color-primary);
}
.sidebar-nav a.active {
  background:   rgba(3, 105, 161, 0.15);
  color:        #38bdf8;
  border-color: #38bdf8;
}
.sidebar-nav a i { width: 18px; text-align: center; }

/* ─── Role badges ────────────────────────────────────────────────────────────── */
.role-badge {
  display:       inline-block;
  padding:       2px 10px;
  border-radius: 9999px;
  font-size:     0.7rem;
  font-weight:   700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role-provider  { background: #7c3aed; color: #fff; }
.role-admin     { background: #0369a1; color: #fff; }
.role-associate { background: #059669; color: #fff; }

/* ─── Admin stat cards ─────────────────────────────────────────────────────── */
.stat-card {
  background:    #fff;
  border-radius: 1rem;
  padding:       1.25rem 1.5rem;
  box-shadow:    0 2px 12px rgba(0,0,0,0.07);
  border-left:   5px solid transparent;
  transition:    box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.13); transform: translateY(-1px); }
.stat-card.blue   { border-color: #0369a1; background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%); }
.stat-card.green  { border-color: #059669; background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 55%); }
.stat-card.orange { border-color: #ea580c; background: linear-gradient(135deg, #fff7ed 0%, #ffffff 55%); }
.stat-card.purple { border-color: #7c3aed; background: linear-gradient(135deg, #faf5ff 0%, #ffffff 55%); }

/* ─── Settings panel ─────────────────────────────────────────────────────────── */
.settings-tab { cursor: pointer; transition: all 0.2s; }
.settings-tab.active {
  background:  rgba(3,105,161,0.12);
  color:       #0369a1;
  font-weight: 600;
}

.bg-type-btn {
  border:      2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding:     0.75rem 1rem;
  cursor:      pointer;
  text-align:  center;
  transition:  all 0.2s;
  font-size:   0.85rem;
  font-weight: 600;
  color:       #64748b;
  background:  #f8fafc;
}
.bg-type-btn:hover { border-color: #0369a1; color: #0369a1; }
.bg-type-btn.selected { border-color: #0369a1; background: #e0f2fe; color: #0369a1; }

/* ─── Settings preview pane ─────────────────────────────────────────────────── */
#settings-preview {
  border-radius: 1rem;
  min-height:   240px;
  overflow:     hidden;
  position:     relative;
  background:   #0F172A;
  transition:   all 0.3s;
}
#settings-preview video {
  position:   absolute;
  inset:      0;
  width:      100%;
  height:     100%;
  object-fit: cover;
}
#preview-label {
  position:  absolute;
  bottom:    1rem;
  left:      1rem;
  color:     rgba(var(--adm-ink-rgb,255,255,255),0.7);
  font-size: 0.75rem;
  background: rgba(0,0,0,0.4);
  padding:   3px 10px;
  border-radius: 9999px;
}

/* ─── Notification dot ─────────────────────────────────────────────────────── */
.notif-dot {
  width:         8px;
  height:        8px;
  border-radius: 50%;
  background:    #ef4444;
  animation:     pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .7; transform: scale(1.4); }
}

/* ─── Booking status pills ─────────────────────────────────────────────────── */
.status-pill {
  display:       inline-flex;
  align-items:   center;
  gap:           0.3rem;
  padding:       3px 12px;
  border-radius: 9999px;
  font-size:     0.75rem;
  font-weight:   600;
  text-transform: capitalize;
}
.status-confirmed  { background: #dcfce7; color: #166534; }
.status-pending    { background: #fef9c3; color: #854d0e; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }
.status-completed  { background: #e0f2fe; color: #075985; }

/* ─── Upload dropzone ────────────────────────────────────────────────────────── */
.dropzone {
  border:        2px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding:       2rem;
  text-align:    center;
  cursor:        pointer;
  transition:    all 0.2s;
  color:         #94a3b8;
}
.dropzone:hover, .dropzone.drag-over {
  border-color:  var(--color-primary);
  background:    #f0f9ff;
  color:         var(--color-primary);
}

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% auto;
  animation:  shimmer 1.5s linear infinite;
  border-radius: 0.5rem;
}

/* ─── Settings: section tab buttons ─────────────────────────────────────────── */
/* Used in admin/settings.html */
.section-tab {
  padding:       0.5rem 1rem;
  border-radius: 0.75rem;
  font-size:     0.875rem;
  font-weight:   600;
  border:        1px solid transparent;
  background:    #f1f5f9;
  color:         #4b5563;
  transition:    all 0.15s;
  cursor:        pointer;
}
.section-tab:hover { background: #e2e8f0; }
.section-tab.active { background: #0369A1; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* bg-type-btn: both .active (used by JS toggle) and .selected (legacy) */
.bg-type-btn.active,
.bg-type-btn.selected { border-color: #0369A1; background: #eff6ff; color: #0369A1; }

/* gradient direction buttons */
.gradient-dir.active { border-color: #0369A1; background: #eff6ff; color: #0369A1; }

/* Preview pane in settings */
#preview-pane {
  min-height:   200px;
  border-radius: 1rem;
  position:     relative;
  overflow:     hidden;
}
#preview-video {
  position: absolute;
  inset:    0;
  width:    100%;
  height:   100%;
  object-fit: cover;
}

/* ─── Tours admin: tab navigation ─────────────────────────────────────────── */
/* Used in admin/tours.html */
.tab-btn {
  border:        1px solid transparent;
  padding:       0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-size:     0.875rem;
  font-weight:   600;
  transition:    all 0.15s;
  cursor:        pointer;
}
.tab-btn.active          { background: #0369A1; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.tab-btn:not(.active)    { background: #fff; color: #4b5563; border-color: #e2e8f0; }
.tab-btn:not(.active):hover { background: #f9fafb; }

/* sub-tour chip (used in tour type cards and modal) */
.sub-product-chip {
  display:     inline-flex;
  align-items: center;
  gap:         4px;
  padding:     2px 10px;
  border-radius: 9999px;
  border:      1px solid #dbeafe;
  background:  #eff6ff;
  color:       #1d4ed8;
  font-size:   11px;
  font-weight: 500;
}

/* product slot (inline product card in company tab) */
.product-slot        { border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; background: #fafafa; }
.product-slot-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* week table in product modal */
.week-table th, .week-table td { border: 1px solid #e5e7eb; }

/* ─── Responsive utilities ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 2rem   !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   Admin Mode
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Body / layout overrides ─────────────────────────────────────────────── */
body.admin {
  background: linear-gradient(135deg, #0f172a 0%, #131e35 35%, #162540 60%, #0f172a 100%) !important;
}
body.admin .admin-layout { display: block; }
body.admin .admin-sidebar { display: none !important; }
body.admin .mobile-topbar { display: none !important; }

/* Hide main until sidebar.js injects the header (prevents layout flash) */
body.admin main.adm-main { opacity: 0; transition: opacity 0.15s ease; }
body.admin.adm-ready main.adm-main { opacity: 1; }

/* main becomes a padded container, no longer a grid cell */
body.admin main.adm-main {
  margin: 0;
  padding: 96px 20px 24px;
  min-height: 100vh;
  background: transparent;
  overflow: auto;
  position: relative;
  z-index: 1;
}

/* Pillar #4 — the admin uses the SAME theme system as public. Its page background
   is the per-page background (#site-background, set in Site Settings) and falls back
   to the primary colour; its glass/text re-skin is driven by the UNIFIED page ink
   (--ds-ink-rgb, the same variable public pages use), so no special-case any more —
   --adm-ink-rgb is just an alias of it here. Light bg → dark text, dark bg → light. */
body.admin { background: var(--cabo-primary, #0F172A); --adm-ink-rgb: var(--ds-ink-rgb, 255,255,255); }
/* Admin header + sidebar text follow the ink colour too (the markup hard-codes
   white text, which would vanish on a light navbar). */
#adm-hdr [class*="text-white"],
.admin-sidebar [class*="text-white"] { color: rgba(var(--adm-ink-rgb,255,255,255),0.92) !important; }
#adm-hdr .text-white\/90,
#adm-hdr .text-white\/70 { color: rgba(var(--adm-ink-rgb,255,255,255),0.85) !important; }

/* ── Immersive content card — dark glass matching login card ─────────────── */
.adm-card {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.12);
  box-shadow: 0 8px 60px rgba(0,0,0,0.45), 0 32px 100px rgba(0,0,0,0.22);
  min-height: calc(100vh - 120px);
  overflow: visible;
  padding: 24px;
  position: relative;
  z-index: 1;
  animation: cardEnter 0.45s ease-out forwards;
}
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Comprehensive dark-glass component system
   Everything inside .adm-card gets the navy dark treatment.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Text colours → white spectrum ──────────────────────────────────────── */
.adm-card .text-cabo-navy,
.adm-card .text-slate-900,
.adm-card .text-slate-800,
.adm-card .text-slate-700,
.adm-card .text-gray-900,
.adm-card .text-gray-800,
.adm-card .text-gray-700 { color: rgba(var(--adm-ink-rgb,255,255,255),0.93) !important; }
.adm-card .text-slate-600,
.adm-card .text-gray-600 { color: rgba(var(--adm-ink-rgb,255,255,255),0.70) !important; }
.adm-card .text-slate-500,
.adm-card .text-gray-500 { color: rgba(var(--adm-ink-rgb,255,255,255),0.52) !important; }
.adm-card .text-slate-400,
.adm-card .text-gray-400 { color: rgba(var(--adm-ink-rgb,255,255,255),0.38) !important; }
.adm-card .text-slate-300,
.adm-card .text-gray-300 { color: rgba(var(--adm-ink-rgb,255,255,255),0.28) !important; }

/* ── White / light sub-cards → dark glass panels ─────────────────────────── */
.adm-card .bg-white,
.adm-card .bg-slate-50,
.adm-card .bg-gray-50 {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.07) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.10) !important;
}
.adm-card .bg-slate-100,
.adm-card .bg-gray-100 {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.05) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.08) !important;
}
.adm-card .bg-slate-200,
.adm-card .bg-gray-200 {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.09) !important;
}

/* Stat cards */
.adm-card .stat-card {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.07) !important;
}
.adm-card .stat-card.blue   { border-color: rgba(99,179,237,0.35)  !important; }
.adm-card .stat-card.green  { border-color: rgba(72,187,120,0.35)  !important; }
.adm-card .stat-card.orange { border-color: rgba(251,146,60,0.35)  !important; }
.adm-card .stat-card.purple { border-color: rgba(167,139,250,0.35) !important; }

/* ── Shadows ─────────────────────────────────────────────────────────────── */
.adm-card .shadow,
.adm-card .shadow-sm,
.adm-card .shadow-md,
.adm-card .shadow-lg {
  box-shadow: 0 4px 20px rgba(0,0,0,0.35) !important;
}

/* ── Borders & dividers ──────────────────────────────────────────────────── */
.adm-card .border,
.adm-card .border-b,
.adm-card .border-t,
.adm-card .border-l,
.adm-card .border-r,
.adm-card .border-gray-200,
.adm-card .border-slate-200,
.adm-card .border-gray-100,
.adm-card .border-slate-100 { border-color: rgba(var(--adm-ink-rgb,255,255,255),0.10) !important; }
.adm-card .divide-y > *,
.adm-card .divide-gray-100 > *,
.adm-card .divide-gray-200 > * { border-color: rgba(var(--adm-ink-rgb,255,255,255),0.08) !important; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.adm-card table  { background: transparent !important; }
.adm-card thead,
.adm-card thead tr { background: rgba(var(--adm-ink-rgb,255,255,255),0.06) !important; }
.adm-card th {
  color: rgba(var(--adm-ink-rgb,255,255,255),0.50) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.08) !important;
  background: transparent !important;
}
.adm-card td { border-color: rgba(var(--adm-ink-rgb,255,255,255),0.06) !important; }
.adm-card tbody tr:hover td,
.adm-card tbody tr:hover { background: rgba(var(--adm-ink-rgb,255,255,255),0.04) !important; }

/* ── Form inputs ─────────────────────────────────────────────────────────── */
.adm-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.adm-card select,
.adm-card textarea {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.08) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.15) !important;
  color: rgba(var(--adm-ink-rgb,255,255,255),0.90) !important;
}
.adm-card input::placeholder,
.adm-card textarea::placeholder { color: rgba(var(--adm-ink-rgb,255,255,255),0.28) !important; }
.adm-card select option { background: #1e293b !important; color: #fff !important; }
.adm-card input:focus,
.adm-card select:focus,
.adm-card textarea:focus {
  border-color: rgba(251,146,60,0.55) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(251,146,60,0.15) !important;
}
.adm-card label { color: rgba(var(--adm-ink-rgb,255,255,255),0.80) !important; }

/* ── Badges — coloured glass variants ────────────────────────────────────── */
.adm-card .bg-yellow-100  { background: rgba(251,191,36,0.18) !important; }
.adm-card .bg-green-100,
.adm-card .bg-emerald-100 { background: rgba(34,197,94,0.16) !important; }
.adm-card .bg-red-100     { background: rgba(239,68,68,0.18) !important; }
.adm-card .bg-blue-100    { background: rgba(59,130,246,0.16) !important; }
.adm-card .bg-purple-100,
.adm-card .bg-violet-100  { background: rgba(168,85,247,0.16) !important; }
.adm-card .bg-orange-100  { background: rgba(234,88,12,0.18) !important; }
.adm-card .bg-teal-100    { background: rgba(20,184,166,0.16) !important; }
.adm-card .bg-pink-100    { background: rgba(236,72,153,0.16) !important; }
.adm-card .bg-indigo-100  { background: rgba(99,102,241,0.16) !important; }

/* Badge text */
.adm-card .text-yellow-700, .adm-card .text-yellow-800 { color: #fcd34d !important; }
.adm-card .text-green-700,  .adm-card .text-green-800,
.adm-card .text-emerald-700 { color: #4ade80 !important; }
.adm-card .text-red-700,    .adm-card .text-red-800    { color: #f87171 !important; }
.adm-card .text-blue-700,   .adm-card .text-blue-800   { color: #93c5fd !important; }
.adm-card .text-purple-700, .adm-card .text-violet-700 { color: #c4b5fd !important; }
.adm-card .text-orange-700  { color: #fb923c !important; }
.adm-card .text-teal-700    { color: #2dd4bf !important; }
.adm-card .text-pink-700    { color: #f472b6 !important; }
.adm-card .text-indigo-700  { color: #a5b4fc !important; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.adm-card .tab-btn {
  color: rgba(var(--adm-ink-rgb,255,255,255),0.55) !important;
  background: rgba(var(--adm-ink-rgb,255,255,255),0.05) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.10) !important;
}
.adm-card .tab-btn.active {
  color: #fb923c !important;
  background: rgba(234,88,12,0.15) !important;
  border-color: rgba(234,88,12,0.35) !important;
}
.adm-card .tab-btn:not(.active):hover {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.09) !important;
  color: rgba(var(--adm-ink-rgb,255,255,255),0.85) !important;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
/* Neutral / ghost buttons → dark glass */
.adm-card .btn-ghost,
.adm-card button.bg-white,
.adm-card a.bg-white {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.08) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.15) !important;
  color: rgba(var(--adm-ink-rgb,255,255,255),0.85) !important;
}
.adm-card button.bg-white:hover,
.adm-card a.bg-white:hover {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.14) !important;
}
/* Quick action hover states */
.adm-card a.hover\:bg-blue-50:hover  { background: rgba(59,130,246,0.15) !important; }
.adm-card a.hover\:bg-orange-50:hover { background: rgba(234,88,12,0.15) !important; }
.adm-card a.hover\:bg-purple-50:hover { background: rgba(168,85,247,0.15) !important; }
.adm-card a.hover\:bg-teal-50:hover   { background: rgba(20,184,166,0.15) !important; }

/* ── Panels / collapsibles ───────────────────────────────────────────────── */
.adm-card .panel-header,
.adm-card [class*="panel-header"] {
  background: rgba(var(--adm-ink-rgb,255,255,255),0.06) !important;
  border-color: rgba(var(--adm-ink-rgb,255,255,255),0.10) !important;
}

/* ── Role badge ─────────────────────────────────────── */
.role-badge { background: rgba(251,146,60,0.18); color: #fb923c; border: 1px solid rgba(251,146,60,0.30); border-radius: 6px; padding: 2px 8px; font-size: 0.68rem; font-weight: 700; }

/* ── Notification / log rows ─────────────────────────────────────────────── */
.adm-card .bg-red-50  { background: rgba(239,68,68,0.10) !important; }
.adm-card .bg-blue-50 { background: rgba(59,130,246,0.10) !important; }
.adm-card .bg-green-50 { background: rgba(34,197,94,0.10) !important; }
.adm-card .bg-yellow-50 { background: rgba(251,191,36,0.10) !important; }
.adm-card .bg-orange-50 { background: rgba(234,88,12,0.10) !important; }
.adm-card .bg-purple-50 { background: rgba(168,85,247,0.10) !important; }

/* ── Scrollbar inside card ───────────────────────────────────────────────── */
.adm-card ::-webkit-scrollbar { width: 6px; height: 6px; }
.adm-card ::-webkit-scrollbar-track { background: rgba(var(--adm-ink-rgb,255,255,255),0.04); border-radius: 4px; }
.adm-card ::-webkit-scrollbar-thumb { background: rgba(var(--adm-ink-rgb,255,255,255),0.18); border-radius: 4px; }
.adm-card ::-webkit-scrollbar-thumb:hover { background: rgba(var(--adm-ink-rgb,255,255,255),0.30); }

/* ── Dropdown menus ──────────────────────────────── */
.adm-dd { position: relative; }

.adm-dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px); left: 0;
  min-width: 210px;
  background: #1e293b;
  border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.10);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.60);
  z-index: 500;
  animation: menuIn 0.14s ease-out;
}
.adm-dd-menu.menu-right { left: auto; right: 0; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.adm-dd.open .adm-dd-menu { display: block; }

/* Mega-menu — Management dropdown as columns per section (desktop), stacked (mobile) */
.adm-dd.open .adm-dd-menu.adm-mega { display: flex; }
.adm-dd-menu.adm-mega {
  flex-wrap: wrap; gap: 2px 10px; padding: 12px;
  min-width: 0; width: max-content; max-width: min(92vw, 860px);
}
.adm-mega-col { display: flex; flex-direction: column; min-width: 172px; flex: 0 0 auto; }
.adm-mega-col .adm-menu-label { padding-top: 2px; }
@media (max-width: 640px) {
  .adm-dd-menu.adm-mega { flex-direction: column; flex-wrap: nowrap; max-width: 88vw; max-height: 78vh; overflow-y: auto; }
  .adm-mega-col { min-width: 0; }
}

/* Menu items */
.adm-dd-menu a,
.adm-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 0.80rem; color: rgba(var(--adm-ink-rgb,255,255,255),0.75);
  text-decoration: none; cursor: pointer;
  transition: background 0.12s, color 0.12s;
  width: 100%; text-align: left; background: none; border: none;
  font-family: 'Inter', sans-serif; white-space: nowrap;
}
.adm-dd-menu a:hover,
.adm-menu-item:hover { background: rgba(var(--adm-ink-rgb,255,255,255),0.08); color: #fff; }
.adm-dd-menu a.active { color: #fb923c; background: rgba(251,146,60,0.14); }

.adm-menu-label {
  padding: 8px 12px 3px;
  font-size: 0.63rem; font-weight: 700;
  color: rgba(var(--adm-ink-rgb,255,255,255),0.28); letter-spacing: 0.10em; text-transform: uppercase;
}
.adm-menu-sep { height: 1px; background: rgba(var(--adm-ink-rgb,255,255,255),0.08); margin: 4px 0; }

/* Avatar menu header */
.adm-menu-hdr {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.08); margin-bottom: 4px;
}
.adm-menu-hdr .hdr-role { font-size: 0.63rem; color: rgba(var(--adm-ink-rgb,255,255,255),0.35); margin-bottom: 3px; }
.adm-menu-hdr .hdr-name { font-size: 0.85rem; font-weight: 700; color: #fff; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body.admin main.adm-main { padding: 88px 12px 16px; }
  .adm-card { border-radius: 16px; min-height: calc(100vh - 104px); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Quick-Create Modal  (admin-panel.js)
══════════════════════════════════════════════════════════════════════════ */
#adm-qc-overlay, .adm-qc-overlay {
  /* Base modal overlay = 2000. A STACKED variant (opened from inside the Product
     Studio at 100055 — taxonomy/card-badge management, E) carries the .adm-qc-overlay
     class and overrides its z-index inline to 100057, so it layers above the Studio
     while the icon picker (100058) + palette (100071) still sit above it. */
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,16,28,0.72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: admQcFadeIn 0.16s ease-out;
}
@keyframes admQcFadeIn { from { opacity:0; } to { opacity:1; } }

#adm-qc-box {
  width: 100%; max-width: 600px;
  max-height: calc(100vh - 40px);
  background: var(--ds-surface-1, #192236);
  border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.12);
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.70);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: admQcSlideIn 0.20s ease-out;
}
@keyframes admQcSlideIn {
  from { opacity:0; transform:scale(0.94) translateY(12px); }
  to   { opacity:1; transform:none; }
}

/* Fixed header — title + save button stays visible always */
#adm-qc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.09);
  flex-shrink: 0;
  gap: 12px;
}
.adm-qc-title-row {
  display: flex; align-items: center; gap: 11px; min-width: 0;
}
.adm-qc-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; flex-shrink: 0;
}
#adm-qc-title {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.97rem; color: rgba(var(--adm-ink-rgb,255,255,255),0.95); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-qc-header-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
#adm-qc-submit {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 15px; border: none; border-radius: 10px;
  color: #fff; font-size: 0.80rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s; white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
#adm-qc-submit:disabled { opacity: 0.55; cursor: default; }
#adm-qc-close {
  width: 30px; height: 30px; background: rgba(var(--adm-ink-rgb,255,255,255),0.07);
  border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.12); border-radius: 8px;
  color: rgba(var(--adm-ink-rgb,255,255,255),0.50); font-size: 1.05rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.14s, color 0.14s;
}
#adm-qc-close:hover { background: rgba(var(--adm-ink-rgb,255,255,255),0.14); color: rgba(var(--adm-ink-rgb,255,255,255),0.9); }

/* Scrollable body */
#adm-qc-body {
  flex: 1; overflow-y: auto; padding: 18px;
  scrollbar-width: thin; scrollbar-color: rgba(var(--adm-ink-rgb,255,255,255),0.18) transparent;
}
#adm-qc-fields { display: flex; flex-direction: column; gap: 14px; }
#adm-qc-msg { margin-top: 14px; font-size: 0.80rem; text-align: center; min-height: 20px; }

.adm-qc-label {
  display: block; margin-bottom: 6px;
  font-size: 0.77rem; font-weight: 600; color: rgba(var(--adm-ink-rgb,255,255,255),0.72);
}
.adm-qc-input {
  width: 100%; padding: 10px 12px; box-sizing: border-box;
  background: rgba(var(--adm-ink-rgb,255,255,255),0.08); border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.14);
  border-radius: 10px; color: rgba(var(--adm-ink-rgb,255,255,255),0.90); font-size: 0.85rem;
  outline: none; font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
}
.adm-qc-input:focus { border-color: rgba(249,115,22,0.55); }
.adm-qc-input option { background: var(--ds-surface-1, #1e293b); color: rgba(var(--adm-ink-rgb,255,255,255),0.92); }
.adm-qc-input::placeholder { color: rgba(var(--adm-ink-rgb,255,255,255),0.40); }
/* Any admin input/textarea placeholder follows the ink too (was white → invisible). */
body.admin input::placeholder, body.admin textarea::placeholder { color: rgba(var(--ds-ink-rgb,255,255,255),0.40); }
/* The product/company modal forms use inline-styled <select>/inputs (not .adm-qc-*),
   so theme ALL selects/options/placeholders inside the modal by the unified ink. */
#adm-qc-overlay select option, .adm-qc-overlay select option { background: var(--ds-surface-1, #1e293b) !important; color: rgba(var(--ds-ink-rgb,255,255,255),0.92) !important; }
#adm-qc-overlay ::placeholder, .adm-qc-overlay ::placeholder { color: rgba(var(--ds-ink-rgb,255,255,255),0.45) !important; }

/* ══════════════════════════════════════════════════════════════════════════
   Existing page modals — scroll fix (title+save fixed, body scrolls)
   Apply to any .modal-overlay that wraps an inner panel/box.
══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  overflow-y: auto !important;
  display: flex !important;
  align-items: flex-start !important;
  padding: 20px !important;
}
.modal-overlay > div {
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   Unsaved-work warning overlay
══════════════════════════════════════════════════════════════════════════ */
#adm-unsaved-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(10,16,28,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: admQcFadeIn 0.15s ease-out;
}
#adm-unsaved-box {
  width: 100%; max-width: 380px;
  background: #192236;
  border: 1px solid rgba(var(--adm-ink-rgb,255,255,255),0.12);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
  padding: 28px 24px 22px;
  animation: admQcSlideIn 0.18s ease-out;
}

/* Google Maps autocomplete above dark-glass modal overlay */
.pac-container { z-index: 2100 !important; }
