/* admin.css — SSMM Master Admin Panel — Glassmorphism Design System */

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

/* ── Glassmorphism Design System ─────────────── */

:root {
  /* Bright, Translucent Light Tint */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-bg-hover: rgba(255, 255, 255, 0.25);
  
  /* Razor-thin, clean border */
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  
  /* Soft, Ambient Drop Shadow */
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);

  /* Balanced, Native Blur */
  --glass-blur: blur(12px);

  /* Clean Typography Tokens (Dark for Light Theme) */
  --text-primary: #2d2a26;
  --text-secondary: rgba(45, 42, 38, 0.65);
  --text-muted: rgba(45, 42, 38, 0.4);

  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.3);

  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-pill: 9999px;
  --transition: all 0.2s ease-in-out;

  /* Admin Panel Background */
  --bg-image: url('assets/bg-floral.jpg') center/cover no-repeat fixed;
  --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --role-admin-bg: rgba(22, 163, 74, 0.15);
  --role-admin-text: var(--success);
  --role-admin-border: rgba(22, 163, 74, 0.25);
  --role-op-bg: rgba(217, 119, 6, 0.15);
  --role-op-text: var(--warning);
  --role-op-border: rgba(217, 119, 6, 0.25);
  --role-other-bg: rgba(100, 116, 139, 0.15);
  --role-other-text: #64748b;
  --role-other-border: rgba(100, 116, 139, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  text-shadow: none;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient); /* fallback/underlay */
}

body::before {
  content: "";
  position: fixed;
  inset: -10%;
  width: 120%;
  height: 120%;
  background: var(--bg-image), var(--bg-gradient);
  z-index: -1;
  opacity: 0.85; /* blend with dark gradient slightly */
  
  /* Prevent flickering/repainting in WebKit/Blink */
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}
input, button, select { font-family: inherit; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; text-shadow: 0 0 8px var(--accent-glow); }

/* ── Base Glass Panel ────────────────────────────────────────── */
.glass, .glass-panel, .glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition);
}

.glass:hover, .glass-panel:hover {
  background: var(--glass-bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Floating Pill / Dock (VisionOS Navigation Bar) ──────────── */
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.5);
}

/* ── Active Selection Bulb ───────────────────────────── */
.glass-active-bulb {
  background: var(--accent-blue);
  border-radius: var(--radius-pill);
  box-shadow: 
    0 0 20px var(--accent-glow),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  transition: var(--transition);
}

/* ── Glass Widget Cards ─────────────────────────────────────── */
.glass-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.full-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

/* ── Typography & Forms ──────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
input[type="text"], input[type="password"], input[type="url"], input[type="tel"], input[type="email"], input[type="number"], input[type="search"], input[type="date"], select, textarea {
  width: 100%;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
select option { background: #ffffff; color: var(--text-primary); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ── Buttons ─────────────────────────────────────────────────── */
button {
  cursor: pointer;
  border: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 16px;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.5);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-glass {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 30px;
}
.btn-glass:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }
.btn-glass:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger-ghost { background: rgba(239, 68, 68, 0.85); color: #fff; border: 1px solid rgba(239, 68, 68, 0.4); box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3), inset 0 1px 1px rgba(255,255,255,0.2); backdrop-filter: blur(8px); text-shadow: none; }
.btn-danger-ghost:hover { background: rgba(239, 68, 68, 1); border-color: rgba(239, 68, 68, 0.8); transform: translateY(-1px); }
.btn-danger-ghost:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Modern Animated Authentication Screen ───────────────────── */
#loginOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background-color: #0b0f19;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  overflow: hidden;
  padding: 24px;
}

#loginOverlay::before,
#loginOverlay::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}

#loginOverlay::before {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.25) 50%, transparent 70%);
  top: 10%;
  left: 15%;
  animation: orbDrift1 18s ease-in-out infinite alternate;
}

#loginOverlay::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(147, 51, 234, 0.25) 50%, transparent 70%);
  bottom: 10%;
  right: 15%;
  animation: orbDrift2 22s ease-in-out infinite alternate;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 24px 60px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 1px 2px rgba(255, 255, 255, 0.9) inset;
  z-index: 10;
  animation: authEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .auth-card {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 28px 70px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 1px 1px rgba(255, 255, 255, 0.15) inset;
}

.auth-card.error-shake {
  animation: cardShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.brand {
  text-align: center;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-logo {
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18);
  position: relative;
  overflow: hidden;
  animation: floatEmblem 4s ease-in-out infinite alternate;
}

.brand-logo::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -70%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(25deg);
  animation: gleamSweep 4.5s ease-in-out infinite;
}

.brand-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.brand h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
  background: linear-gradient(135deg, var(--text-primary) 30%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 6px 0 0 0;
  font-weight: 500;
  letter-spacing: 0.2px;
}

#loginForm .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

#loginForm input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font-size: 14.5px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) inset;
  box-sizing: border-box;
}

[data-theme="dark"] #loginForm input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) inset;
}

#loginForm input:focus {
  outline: none;
  border-color: #f59e0b;
  background: #ffffff;
  box-shadow: 
    0 0 0 3px rgba(245, 158, 11, 0.25),
    0 2px 8px rgba(245, 158, 11, 0.15);
  transform: translateY(-1px);
}

#loginPasswordToggle:hover {
  color: var(--text-primary) !important;
  background: rgba(245, 158, 11, 0.12) !important;
}

#loginError:not(:empty) {
  display: flex;
  align-items: center;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  animation: errorPillPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#loginBtn {
  position: relative;
  width: 100%;
  height: 44px;
  margin-top: 4px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#loginBtn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: btnShimmer 3.5s infinite;
}

#loginBtn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  filter: brightness(1.06);
}

#loginBtn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

#loginBtn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Login Keyframe Animations ────────────────────────────────── */
@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, -50px) scale(1.12); }
  100% { transform: translate(-40px, 60px) scale(0.92); }
}

@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 60px) scale(1.14); }
  100% { transform: translate(50px, -40px) scale(0.92); }
}

@keyframes authEntrance {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatEmblem {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes gleamSweep {
  0%, 65% { left: -70%; }
  100% { left: 150%; }
}

@keyframes btnShimmer {
  0%, 70% { left: -100%; }
  100% { left: 190%; }
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes errorPillPop {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Admin Header ────────────────────────────────────────────── */
.admin-header {
  height: auto;
  padding: 12px 24px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-light);
  border: 1px solid rgba(124,111,247,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.header-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-user {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ── Main content ─────────────────────────────────────────────── */
.admin-main {
  flex: 1;
  padding: 0 24px 24px 24px;
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.glass-inner-pane {
  padding: 32px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 20px rgba(255, 255, 255, 0.6), 0 8px 32px rgba(0, 0, 0, 0.03);
}

.master-glass-wrapper {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  
  margin: 5vh auto;
  width: 80%;
  max-width: 1400px;
  min-height: calc(100vh - 10vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Section header ──────────────────────────────────────────── */
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.section-title { font-size: 22px; font-weight: 600; letter-spacing: -0.2px; }
.section-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.section-actions { display: flex; gap: 10px; align-items: center; }

/* ── Glass Table ─────────────────────────────────────────────── */
.glass-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 16px;
}

.glass-table thead tr {
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.glass-table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  border-bottom: none;
}

.glass-table tbody tr {
  background: rgba(253, 251, 247, 0.85);
  border-bottom: 4px solid transparent; /* fake gap */
  transition: var(--transition);
  border-radius: var(--radius-sm);
}
.glass-table tbody tr:hover { background: rgba(253, 251, 247, 1); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.glass-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

/* ── User cell ───────────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c6ff7, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-name { font-weight: 600; font-size: 18px; }
.user-id { font-size: 13px; color: var(--text-muted); font-family: monospace; margin-top: 4px; }

/* ── Role Tags ───────────────────────────────────────────────── */
.role-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.role-tag.admin, .role-tag.manager { background: var(--role-admin-bg); color: var(--role-admin-text); border: 1px solid var(--role-admin-border); }
.role-tag.operator{ background: var(--role-op-bg);    color: var(--role-op-text); border: 1px solid var(--role-op-border); }
.role-tag.other   { background: var(--role-other-bg); color: var(--role-other-text); border: 1px solid var(--role-other-border); }
.role-tag.none    { color: var(--text-muted); }

/* ── Skeleton ────────────────────────────────────────────────── */
.skeleton-rows { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.skeleton-row {
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Modals ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 12, 41, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%; max-width: 480px; padding: 32px; max-height: 90vh; overflow-y: auto;
  position: relative; animation: modalIn 0.22s cubic-bezier(.4,0,.2,1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { color: #fff; font-size: 18px; font-weight: 700; }
.modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  padding: 0;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text-primary); }

.modal-footer { display: flex; gap: 10px; justify-content: flex-end; }

/* ── Access Denied card ───────────────────────────────────────── */
.denied-icon { font-size: 48px; text-align: center; }
.denied-card {
  text-align: center;
  max-width: 400px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.denied-card h2 { font-size: 20px; font-weight: 700; color: var(--danger); }
.denied-card p  { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
#accessDeniedEmail { color: var(--text-primary); font-weight: 500; font-size: 13px; }

/* ── Notification Toast ──────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100000;
  pointer-events: none;
}

.toast {
  min-width: 380px;
  max-width: 480px;
  padding: 18px 24px;
  border-radius: 14px;
  background: #E0E5EC;
  box-shadow: -6px -6px 12px rgba(255,255,255,.85), 6px 6px 12px rgba(0,0,0,.12);
  color: #4A5568;
  font-size: 16px;
  font-weight: 600;
  pointer-events: auto;
  animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  display: flex;
  align-items: center;
  gap: 14px;
}

.toast.toast-closing {
  animation: slideOutRight 0.4s ease forwards;
}

.toast.success { border-left: 6px solid var(--success); }
.toast.warning { border-left: 6px solid var(--warning); }
.toast.info { border-left: 6px solid var(--accent); }
.toast.danger, .toast.error { border-left: 6px solid var(--danger); }

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

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); height: auto; margin-bottom: 0; padding-top: 18px; padding-bottom: 18px; }
  to { opacity: 0; transform: translateX(120%); height: 0; margin-bottom: -12px; padding-top: 0; padding-bottom: 0; border: none; overflow: hidden; }
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 13px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-secondary); }
.stat-value { font-size: 38px; font-weight: 600; letter-spacing: -1px; margin: 6px 0; color: var(--text-primary); }
.stat-sub   { font-size: 13px; color: var(--text-muted); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .admin-header { padding: 0 16px; }
  .admin-main   { padding: 16px; }
  .modal-card   { padding: 24px 18px; }
  .section-header { flex-direction: column; align-items: stretch; }
  .section-actions { flex-wrap: wrap; }
}
/* ── Custom Scrollbars ───────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Placeholders & Custom Select Arrows */
::placeholder {
  color: var(--text-muted) !important;
  font-style: italic;
  font-weight: 300;
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232d2a26' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px !important;
}



/* Recessed Pill Container */
.glass-pill-container {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  padding: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sliding Glass Bulb */
.glass-sliding-bulb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px) saturate(200%);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Tab Labels */
.glass-tab-item {
  position: relative;
  z-index: 2;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.glass-tab-item.active {
  color: var(--text-primary);
  text-shadow: none;
}

/* ── Clean Floating Row Items ───────────────────────────────── */
.glass-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: var(--transition);
}

.glass-list-item:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

/* Round Icons */
.glass-icon-circle-dark {
  width: 44px; height: 44px; border-radius: 50%; font-size: 18px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-weight: bold; cursor: default;
}
button.glass-icon-circle-dark { cursor: pointer; transition: transform 0.2s; }
button.glass-icon-circle-dark:hover { transform: scale(1.1); border-color: rgba(255,255,255,0.6); }

/* List Header */
.glass-list-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 16px 20px; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 1px;
}

.content-section { display: none; width: 100%; margin: 0; }
.content-section.active { display: block; animation: fadeIn 0.3s ease; }


