/* =============================================
   Admin Portal — Modern Clean SaaS Dashboard
   SITI · Ciudad Juárez · 2026
   Light + Dark Mode
   ============================================= */

/* ── Light Theme (default) ── */
:root {
  --primary: #F97316;
  --primary-hover: #EA580C;
  --primary-soft: rgba(249, 115, 22, .08);
  --primary-shadow: rgba(249, 115, 22, .20);

  --green: #10b981;
  --green-soft: rgba(16, 185, 129, .08);
  --rose: #ef4444;
  --rose-soft: rgba(239, 68, 68, .08);
  --orange: #f59e0b;
  --orange-soft: rgba(245, 158, 11, .08);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, .08);
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, .08);

  --bg: #f3f4f6;
  --surface: #ffffff;
  --text: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --border: #e5e7eb;
  --border-hover: #d1d5db;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);

  --sidebar-width: 240px;
  --header-height: 60px;
  --transition: .15s ease;
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg: #111827;
  --surface: #1f2937;
  --text: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  --border: #374151;
  --border-hover: #4b5563;

  --primary-soft: rgba(249, 115, 22, .12);
  --green-soft: rgba(16, 185, 129, .12);
  --rose-soft: rgba(239, 68, 68, .12);
  --orange-soft: rgba(245, 158, 11, .12);
  --purple-soft: rgba(139, 92, 246, .12);
  --cyan-soft: rgba(6, 182, 212, .12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, .3);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
}

/* ── Layout Shell ── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════
   SIDEBAR
   ═══════════════════════════════ */
.admin-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

/* ── Brand ── */
.sidebar-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 100px;
  height: auto;
  display: block;
}

/* ── Navigation ── */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: all var(--transition);
  border: none;
  background: none;
  cursor: pointer;
}

.sidebar-item .material-icons-outlined,
.sidebar-item svg {
  font-size: 20px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--transition);
}

.sidebar-item:hover {
  color: var(--text);
  background: var(--bg);
}

.sidebar-item:hover .material-icons-outlined,
.sidebar-item:hover svg {
  opacity: .85;
}

.sidebar-item.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 1px 3px var(--primary-shadow);
}

.sidebar-item.active .material-icons-outlined,
.sidebar-item.active svg {
  opacity: 1;
}

/* ── Sidebar Groups (collapsible categories) ── */
.sidebar-group {
  margin-top: 4px;
}

.sidebar-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-radius: var(--radius);
  transition: all var(--transition);
}

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

.group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.group-label {
  flex: 1;
  text-align: left;
}

.group-chevron {
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  transition: transform .2s ease;
  opacity: .5;
}

.sidebar-group-toggle.collapsed .group-chevron {
  transform: rotate(-90deg);
}

.sidebar-group-items {
  overflow: hidden;
  max-height: 500px;
  transition: max-height .25s ease, opacity .2s ease;
  opacity: 1;
  padding-left: 8px;
}

.sidebar-group-items:not(.open) {
  max-height: 0;
  opacity: 0;
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn-theme-toggle .material-icons-outlined,
.btn-theme-toggle svg {
  font-size: 18px;
  width: 16px;
  height: 16px;
}

.sidebar-footer .btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--rose-soft);
  color: var(--rose);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.sidebar-footer .btn-logout:hover {
  background: var(--rose);
  color: #fff;
}

.sidebar-footer .btn-logout .material-icons-outlined,
.sidebar-footer .btn-logout svg {
  font-size: 18px;
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════ */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
}

/* ── Mobile Sidebar Toggle ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--surface);
  border: none;
  border-radius: var(--radius-lg);
  padding: 10px;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: all var(--transition);
}

.sidebar-toggle:hover {
  background: var(--bg);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 99;
  backdrop-filter: blur(2px);
}

@media (max-width: 860px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

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

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

  .sidebar-toggle {
    display: flex;
  }

  .admin-main {
    margin-left: 0;
    padding-top: 52px !important;
  }
}

/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVENESS — COMPREHENSIVE
   Luna's Mobile-First Overhaul · March 2026
   ═══════════════════════════════════════════════ */

/* ── Tablet (≤768px) ── */
@media (max-width: 768px) {

  /* Panels: reduced side padding */
  .admin-panel.active {
    padding: 16px;
    padding-top: 0;
  }

  #panel-dashboard.active {
    padding-top: 20px;
  }

  /* Panel header: stack title + button vertically */
  .panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px;
    height: auto !important;
    padding: 14px 16px !important;
    padding-left: 56px !important; /* ← room for sidebar toggle (Fitts's Law) */
    margin: 0 !important;
    margin-bottom: 16px !important;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .panel-title {
    font-size: 16px;
  }

  .btn-create {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }

  /* ── Tables → Card-row style (replaces horizontal scroll) ── */
  .admin-table-wrap {
    overflow-x: visible;
    -webkit-overflow-scrolling: auto;
    border-radius: var(--radius-lg);
    background: none;
    border: none;
    box-shadow: none;
  }

  .admin-table {
    min-width: 0;
    display: block;
    border: none;
  }

  .admin-table thead {
    display: none; /* Hide the header row — labels come from ::before */
  }

  .admin-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .admin-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
  }

  .admin-table tbody tr:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
  }

  .admin-table td {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: none;
    font-size: 13px;
    white-space: normal;
    word-break: break-word;
    min-height: 28px;
  }

  /* Data-label: show column name above cell content */
  .admin-table td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-muted);
    margin-bottom: 1px;
    flex-shrink: 0;
    min-width: 70px;
  }

  /* Hide label on thumbnail cell (first) and actions cell (last) */
  .admin-table td:first-child::before,
  .admin-table td:last-child::before {
    display: none;
  }

  /* First cell (usually thumbnail) – span full width */
  .admin-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
  }

  /* Last cell (actions) – span full width, right-aligned */
  .admin-table td:last-child {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    gap: 6px;
    flex-wrap: wrap;
  }

  /* Action buttons – bigger touch targets on mobile (Fitts's Law) */
  .admin-table .btn-action {
    padding: 8px 14px;
    min-height: 40px;
    font-size: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
  }

  .admin-table .btn-edit {
    background: var(--primary-soft);
    border-color: transparent;
    color: var(--primary);
  }

  .admin-table .btn-delete {
    background: var(--rose-soft);
    border-color: transparent;
    color: var(--rose);
  }

  /* Pagination (admin table) */
  .admin-table-wrap + div {
    flex-wrap: wrap;
  }

  /* Active trivia row – keep highlight on card */
  .admin-table tbody tr.row-active-edition {
    border-left: 3px solid var(--green);
    background: var(--green-soft);
  }

  /* Featured row highlight */
  .admin-table tbody tr.fp-row-featured {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(90deg, rgba(245, 158, 11, .12) 0%, rgba(251, 191, 36, .06) 40%, transparent 100%);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .10);
  }

  /* Dashboard: compact welcome */
  .dash-header {
    margin-bottom: 20px;
    padding-left: 44px; /* room for toggle */
  }

  .dash-header h3 {
    font-size: 22px;
  }

  /* Dashboard bottom grid: stack */
  .dash-bottom-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px;
  }

  /* Charts: stack */
  .dash-charts-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 24px;
  }

  .dash-charts-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dash-chart-card {
    padding: 16px;
  }

  /* Modal: more mobile-friendly → bottom sheet */
  .admin-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .admin-modal-content {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 20px 16px;
    animation: modalSlideUpMobile .25s ease;
  }

  @keyframes modalSlideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal-title {
    font-size: 16px;
  }

  /* Forms: single column on tablet */
  .admin-form .form-row {
    grid-template-columns: 1fr;
  }

  .admin-form .form-input {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Confirm dialog: more compact */
  .confirm-dialog {
    padding: 20px;
    max-width: calc(100vw - 32px);
  }

  .confirm-title {
    font-size: 15px;
  }

  .confirm-message {
    font-size: 12px;
  }

  .confirm-actions {
    flex-direction: column;
  }

  .confirm-btn {
    width: 100%;
    justify-content: center;
  }

  /* Toasts: full width */
  .toast-container {
    left: 16px;
    right: 16px;
    top: 12px;
  }

  .toast {
    max-width: 100%;
  }

  /* Sidebar toggle: bigger touch target (Fitts's Law) */
  .sidebar-toggle {
    padding: 10px 12px;
    top: 10px;
    left: 10px;
  }

  .sidebar-toggle svg {
    width: 22px;
    height: 22px;
  }

  /* City selector: compact & reflow under toggle */
  #admin-city-selector {
    padding: 0 16px !important;
    padding-left: 56px !important; /* room for sidebar toggle */
    min-height: 48px !important;
    font-size: 12px !important;
  }

  /* Crossing cards: stack */
  .crossing-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }

  /* Currency card: full width */
  .currency-card {
    max-width: 100%;
    padding: 18px;
  }

  /* Pagination: compact with proper touch targets */
  .pagination-bar {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  .pagination-btn {
    min-height: 44px;
    padding: 10px 18px;
  }

  /* Announcement stats: scroll */
  .ann-stats-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .ann-stat-chip {
    flex-shrink: 0;
    min-width: 140px;
  }

  /* Content submissions detail modal */
  .cs-detail-modal {
    max-width: 100% !important;
  }

  /* Attention cards in dashboard */
  .dash-attention-card {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .dash-attention-badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  /* Activity grid */
  .dash-activity-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Featured spot banner */
  .fsh-banner-content {
    padding: 20px;
    min-height: 160px;
  }

  .fsh-banner-name {
    font-size: 18px;
  }

  .fsh-empty,
  .fp-empty {
    flex-direction: column;
    text-align: center;
    padding: 20px 16px;
  }

  /* Featured promo cards */
  .fp-card {
    min-width: 180px;
    max-width: 180px;
  }

  .fp-card-img-wrap {
    height: 100px;
  }

  /* Featured spot picker grid in modal */
  .fsp-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  /* Users search bar: stack vertically */
  .users-search-bar {
    flex-direction: column;
    gap: 8px;
  }

  .users-search-input-wrap {
    max-width: 100%;
    width: 100%;
  }

  .users-search-btn,
  .users-search-clear {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Groups subtabs: scrollable with fade */
  .groups-subtabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 6px;
    mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 16px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8px, black calc(100% - 16px), transparent);
  }

  .groups-subtab {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  /* Groups filter bar: scrollable */
  .groups-filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .groups-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Hero banner: stack vertically */
  .admin-panel [style*="display:flex"][style*="min-height:220px"] {
    flex-direction: column !important;
  }

  .admin-panel [style*="display:flex"][style*="min-height:220px"] > [style*="width:240px"] {
    width: 100% !important;
    min-width: 100% !important;
    height: 180px !important;
  }

  /* Poll hero banner: responsive */
  .poll-hero-banner,
  [class*="poll-hero-banner"],
  [style*="border-radius:var(--radius)"][style*="padding:24px"][style*="color:#fff"] {
    padding: 16px !important;
  }

  .poll-hero-header,
  [style*="display:flex"][style*="justify-content:space-between"][style*="align-items:start"][style*="margin-bottom:16px"] {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .poll-hero-actions,
  [style*="display:flex"][style*="gap:6px"]:has(> .btn-action) {
    flex-wrap: wrap !important;
  }

  .poll-hero-options,
  [style*="display:grid"][style*="grid-template-columns:1fr 1fr"][style*="gap:16px"][style*="margin-bottom:16px"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* API docs toolbar */
  .apidocs-toolbar {
    flex-direction: column;
    gap: 6px;
  }

  .token-badge code {
    font-size: 10px;
    word-break: break-all;
  }

  /* Schedule picker: scroll hint */
  .sp-container {
    max-width: 100%;
  }

  /* Image mode tabs: scrollable */
  .img-mode-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .img-mode-tab {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {

  /* Even tighter padding */
  .admin-panel.active {
    padding: 10px;
    padding-top: 0;
  }

  #panel-dashboard.active {
    padding-top: 14px;
  }

  .panel-header {
    padding: 12px 10px !important;
    padding-left: 52px !important; /* sidebar toggle clearance */
    margin: 0 !important;
    margin-bottom: 12px !important;
    overflow: hidden;
  }

  .panel-title {
    font-size: 14px;
    gap: 6px;
  }

  .panel-title .material-icons-outlined,
  .panel-title svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }

  /* Dashboard: even more compact */
  .dash-header {
    padding-left: 40px;
  }

  .dash-header h3 {
    font-size: 18px;
  }

  .dash-header p {
    font-size: 12px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card .stat-value {
    font-size: 22px;
  }

  .stat-card .stat-icon {
    width: 34px;
    height: 34px;
  }

  /* Table cards: single column on very small screens */
  .admin-table tbody tr {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .admin-table td {
    font-size: 12px;
  }

  /* Login card: more compact */
  .admin-login-card {
    padding: 28px 20px;
  }

  .login-title {
    font-size: 20px;
  }

  /* Modal: tighter */
  .admin-modal-content {
    padding: 16px 12px;
  }

  .modal-header {
    margin-bottom: 14px;
  }

  /* Action buttons: bigger hit area for thumbs (Fitts's Law) */
  .btn-action {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 12px;
  }

  /* News cards */
  .news-card-body {
    padding: 12px;
  }

  .news-card-footer {
    padding: 10px 12px;
  }

  /* Announcements cards */
  .ann-card-content {
    padding: 12px 14px 10px;
  }

  .ann-card-footer {
    padding: 8px 14px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Content submissions */
  .cs-card {
    padding: 14px;
  }

  .cs-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .cs-detail-actions {
    flex-direction: column;
  }

  .cs-detail-actions .btn-approve,
  .cs-detail-actions .btn-reject,
  .cs-detail-actions .btn-delete-sub {
    width: 100%;
  }

  /* Confirm dialog full width → bottom sheet */
  .confirm-dialog {
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .confirm-overlay {
    align-items: flex-end;
    padding: 0;
  }

  /* Must Go strip cards */
  .mg-card {
    min-width: 100px;
    max-width: 100px;
  }

  /* Featured promo cards */
  .fp-card {
    min-width: 160px;
    max-width: 160px;
  }

  /* Featured spot banner */
  .fsh-banner-content {
    padding: 16px;
    min-height: 140px;
  }

  .fsh-banner-name {
    font-size: 16px;
  }

  /* City selector: even tighter */
  #admin-city-selector {
    padding: 0 10px !important;
    padding-left: 52px !important;
    min-height: 44px !important;
  }

  /* Crossing cards: smaller */
  .crossing-card {
    padding: 12px 14px;
  }

  /* Pagination inline buttons: proper touch targets */
  .pagination-btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 13px;
  }

  /* Chart cards */
  .dash-chart-card {
    padding: 14px;
  }

  .dash-chart-card canvas {
    max-height: 180px;
  }

  /* Attention card */
  .dash-attention-card .att-icon {
    width: 40px;
    height: 40px;
  }

  .dash-attention-card .att-title {
    font-size: 13px;
  }

  .dash-attention-card .att-sub {
    font-size: 12px;
  }
}

/* ═══════════════════════════════
   PANEL HEADER (per-section top bar)
   ═══════════════════════════════ */
.panel-header {
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
  /* Full-bleed: counteract the panel's 24px padding */
  margin: 0 -24px;
  margin-bottom: 24px;
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.panel-title .material-icons-outlined,
.panel-title svg {
  font-size: 22px;
  width: 22px;
  height: 22px;
  color: var(--primary);
}

/* ═══════════════════════════════
   PANELS
   ═══════════════════════════════ */
.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-top: 0;
}

#panel-dashboard.active {
  padding-top: 28px;
  max-width: 1400px;
}

/* Content area below header — generous padding */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ═══════════════════════════════
   DASHBOARD STATS (Premium SaaS)
   ═══════════════════════════════ */

/* Dashboard welcome header */
.dash-header {
  margin-bottom: 28px;
}

.dash-header h3 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.dash-header p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 0;
  padding: 0;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all .2s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

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

.stat-card .stat-glow {
  display: none;
}

.stat-card .stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.stat-card .stat-icon svg,
.stat-card .stat-icon .material-icons-outlined {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.5px;
}

.stat-card .stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Attention section ── */
.dash-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.dash-attention-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all .2s ease;
}

.dash-attention-card:hover {
  border-color: var(--primary);
}

.dash-attention-card .att-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-attention-card .att-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.dash-attention-card .att-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.dash-attention-card .att-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-attention-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
}

/* ── Activity metrics ── */
.dash-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .dash-activity-grid {
    grid-template-columns: 1fr;
  }
}

.dash-activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.dash-activity-card .act-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dash-activity-card .act-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.dash-activity-card .act-value.primary {
  color: var(--primary);
}

.dash-activity-card .act-value.green {
  color: var(--green);
}

.dash-activity-card .act-value.purple {
  color: var(--purple);
}

.dash-progress-bar {
  margin-top: 14px;
  height: 5px;
  width: 100%;
  background: var(--bg);
  border-radius: 9999px;
  overflow: hidden;
}

.dash-progress-bar .bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--primary);
  transition: width .5s ease;
}

.dash-trend {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}

.dash-trend .material-icons-outlined {
  font-size: 16px;
}

/* Bottom grid layout for attention + activity */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  margin-top: 32px;
}

@media (max-width: 1000px) {
  .dash-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard Charts ── */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-top: 32px;
}

@media (max-width: 1000px) {
  .dash-charts-grid {
    grid-template-columns: 1fr;
  }
}

.dash-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: box-shadow .2s ease;
}

.dash-chart-card:hover {
  box-shadow: var(--shadow-md);
}

.dash-chart-card .chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.dash-chart-card .chart-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.dash-chart-card canvas {
  max-height: 240px;
  width: 100% !important;
}

.dash-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 860px) {
  .dash-charts-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════
   TABLE
   ═══════════════════════════════ */
.admin-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

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

.admin-table tbody tr {
  transition: background var(--transition);
}

.admin-table tbody tr:hover {
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.admin-table td strong {
  color: var(--text);
  font-weight: 600;
}

/* Table thumbnail */
.table-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
}

.table-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* ═══════════════════════════════
   BUTTONS
   ═══════════════════════════════ */

/* Primary action button (e.g. "Nuevo Evento") */
.btn-create {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px var(--primary-shadow);
  transition: all var(--transition);
}

.btn-create:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 8px var(--primary-shadow);
  transform: translateY(-1px);
}

.btn-create:active {
  transform: translateY(0);
}

.btn-create .material-icons-outlined,
.btn-create svg {
  font-size: 18px;
  width: 16px;
  height: 16px;
}

/* Action buttons (edit / delete inline) */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action .material-icons-outlined,
.btn-action svg {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.btn-edit {
  color: var(--text-muted);
  background: none;
}

.btn-edit:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-delete {
  color: var(--text-muted);
  background: none;
}

.btn-delete:hover {
  color: var(--rose);
  background: var(--rose-soft);
}

/* ═══════════════════════════════
   USERS SEARCH BAR
   ═══════════════════════════════ */
.users-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.users-search-input-wrap {
  position: relative;
  flex: 1;
  max-width: 440px;
  min-width: 200px;
}

.users-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.users-search-input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 400;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.users-search-input-wrap input:hover {
  border-color: var(--border-hover);
}

.users-search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}

.users-search-input-wrap input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.users-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.users-search-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 2px 8px var(--primary-shadow);
}

.users-search-clear {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--rose-soft);
  color: var(--rose);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.users-search-clear:hover {
  background: var(--rose);
  color: #fff;
}

/* ═══════════════════════════════
   RANK LEVELS INLINE INPUTS
   ═══════════════════════════════ */
.rl-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition);
  outline: none;
}

.rl-input:hover {
  border-color: var(--border-hover);
}

.rl-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}

/* ═══════════════════════════════
   BADGES
   ═══════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: none;
}

.badge-active {
  background: var(--green-soft);
  color: var(--green);
}

.badge-inactive {
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-pending {
  background: var(--orange-soft);
  color: var(--orange);
}

.badge-rejected {
  background: var(--rose-soft);
  color: var(--rose);
}

.badge-check {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

/* Category badges */
.tag-admin {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  border: none;
}

/* ═══════════════════════════════
   ACTIVE TRIVIA EDITION ROW
   ═══════════════════════════════ */
.row-active-edition {
  background: var(--green-soft) !important;
  border-left: 3px solid var(--green);
}

/* ═══════════════════════════════
   PAGINATION
   ═══════════════════════════════ */
.pagination-bar {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 50%, transparent);
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--border-hover);
}

.pagination-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pagination-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ═══════════════════════════════
   CROSSING CARD
   ═══════════════════════════════ */
.crossing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.crossing-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

/* ═══════════════════════════════
   CURRENCY CARD
   ═══════════════════════════════ */
.currency-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 520px;
  box-shadow: var(--shadow-sm);
}

/* ═══════════════════════════════
   LOGIN
   ═══════════════════════════════ */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.login-icon-wrap {
  width: 120px;
  height: auto;
  border-radius: var(--radius-lg);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.10);
}

.login-icon-wrap svg,
.login-icon-wrap .material-icons-outlined {
  width: 24px;
  height: 24px;
  font-size: 24px;
}

.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ═══════════════════════════════
   FORMS
   ═══════════════════════════════ */
.admin-form .form-group {
  margin-bottom: 16px;
}

.admin-form .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.admin-form .form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  transition: all var(--transition);
}

.admin-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}

.admin-form .form-input::placeholder {
  color: var(--text-muted);
}

.admin-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .admin-form .form-row {
    grid-template-columns: 1fr;
  }
}

.admin-form .btn-submit {
  width: 100%;
  padding: 11px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px var(--primary-shadow);
  transition: all var(--transition);
}

.admin-form .btn-submit:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 8px var(--primary-shadow);
  transform: translateY(-1px);
}

.admin-form .btn-submit:active {
  transform: translateY(0);
}

.admin-form .btn-submit:disabled {
  opacity: .5;
  cursor: default;
  transform: none;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 400;
}

.form-error-text {
  font-size: 12px;
  color: var(--rose);
  margin-top: 4px;
  font-weight: 500;
  display: none;
}

.password-wrapper {
  position: relative;
}

.password-wrapper .form-input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--primary);
}

.password-toggle svg {
  width: 16px;
  height: 16px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  border-radius: 4px;
}

.capitalize-input {
  text-transform: capitalize;
}

/* ═══════════════════════════════
   MODAL
   ═══════════════════════════════ */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-modal-overlay.hidden {
  display: none;
}

.admin-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp .2s ease;
}

.admin-modal-content:has(.sp-container) {
  max-width: 680px;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: transparent;
}

.modal-close svg,
.modal-close .material-icons-outlined {
  width: 16px;
  height: 16px;
  font-size: 16px;
}

/* ═══════════════════════════════
   TOAST
   ═══════════════════════════════ */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastSlide .25s ease;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast svg,
.toast .material-icons-outlined {
  font-size: 18px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.success svg,
.toast.success .material-icons-outlined {
  color: var(--green);
}

.toast.error {
  border-left: 3px solid var(--rose);
}

.toast.error svg,
.toast.error .material-icons-outlined {
  color: var(--rose);
}

/* ═══════════════════════════════
   CONFIRM DIALOG (in-app popup)
   ═══════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: confirmFadeIn .18s ease;
}

@keyframes confirmFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.confirm-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 400px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25), 0 0 0 1px rgba(255, 255, 255, .05);
  animation: confirmSlideUp .22s cubic-bezier(.22, 1, .36, 1);
  text-align: center;
}

@keyframes confirmSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.confirm-icon .material-icons-outlined {
  font-size: 28px;
}

.confirm-icon.confirm-icon-danger {
  background: var(--rose-soft);
  color: var(--rose);
}

.confirm-icon.confirm-icon-warning {
  background: var(--orange-soft);
  color: var(--orange);
}

.confirm-icon.confirm-icon-info {
  background: var(--primary-soft);
  color: var(--primary);
}

.confirm-icon.confirm-icon-star {
  background: var(--orange-soft);
  color: var(--orange);
}

.confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.confirm-message {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.confirm-btn {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.confirm-btn:active {
  transform: scale(.97);
}

.confirm-btn-cancel {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.confirm-btn-cancel:hover {
  background: var(--border);
  color: var(--text);
}

.confirm-btn-danger {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, .3);
}

.confirm-btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 14px rgba(239, 68, 68, .4);
}

.confirm-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-shadow);
}

.confirm-btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px var(--primary-shadow);
}

.confirm-btn-warning {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, .3);
}

.confirm-btn-warning:hover {
  background: #d97706;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .4);
}

/* ═══════════════════════════════
   SCROLLBAR
   ═══════════════════════════════ */
.sidebar-nav::-webkit-scrollbar,
.admin-modal-content::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb,
.admin-modal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-track,
.admin-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

/* ═══════════════════════════════
   API DOCS
   ═══════════════════════════════ */
.apidocs-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.token-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  transition: all var(--transition);
}

.token-badge:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.token-badge code {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}

/* ═══════════════════════════════
   ANNOUNCEMENTS SECTION
   ═══════════════════════════════ */

/* ── Stats Row ── */
.ann-stats-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ann-stat-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 120px;
  transition: all var(--transition);
}

.ann-stat-chip:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-hover);
}

.ann-stat-val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.ann-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ann-stat-total .material-icons-outlined {
  color: var(--primary);
}

.ann-stat-active .material-icons-outlined {
  color: var(--green);
}

.ann-stat-expired .material-icons-outlined {
  color: var(--orange);
}

.ann-stat-inactive .material-icons-outlined {
  color: var(--text-muted);
}

/* ── Card Grid ── */
.ann-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

@media (max-width: 740px) {
  .ann-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Card ── */
.ann-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--shadow-sm);
}

.ann-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.ann-card-dim {
  opacity: .55;
}

.ann-card-dim:hover {
  opacity: .75;
}

.ann-card-expired {
  border-left: 3px solid var(--orange);
}

/* ── Card Visual ── */
.ann-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ann-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.ann-card:hover .ann-card-img {
  transform: scale(1.05);
}

.ann-card-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ann-card-img-fallback .material-icons-outlined {
  font-size: 40px;
  color: rgba(255, 255, 255, .4);
}

.ann-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .35) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Status Badge ── */
.ann-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ann-status-badge .material-icons-outlined {
  font-size: 13px;
}

.ann-status-active {
  background: rgba(34, 197, 94, .2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, .3);
}

.ann-status-inactive {
  background: rgba(107, 114, 128, .25);
  color: #d1d5db;
  border: 1px solid rgba(107, 114, 128, .3);
}

.ann-status-expired {
  background: rgba(245, 158, 11, .2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, .3);
}

/* ── Card Content ── */
.ann-card-content {
  padding: 16px 18px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ann-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ann-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* ── Card Footer ── */
.ann-card-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ann-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ann-card-date,
.ann-card-expires {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ann-card-date .material-icons-outlined,
.ann-card-expires .material-icons-outlined {
  font-size: 13px;
  opacity: .7;
}

.ann-card-expires {
  color: var(--orange);
}

.ann-card-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

/* ── Toggle Switch ── */
.ann-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}

.ann-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ann-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--border);
  transition: background .25s ease, box-shadow .25s ease;
}

.ann-toggle input:checked + .ann-toggle-track {
  background: var(--green);
  box-shadow: 0 0 10px rgba(34, 197, 94, .35);
}

.ann-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}

.ann-toggle input:checked ~ .ann-toggle-thumb {
  transform: translateX(16px);
}

.ann-toggle:hover .ann-toggle-track {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}

.ann-toggle.ann-toggle-loading {
  opacity: .5;
  pointer-events: none;
}

/* ── Empty State ── */
.ann-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 60px;
  text-align: center;
}

.ann-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-soft) 0%, rgba(99, 102, 241, .15) 100%);
  margin-bottom: 20px;
}

.ann-empty-icon .material-icons-outlined {
  font-size: 32px;
  color: var(--primary);
}

.ann-empty h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.ann-empty p {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.ann-empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--primary-shadow);
  transition: all .2s ease;
}

.ann-empty-cta:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px var(--primary-shadow);
  transform: translateY(-1px);
}

.ann-empty-cta svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════
   NEWS SECTION
   ═══════════════════════════════ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

@media (max-width: 740px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.news-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.news-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.news-card:hover .news-card-img-wrap img {
  transform: scale(1.03);
}

.news-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.news-card-img-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  opacity: .25;
}

.news-card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
  backdrop-filter: blur(8px);
}

.news-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-card-time {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-card-time svg {
  width: 13px;
  height: 13px;
}

.news-card-actions {
  display: flex;
  gap: 4px;
}

.news-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.news-count-badge svg {
  width: 14px;
  height: 14px;
}

.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.news-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}

.news-empty-icon svg {
  width: 28px;
  height: 28px;
}

.news-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.news-empty p {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 300px;
}

.news-img-preview {
  margin-top: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 160px;
  display: none;
}

.news-img-preview.active {
  display: block;
}

.news-img-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

/* ── Poll Image Preview ── */
.poll-img-preview {
  margin-top: 6px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 120px;
  display: none;
}

.poll-img-preview.active {
  display: block;
}

.poll-img-preview img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  display: block;
}

/* ═══════════════════════════════
   UTILITY
   ═══════════════════════════════ */
.hidden {
  display: none !important;
}

/* ═══════════════════════════════
   GROUPS SUB-TABS
   ═══════════════════════════════ */
.groups-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.groups-subtab {
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.groups-subtab:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-hover);
}

.groups-subtab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Groups Filter Bar ── */
.groups-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.groups-filter-btn {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.groups-filter-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.groups-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ═══════════════════════════════
   APPROVE / REJECT BUTTONS
   ═══════════════════════════════ */
.btn-approve {
  background: var(--green-soft);
  color: var(--green);
}

.btn-approve:hover {
  background: var(--green);
  color: #fff;
}

.btn-reject {
  background: var(--rose-soft);
  color: var(--rose);
}

.btn-reject:hover {
  background: var(--rose);
  color: #fff;
}

/* ═══════════════════════════════
   SURVEY ANSWERS
   ═══════════════════════════════ */
.survey-answers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.survey-answer-item {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  line-height: 1.4;
}

.survey-answer-item strong {
  color: var(--text);
  font-weight: 600;
}

/* ═══════════════════════════════
   DASHBOARD EXTRA SECTIONS
   ═══════════════════════════════ */
.dash-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-section-title .material-icons-outlined {
  font-size: 18px;
  color: var(--primary);
}

.dash-attention-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  transition: all var(--transition);
}

.dash-attention-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.dash-activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 8px;
}

.dash-activity-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.dash-activity-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: .3px;
}

/* ── Coords Paste Input ── */
.coords-paste {
  border-style: dashed !important;
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  transition: all .2s ease !important;
}

.coords-paste::placeholder {
  color: var(--primary) !important;
  opacity: .5;
}

.coords-paste:focus {
  border-style: solid !important;
  background: var(--surface) !important;
}

/* ── Image Mode Tabs ── */
.img-mode-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.img-mode-tab {
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s ease;
}

.img-mode-tab:hover {
  background: var(--surface);
  color: var(--text);
}

.img-mode-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Upload Dropzone ── */
.img-upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
  gap: 2px;
}

.img-upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Schedule Picker Grid ── */
.sp-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg);
  user-select: none;
  -webkit-user-select: none;
}

.sp-header {
  display: flex;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}

.sp-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light, rgba(255, 255, 255, .05));
}

.sp-row:last-child {
  border-bottom: none;
}

.sp-day-label {
  width: 36px;
  min-width: 36px;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.sp-cells {
  display: flex;
  flex: 1;
  gap: 1px;
}

.sp-hour-hdr {
  flex: 1;
  min-width: 22px;
  text-align: center;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 0;
}

.sp-cell {
  flex: 1;
  min-width: 22px;
  height: 24px;
  background: var(--surface);
  border-radius: 3px;
  cursor: pointer;
  transition: all .1s ease;
  position: relative;
}

.sp-cell:hover {
  background: var(--primary-soft);
  transform: scale(1.1);
  z-index: 1;
}

.sp-cell.sp-active {
  background: var(--primary);
  box-shadow: 0 0 6px rgba(99, 102, 241, .35);
}

.sp-cell.sp-active:hover {
  background: var(--primary-hover);
}

.sp-copy-btn {
  width: 28px;
  min-width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all .15s ease;
}

.sp-copy-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ═══════════════════════════════
   MUST GO STRIP
   ═══════════════════════════════ */
.mg-section {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.mg-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.mg-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mg-strip::-webkit-scrollbar {
  height: 4px;
}

.mg-strip::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.mg-card {
  position: relative;
  min-width: 110px;
  max-width: 110px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  cursor: grab;
  transition: all .15s ease;
  flex-shrink: 0;
}

.mg-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.mg-card.mg-dragging {
  opacity: .35;
  transform: scale(.92);
  box-shadow: 0 0 0 2px var(--primary), 0 8px 24px rgba(99, 102, 241, .2);
  border-color: var(--primary);
}

.mg-card-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  z-index: 2;
  line-height: 1.2;
}

.mg-card-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .15s ease;
}

.mg-card:hover .mg-card-remove {
  opacity: 1;
}

.mg-card-remove:hover {
  background: var(--rose);
}

.mg-card-img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.mg-card-placeholder {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--text-muted);
  background: var(--bg);
}

.mg-card-name {
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.mg-card-add {
  border-style: dashed;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 98px;
}

.mg-card-add:hover {
  border-color: var(--orange);
  background: rgba(249, 115, 22, .05);
}

/* ═══════════════════════════════
   FEATURED PROMOTIONS — PREMIUM CARDS
   ═══════════════════════════════ */
.fp-section {
  margin-bottom: 20px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.fp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.fp-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.fp-strip::-webkit-scrollbar {
  height: 4px;
}

.fp-strip::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.fp-card {
  position: relative;
  min-width: 220px;
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  transition: all .2s ease;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.fp-card:hover {
  border-color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, .12), 0 2px 8px rgba(0, 0, 0, .08);
}

.fp-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  border: none;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all .15s ease;
  backdrop-filter: blur(4px);
}

.fp-card:hover .fp-card-remove {
  opacity: 1;
}

.fp-card-remove:hover {
  background: var(--rose);
  transform: scale(1.1);
}

.fp-card-img-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
}

.fp-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.fp-card:hover .fp-card-img {
  transform: scale(1.06);
}

.fp-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, .06), rgba(249, 115, 22, .04));
}

.fp-card-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  letter-spacing: .3px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, .4);
  z-index: 2;
  text-transform: uppercase;
}

.fp-card-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.fp-status-active {
  background: rgba(34, 197, 94, .88);
  color: #fff;
}

.fp-status-scheduled {
  background: rgba(245, 158, 11, .88);
  color: #fff;
}

.fp-status-expired {
  background: rgba(239, 68, 68, .78);
  color: #fff;
}

.fp-card-body {
  padding: 12px 14px;
}

.fp-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fp-card-business {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.fp-card-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fp-price-old {
  font-size: 12px;
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 500;
}

.fp-price-new {
  font-size: 15px;
  font-weight: 800;
  color: var(--green);
}

.fp-card-dates {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fp-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Empty state ── */
.fp-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all .2s ease;
}

.fp-empty:hover {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, .04);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .08);
}

.fp-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
}

.fp-empty:hover .fp-empty-icon {
  background: #f59e0b;
}

.fp-empty:hover .fp-empty-icon .material-icons-outlined {
  color: #fff !important;
}

.fp-empty-text {
  flex: 1;
}

/* ── Featured row highlight in table ── */
.fp-row-featured {
  background: linear-gradient(90deg, rgba(245, 158, 11, .14) 0%, rgba(251, 191, 36, .07) 35%, rgba(249, 115, 22, .04) 100%);
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, #f59e0b, #f97316, #ec4899) 1;
  position: relative;
}

.fp-row-featured::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #fbbf24, #f59e0b, #f97316);
  border-radius: 0 2px 2px 0;
  animation: fp-shimmer 2.5s ease-in-out infinite;
}

@keyframes fp-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

.fp-row-featured:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, .22) 0%, rgba(251, 191, 36, .12) 35%, rgba(249, 115, 22, .06) 100%) !important;
}

@media (max-width: 740px) {
  .fp-card {
    min-width: 180px;
    max-width: 180px;
  }

  .fp-card-img-wrap {
    height: 100px;
  }

  .fp-empty {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══════════════════════════════
   FEATURED TOURIST SPOT — PREMIUM BANNER
   ═══════════════════════════════ */
.fsh-banner {
  position: relative;
  width: 100%;
  min-height: 200px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 20px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  transition: box-shadow .3s ease;
}

.fsh-banner:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.fsh-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(0, 0, 0, .75) 0%,
      rgba(0, 0, 0, .55) 40%,
      rgba(0, 0, 0, .20) 100%);
  z-index: 1;
}

.fsh-banner-content {
  position: relative;
  z-index: 2;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 200px;
}

.fsh-badge-glow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245, 158, 11, .92);
  color: #fff;
  letter-spacing: .4px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 14px rgba(245, 158, 11, .45), 0 2px 6px rgba(0, 0, 0, .2);
  width: fit-content;
  margin-bottom: 10px;
  animation: fsh-glow-pulse 2.5s ease-in-out infinite;
}

@keyframes fsh-glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 14px rgba(245, 158, 11, .45), 0 2px 6px rgba(0, 0, 0, .2);
  }

  50% {
    box-shadow: 0 0 22px rgba(245, 158, 11, .65), 0 2px 8px rgba(0, 0, 0, .3);
  }
}

.fsh-banner-name {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  margin-bottom: 8px;
}

.fsh-banner-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.fsh-pill {
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .15);
}

.fsh-addr {
  font-size: 12px;
  color: rgba(255, 255, 255, .75);
  font-weight: 400;
}

.fsh-rating-pill {
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.fsh-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(10px);
  cursor: pointer;
  width: fit-content;
  transition: all .2s ease;
  letter-spacing: .2px;
}

.fsh-change-btn:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .45);
  box-shadow: 0 4px 16px rgba(255, 255, 255, .1);
  transform: translateY(-1px);
}

/* ── Empty state ── */
.fsh-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all .2s ease;
}

.fsh-empty:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.fsh-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s ease;
}

.fsh-empty:hover .fsh-empty-icon {
  background: var(--primary);
}

.fsh-empty:hover .fsh-empty-icon .material-icons-outlined {
  color: #fff !important;
}

.fsh-empty-text {
  flex: 1;
}

/* ═══════════════════════════════
   FEATURED SPOT PICKER — MODAL CARDS
   ═══════════════════════════════ */
.fsp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}

.fsp-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .2s ease;
}

.fsp-card:not(.fsp-card-active):hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--primary-shadow);
  transform: translateY(-3px);
}

.fsp-card-active {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .25), 0 4px 12px rgba(245, 158, 11, .15);
}

.fsp-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg);
}

.fsp-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.fsp-card:not(.fsp-card-active):hover .fsp-card-img {
  transform: scale(1.06);
}

.fsp-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.fsp-card-current {
  position: absolute;
  bottom: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(245, 158, 11, .92);
  color: #fff;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, .35);
}

.fsp-card-body {
  padding: 10px 12px;
}

.fsp-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fsp-card-cat {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
}

.fsp-card-rating {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

@media (max-width: 740px) {
  .fsh-banner-content {
    padding: 20px;
    min-height: 160px;
  }

  .fsh-banner-name {
    font-size: 18px;
  }

  .fsh-empty {
    flex-direction: column;
    text-align: center;
  }

  .fsp-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* ═══════════════════════════════
   SIDEBAR BADGE (pending count)
   ═══════════════════════════════ */
.sidebar-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  background: var(--rose);
  color: #fff;
  flex-shrink: 0;
}

.sidebar-item.active .sidebar-badge {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

/* ═══════════════════════════════
   CONTENT SUBMISSIONS
   ═══════════════════════════════ */
.cs-grid {
  display: grid;
  gap: 14px;
  padding: 4px 0;
}

.cs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: all .2s ease;
  cursor: pointer;
}

.cs-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.cs-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.cs-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.cs-card-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  flex-shrink: 0;
}

.cs-card-meta {
  display: flex;
  flex-direction: column;
}

.cs-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.cs-card-date {
  font-size: 11px;
  color: var(--text-muted);
}

.cs-card-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.cs-card-type-place {
  background: rgba(59, 130, 246, .1);
  color: #3b82f6;
}

.cs-card-type-event {
  background: rgba(139, 92, 246, .1);
  color: #8b5cf6;
}

.cs-card-type-promotion {
  background: rgba(16, 185, 129, .1);
  color: #10b981;
}

.cs-card-body {
  margin-top: 12px;
}

.cs-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cs-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cs-card-image {
  margin-top: 12px;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.cs-card-footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Detail modal – wider for submissions */
.cs-detail-modal {
  max-width: 660px !important;
}

.cs-detail-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.cs-detail-section {
  margin-bottom: 18px;
}

.cs-detail-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cs-detail-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 600px) {
  .cs-detail-data-grid {
    grid-template-columns: 1fr;
  }
}

.cs-data-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.cs-data-item-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.cs-data-item-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.cs-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.cs-detail-actions .btn-approve {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.cs-detail-actions .btn-approve:hover {
  background: #059669;
  box-shadow: 0 4px 8px rgba(16, 185, 129, .3);
  transform: translateY(-1px);
}

.cs-detail-actions .btn-reject {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--rose);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.cs-detail-actions .btn-reject:hover {
  background: #dc2626;
  box-shadow: 0 4px 8px rgba(239, 68, 68, .3);
  transform: translateY(-1px);
}

.cs-detail-actions .btn-delete-sub {
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.cs-detail-actions .btn-delete-sub:hover {
  color: var(--rose);
  border-color: var(--rose);
  background: var(--rose-soft);
}

.cs-notes-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  transition: all var(--transition);
  margin-top: 12px;
}

.cs-notes-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.cs-admin-notes {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cs-admin-notes strong {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ═══════════════════════════════
   CHAT MODERATION — Luna 🌙
   ═══════════════════════════════ */
.chat-mod-layout {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 520px;
  background: var(--bg);
}

/* ── Channel Sidebar ── */
.chat-mod-channels {
  width: 220px;
  min-width: 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-mod-channels-header {
  padding: 14px 16px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-mod-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

.chat-mod-channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
}

.chat-mod-channel-item:hover {
  background: var(--bg);
}

.chat-mod-channel-item.active {
  background: var(--primary-soft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.chat-mod-channel-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.chat-mod-channel-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-mod-channel-item.active .chat-mod-channel-name {
  color: var(--primary);
}

/* ── Messages Area ── */
.chat-mod-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.chat-mod-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  flex-shrink: 0;
}

.chat-mod-toolbar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chat-mod-toolbar-info .channel-label {
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

.chat-mod-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-mod-btn-select {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chat-mod-btn-select:hover {
  background: var(--surface);
  border-color: var(--border-hover);
  color: var(--text);
}

.chat-mod-btn-delete {
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--rose);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, .25);
}

.chat-mod-btn-delete:hover {
  background: #dc2626;
  box-shadow: 0 4px 14px rgba(239, 68, 68, .35);
  transform: translateY(-1px);
}

.chat-mod-btn-delete:disabled {
  opacity: .4;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.chat-mod-selected-count {
  padding: 4px 10px;
  background: var(--rose-soft);
  color: var(--rose);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

/* ── Messages Scroll ── */
.chat-mod-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-mod-messages::-webkit-scrollbar {
  width: 5px;
}

.chat-mod-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ── Chat Bubble ── */
.chat-mod-bubble {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: all .15s ease;
  cursor: pointer;
  position: relative;
}

.chat-mod-bubble:hover {
  background: var(--bg);
}

.chat-mod-bubble.selected {
  background: var(--rose-soft);
  box-shadow: inset 0 0 0 1.5px var(--rose);
}

.chat-mod-bubble-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  transition: all .15s ease;
  background: var(--surface);
}

.chat-mod-bubble.selected .chat-mod-bubble-check {
  background: var(--rose);
  border-color: var(--rose);
}

.chat-mod-bubble.selected .chat-mod-bubble-check::after {
  content: '✓';
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.chat-mod-bubble-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}

.chat-mod-bubble-body {
  flex: 1;
  min-width: 0;
}

.chat-mod-bubble-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}

.chat-mod-bubble-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.chat-mod-bubble-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.chat-mod-bubble-msg {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  word-break: break-word;
}

.chat-mod-bubble-msg img {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  margin-top: 4px;
  border: 1px solid var(--border);
}

.chat-mod-bubble-channel {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.chat-mod-bubble-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity .15s ease;
  flex-shrink: 0;
  margin-top: 4px;
}

.chat-mod-bubble:hover .chat-mod-bubble-actions {
  opacity: 1;
}

/* ── Empty State ── */
.chat-mod-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.chat-mod-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  margin-bottom: 16px;
  font-size: 28px;
}

.chat-mod-empty h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.chat-mod-empty p {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 280px;
  margin: 0;
}

/* ── Pagination ── */
.chat-mod-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .chat-mod-layout {
    flex-direction: column;
    min-height: auto;
  }

  .chat-mod-channels {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }

  .chat-mod-channels-list {
    display: flex;
    flex-wrap: wrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding: 8px;
  }

  .chat-mod-channel-item {
    padding: 6px 12px;
    border-radius: 9999px;
    background: var(--bg);
    border: 1px solid var(--border);
    width: auto;
  }

  .chat-mod-channel-item.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: none;
  }

  .chat-mod-channel-item.active .chat-mod-channel-name {
    color: #fff;
  }

  .chat-mod-channel-icon {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .chat-mod-channel-name {
    font-size: 11px;
  }

  .chat-mod-messages {
    max-height: 400px;
  }
}

/* ═══════════════════════════════
   AI ENRICH MODAL — Premium Design
   ═══════════════════════════════ */

/* ── Header Strip ── */
.ai-enrich-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  margin: -28px -28px 24px -28px;
  background: linear-gradient(135deg, #EA580C 0%, #F97316 50%, #FB923C 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  position: relative;
  overflow: hidden;
}

/* Subtle noise overlay */
.ai-enrich-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
}

.ai-enrich-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  animation: aiIconPulse 2.5s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, .15);
}

@keyframes aiIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.ai-enrich-header-text {
  flex: 1;
  min-width: 0;
}

.ai-enrich-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.ai-enrich-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, .7);
}

.ai-enrich-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, .8);
  transition: all var(--transition);
  flex-shrink: 0;
}

.ai-enrich-close:hover {
  background: rgba(255, 255, 255, .25);
  color: #fff;
}

.ai-enrich-close .material-icons-outlined {
  font-size: 16px;
}

/* ── Place Info Pill ── */
.ai-enrich-place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 9999px;
  margin-bottom: 16px;
}

.ai-enrich-place-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.ai-enrich-place-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* ── Tip Card ── */
.ai-enrich-tip {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  align-items: flex-start;
}

.ai-enrich-tip-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ai-enrich-tip-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.ai-enrich-tip-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Textarea ── */
.ai-enrich-textarea-wrap {
  margin-bottom: 20px;
}

.ai-enrich-textarea-wrap label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.ai-enrich-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 400;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 120px;
  transition: all .2s ease;
  outline: none;
}

.ai-enrich-textarea:hover {
  border-color: var(--border-hover);
}

.ai-enrich-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: var(--surface);
}

.ai-enrich-textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

/* ── Footer Actions ── */
.ai-enrich-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

.ai-enrich-btn-cancel {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

.ai-enrich-btn-cancel:hover {
  background: var(--bg);
  border-color: var(--border-hover);
  color: var(--text);
}

.ai-enrich-btn-generate {
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #EA580C, #F97316);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--primary-shadow);
}

.ai-enrich-btn-generate::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  animation: aiShimmer 2.5s ease-in-out infinite;
}

@keyframes aiShimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.ai-enrich-btn-generate:hover {
  background: linear-gradient(135deg, #C2410C, #EA580C);
  box-shadow: 0 4px 16px rgba(249, 115, 22, .35);
  transform: translateY(-1px);
}

.ai-enrich-btn-generate:active {
  transform: translateY(0);
}

.ai-enrich-btn-generate:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.ai-enrich-btn-generate:disabled::before {
  animation: none;
}

/* ── Spinner for AI processing state ── */
.ai-enrich-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: aiSpinRotate .6s linear infinite;
}

@keyframes aiSpinRotate {
  to { transform: rotate(360deg); }
}