/* ================================================================
   APOLLO ADMIN — DESIGN SYSTEM
   Modern dashboard UI built on Bootstrap 5
   ================================================================ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── 1. CSS VARIABLES ── */
:root {
  --c-primary:        #2563EB;
  --c-primary-dark:   #1D4ED8;
  --c-primary-light:  #EFF6FF;
  --c-primary-mid:    #BFDBFE;

  --c-success:        #16A34A;
  --c-success-light:  #F0FDF4;
  --c-success-mid:    #BBF7D0;

  --c-warning:        #D97706;
  --c-warning-light:  #FFFBEB;
  --c-warning-mid:    #FDE68A;

  --c-danger:         #DC2626;
  --c-danger-light:   #FFF1F2;
  --c-danger-mid:     #FECACA;

  --c-info:           #0891B2;
  --c-info-light:     #ECFEFF;
  --c-info-mid:       #A5F3FC;

  --c-purple:         #7C3AED;
  --c-purple-light:   #F5F3FF;

  /* Neutrals */
  --c-text:           #0F172A;
  --c-text-2:         #475569;
  --c-text-3:         #94A3B8;
  --c-border:         #E2E8F0;
  --c-border-light:   #F1F5F9;
  --c-bg:             #F8FAFC;
  --c-surface:        #FFFFFF;

  /* Sidebar */
  --sb-bg:            #0F172A;
  --sb-hover:         rgba(255,255,255,0.055);
  --sb-active-bg:     rgba(37,99,235,0.18);
  --sb-active-bar:    #3B82F6;
  --sb-text:          #94A3B8;
  --sb-text-hover:    #CBD5E1;
  --sb-text-active:   #FFFFFF;
  --sb-section:       #64748B;
  --sb-border:        rgba(255,255,255,0.07);
  --sb-width:         252px;

  /* Layout */
  --topbar-h:         62px;
  --pad:              1.625rem;

  /* Radius */
  --r-xs:   3px;
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.04);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md: 0 4px 8px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --sh-lg: 0 10px 20px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --sh-sidebar: 2px 0 12px rgba(0,0,0,0.18);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--c-text); }

a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

/* ── 3. LAYOUT ── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── 4. SIDEBAR ── */
.admin-sidebar {
  width: var(--sb-width);
  min-height: 100vh;
  background: var(--sb-bg);
  box-shadow: var(--sh-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Sidebar Brand */
.sb-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.125rem 1.125rem 1rem;
  border-bottom: 1px solid var(--sb-border);
  text-decoration: none;
  flex-shrink: 0;
}

.sb-brand-icon {
  width: 36px;
  height: 36px;
  background: var(--c-primary);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

.sb-brand-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.sb-brand-sub {
  font-size: 10.5px;
  color: var(--sb-text);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 1px;
}

/* Sidebar Nav */
.sb-nav {
  flex: 1;
  padding: 0.5rem 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sb-nav::-webkit-scrollbar { width: 4px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sb-section { padding: 0.875rem 1rem 0.2rem; }

.sb-section-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-section);
}

.sb-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.875rem;
  margin: 1px 0.5rem;
  border-radius: var(--r-md);
  color: var(--sb-text);
  font-size: 13px;
  font-weight: 400;
  transition: all 0.14s ease;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.sb-link:hover {
  background: var(--sb-hover);
  color: var(--sb-text-hover);
}

.sb-link.active {
  background: var(--sb-active-bg);
  color: var(--sb-text-active);
  font-weight: 500;
}

.sb-link.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--sb-active-bar);
  border-radius: 3px 0 0 3px;
}

.sb-link i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  opacity: 0.75;
  flex-shrink: 0;
}

.sb-link.active i { opacity: 1; }

/* Sidebar Footer */
.sb-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--sb-border);
  flex-shrink: 0;
}

.sb-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sb-avatar {
  width: 30px;
  height: 30px;
  background: rgba(59,130,246,0.25);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93C5FD;
  font-size: 12px;
  flex-shrink: 0;
}

.sb-user-name { font-size: 12px; font-weight: 500; color: #E2E8F0; line-height: 1.2; }
.sb-user-role { font-size: 10.5px; color: var(--sb-text); }

/* Sidebar overlay (mobile) */
.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999;
  backdrop-filter: blur(1px);
}

/* ── 5. MAIN CONTENT ── */
.admin-main {
  flex: 1;
  margin-left: var(--sb-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── 6. TOPBAR ── */
.admin-topbar {
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 0.875rem;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.topbar-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-sep {
  width: 1px;
  height: 20px;
  background: var(--c-border);
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.topbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.14s;
  text-decoration: none;
}

.topbar-icon-btn:hover {
  background: var(--c-bg);
  border-color: #CBD5E1;
  color: var(--c-text);
}

.topbar-user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.625rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.14s;
  border: 1px solid transparent;
  text-decoration: none;
}

.topbar-user-pill:hover {
  background: var(--c-bg);
  border-color: var(--c-border);
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  background: var(--c-primary-light);
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  font-size: 12px;
}

.topbar-username {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

.sidebar-toggle-btn {
  display: none;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: transparent;
  color: var(--c-text-2);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.14s;
}

.sidebar-toggle-btn:hover {
  background: var(--c-bg);
  color: var(--c-text);
}

/* ── 7. CONTENT AREA ── */
.admin-content {
  flex: 1;
  padding: var(--pad);
}

/* ── 8. PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header-info { min-width: 0; }

.page-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.025em;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-breadcrumb li { display: flex; align-items: center; gap: 0.3rem; }

.page-breadcrumb li + li::before {
  content: '/';
  color: var(--c-border);
  font-size: 12px;
}

.page-breadcrumb a { font-size: 12px; color: var(--c-text-3); }
.page-breadcrumb a:hover { color: var(--c-primary); }
.page-breadcrumb .bc-current { font-size: 12px; color: var(--c-text-2); font-weight: 500; }

/* ── 9. FLASH MESSAGES ── */
.flash-wrap { margin-bottom: 1.25rem; }

/* ── 10. CARDS ── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--c-border-light);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-header-title i {
  color: var(--c-primary);
  font-size: 13px;
}

.card-body { padding: 1.25rem; }

.card-footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border-light);
  padding: 0.75rem 1.25rem;
}

/* ── 11. STAT CARDS ── */
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: box-shadow 0.18s, transform 0.18s;
}

.stat-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-text-3);
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-note {
  font-size: 11.5px;
  color: var(--c-text-3);
}

/* Color variants */
.stat-card.sc-blue  .stat-icon { background: var(--c-primary-light); color: var(--c-primary); }
.stat-card.sc-green .stat-icon { background: var(--c-success-light); color: var(--c-success); }
.stat-card.sc-amber .stat-icon { background: var(--c-warning-light); color: var(--c-warning); }
.stat-card.sc-teal  .stat-icon { background: var(--c-info-light);    color: var(--c-info); }
.stat-card.sc-purple .stat-icon{ background: var(--c-purple-light);  color: var(--c-purple); }

/* Backward-compat: restyle old gradient classes */
.stat-card.gradient-primary,
.stat-card.gradient-success,
.stat-card.gradient-info,
.stat-card.gradient-purple {
  background: var(--c-surface) !important;
  color: var(--c-text) !important;
}

/* ── 12. TABLES ── */
.table {
  font-size: 13px;
  color: var(--c-text);
  border-color: var(--c-border);
  margin: 0;
}

.table thead th {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-text-3);
  border-bottom: 1px solid var(--c-border);
  border-top: none;
  padding: 0.65rem 0.875rem;
  background: var(--c-bg);
  white-space: nowrap;
  vertical-align: middle;
}

.table tbody td {
  padding: 0.65rem 0.875rem;
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: middle;
  color: var(--c-text);
}

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

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

.table-striped tbody tr:nth-of-type(odd) td { background: transparent; }

.table > :not(caption) > * > * { background: transparent; }

.table-responsive { border-radius: var(--r-md); overflow: hidden; }

/* Table cell helpers */
.td-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }
.td-muted { color: var(--c-text-3); font-size: 12px; }
.td-bold  { font-weight: 600; }

/* ── 13. BUTTONS ── */
.btn {
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--r-md);
  padding: 0.4rem 0.8rem;
  transition: all 0.14s ease;
  border: 1px solid transparent;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }

.btn-secondary {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text-2);
}
.btn-secondary:hover { background: var(--c-bg); border-color: #CBD5E1; color: var(--c-text); }

.btn-success { background: var(--c-success); border-color: var(--c-success); color: #fff; }
.btn-success:hover { background: #15803D; border-color: #15803D; color: #fff; }

.btn-danger { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; border-color: #B91C1C; color: #fff; }

.btn-warning { background: var(--c-warning); border-color: var(--c-warning); color: #fff; }
.btn-warning:hover { background: #B45309; border-color: #B45309; color: #fff; }

.btn-outline-primary {
  background: transparent; border-color: var(--c-primary); color: var(--c-primary);
}
.btn-outline-primary:hover { background: var(--c-primary); color: #fff; }

.btn-outline-secondary {
  background: transparent; border-color: var(--c-border); color: var(--c-text-2);
}
.btn-outline-secondary:hover { background: var(--c-bg); border-color: #CBD5E1; color: var(--c-text); }

.btn-sm { font-size: 12px; padding: 0.3rem 0.65rem; border-radius: var(--r-sm); }
.btn-lg { font-size: 14.5px; padding: 0.6rem 1.2rem; }

.btn-icon-only {
  padding: 0.375rem;
  width: 32px;
  height: 32px;
  justify-content: center;
}

/* Table actions group */
.act-group { display: flex; align-items: center; justify-content: flex-end; gap: 0.3rem; }

/* ── 14. FORMS ── */
.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--c-text-2);
  margin-bottom: 0.35rem;
}

.form-control,
.form-select {
  font-size: 13px;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 0.45rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.5;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.09);
  outline: none;
}

.form-control::placeholder { color: var(--c-text-3); }

.form-control-sm, .form-select-sm {
  font-size: 12px;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r-sm);
}

.form-check-input {
  border-color: var(--c-border);
  border-radius: var(--r-xs);
  cursor: pointer;
  margin-top: 0.2em;
}

.form-check-input:checked { background-color: var(--c-primary); border-color: var(--c-primary); }
.form-check-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.09); }

.form-switch .form-check-input { border-radius: var(--r-pill); }

.form-text { font-size: 11.5px; color: var(--c-text-3); margin-top: 0.3rem; }

.input-group-text {
  background: var(--c-bg);
  border-color: var(--c-border);
  color: var(--c-text-2);
  font-size: 13px;
}

textarea.form-control { resize: vertical; }

/* Form section divider */
.form-divider {
  border: 0;
  border-top: 1px solid var(--c-border-light);
  margin: 1.5rem 0 1.25rem;
}

.form-section-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--c-text-3);
  margin-bottom: 1rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding: 0.875rem 1.25rem;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-light);
}

.filter-bar .form-label {
  font-size: 11px;
  margin-bottom: 0.2rem;
}

/* ── 15. BADGES ── */
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 0.25em 0.6em;
  border-radius: var(--r-pill);
  letter-spacing: 0.015em;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  line-height: 1.4;
}

.badge.bg-success    { background: var(--c-success-light) !important; color: var(--c-success) !important; }
.badge.bg-danger     { background: var(--c-danger-light)  !important; color: var(--c-danger)  !important; }
.badge.bg-warning    { background: var(--c-warning-light) !important; color: var(--c-warning) !important; }
.badge.bg-primary    { background: var(--c-primary-light) !important; color: var(--c-primary) !important; }
.badge.bg-info       { background: var(--c-info-light)    !important; color: var(--c-info)    !important; }
.badge.bg-info.text-dark { color: var(--c-info) !important; }
.badge.bg-secondary  {
  background: var(--c-bg) !important;
  color: var(--c-text-2) !important;
  border: 1px solid var(--c-border);
}

/* Reservation status badges */
.badge-pending   { background: #FEF3C7; color: #92400E; }
.badge-confirmed { background: var(--c-success-light); color: var(--c-success); }
.badge-completed { background: var(--c-primary-light); color: var(--c-primary); }
.badge-cancelled { background: var(--c-danger-light); color: var(--c-danger); }

/* Dot indicator */
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.status-dot.active   { background: var(--c-success); }
.status-dot.inactive { background: var(--c-text-3); }

/* ── 16. ALERTS ── */
.alert {
  font-size: 13px;
  border-radius: var(--r-lg);
  padding: 0.75rem 1rem;
  border: none;
  border-left: 3px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.alert-success { background: var(--c-success-light); color: #14532D; border-left-color: var(--c-success); }
.alert-danger  { background: var(--c-danger-light);  color: #7F1D1D; border-left-color: var(--c-danger); }
.alert-warning { background: var(--c-warning-light); color: #78350F; border-left-color: var(--c-warning); }
.alert-info    { background: var(--c-info-light);    color: #164E63; border-left-color: var(--c-info); }

.alert .btn-close { margin-left: auto; }
.ajax-flash { border-radius: var(--r-lg); }

/* ── 17. TOASTS ── */
.toast-container { z-index: 9999; }

.toast {
  border-radius: var(--r-lg);
  font-size: 13px;
  border: none;
  box-shadow: var(--sh-lg);
  min-width: 270px;
}

.toast.text-bg-success { background: var(--c-success) !important; }
.toast.text-bg-danger  { background: var(--c-danger)  !important; }
.toast.text-bg-warning { background: var(--c-warning) !important; }
.toast.text-bg-primary { background: var(--c-primary) !important; }

/* ── 18. MODALS ── */
.modal-content {
  border: none;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}

.modal-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border-light);
  padding: 1.125rem 1.375rem;
}

.modal-title { font-size: 14.5px; font-weight: 600; }
.modal-body  { padding: 1.375rem; }

.modal-footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border-light);
  padding: 0.875rem 1.375rem;
  gap: 0.5rem;
}

/* ── 19. LOADER OVERLAY ── */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248,250,252,0.75);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

/* ── 20. EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--c-text-3);
}

.empty-state-icon {
  width: 52px; height: 52px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.875rem;
  font-size: 20px;
  color: var(--c-text-3);
}

.empty-state-title { font-size: 14px; font-weight: 600; color: var(--c-text-2); margin-bottom: 0.35rem; }
.empty-state-text  { font-size: 12.5px; color: var(--c-text-3); margin-bottom: 1rem; max-width: 260px; margin-left: auto; margin-right: auto; }

/* ── 21. IMAGE GALLERY ── */
.sortable-images {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.875rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.image-card { width: 155px; cursor: move; list-style: none; }

.image-card .card {
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}

.image-card .card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }

.image-card .card-img-top { height: 112px; object-fit: cover; border-radius: 0; }
.image-card .card-body    { padding: 0.6rem; }

.sortable-placeholder {
  width: 155px;
  min-height: 155px;
  border: 2px dashed var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-bg);
  list-style: none;
}

.handle { cursor: grab; }
.handle:active { cursor: grabbing; }

/* ── 22. SELECT2 OVERRIDES ── */
.select2-container--default .select2-selection--single {
  height: 37px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--c-text);
  font-size: 13px;
  line-height: 35px;
  padding-left: 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow { height: 35px; }

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.09);
}

.select2-dropdown {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: 13px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--c-primary) !important;
}

/* ── 23. PAGINATION ── */
.pagination { gap: 0.25rem; flex-wrap: wrap; }

.page-link {
  font-size: 12.5px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--r-md) !important;
  border-color: var(--c-border);
  color: var(--c-text-2);
  transition: all 0.14s;
}

.page-link:hover { background: var(--c-bg); border-color: #CBD5E1; color: var(--c-text); }
.page-item.active .page-link { background: var(--c-primary); border-color: var(--c-primary); }

/* ── 24. MISC UTILITIES ── */
.text-muted         { color: var(--c-text-3) !important; }
.text-secondary     { color: var(--c-text-2) !important; }
.fw-medium          { font-weight: 500; }
.fw-semibold        { font-weight: 600; }
.icon-preview       { font-size: 17px; color: var(--c-text-2); }

/* Price cell */
.price-cell { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Inline code/mono */
.mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 12px; }

/* Crop container */
.crop-container { max-height: 480px; overflow: hidden; border-radius: var(--r-md); }

/* ── 25. RESPONSIVE ── */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.sb-open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .sb-overlay.sb-open {
    display: block;
  }

  :root { --pad: 1rem; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .topbar-username { display: none; }
  .page-title { font-size: 17px; }
  .stat-value  { font-size: 24px; }
}

/* ── 26. TABLE SEARCH ── */
.table-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.table-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bs-secondary-color);
  pointer-events: none;
  font-size: 0.8rem;
}
.table-search-input {
  width: 100%;
  padding: 6px 12px 6px 32px;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.table-search-input:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15);
}

/* ── 26a. PRICE PREVIEW BADGE ── */
.price-preview-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: default;
  line-height: 1.2;
}
.price-preview-amount {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--bs-body-color);
}
.price-preview-label {
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  display: flex;
  align-items: center;
  gap: 4px;
}
.price-preview-more {
  background: var(--bs-primary);
  color: #fff;
  border-radius: 20px;
  padding: 0 5px;
  font-size: 0.68rem;
  line-height: 1.4;
}
.price-pop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 6px;
}
.price-pop-table td { padding: 3px 0; }
.price-pop-table tr + tr td { border-top: 1px solid var(--bs-border-color); }
.price-pop-extra {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  border-top: 1px dashed var(--bs-border-color);
  padding-top: 5px;
  margin-top: 2px;
}

/* ── 26b. BULK ACTION BAR ── */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--bs-primary) 30%, transparent);
  border-radius: var(--bs-border-radius);
  font-size: 0.875rem;
}
.bulk-bar-count {
  font-weight: 600;
  color: var(--bs-primary);
  white-space: nowrap;
}

/* ── 26c. LOCATION POPOVER ── */
.loc-badge { cursor: default; }
.loc-pop-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.loc-pop-item:last-child { border-bottom: none; }
.loc-pop-item .fa-location-dot {
  color: var(--bs-primary);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ── 26b. LOCATION PILLS ── */
.location-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1.5px solid var(--bs-border-color);
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  color: var(--bs-secondary-color);
  background: transparent;
}
.location-pill input[type="checkbox"] { display: none; }
.location-pill:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.location-pill.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

/* ── 27. PRINT ── */
@media print {
  .admin-sidebar,
  .admin-topbar,
  .act-group,
  .filter-bar,
  .btn { display: none !important; }
  .admin-main { margin-left: 0 !important; }
}
