/* Admin panel layout additions — extends public/assets/css/style.css tokens. */

:root {
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body.admin-body { background: var(--background); color: var(--on-background); font-family: var(--font-body); margin: 0; }

/* Accessibility: visible keyboard focus indicator for all interactive elements in admin/portal layouts. */
.admin-body a:focus-visible,
.admin-body button:focus-visible,
.admin-body input:focus-visible,
.admin-body select:focus-visible,
.admin-body textarea:focus-visible,
.admin-body [tabindex]:focus-visible {
  outline: 3px solid var(--on-tertiary-container, #2480ff);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *, .admin-body *::before, .admin-body *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.mono, .num, .kpi-num, .stat-value, .stat-delta, td.num, td.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  color: var(--primary, #0d1c32);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 40;
  padding: 24px 0;
  border-right: 1px solid var(--outline-variant, #e2e4ea);
  /* Raised-panel depth: a soft ambient shadow plus a hairline highlight along
     the right edge, so the whole sidebar reads as a slab sitting in front of
     the content rather than a flat-painted strip. */
  box-shadow:
    8px 0 24px -10px rgba(10,25,47,.16),
    inset -1px 0 0 rgba(255,255,255,.6);
}
.admin-sidebar-pattern { display: none; } /* decorative dot pattern was tuned for a dark panel; not used on white */
.admin-sidebar .brand, .admin-sidebar .admin-nav { position: relative; z-index: 1; }
.admin-sidebar .brand { padding: 0 20px 20px; border-bottom: 1px solid var(--outline-variant, #e2e4ea); margin-bottom: 12px; }
.admin-sidebar .brand strong { font-family: var(--font-display); font-size: 18px; color: var(--primary, #0d1c32); display:block; }
.admin-sidebar .brand span { font-size: 12px; opacity: .65; color: var(--on-surface-variant, #5a6072); }

/* 3D nav: perspective on the list so each item's hover-tilt has real depth
   to rotate into, plus per-item layered shadows that simulate a raised chip
   floating above the white sidebar surface (ambient shadow + tight contact
   shadow + top highlight), and a pressed-in inset look for the active item. */
.admin-nav {
  display: flex; flex-direction: column; gap: 5px; padding: 0 12px;
  perspective: 900px;
}
.admin-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: 10px;
  color: rgba(255,255,255,.82); text-decoration: none; font-size: 13.5px; font-weight: 500;
  position: relative;
  border-left: 3px solid transparent;
  /* Dark navy chip floating on the white sidebar panel. */
  background: linear-gradient(180deg, #16294a 0%, #0d1c32 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.08) inset,
    0 6px 14px -8px rgba(13,28,50,.45),
    0 1px 2px rgba(13,28,50,.15);
  transform-style: preserve-3d;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
              transform .2s cubic-bezier(.2,.8,.3,1.3), box-shadow .2s ease;
}
.admin-nav a:hover {
  background: linear-gradient(180deg, #1d3258 0%, #112240 100%);
  color: #fff;
  /* Lift + slight rotation toward the viewer, like a raised key catching light. */
  transform: translateX(3px) translateY(-2px) rotateX(6deg) rotateY(-3deg) scale(1.015);
  box-shadow:
    0 1px 0 rgba(255,255,255,.14) inset,
    0 12px 22px -8px rgba(13,28,50,.55),
    0 3px 6px rgba(13,28,50,.3);
}
.admin-nav a:active { transform: translateX(1px) translateY(0) rotateX(0) rotateY(0) scale(.99); }
.admin-nav a.active {
  background: linear-gradient(180deg, #2a4064 0%, #16294a 100%);
  color: var(--secondary-fixed-dim, #fed488);
  font-weight: 700;
  border-left-color: #e0ac4b;
  /* Pressed-into-the-panel look: inner shadow on top/left, a thin bright
     rim on the bottom edge, and a soft gold glow — reads as "docked". */
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.35),
    inset 0 -1px 0 rgba(254,212,136,.3),
    0 8px 16px -6px rgba(13,28,50,.5),
    0 0 14px -4px rgba(224,172,75,.4);
  transform: translateZ(4px);
}
.admin-nav a.active:hover { transform: translateX(2px) translateY(-1px) rotateX(4deg) rotateY(-2deg) translateZ(4px); }
.admin-nav .nav-icon {
  width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}
.admin-nav .nav-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.admin-nav .nav-logout { margin-top: 14px; border-top: 1px solid var(--outline-variant, #e2e4ea); padding-top: 14px; }
@media (prefers-reduced-motion: reduce) {
  .admin-nav a, .admin-nav a:hover, .admin-nav a.active:hover { transform: none !important; }
}

.admin-main { flex: 1; margin-left: 260px; min-width: 0; }
.admin-topbar {
  height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; background: var(--glass-surface); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline-variant); position: sticky; top: 0; z-index: 30;
}
.admin-topbar h1 { font-family: var(--font-display); font-size: 19px; margin: 0; color: var(--primary); }
.admin-topbar .who { font-size: 13px; color: var(--on-surface-variant); display:flex; align-items:center; gap:12px; }
.admin-content { padding: 28px; max-width: 1400px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-grid--3col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2,1fr); } .admin-sidebar { display:none; } .admin-main { margin-left:0; } }

/* Arena tabs (superadmin/stall-bookings.php) */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--outline-variant); }
.admin-tab {
  padding: 10px 18px; font-size: 13.5px; font-weight: 600; color: var(--on-surface-variant);
  border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none;
}
.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.stat-card {
  background: var(--surface-container-lowest, #fff);
  border: 1px solid var(--outline-variant); border-radius: var(--radius, 12px);
  padding: 18px 20px; position: relative; overflow: hidden;
  opacity: 0; animation: kpi-fade-up .6s cubic-bezier(0.16,1,0.3,1) both;
}
.stat-grid .stat-card:nth-child(1) { animation-delay: .02s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: .08s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: .14s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: .20s; }
@keyframes kpi-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .stat-card { animation: none; opacity: 1; transform: none; } }

.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-card .stat-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--primary-fixed); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.stat-card .stat-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.stat-card .stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--on-surface-variant); font-weight: 600; }
.stat-card .stat-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 700; color: var(--primary); margin-top: 8px; line-height: 1.1; }
.stat-card .stat-delta { font-family: var(--font-mono); font-size: 11.5px; margin-top: 8px; color: #1c8a3f; display: inline-flex; align-items: center; gap: 4px; }
.stat-card .stat-delta.down { color: var(--error); }
.stat-card .stat-delta.neutral { color: var(--on-surface-variant); }
.stat-card .kpi-sparkline { margin-top: 10px; opacity: .85; }

.admin-panel {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius, 12px);
  padding: 22px;
  margin-bottom: 22px;
}
.admin-panel h2 { font-family: var(--font-display); font-size: 17px; margin: 0 0 16px; color: var(--primary); }

.admin-table-wrap {
  border: 1px solid var(--outline-variant);
  /* Top corners only: the previous "white sliver" bug here was actually a
     stray UTF-8 BOM leaking from lang/en.php|hi.php into the response
     (fixed at the source), not a real corner-radius mismatch — overflow:auto
     correctly clips the table's square corners to this radius as long as
     there's no phantom whitespace/text node breaking the sticky header's
     flush alignment with the wrapper's top edge. Bottom stays square since
     content can scroll past it (rounding the bottom would clip mid-row). */
  border-top-left-radius: var(--radius-lg, 14px);
  border-top-right-radius: var(--radius-lg, 14px);
  overflow: auto; max-height: 72vh;
  box-shadow: var(--shadow-soft, 0 2px 12px rgba(10,25,47,.06));
}
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; background: var(--surface-container-lowest, #fff); }
.admin-table th, .admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--outline-variant); text-align: left; vertical-align: middle; }

/* Dark, elegant header — Mission Control navy with gold-tinted uppercase labels */
.admin-table th {
  color: rgba(255,255,255,0.92);
  font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  background: linear-gradient(180deg, var(--primary, #0d1c32), #0a1526);
  border-bottom: 2px solid var(--secondary-fixed-dim, #e9c176);
  position: sticky; top: 0; z-index: 5;
  white-space: nowrap;
}
.admin-table th a,
.admin-table th .sort-link { color: rgba(255,255,255,0.92) !important; }
.admin-table th .sort-icon { color: rgba(255,255,255,0.55) !important; }
.admin-table th .sort-link.sort-active .sort-icon { color: var(--secondary-fixed-dim, #e9c176) !important; opacity: 1; }
.admin-table th .sort-link:hover { color: var(--secondary-fixed-dim, #e9c176) !important; }

/* Clean zebra striping: white / light gray */
.admin-table tbody tr:nth-child(odd) td { background: #ffffff; }
.admin-table tbody tr:nth-child(even) td { background: var(--surface-container-low, #f3f4f6); }
.admin-table tbody tr { transition: background-color .15s ease; }
.admin-table tr:hover td { background: var(--primary-fixed, #eef2fb) !important; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table td.num, .admin-table th.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }

/* ---- Row actions cell: root-caused fix for "action buttons not visible" ----
   Root cause (verified empirically, see ROADMAP-ADMIN-DRAWER-NOTES.md): no
   page actually wrapped its <table class="admin-table"> in the already-defined
   .admin-table-wrap scroll container, and the global body has overflow-x:hidden
   (assets/css/style.css) — so on any table wider than the viewport, the
   right-most column (actions) was silently clipped with no way to reach it,
   not merely squished. Also harden bare <form> children of the actions cell
   so they never fall back to block-level stacking. */
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-row-actions form { display: inline-flex; margin: 0; }
.admin-row-actions .btn .action-icon,
.admin-row-actions button .action-icon,
.admin-row-actions a .action-icon { flex-shrink: 0; vertical-align: -2px; margin-right: 4px; }
.admin-row-actions .btn, .admin-row-actions button, .admin-row-actions a.btn { display: inline-flex; align-items: center; }
/* Icon-only action buttons: square-ish, no visible text label (aria-label +
   title carry the accessible name / tooltip instead). */
.btn-icon-only {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: linear-gradient(160deg, var(--primary, #0d1c32), #0a1526);
  color: #fff;
  box-shadow: 0 2px 6px rgba(10,25,47,.25);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-icon-only .action-icon { margin-right: 0; width: 15px; height: 15px; color: #fff; stroke: #fff; }
.btn-icon-only:hover, .btn-icon-only:focus-visible {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 5px 14px rgba(10,25,47,.35);
  background: linear-gradient(160deg, #14294a, var(--primary, #0d1c32));
  color: #fff;
}
.btn-icon-only.btn-icon-danger {
  background: linear-gradient(160deg, #b3261e, #7f1a14);
  box-shadow: 0 2px 6px rgba(179,38,30,.3);
}
.btn-icon-only.btn-icon-danger:hover, .btn-icon-only.btn-icon-danger:focus-visible {
  background: linear-gradient(160deg, #d4342a, #b3261e);
  box-shadow: 0 5px 14px rgba(179,38,30,.4);
}
.btn-icon-only.btn-icon-success {
  background: linear-gradient(160deg, #2e7d32, #1b5e20);
  box-shadow: 0 2px 6px rgba(46,125,50,.3);
}
.btn-icon-only.btn-icon-success:hover, .btn-icon-only.btn-icon-success:focus-visible {
  background: linear-gradient(160deg, #388e3c, #2e7d32);
  box-shadow: 0 5px 14px rgba(46,125,50,.4);
}
.btn-icon-only.btn-icon-gold {
  background: linear-gradient(160deg, #b8860b, #8a640a);
  box-shadow: 0 2px 6px rgba(184,134,11,.3);
}
.btn-icon-only.btn-icon-gold:hover, .btn-icon-only.btn-icon-gold:focus-visible {
  background: linear-gradient(160deg, #d4a017, #b8860b);
  box-shadow: 0 5px 14px rgba(184,134,11,.4);
}
.admin-row-actions { row-gap: 8px; }

/* AJAX live-search: dim the results while a fetch is in flight, no layout jump. */
#list-results { position: relative; transition: opacity .12s ease; }
#list-results.is-loading { opacity: .55; pointer-events: none; }
.js-live-search-form { position: relative; }
.admin-table-wrap .admin-table td.admin-row-actions,
.admin-table-wrap .admin-table th:last-child {
  position: sticky; right: 0;
  box-shadow: -6px 0 8px -6px rgba(10,25,47,.12);
}
@media (max-width: 900px) {
  .admin-table-wrap .admin-table td.admin-row-actions,
  .admin-table-wrap .admin-table th:last-child { position: static; box-shadow: none; }
}
.sort-link { color: #1a1a1a; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sort-link:hover { color: var(--primary); }
.sort-link .sort-icon { width: 10px; height: 10px; opacity: .6; }
.sort-link.sort-active .sort-icon { opacity: 1; color: var(--secondary); }

.admin-empty-state { text-align: center; padding: 56px 20px; color: var(--on-surface-variant); }
.admin-empty-state svg { width: 46px; height: 46px; stroke: var(--outline-variant); margin-bottom: 14px; }
.admin-empty-state p { margin: 0; font-size: 14px; }

.pill { display:inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
/* Sponsor-covered stall label (just the company name) — kept to one line with
   an ellipsis rather than wrapping, so it can't stretch the Amount column (and
   the whole table) taller/wider; the full name is still on the tooltip. */
.pill-ellipsis { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Compact table variant — tighter padding/font so more rows and columns fit
   on screen without scrolling, for tables with many columns (e.g. stall
   bookings). Opt-in via class="admin-table compact" rather than changing
   .admin-table globally, since other list pages are tuned for the roomier
   default. */
.admin-table.compact th, .admin-table.compact td { padding: 8px 10px; font-size: 12.5px; }
.admin-table.compact .pill { padding: 2px 8px; font-size: 10.5px; }
.admin-table.compact .btn-sm { padding: 4px 9px; font-size: 12px; }

/* Per-row "..." actions menu — collapses a long row of buttons (view/edit/
   files/copy link/regenerate/whatsapp/cancel/delete) into a single compact
   toggle, so the actions column stays one line no matter how many actions a
   given row has. */
.row-menu { position: relative; display: inline-block; }
.row-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 8px;
  border: 1px solid var(--outline-variant); background: var(--surface-container-lowest, #fff);
  color: var(--on-surface-variant); cursor: pointer;
}
.row-menu-toggle:hover, .row-menu-toggle:focus-visible { background: var(--surface-container-low); color: var(--primary); }
.row-menu-list {
  /* position: fixed (not absolute) and placed via JS (admin-row-menu.js)
     rather than plain CSS — the row lives inside .admin-table-wrap, which
     scrolls with overflow:auto, and that clips any absolutely-positioned
     child that pokes outside it. Fixed positioning escapes that clipping
     since it's relative to the viewport, not the scrolling ancestor. */
  display: none; position: fixed; z-index: 1000;
  min-width: 190px; background: var(--surface-container-lowest, #fff);
  border: 1px solid var(--outline-variant); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 6px; text-align: left;
}
.row-menu-list.open { display: block; }
.row-menu-list form { margin: 0; }
.row-menu-list .row-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box;
  padding: 8px 10px; border-radius: 6px; border: none; background: none;
  font-size: 13px; font-family: inherit; color: var(--on-surface, #222);
  text-decoration: none; text-align: left; cursor: pointer; white-space: nowrap;
}
.row-menu-list .row-menu-item svg { width: 15px; height: 15px; stroke: var(--on-surface-variant); flex-shrink: 0; }
.row-menu-list .row-menu-item:hover { background: var(--surface-container-low); }
.row-menu-list .row-menu-item.danger { color: var(--error, #b3261e); }
.row-menu-list .row-menu-item.danger svg { stroke: var(--error, #b3261e); }
.row-menu-list .row-menu-divider { height: 1px; margin: 6px 4px; background: var(--outline-variant); }
.pill-green { background: #dff5e1; color: #1c5b2c; }
.pill-amber { background: var(--secondary-container); color: var(--on-secondary-container); }
.pill-red { background: var(--error-container); color: var(--on-error-container); }
.pill-blue { background: var(--tertiary-fixed); color: var(--primary); }
.pill-gray { background: var(--surface-container-high); color: var(--on-surface-variant); }

/* ---- List page toolbar / sort / export (admin list pages, phase 2a) ---- */
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.search-input { padding: 8px 10px; border: 1px solid var(--outline-variant); border-radius: 8px; font-size: 13px; min-width: 260px; }
.sort-link:hover { text-decoration: underline; }
.export-dropdown { position: relative; display: inline-block; }
.export-dropdown-menu {
  display: none; opacity: 0; transform: translateY(-4px);
  position: absolute; right: 0; top: 100%; margin-top: 6px;
  background: var(--surface, #fff); border: 1px solid var(--outline-variant); border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 10px 40px rgba(10,25,47,.18));
  min-width: 190px; z-index: 50; overflow: hidden;
  transition: opacity .15s ease, transform .15s ease;
}
.export-dropdown-menu.open { display: block; animation: export-open .15s ease both; }
@keyframes export-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .export-dropdown-menu.open { animation: none; } }
.export-dropdown-menu a { display: flex; align-items: center; gap: 9px; padding: 10px 14px; font-size: 13px; color: var(--on-surface, #222); text-decoration: none; }
.export-dropdown-menu a svg { width: 15px; height: 15px; stroke: var(--on-surface-variant); flex-shrink: 0; }
.export-dropdown-menu a:hover { background: var(--surface-container-low); }
.export-dropdown-menu a:hover svg { stroke: var(--primary); }

/* ---- Forms — compact, elegant "Mission Control" treatment ----
   These overrides apply globally to every add/edit form across the admin
   panel and the attendee/exhibitor/volunteer portals (they all share this
   stylesheet), so tightening .form-group/.form-label/.form-control here once
   improves every existing form without needing to touch each page. Pages that
   opt into the richer .admin-form-card/.admin-form-grid wrapper (see below)
   get the fuller treatment (section grouping, sticky actions, icon header). */
.admin-body .form-group,
.admin-content .form-group { margin-bottom: 16px; }
.admin-body .form-label,
.admin-content .form-label {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--on-surface-variant);
  margin-bottom: 6px;
}
.admin-body .form-control,
.admin-content .form-control {
  padding: 10px 13px; font-size: 13.5px; border-radius: 8px;
  min-height: 40px; background: var(--surface-container-lowest, #fff);
}
.admin-body textarea.form-control,
.admin-content textarea.form-control { min-height: 90px; }
.admin-body .btn,
.admin-content .btn { min-height: 38px; padding: 9px 20px; font-size: 13.5px; }

/* ---- Elegant form-card wrapper: compact, distinct from list panels ---- */
.admin-form-card {
  background: var(--surface-container-lowest, #fff);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg, 14px);
  box-shadow: var(--shadow-soft, 0 2px 10px rgba(10,25,47,.05));
  margin-bottom: 22px;
  overflow: hidden;
}
.admin-form-card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--primary-fixed, #eef2fb), var(--surface-container-low, #f4f5f8));
  border-bottom: 1px solid var(--outline-variant);
}
.admin-form-card-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.admin-form-card-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.admin-form-card-head h2 { font-size: 15px; margin: 0; }
.admin-form-card-head p { font-size: 12px; color: var(--on-surface-variant); margin: 2px 0 0; }
.admin-form-card-body { padding: 18px 20px 6px; }

.admin-form-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--outline-variant); }
.admin-form-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.admin-form-section h3 {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--secondary);
  margin: 0 0 12px;
}
.admin-form-section .section-hint { font-size: 12px; color: var(--on-surface-variant); margin: -8px 0 12px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width: 720px) { .admin-form-grid { grid-template-columns: 1fr; gap: 0; } }
.admin-form-grid .full-span { grid-column: 1 / -1; }
.admin-form-grid .form-control:focus,
.admin-content .form-control:focus {
  outline: none; border-color: var(--on-tertiary-container);
  box-shadow: 0 0 0 3px rgba(36,128,255,0.15);
}
.required-mark { color: var(--error); margin-left: 3px; }
.form-actions-sticky {
  position: sticky; bottom: 0; background: var(--surface-container-lowest, #fff);
  border-top: 1px solid var(--outline-variant); padding: 14px 20px; margin: 10px -20px -6px;
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; z-index: 10;
}
@media (max-width: 560px) { .form-actions-sticky { flex-direction: column-reverse; } .form-actions-sticky .btn { width: 100%; } }

/* ---- Admin floor plan: force a clear grey/muted look regardless of category color ---- */
.fp-svg--deccan .fp-stall--occupied rect { fill: #b8b8b8 !important; fill-opacity: 1 !important; stroke: #8a8a8a !important; }
.fp-svg--deccan .fp-stall--occupied text { fill: #1a1a1a !important; }
.fp-svg--deccan .fp-stall--reserved rect { fill: #e7dcc0 !important; fill-opacity: 1 !important; stroke: #c9b98a !important; stroke-dasharray: 3 2; }
.fp-svg--deccan .fp-stall--reserved text { fill: #1a1a1a !important; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.toolbar .search-input { padding: 10px 14px; border: 1px solid var(--outline-variant); border-radius: 8px; min-width: 240px; font-size: 14px; }

.pagination { display: flex; gap: 14px; align-items: center; margin-top: 16px; font-size: 13px; }
.pagination .page-link { color: var(--on-tertiary-container); text-decoration: none; font-weight: 600; }
.pagination .page-current { color: var(--on-surface-variant); }

.admin-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.admin-alert.ok { background: #dff5e1; color: #1c5b2c; }
.admin-alert.err { background: var(--error-container); color: var(--on-error-container); }

.login-shell {
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0d1c32, #16274a 60%, #0a1526);
  padding: 20px;
}
.login-shell::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.login-shell::after {
  content: ''; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(254,212,136,0.14), transparent 70%);
  top: -120px; right: -120px; pointer-events: none;
}
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px; padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  position: relative; z-index: 1;
  color: #fff;
  opacity: 0; animation: kpi-fade-up .7s cubic-bezier(0.16,1,0.3,1) both;
}
@media (prefers-reduced-motion: reduce) { .login-card { animation: none; opacity: 1; } }
.login-card h1 { font-family: var(--font-display); font-size: 22px; color: #fff; margin: 0 0 6px; }
.login-card p.sub { color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 24px; }
.login-card .form-label { color: rgba(255,255,255,0.85); }
.login-card .form-control { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.22); color: #fff; }
.login-card .form-control::placeholder { color: rgba(255,255,255,0.4); }
.login-card .form-control:focus { border-color: #2480ff; box-shadow: 0 0 0 3px rgba(36,128,255,0.25); }
.login-card .text-muted { color: rgba(255,255,255,0.55) !important; }

.svg-chart-bar { fill: var(--primary-fixed); }
.svg-chart-bar.peak { fill: var(--primary); }
.svg-chart-line { stroke: var(--on-tertiary-container); stroke-width: 2; fill: none; }

.kpi-sparkline { width: 100%; height: 36px; }

/* ---- Global reduced-motion catch-all for admin panel ---- */
@media (prefers-reduced-motion: reduce) {
  .admin-nav a, .export-dropdown-menu, .stat-card, .login-card { transition: none !important; animation: none !important; }
}

/* ---- Slide-out drawer (shared component: superadmin/assets/js/admin-drawer.js) ----
   Used across all admin list pages for add/edit forms. See admin-drawer.js for
   the markup contract and JS API (AdminDrawer.open/close). */
.admin-drawer-toolbar-btn { margin-left: auto; }
body.admin-drawer-locked { overflow: hidden; }

.admin-drawer {
  position: fixed; inset: 0; z-index: 200;
  display: none;
}
.admin-drawer.open { display: block; }

.admin-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 20, 40, 0.45);
  opacity: 0;
  transition: opacity .4s cubic-bezier(0.16,1,0.3,1);
}
.admin-drawer.open .admin-drawer-backdrop { opacity: 1; }

.admin-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 65%; max-width: 900px;
  background: var(--surface-container-lowest, #fff);
  box-shadow: -12px 0 40px rgba(10,25,47,.22);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(0.16,1,0.3,1);
}
.admin-drawer.open .admin-drawer-panel { transform: translateX(0); }

@media (max-width: 768px) {
  .admin-drawer-panel { width: 92vw; max-width: none; margin-left: 8vw; }
}

.admin-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 22px;
  background: linear-gradient(135deg, var(--primary-fixed, #eef2fb), var(--surface-container-low, #f4f5f8));
  border-bottom: 1px solid var(--outline-variant);
  flex-shrink: 0;
}
.admin-drawer-header h2 { font-size: 16px; margin: 0; }
.admin-drawer-close {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--outline-variant);
  background: var(--surface-container-lowest, #fff); font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--on-surface-variant);
}
.admin-drawer-close:hover { background: var(--surface-container-low); }

.admin-drawer-body { padding: 20px 22px 24px; overflow-y: auto; flex: 1 1 auto; }
.admin-drawer-body .admin-form-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--outline-variant); }
.admin-drawer-body .admin-form-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.admin-drawer-body .form-actions-sticky { margin: 10px -22px -24px; }

@media (prefers-reduced-motion: reduce) {
  .admin-drawer-backdrop, .admin-drawer-panel { transition: none !important; }
}

/* ---------------------------------------------------------------------- */
/* Notification bell (attendee + exhibitor portal headers)                */
/* ---------------------------------------------------------------------- */
.notif-bell-wrap { position: relative; }
.notif-bell-btn {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--on-surface-variant); padding: 6px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.notif-bell-btn:hover { background: rgba(0,0,0,0.06); color: var(--on-surface); }
.notif-bell-badge {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  background: #e53935; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center; border-radius: 999px; box-shadow: 0 0 0 2px var(--background, #fff);
}
.notif-bell-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-width: 90vw;
  background: var(--surface, #fff); border: 1px solid var(--outline-variant, #ddd); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18); z-index: 200; overflow: hidden;
}
.notif-bell-dropdown-head {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid var(--outline-variant, #eee); font-size: 13px;
}
.notif-mark-all { background: none; border: none; color: var(--primary, #1a56db); font-size: 12px; cursor: pointer; padding: 0; }
.notif-mark-all:hover { text-decoration: underline; }
.notif-bell-list { max-height: 340px; overflow-y: auto; }
.notif-empty { padding: 20px 14px; text-align: center; color: var(--on-surface-variant); font-size: 13px; margin: 0; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid var(--outline-variant, #f0f0f0); cursor: pointer; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(0,0,0,0.03); }
.notif-item.notif-unread { background: rgba(37,99,235,0.06); }
.notif-item-title { font-weight: 700; font-size: 13px; }
.notif-item-body { font-size: 12px; color: var(--on-surface-variant); margin-top: 2px; }
.notif-item-time { font-size: 11px; color: var(--on-surface-variant); opacity: .7; margin-top: 4px; }

/* Per-page SEO editor (superadmin/seo.php) */
.seo-page-list { display: flex; flex-direction: column; gap: 18px; }
.seo-page-row {
  border: 1px solid var(--outline-variant); border-radius: 10px; padding: 16px;
  background: var(--surface, #fff);
}
.seo-page-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.seo-page-row-head strong { font-size: 14px; }
.seo-page-row-advanced { margin: 4px 0 12px; }
.seo-page-row-advanced summary { cursor: pointer; font-size: 12.5px; color: var(--on-surface-variant); user-select: none; }
.seo-page-row-advanced summary:hover { color: var(--primary); }
.seo-page-row textarea.form-control { min-height: 56px; }

/* Searchable stall picker (superadmin/book-stall-manual.php, stall-bookings edit) */
.admin-combobox { position: relative; }
.admin-combobox-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px;
  background: var(--surface, #fff); border: 1px solid var(--outline-variant); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); max-height: 360px; overflow-y: auto;
}
.admin-combobox-item {
  display: block; width: 100%; text-align: left; padding: 9px 12px; font-size: 13px;
  background: none; border: none; border-bottom: 1px solid rgba(0,0,0,0.06); cursor: pointer;
}
.admin-combobox-item:last-child { border-bottom: none; }
.admin-combobox-item.is-available { background: #e8f8ee; }
.admin-combobox-item.is-occupied { background: #e8f1fb; }
.admin-combobox-item.is-reserved { background: #fff1e6; }
.admin-combobox-item.is-available:hover,
.admin-combobox-item.is-available:focus-visible { background: #d5f0df; }
.admin-combobox-item.is-occupied:hover,
.admin-combobox-item.is-occupied:focus-visible { background: #d9e8f7; }
.admin-combobox-item.is-reserved:hover,
.admin-combobox-item.is-reserved:focus-visible { background: #ffe4cc; }
.admin-combobox-item.is-selected { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: -2px; font-weight: 600; }
.admin-combobox-item.is-disabled { cursor: not-allowed; opacity: 0.9; }
.admin-combobox-empty { padding: 10px 12px; font-size: 12.5px; color: var(--on-surface-variant); }
