/* ============================================================
   Dohorify — Clean Minimal DJ Dashboard
   Theme: Deep charcoal + warm white text + single lime accent
   Font: DM Sans + DM Mono
   ============================================================ */

@import url('https://fonts.bunny.net/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:           #0e0e10;
  --surface:      #18181b;
  --surface-2:    #222226;
  --surface-3:    #2a2a2f;
  --border:       #2c2c31;
  --border-light: #36363d;

  --accent:       #b8f54a;
  --accent-dim:   rgba(184, 245, 74, 0.10);
  --accent-hover: #caff5f;

  --text-1:  #f2f2ef;
  --text-2:  #a0a0a8;
  --text-3:  #5c5c66;

  --danger:      #e05757;
  --danger-dim:  rgba(224, 87, 87, 0.12);
  --success:     #4fc98a;
  --success-dim: rgba(79, 201, 138, 0.12);
  --warning:     #e0a54a;
  --warning-dim: rgba(224, 165, 74, 0.12);
  --info:        #5a9cf5;
  --info-dim:    rgba(90, 156, 245, 0.12);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;

  --sidebar-w: 230px;
  --transition: 0.15s ease;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.55);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body, body.dark-mode {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text-1);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ── Loading Screen ────────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 9999;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loading-screen p {
  color: var(--text-2);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
}

/* ── Layout ────────────────────────────────────────────────── */
.app-container {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
  position: relative;
  z-index: 100;
}

.sidebar-header {
  padding: 0 0.5rem 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.125rem;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color var(--transition), background var(--transition);
}

.sidebar-close-btn:hover { color: var(--text-1); background: var(--surface-2); }

.logo-container {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.logo-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-top span { display: inline !important; color: var(--text-1); font-size: 1.0625rem; font-weight: 600; }

.logo-container i { color: var(--accent); font-size: 1.1rem; }

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 0.75rem;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-item i {
  width: 1rem;
  text-align: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.nav-item:hover { background: var(--surface-2); color: var(--text-1); }

.nav-item.active { background: var(--accent-dim); color: var(--accent); cursor: default; pointer-events: none; }

.badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  min-width: 1.35rem;
  text-align: center;
}

.sidebar-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.nav-action-btn {
  width: 100%;
  background: var(--surface);
  -webkit-appearance: none;
  appearance: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-2);
  font-family: inherit;
}
.nav-action-btn:hover { background: var(--surface-2); color: var(--text-1); }

.nav-action-danger:hover { background: rgba(239,68,68,.12); color: #f87171; }

.nav-request-song-dim {
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-request-song-dim:hover { color: var(--text-1); background: var(--surface-2); }

/* Sidebar Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

.user-profile { display: flex; align-items: center; gap: 0.625rem; flex: 1; min-width: 0; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* Equalizer avatar (replaces DJ text) */
.avatar-eq {
  gap: 2px;
  padding: 0;
  align-items: flex-end;
  background: transparent;
  border: none;
  border-radius: 0;
}
.avatar-eq span {
  display: inline-block;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: avatarEqPulse 1.2s ease-in-out infinite alternate;
}
.avatar-eq span:nth-child(1) { height: 8px;  animation-duration: 1.05s; animation-delay: 0s; }
.avatar-eq span:nth-child(2) { height: 14px; animation-duration: 0.85s; animation-delay: 0.15s; }
.avatar-eq span:nth-child(3) { height: 10px; animation-duration: 1.30s; animation-delay: 0.05s; }
.avatar-eq span:nth-child(4) { height: 6px;  animation-duration: 0.95s; animation-delay: 0.22s; }
@keyframes avatarEqPulse {
  from { transform: scaleY(0.35); opacity: 0.7; }
  to   { transform: scaleY(1);    opacity: 1; }
}

.user-info { flex: 1; min-width: 0; }

.user-info h4 {
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-1);
}

.user-info p { font-size: 0.6875rem; color: var(--success); margin: 0; }

.logout-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.logout-btn:hover { color: var(--danger); background: var(--danger-dim); }

/* ── Main Content ──────────────────────────────────────────── */
.main-content { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.75rem;
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-shrink: 0;
}

.top-bar-left { display: flex; align-items: center; gap: 0.875rem; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .25rem .375rem;
}

.top-bar-left h1 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }

.top-bar-right { display: flex; align-items: center; gap: 0.5rem; }

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-2);
  padding: 0.3rem 0.75rem;
  background: var(--surface-2);
  border-radius: 99px;
  border: 1px solid var(--border);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.icon-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover { background: var(--surface-2); color: var(--text-1); }

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 700;
}

/* ── Content Area ──────────────────────────────────────────── */
.content-area { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.75rem; }

/* ── Views ─────────────────────────────────────────────────── */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.2s ease; }
.view.active.tables-page { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Requests Filter Bar (lives outside scroll area) ───────── */
.requests-filter-bar {
  flex-shrink: 0;
  background: var(--bg);
  padding: 0.5rem 1.75rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Type Filter Row (above status filters) ────────────────── */
.type-filter-controls {
  display: flex;
  gap: .375rem;
}

.type-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.type-filter-btn i { font-size: .7rem; }
.type-filter-btn:hover { background: var(--surface-2); color: var(--text-1); }
.type-filter-btn.active {
  background: var(--accent-dim);
  border-color: rgba(184,245,74,.3);
  color: var(--accent);
}

/* ── Type Tabs ─────────────────────────────────────────────── */
.type-tabs {
  display: flex;
  gap: .375rem;
}

.type-tab {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .4rem .875rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.type-tab i { font-size: .75rem; }

.type-tab:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.type-tab.active {
  background: var(--accent-dim);
  border-color: rgba(184,245,74,.3);
  color: var(--accent);
}

/* type badge on type tab */
.type-tab .filter-badge {
  background: var(--surface-3);
  color: var(--text-2);
}
.type-tab.active .filter-badge {
  background: rgba(184,245,74,.2);
  color: var(--accent);
}

.view-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.view-header h2 { font-size: 1rem; font-weight: 600; }

/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.filter-btn {
  padding: 0.35rem 0.875rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.267rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  position: relative;
  z-index: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, z-index 0s;
}

.filter-btn:hover { color: var(--text-1); }
.filter-btn.active {
  color: var(--text-1);
  z-index: 10;
}

/* Dim inactive backgrounds when one is active */
.filter-controls:has(.filter-btn.active) .filter-btn[data-filter="pending"]:not(.active) { background: rgba(224, 87, 87, 0.02); border-color: rgba(224, 87, 87, 0.07); }
.filter-controls:has(.filter-btn.active) .filter-btn[data-filter="accepted"]:not(.active) { background: rgba(224, 165, 74, 0.02); border-color: rgba(224, 165, 74, 0.07); }
.filter-controls:has(.filter-btn.active) .filter-btn[data-filter="played"]:not(.active) { background: rgba(79, 201, 138, 0.02); border-color: rgba(79, 201, 138, 0.07); }

/* Per-status active pop effect */
.filter-btn[data-filter="pending"].active {
  background: rgba(224, 87, 87, 0.18);
  border-color: rgba(224, 87, 87, 0.5);
  box-shadow: 0 6px 20px rgba(224, 87, 87, 0.35), 0 2px 8px rgba(0,0,0,0.4);
}
.filter-btn[data-filter="accepted"].active {
  background: rgba(224, 165, 74, 0.18);
  border-color: rgba(224, 165, 74, 0.5);
  box-shadow: 0 6px 20px rgba(224, 165, 74, 0.35), 0 2px 8px rgba(0,0,0,0.4);
}
.filter-btn[data-filter="played"].active {
  background: rgba(79, 201, 138, 0.18);
  border-color: rgba(79, 201, 138, 0.5);
  box-shadow: 0 6px 20px rgba(79, 201, 138, 0.35), 0 2px 8px rgba(0,0,0,0.4);
}

/* Glassy per-status styles */
.filter-btn[data-filter="pending"] {
  background: rgba(224, 87, 87, 0.07);
  border-color: rgba(224, 87, 87, 0.18);
  backdrop-filter: blur(8px);
  color: var(--danger);
}
.filter-btn[data-filter="pending"]:hover,
.filter-btn[data-filter="pending"].active {
  background: rgba(224, 87, 87, 0.16);
  border-color: rgba(224, 87, 87, 0.32);
  color: var(--danger);
}

.filter-btn[data-filter="accepted"] {
  background: rgba(224, 165, 74, 0.07);
  border-color: rgba(224, 165, 74, 0.18);
  backdrop-filter: blur(8px);
  color: var(--warning);
}
.filter-btn[data-filter="accepted"]:hover,
.filter-btn[data-filter="accepted"].active {
  background: rgba(224, 165, 74, 0.16);
  border-color: rgba(224, 165, 74, 0.32);
  color: var(--warning);
}

.filter-btn[data-filter="played"] {
  background: rgba(79, 201, 138, 0.07);
  border-color: rgba(79, 201, 138, 0.18);
  backdrop-filter: blur(8px);
  color: var(--success);
}
.filter-btn[data-filter="played"]:hover,
.filter-btn[data-filter="played"].active {
  background: rgba(79, 201, 138, 0.16);
  border-color: rgba(79, 201, 138, 0.32);
  color: var(--success);
}

.filter-badge {
  display: inline-block;
  background: var(--surface-3);
  color: var(--text-2);
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  padding: 0.05rem 0.4rem;
  margin-left: 0.3rem;
  min-width: 1.1rem;
  text-align: center;
  vertical-align: middle;
  line-height: 1.5;
}

.filter-badge:empty { display: none; }

.filter-btn[data-filter="pending"]  .filter-badge { background: var(--danger-dim);  color: var(--danger); }
.filter-btn[data-filter="accepted"] .filter-badge { background: var(--warning-dim); color: var(--warning); }
.filter-btn[data-filter="played"]   .filter-badge { background: var(--success-dim); color: var(--success); }
.filter-btn[data-filter="all"] .filter-badge { background: var(--info-dim); color: var(--info); }

.action-buttons { display: flex; gap: 0.5rem; }

/* ── Request Cards ─────────────────────────────────────────── */
.requests-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.request-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
  position: relative;
}

.request-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); }

.card-remove-btn {
  position: absolute;
  top: .625rem;
  right: .625rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .625rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.card-remove-btn:hover { background: var(--danger-dim); color: var(--danger); border-color: var(--danger); }

/* Status-aware left accent border */
.request-card.pending  { border-left-color: var(--danger); }
.request-card.accepted { border-left-color: var(--warning); }
.request-card.played   { border-left-color: var(--accent); opacity: .8; }
.request-card.rejected { border-left-color: var(--danger); opacity: .55; }

.request-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }

/* Song info */
.request-song { flex: 1; min-width: 0; }
.request-title {
  font-size: 1rem; font-weight: 700; color: var(--text-1);
  line-height: 1.3; margin-bottom: .2rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.request-artist { font-size: .8125rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge.pending  { background: var(--warning-dim); color: var(--warning); }
.status-badge.accepted { background: var(--success-dim); color: var(--success); }
.status-badge.rejected { background: var(--danger-dim);  color: var(--danger);  }
.status-badge.played   { background: var(--accent-dim);  color: var(--accent);  }

/* Meta chips row */
.request-meta-row { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; }

.request-meta-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .65rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 99px;
  font-size: .75rem; color: var(--text-2);
  white-space: nowrap;
}
.request-meta-chip i { color: var(--text-3); font-size: .6875rem; }
.request-meta-link { color: var(--accent); border-color: rgba(184,245,74,.2); background: var(--accent-dim); }
.request-meta-link:hover { background: rgba(184,245,74,.18); }
.request-type-chip { font-weight: 600; }
.request-type-chip.type-song  { color: #7eb8ff; border-color: rgba(126,184,255,.25); background: rgba(126,184,255,.1); }
.request-type-chip.type-song i  { color: #7eb8ff; }
.request-type-chip.type-sing  { color: #f8a4d4; border-color: rgba(248,164,212,.25); background: rgba(248,164,212,.1); }
.request-type-chip.type-sing i  { color: #f8a4d4; }
.request-type-chip.type-dance { color: #a5d6a7; border-color: rgba(165,214,167,.25); background: rgba(165,214,167,.1); }
.request-type-chip.type-dance i { color: #a5d6a7; }

/* ── Table Management ─────────────────────────────────────── */
.tables-page {
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.tables-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem 1rem;
  flex-shrink: 0;
}

.tables-title-group {
  display: flex;
  align-items: center;
  gap: .625rem;
}

.tables-page-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
}

.tables-count-badge {
  font-family: 'DM Mono', monospace;
  font-size: .6875rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(184,245,74,.2);
  padding: .15rem .55rem;
  border-radius: 100px;
}

.tables-header-actions { display: flex; gap: .5rem; }

/* Creation panel */
.tables-creation {
  flex-shrink: 0;
  padding: .875rem 1.75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.tables-create-row {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-wrap: wrap;
}

.tables-create-tag {
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  width: 3rem;
  flex-shrink: 0;
}

.tables-create-sep {
  height: 1px;
  background: var(--border);
  margin: .125rem 0;
}

.tables-range-sep {
  color: var(--text-3);
  font-size: .875rem;
  flex-shrink: 0;
}

.tables-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  padding: .45rem .75rem;
  outline: none;
  transition: border-color var(--transition);
  min-width: 0;
}
.tables-input:focus { border-color: rgba(184,245,74,.5); }
.tables-input::placeholder { color: var(--text-3); }
.tables-input-num { width: 88px; }
.tables-input-wide { flex: 1; min-width: 120px; }

/* Scroll area */
.tables-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
}

/* Grid */
.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: .875rem;
}

.tables-empty-state {
  grid-column: 1 / -1;
  color: var(--text-3);
  font-size: .875rem;
  padding: 2rem 0;
  text-align: center;
}

/* Card */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.table-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
}

.table-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: .875rem 1rem .625rem;
}

.table-card-identity {}

.table-card-number {
  font-family: 'DM Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  letter-spacing: .02em;
}

.table-card-label {
  font-size: .6875rem;
  color: var(--text-3);
  margin-top: .25rem;
}

.table-card-del {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: .25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  font-size: .75rem;
  line-height: 1;
}
.table-card-del:hover { color: var(--danger); background: var(--danger-dim); }

.table-card-qr-wrap {
  padding: 0 1rem .75rem;
}

.table-card-qr {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
  display: block;
}

.table-card-url {
  padding: 0 1rem .875rem;
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  color: var(--text-3);
  word-break: break-all;
  line-height: 1.5;
  text-align: center;
}

.table-card-dl {
  margin: 0 1rem 1rem;
  background: var(--accent-dim);
  border: 1px solid rgba(184,245,74,.18);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: .5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  transition: background var(--transition), border-color var(--transition);
  width: calc(100% - 2rem);
}
.table-card-dl:hover { background: rgba(184,245,74,.18); border-color: rgba(184,245,74,.32); }

/* ── Tables inline confirm panel ─────────────────────────── */
.tables-confirm-panel {
  flex-shrink: 0;
  border-top: 1px solid rgba(224,87,87,.3);
  background: rgba(224,87,87,.07);
  padding: .875rem 1.75rem;
  animation: fadeIn .15s ease;
}
.tables-confirm-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tables-confirm-msg {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.tables-confirm-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-1);
}
.tables-confirm-sub {
  font-size: .8rem;
  color: var(--text-2);
  margin-top: .125rem;
}
.tables-confirm-actions { display: flex; gap: .5rem; }

/* ── Seating label chip on request cards ──────────────────── */
.seating-label-chip { color: #fbbf24; border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.1); font-weight: 600; }
.seating-label-chip i { color: #fbbf24; }

/* kept for backward compat with old requests */
.table-num-chip { color: #fbbf24; border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.1); font-weight: 600; }
.table-num-chip i { color: #fbbf24; }

/* ── Seating type badge on cards ──────────────────────────── */
.seating-type-tag {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .1rem .4rem;
  border-radius: 100px;
  border: 1px solid;
}
.seating-type-table  { color: #63b3ed; border-color: rgba(99,179,237,.3); background: rgba(99,179,237,.1); }
.seating-type-sofa   { color: #b794f4; border-color: rgba(183,148,244,.3); background: rgba(183,148,244,.1); }
.seating-type-general{ color: #68d391; border-color: rgba(104,211,145,.3); background: rgba(104,211,145,.1); }
.seating-type-custom { color: #fbbf24; border-color: rgba(251,191,36,.3);  background: rgba(251,191,36,.1); }

.note-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--text-2);
  max-height: 56px;
  overflow-y: auto;
  font-style: italic;
}

/* Actions footer */
.request-actions {
  display: flex; gap: .5rem; flex-wrap: wrap;
  padding-top: .875rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* Accept / Reject card buttons */
.btn-accept {
  flex: 1; min-width: 80px; justify-content: center;
  padding: .55rem .875rem;
  background: rgba(79,201,138,.13); color: var(--success);
  border: 1px solid rgba(79,201,138,.3);
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  font-family: 'DM Sans', sans-serif;
  transition: background var(--transition);
}
.btn-accept:hover { background: rgba(79,201,138,.24); }

.btn-reject {
  flex: 1; min-width: 80px; justify-content: center;
  padding: .55rem .875rem;
  background: transparent; color: var(--danger);
  border: 1px solid rgba(224,87,87,.28);
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  font-family: 'DM Sans', sans-serif;
  transition: background var(--transition);
}
.btn-reject:hover { background: rgba(224,87,87,.12); }

.btn-mark-played { flex: 1; justify-content: center; }

.btn-message {
  flex: 1; justify-content: center;
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .875rem;
  background: rgba(99,179,237,.1); color: #63b3ed;
  border: 1px solid rgba(99,179,237,.25); border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background var(--transition);
}
.btn-message:hover { background: rgba(99,179,237,.2); }

/* Dedication section overrides */
.dedication-note {
  max-height: none;
  font-style: normal;
}
.dedication-label {
  display: block;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  margin-bottom: .3rem;
}
.dedication-list {
  list-style: disc;
  margin: 0 0 0 1rem;
  padding: 0;
  color: var(--text-1);
}
.dedication-list li { line-height: 1.65; font-size: .8125rem; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.8125rem;
  font-family: 'DM Sans', sans-serif;
  transition: opacity var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:active { opacity: 0.8; }

.btn-primary { background: var(--accent); color: #0e0e10; font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-success { background: var(--success-dim); color: var(--success); border: 1px solid rgba(79,201,138,0.25); }
.btn-success:hover { background: rgba(79,201,138,0.22); }

.btn-danger { background: var(--danger-dim); color: var(--danger); border: 1px solid rgba(224,87,87,0.25); }
.btn-danger:hover { background: rgba(224,87,87,0.22); }

.btn-secondary { background: var(--surface-2); color: var(--text-1); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface-3); }

.btn-link { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); text-decoration: none; }
.btn-link:hover { background: var(--surface-3); }

.btn-sm   { padding: 0.325rem 0.65rem; font-size: 0.75rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-3); }
.empty-state i { font-size: 2rem; margin-bottom: 0.875rem; display: block; }
.empty-state p { font-size: 0.875rem; }

/* ── Queue ─────────────────────────────────────────────────── */
.queue-list { display: flex; flex-direction: column; gap: 0.625rem; }

.queue-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: grab;
  transition: border-color var(--transition);
}

.queue-item:hover { border-color: var(--border-light); }
.queue-item.dragging { opacity: 0.45; }

.queue-position {
  font-size: .8rem;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--text-3);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.queue-content { flex: 1; min-width: 0; }
.queue-title { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-subtitle { font-size: 0.8125rem; color: var(--text-2); margin-top: 0.15rem; }
.queue-duration { font-size: 0.8125rem; color: var(--text-3); font-family: 'DM Mono', monospace; flex-shrink: 0; }

.queue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: background var(--transition), border-color var(--transition);
}
.queue-card:hover { background: var(--surface-2); border-color: var(--border-light); }

.queue-card-row {
  display: flex;
  align-items: center;
  gap: .875rem;
}
.queue-card-info {
  flex: 1;
  min-width: 0;
}
.queue-card-info .request-title {
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-card-info .request-artist {
  font-size: .775rem;
  color: var(--text-3);
  margin-top: .1rem;
}

.queue-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .1rem;
  flex-shrink: 0;
}
.queue-requester {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: .1rem;
}
.queue-requester-label {
  font-size: .6875rem;
  color: var(--text-3);
}
.queue-requester-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-1);
}

.queue-card-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}
.queue-play-btn,
.queue-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
}
.queue-play-btn { background: var(--accent); color: #0e0e10; }
.queue-remove-btn { background: transparent; color: var(--text-3); border: 1px solid var(--border); }
.queue-play-btn:hover { transform: scale(1.08); }
.queue-remove-btn:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-dim); }

.queue-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.queue-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  flex-shrink: 0;
}
.queue-info { flex: 1; min-width: 0; }
.queue-info h3 { font-size: 0.9375rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 0.2rem; }
.queue-info p { font-size: 0.8125rem; color: var(--text-2); margin: 0 0 0.25rem; }
.queue-requester { font-size: 0.75rem; color: var(--text-3); }
.queue-requester i { margin-right: 0.25rem; }

/* ── Analytics ─────────────────────────────────────────────── */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.stat-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-sm); }

.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }

.stat-label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
}

.stat-header i {
  font-size: .875rem;
  color: var(--text-3);
  width: 30px; height: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.stat-value {
  font-size: 2.125rem;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  font-family: 'DM Mono', monospace;
}

.stat-subtitle { font-size: 0.75rem; color: var(--text-3); margin-top: 0.5rem; }

.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  min-width: 0;
  overflow: hidden;
}

.chart-container h3 { font-size: 0.875rem; font-weight: 600; color: var(--text-1); margin-bottom: 1.25rem; }

.status-breakdown { display: flex; flex-direction: column; gap: 1rem; }

.status-item {
  display: grid;
  grid-template-columns: minmax(0, 90px) 1fr minmax(0, 44px);
  align-items: center;
  gap: 0.875rem;
}

.status-label { font-size: .75rem; color: var(--text-2); font-weight: 600; }

.progress-bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }

.progress-fill { height: 100%; border-radius: 99px; transition: width 0.4s ease; }
.progress-fill.accepted { background: var(--success); }
.progress-fill.pending  { background: var(--warning); }
.progress-fill.rejected { background: var(--danger);  }
.progress-fill.played   { background: var(--accent);  }

.status-item > span:last-child {
  font-size: 0.8125rem;
  color: var(--text-2);
  font-family: 'DM Mono', monospace;
  text-align: right;
}

/* ── Settings ──────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.settings-card:hover { border-color: var(--border-light); }

.settings-card h3 {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 1.375rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--border);
}

.setting-group { margin-bottom: 1.25rem; }

.setting-group label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--text-1);
}

.setting-group input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

.setting-group input[type="text"],
.setting-group input[type="number"],
.setting-group input[type="email"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.setting-group input[type="text"]:focus,
.setting-group input[type="number"]:focus,
.setting-group input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.help-text { font-size: 0.75rem; color: var(--text-3); margin-top: 0.3rem; }
.qr-link-row { display: flex; align-items: baseline; gap: .25rem; overflow: hidden; }
.qr-link-label { white-space: nowrap; flex-shrink: 0; }
.qr-link-url { color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }

#requestUrlLink,
#queueUrlLink {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: .2rem;
}

.qr-code-container {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  margin-bottom: 0.875rem;
  border: 1px solid var(--border);
}

/* ── Settings Tabs ──────────────────────────────────────────── */
.settings-tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .3rem;
  width: fit-content;
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .875rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.settings-tab:hover { color: var(--text-1); background: var(--surface-2); }
.settings-tab.active { background: var(--surface-3); color: var(--text-1); box-shadow: var(--shadow-sm); }
.settings-tab.active i { color: var(--accent); }

.settings-panel { display: none; }
.settings-panel.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  animation: fadeIn .2s ease;
}

/* ── Settings Card Redesign ─────────────────────────────────── */
.settings-card { position: relative; overflow: hidden; }
.settings-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity .4s ease;
  background: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(184,245,74,.07), transparent 40%);
  pointer-events: none;
  z-index: 0;
}
.settings-card:hover::before { opacity: 1; }
.settings-card > * { position: relative; z-index: 1; }

.settings-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--border);
}
.settings-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  flex-shrink: 0;
}
.settings-card-icon.accent  { background: var(--accent-dim);  color: var(--accent); }
.settings-card-icon.info    { background: var(--info-dim);    color: var(--info); }
.settings-card-icon.warning { background: var(--warning-dim); color: var(--warning); }
.settings-card-icon.success { background: var(--success-dim); color: var(--success); }
.settings-card-icon.danger  { background: var(--danger-dim);  color: var(--danger); }
.settings-card-title { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.settings-card-desc  { font-size: .75rem; color: var(--text-3); margin-top: .15rem; }

/* ── Custom Toggle Switch ───────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .625rem 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-of-type { border-bottom: none; }
.toggle-text { flex: 1; }
.toggle-label { font-size: .875rem; font-weight: 500; color: var(--text-1); }
.toggle-desc  { font-size: .75rem;  color: var(--text-3); margin-top: .1rem; }

.toggle-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; flex-shrink: 0; }
.toggle-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-thumb {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  transition: background .2s ease, border-color .2s ease;
  position: relative;
}
.toggle-thumb::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform .2s ease, background .2s ease;
}
.toggle-switch input:checked + .toggle-thumb { background: var(--accent-dim); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-thumb::after { transform: translateX(16px); background: var(--accent); }

/* ── Number Stepper ─────────────────────────────────────────── */
.number-stepper { display: flex; align-items: center; gap: .5rem; margin-top: .375rem; }
.stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
  font-family: inherit;
}
.stepper-btn:hover { background: var(--surface-3); border-color: var(--accent); color: var(--accent); }
.number-stepper input {
  width: 58px;
  text-align: center;
  padding: .35rem .5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: .875rem;
  font-family: 'DM Mono', monospace;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.number-stepper input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Card entrance animation on tab switch */
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.settings-panel.active .settings-card { animation: cardSlideIn .22s ease both; }
.settings-panel.active .settings-card:nth-child(2) { animation-delay: .05s; }
.settings-panel.active .settings-card:nth-child(3) { animation-delay: .10s; }
.settings-panel.active .settings-card:nth-child(4) { animation-delay: .15s; }

/* ── Modals ────────────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #0e0e10;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; animation: fadeIn 0.2s ease; }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Clear All Warning Banner */
.clear-all-banner {
  flex-shrink: 0;
  background: var(--danger-dim);
  border-bottom: 1px solid rgba(224, 87, 87, 0.3);
  animation: slideDown 0.2s ease;
  overflow: hidden;
}

@keyframes slideDown {
  from { max-height: 0; opacity: 0; }
  to   { max-height: 120px; opacity: 1; }
}

.clear-all-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.75rem;
  flex-wrap: wrap;
}

.clear-all-banner-msg {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.clear-all-banner-msg i {
  color: var(--danger);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.clear-all-banner-msg div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.clear-all-banner-msg strong {
  font-size: 0.875rem;
  color: var(--danger);
  font-weight: 600;
}

.clear-all-banner-msg span {
  font-size: 0.75rem;
  color: var(--text-2);
}

.clear-all-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.clear-all-confirm-btn {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  border: none;
}
.clear-all-confirm-btn:hover { background: #c94848; }

/* Auth Modal */
.auth-modal { width: 100%; max-width: 380px; padding: 2rem; }

/* PIN Modal */
.pin-modal {
  width: 100%;
  max-width: 360px;
  padding: 2.25rem 2rem;
  text-align: center;
}
.pin-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.pin-icon i {
  font-size: 1.375rem;
  color: var(--accent);
}
.pin-modal-header h2 { margin: 0 0 0.375rem; font-size: 1.25rem; }
.pin-modal-header p  { color: var(--text-2); font-size: 0.875rem; margin: 0; }

.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
  margin: 2rem 0 0.625rem;
}
.pin-input {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.1s;
  caret-color: transparent;
}
.pin-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.pin-input.filled {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

@keyframes pin-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.pin-inputs.shake { animation: pin-shake 0.4s ease; }

.pin-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin: 0.25rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}
.pin-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: center;
}
.pin-actions .btn { min-width: 100px; justify-content: center; }

.auth-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-bottom: 1.75rem;
}

.auth-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  flex-shrink: 0;
  object-fit: contain;
}

.auth-header-text { display: flex; flex-direction: column; }

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.auth-header p { font-size: 0.8125rem; color: var(--text-2); }

.auth-tabs {
  display: flex;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition), border-color var(--transition);
}

.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group { margin-bottom: 1.125rem; }

.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.8125rem; font-weight: 500; color: var(--text-2); }

.form-group input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input::placeholder { color: var(--text-3); }

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group small { display: block; margin-top: 0.3rem; color: var(--text-3); font-size: 0.75rem; }

.form-help { text-align: center; font-size: 0.8125rem; color: var(--text-2); margin-top: 1rem; }
.form-help a { color: var(--accent); transition: opacity var(--transition); }
.form-help a:hover { opacity: 0.75; }

/* Request Modal */
.request-modal { width: 100%; max-width: 540px; max-height: 80vh; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 0.9375rem; font-weight: 600; }

.close-btn {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition);
}

.close-btn:hover { color: var(--text-1); }

.modal-body { padding: 1.5rem; }

.modal-footer {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

/* ── Toasts ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: slideIn 0.25s ease;
  min-width: 280px;
  max-width: 360px;
  font-size: 0.875rem;
}

@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.toast.success { border-color: rgba(79, 201, 138, 0.35); }
.toast.error   { border-color: rgba(224, 87, 87, 0.35);  }
.toast.warning { border-color: rgba(224, 165, 74, 0.35); }
.toast.info    { border-color: rgba(90, 156, 245, 0.35); }

.toast i { font-size: 1rem; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--danger);  }
.toast.warning i { color: var(--warning); }
.toast.info    i { color: var(--info);    }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

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

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

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .logo-top span { display: none; }
  .app-container { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    left: -147px;
    top: 0;
    width: 147px;
    height: 100%;
    z-index: 200;
    transition: left 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.45);
  }

  .sidebar.open { left: 0; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; padding: 0.4rem; }

  .top-bar {
    padding: 0 1rem;
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .top-bar-right { flex-wrap: wrap; gap: 0.375rem; }
  .status-indicator { font-size: 0.75rem; padding: 0.25rem 0.6rem; }

  .content-area { padding: 1rem; }

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

  .requests-filter-bar { padding: 0.5rem 1rem; }
  .filter-controls { width: 100%; }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }

  .filter-btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
  }

  .action-buttons { width: 100%; justify-content: flex-end; }

  .requests-list { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .tables-grid { grid-template-columns: repeat(2, 1fr); }
  .tables-creation { padding: .75rem 1rem; }
  .tables-topbar { padding: 1rem 1rem .75rem; }
  .tables-scroll { padding: 1rem; }

  .auth-modal { max-width: 92%; padding: 1.5rem; }
  .request-modal { max-width: 96%; }

  .toast-container { right: 0.75rem; left: 0.75rem; top: 0.75rem; }
  .toast { min-width: auto; max-width: 100%; }

  .notif-panel { width: 280px; right: -0.5rem; }

  .modal-content { margin: 0.75rem; }
}

@media (max-width: 480px) {
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-row-2 { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.5rem; }
  .filter-controls { flex-wrap: nowrap; gap: 1px; padding: 2px; }
  .filter-btn { padding: 0.28rem 0.3rem; font-size: 1.014rem; min-width: 0; }
  .filter-badge { font-size: 0.75rem; padding: 0.05rem 0.25rem; margin-left: 0.15rem; min-width: auto; }
  .action-buttons { flex-wrap: wrap; }
  .view-header h2 { font-size: 0.9375rem; }
  .appearance-grid { grid-template-columns: 1fr; }
  .theme-presets-grid { grid-template-columns: repeat(3, 1fr); }
  .pin-inputs { gap: 0.5rem; }
  .pin-input { width: 48px; height: 56px; font-size: 1.5rem; }

  .sidebar {
    width: 51vw;
    left: -51vw;
  }
}

/* ── Admin Mode ────────────────────────────────────────────── */
body.admin-mode .sidebar {
  border-right-color: rgba(184,245,74,.18);
}
body.admin-mode .sidebar-header {
  border-bottom-color: rgba(184,245,74,.15);
}
body.admin-mode .logo-container::after {
  content: 'ADMIN';
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(184,245,74,.25);
  border-radius: 99px;
  padding: .15rem .5rem;
  align-self: flex-start;
}
body.admin-mode .top-bar {
  border-bottom-color: rgba(184,245,74,.15);
}

/* ── Light Mode ────────────────────────────────────────────── */
body.light-mode {
  --bg:           #f4f4f6;
  --surface:      #ffffff;
  --surface-2:    #f0f0f3;
  --surface-3:    #e8e8ec;
  --border:       #d8d8de;
  --border-light: #c8c8d0;
  --text-1: #111115;
  --text-2: #5c5c70;
  --text-3: #9090a0;

  --accent:       #16a34a;
  --accent-dim:   rgba(22, 163, 74, 0.10);
  --accent-hover: #15803d;
}

/* Replace hardcoded lime rgba values with green equivalents in light mode */
body.light-mode .type-filter-btn.active,
body.light-mode .type-tab.active          { border-color: rgba(22,163,74,.35); }
body.light-mode .type-tab.active .filter-badge { background: rgba(22,163,74,.15); }
body.light-mode .request-meta-link        { border-color: rgba(22,163,74,.25); background: var(--accent-dim); }
body.light-mode .request-meta-link:hover  { background: rgba(22,163,74,.15); }
body.light-mode .bar-col:hover            { background: rgba(22,163,74,.45); }
body.light-mode .lb-rank.bronze           { background: rgba(22,163,74,.1); border-color: rgba(22,163,74,.3); }

/* ── Genre & Tip Badges ────────────────────────────────────── */
.genre-tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(184,245,74,.25);
  border-radius: 99px;
  font-size: .6875rem;
  font-weight: 600;
  padding: .15rem .55rem;
  margin-left: .4rem;
  vertical-align: middle;
}

.tip-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(79,201,138,.25);
  border-radius: 99px;
  font-size: .6875rem;
  font-weight: 600;
  padding: .15rem .55rem;
  margin-top: .25rem;
}

/* ── Blacklist ─────────────────────────────────────────────── */
.blacklist-list {
  list-style: none;
  margin-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 180px;
  overflow-y: auto;
}

.blacklist-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .625rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .8125rem;
}

.blacklist-type {
  color: var(--accent);
  font-weight: 600;
  min-width: 3rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.blacklist-value { flex: 1; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.blacklist-remove {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 .2rem;
  line-height: 1;
  transition: color var(--transition);
  flex-shrink: 0;
}

.blacklist-remove:hover { color: var(--danger); }

.blacklist-add-row {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  align-items: center;
}

.blacklist-add-row select,
.blacklist-add-row input {
  padding: .5rem .65rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: .8125rem;
  font-family: 'DM Sans', sans-serif;
}

.blacklist-add-row select { width: 90px; flex-shrink: 0; }
.blacklist-add-row input  { flex: 1; }

/* ── Announcement ──────────────────────────────────────────── */
.announcement-textarea {
  width: 100%;
  padding: .625rem .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  resize: vertical;
  min-height: 72px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.announcement-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.announcement-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* ── Appearance Customizer ─────────────────────────────────── */
.appearance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.appearance-color-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.appearance-color-row input[type="color"] {
  width: 36px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
}

.appearance-color-row span {
  font-size: .8125rem;
  color: var(--text-2);
}

/* ── Theme Presets ─────────────────────────────────────────── */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .4rem;
  margin-top: .375rem;
}

.theme-preset-card {
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: .4rem .3rem;
  text-align: center;
  background: var(--surface-2);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.theme-preset-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.theme-preset-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.theme-preset-preview {
  width: 100%;
  height: 34px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin-bottom: .3rem;
}
.theme-preset-inner {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 68%;
  height: 52%;
  border-radius: 3px;
  opacity: .95;
}
.theme-preset-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.theme-preset-name {
  font-size: .625rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .01em;
}
.theme-preset-card.active .theme-preset-name {
  color: var(--accent);
}

.settings-card select {
  width: 100%;
  padding: .55rem .75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: .875rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color var(--transition);
}

.settings-card select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
/* ── Analytics ──────────────────────────────────────────────── */
.analytics-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  row-gap: .625rem;
}
.analytics-toolbar-label {
  font-size: .8125rem;
  color: var(--text-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.range-pills {
  display: flex;
  gap: .375rem;
  flex-wrap: wrap;
}
.range-pill {
  padding: .35rem .875rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.range-pill:hover { border-color: var(--border-light); color: var(--text-1); }
.range-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0e10;
  font-weight: 600;
}

/* Custom date range row */
.custom-date-row {
  display: none;
  align-items: center;
  gap: .5rem;
  flex-basis: 100%;
  flex-wrap: wrap;
}
.custom-date-row.open { display: flex; }
.date-input {
  padding: .35rem .625rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-1);
  font-size: .8125rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.date-input:focus { border-color: var(--accent); }
.date-input::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
.date-range-sep { font-size: .8125rem; color: var(--text-3); }

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .875rem;
  margin-bottom: 1.25rem;
}

.analytics-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}
@media (max-width: 760px) {
  .analytics-row-2 { grid-template-columns: 1fr; }
}

.chart-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  min-width: 0;
  overflow: hidden;
}
.chart-container h3 {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

/* ── Bar chart (CSS) ────────────────────────────────────────── */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  width: 100%;
}
.bar-chart.tall { height: 120px; }

.bar-col {
  flex: 1;
  background: var(--accent-dim);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: background var(--transition);
  position: relative;
  cursor: default;
}
.bar-col:hover { background: rgba(184,245,74,.45); }
.bar-col.peak  { background: var(--accent); }

.bar-chart-labels {
  display: flex;
  gap: 3px;
  margin-top: .375rem;
}
.bar-chart-labels.sparse .bar-label:not(.show) { visibility: hidden; }

.bar-label {
  flex: 1;
  font-size: .5rem;
  color: var(--text-3);
  text-align: center;
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Leaderboard ────────────────────────────────────────────── */
.leaderboard { display: flex; flex-direction: column; gap: .375rem; }

.lb-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}
.lb-item:hover { background: var(--surface-3); border-color: var(--border); }

.lb-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
}
.lb-rank.gold   { background: rgba(224,165,74,.2); border-color: var(--warning); color: var(--warning); }
.lb-rank.silver { background: rgba(160,160,168,.15); border-color: var(--text-3); color: var(--text-2); }
.lb-rank.bronze { background: rgba(184,245,74,.1); border-color: rgba(184,245,74,.3); color: var(--accent); }

.lb-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-3);
  flex-shrink: 0;
}
.lb-thumb-placeholder {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: .75rem;
  flex-shrink: 0;
}

.lb-info { flex: 1; min-width: 0; }
.lb-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-sub {
  font-size: .75rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-count {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
  background: var(--accent-dim);
  padding: .15rem .5rem;
  border-radius: 99px;
}

.analytics-empty {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-3);
  font-size: .875rem;
}

/* ── Notification panel ─────────────────────────────────────── */
.notif-wrapper {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .875rem;
  border-bottom: 1px solid var(--border);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-1);
}

.notif-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .75rem;
  color: var(--text-3);
  padding: 0;
}
.notif-clear-btn:hover { color: var(--accent); }

.notif-list {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
}

.notif-empty {
  padding: 1.25rem .875rem;
  text-align: center;
  font-size: .8125rem;
  color: var(--text-3);
}

.notif-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .6rem .875rem;
  border-bottom: 1px solid var(--border);
  font-size: .8125rem;
}
.notif-item:last-child { border-bottom: none; }

.notif-msg { color: var(--text-1); line-height: 1.4; }
.notif-time { color: var(--text-3); font-size: .6875rem; font-family: 'DM Mono', monospace; }

.notif-item.notif-info .notif-msg::before  { content: '♪ '; color: var(--accent); }
.notif-item.notif-error .notif-msg::before { content: '⚠ '; color: var(--danger); }

.notif-item-row { display: flex; align-items: flex-start; gap: .5rem; }
.notif-item-row .notif-msg { flex: 1; }
.notif-goto { flex-shrink: 0; color: var(--text-3); font-size: .7rem; margin-top: .15rem; transition: color var(--transition); }

.notif-item.notif-clickable { cursor: pointer; }
.notif-item.notif-clickable:hover { background: var(--surface-2); }
.notif-item.notif-clickable:hover .notif-goto { color: var(--accent); }

@keyframes cardHighlight {
  0%   { box-shadow: 0 0 0 3px var(--accent); border-color: var(--accent); }
  60%  { box-shadow: 0 0 0 3px var(--accent); border-color: var(--accent); }
  100% { box-shadow: none; border-color: var(--border); }
}
.request-card.highlight { animation: cardHighlight 2.2s ease forwards; }

/* ── Admin / Dashboard page nav links ───────────────────────── */
[data-admin-only],
[data-dashboard-only] {
  display: none; /* hidden by default; JS reveals correct set after load */
}

/* Enforce correct visibility regardless of any JS inline-style timing */
body.admin-mode [data-dashboard-only] { display: none !important; }
body:not(.admin-mode) [data-admin-only] { display: none !important; }

.nav-link-page {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
  margin-top: .5rem;
  opacity: .75;
}
.nav-link-page:hover { opacity: 1; background: var(--surface-2); color: var(--text-1); }

/* Share QR Modal */
#shareQrModal {
  background: transparent;
  pointer-events: none;
}
#shareQrModal .share-qr-modal {
  pointer-events: all;
  box-shadow: 0 8px 48px rgba(0,0,0,0.55), 0 2px 12px rgba(0,0,0,0.35);
}
.share-qr-modal {
  width: 100%;
  max-width: 400px;
  padding: 0;
  overflow: hidden;
}
.share-qr-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.share-qr-preview {
  width: 140px;
  height: 140px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px;
}
.share-qr-desc {
  font-size: .8125rem;
  color: var(--text-2);
  text-align: center;
  margin: 0;
}
.share-platforms {
  display: flex;
  gap: .625rem;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}
.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 500;
  font-family: inherit;
  min-width: 58px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.share-platform-btn i { font-size: 1.125rem; }
.share-platform-btn:hover { background: var(--surface-3); border-color: var(--border-light); }
.share-platform-btn[href*="wa.me"] i    { color: #25d366; }
.share-platform-btn[href*="facebook"] i { color: #1877f2; }
#shareInstagram i { color: #e1306c; }
.share-copy-row {
  display: flex;
  gap: .5rem;
  width: 100%;
}
.share-link-input {
  flex: 1;
  min-width: 0;
  padding: .5rem .75rem;
  font-size: .8125rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-family: 'DM Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-copy-btn { flex-shrink: 0; }

/* Rejected Songs view — no red left border on cards */
#rejectedView .request-card.rejected { border-left-color: var(--border); opacity: 1; }

/* Red dot indicator on Rejected Songs sidebar nav item */
.rejected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
  margin-left: auto;
}
