/* ==========================================================================
   MAIN.CSS — Tickets Oryon · Modern Dark Glass Design System
   Unified token architecture: Primitives → Semantics → Components
   ========================================================================== */

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

:root {
  /* ═══ 1. PRIMITIVES: Neutral Ramp ═══ */
  --neutral-950: #070709;
  --neutral-900: #0c0c10;
  --neutral-850: #121217;
  --neutral-800: #181820;
  --neutral-700: #27272a;
  --neutral-600: #3f3f46;
  --neutral-500: #52525b;
  --neutral-400: #71717a;
  --neutral-300: #a1a1aa;
  --neutral-200: #d4d4d8;
  --neutral-100: #f4f4f5;
  --neutral-50: #fafafa;

  /* ═══ 2. PRIMITIVES: Brand Ramp ═══ */
  --cyan-50: #ecfeff;
  --cyan-100: #cffafe;
  --cyan-200: #a5f3fc;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --cyan-a08: rgba(34,211,238,0.08);
  --cyan-a12: rgba(34,211,238,0.12);
  --cyan-a20: rgba(34,211,238,0.20);
  --cyan-a35: rgba(34,211,238,0.35);

  --indigo-300: #a5b4fc;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-a12: rgba(99,102,241,0.12);

  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-a12: rgba(167,139,250,0.12);

  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-a12: rgba(52,211,153,0.12);

  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-a12: rgba(251,191,36,0.12);

  --rose-300: #fda4af;
  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-a12: rgba(251,113,133,0.12);

  /* ═══ 3. SEMANTICS: Surfaces ═══ */
  --bg-base: var(--neutral-950);
  --bg-surface: var(--neutral-900);
  --bg-elevated: var(--neutral-850);
  --bg-overlay: var(--neutral-800);
  --bg-input: #0e0e13;
  --bg-input-focus: #14141c;
  --bg-hover: rgba(255,255,255,0.04);
  --bg-active: rgba(255,255,255,0.07);

  /* ═══ 4. SEMANTICS: Glass System ═══ */
  --glass-bg: rgba(18,18,23,0.62);
  --glass-bg-strong: rgba(18,18,23,0.82);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-hover: rgba(255,255,255,0.16);
  --glass-highlight: linear-gradient(90deg, transparent, rgba(255,255,255,0.09), transparent);
  --glass-blur: 16px;
  --glass-blur-strong: 24px;

  /* ═══ 5. SEMANTICS: Accent ═══ */
  --cyan: var(--cyan-400);
  --cyan-soft: var(--cyan-500);
  --cyan-dim: var(--cyan-a12);
  --cyan-glow: 0 0 24px rgba(34,211,238,0.22);
  --indigo: var(--indigo-500);
  --indigo-dim: var(--indigo-a12);
  --indigo-glow: 0 0 24px rgba(99,102,241,0.22);
  --purple: var(--purple-400);
  --purple-dim: var(--purple-a12);
  --emerald: var(--emerald-400);
  --emerald-dim: var(--emerald-a12);
  --emerald-glow: 0 0 20px rgba(52,211,153,0.22);
  --amber: var(--amber-400);
  --amber-dim: var(--amber-a12);
  --rose: var(--rose-400);
  --rose-dim: var(--rose-a12);
  --rose-glow: 0 0 20px rgba(251,113,133,0.22);
  --accent: var(--cyan);
  --accent-dim: var(--cyan-dim);

  /* ═══ 6. SEMANTICS: Borders ═══ */
  --border-faint: rgba(255,255,255,0.05);
  --border-subtle: rgba(255,255,255,0.08);
  --border-medium: rgba(255,255,255,0.15);
  --border-accent: var(--cyan-a35);

  /* ═══ 7. SEMANTICS: Typography ═══ */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.68rem;
  --text-sm: 0.75rem;
  --text-base: 0.8rem;
  --text-md: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.15rem;
  --text-2xl: 1.4rem;
  --text-3xl: 1.75rem;

  --text-primary: var(--neutral-50);
  --text-secondary: var(--neutral-300);
  --text-muted: var(--neutral-500);
  --text-dim: var(--neutral-600);

  /* ═══ 8. SHADOWS ═══ */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 70px rgba(0,0,0,0.85);
  --shadow-glow-cyan: 0 0 30px rgba(34,211,238,0.15);
  --shadow-glow-indigo: 0 0 30px rgba(99,102,241,0.15);

  /* ═══ 9. RADII ═══ */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-full: 9999px;

  /* Legacy aliases */
  --radius-lg: var(--r-lg);
  --bg-card: var(--bg-elevated);

  /* ═══ 10. TRANSITIONS ═══ */
  --t-fast: 0.14s cubic-bezier(0.16,1,0.3,1);
  --t-normal: 0.24s cubic-bezier(0.16,1,0.3,1);
  --t-smooth: 0.4s cubic-bezier(0.16,1,0.3,1);
}

body.light-mode {
  color-scheme: light;
  --bg-base: #f6f8fb;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-overlay: #f1f5f9;
  --bg-input: #f8fafc;
  --bg-input-focus: #ffffff;
  --bg-hover: rgba(15,23,42,0.05);
  --bg-active: rgba(14,165,233,0.11);
  --glass-bg: rgba(255,255,255,0.72);
  --glass-bg-strong: rgba(255,255,255,0.88);
  --glass-border: rgba(15,23,42,0.08);
  --glass-border-hover: rgba(15,23,42,0.16);
  --border-faint: rgba(15,23,42,0.08);
  --border-subtle: rgba(15,23,42,0.12);
  --border-medium: rgba(15,23,42,0.18);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --shadow-sm: 0 2px 10px rgba(15,23,42,0.08);
  --shadow-md: 0 4px 18px rgba(15,23,42,0.12);
  --shadow-lg: 0 14px 34px rgba(15,23,42,0.16);
  --shadow-xl: 0 22px 60px rgba(15,23,42,0.18);
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--cyan); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #fff; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
input, textarea, select { font-family: inherit; color: var(--text-primary); }

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; transition: background 0.2s; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-a35); }

/* ═══ AMBIENT ORBS ═══ */
#particles-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
  animation: floatOrb 22s ease-in-out infinite alternate;
}
.bg-orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(34,211,238,0.06) 0%, transparent 70%); top:-200px; left:-180px; }
.bg-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 70%); bottom:-180px; right:-120px; animation-delay:-8s; }
.bg-orb-3 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(167,139,250,0.04) 0%, transparent 70%); top:40%; left:38%; animation-delay:-16s; }

@keyframes floatOrb {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(40px,25px) scale(1.06); }
  100% { transform: translate(-25px,45px) scale(0.95); }
}

/* ════════════════════════════════════════════
   BUTTONS — Refined with subtle depth
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--text-base);
  font-weight: 550;
  padding: 8px 14px;
  border-radius: var(--r-md);
  transition: transform var(--t-fast), box-shadow var(--t-normal), background var(--t-normal), border-color var(--t-normal), color var(--t-normal);
  white-space: nowrap;
  user-select: none;
  position: relative;
  letter-spacing: 0.01em;
  line-height: 1.4;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn:hover::after { left: 100%; }

.btn-primary {
  background: var(--indigo);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 10px rgba(99,102,241,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: #5255ee;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-gradient {
  background: linear-gradient(135deg, var(--cyan-500), var(--indigo));
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 2px 12px rgba(34,211,238,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(34,211,238,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-gradient:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-active);
  border-color: var(--cyan-a35);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), var(--shadow-glow-cyan);
}
.btn-secondary:active { transform: translateY(0); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.4);
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
  transform: translateY(-1px);
}
.btn-danger:active { transform: translateY(0); }

.btn-ghost { color: var(--text-muted); background: transparent; border: 1px solid transparent; }
.btn-ghost:hover { color: var(--text-secondary); background: var(--bg-hover); }

.btn-sm  { padding: 5px 11px; font-size: var(--text-sm); border-radius: var(--r-sm); gap: 5px; }
.btn-lg  { padding: 10px 20px; font-size: var(--text-md); border-radius: var(--r-lg); }
.btn-xl  { padding: 12px 28px; font-size: var(--text-md); font-weight: 600; border-radius: var(--r-lg); gap: 8px; }
.btn-icon-only { padding: 6px 8px; border-radius: var(--r-md); }

/* ════════════════════════════════════════════
   BADGES — Refined with glass
   ════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.badge-cyan    { background: var(--cyan-dim);    color: var(--cyan);    border-color: rgba(34,211,238,0.2); }
.badge-blurple { background: var(--indigo-dim);  color: var(--indigo-400); border-color: rgba(99,102,241,0.2); }
.badge-emerald { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(52,211,153,0.2); }
.badge-amber   { background: var(--amber-dim);   color: var(--amber);   border-color: rgba(251,191,36,0.2); }
.badge-rose    { background: var(--rose-dim);    color: var(--rose);    border-color: rgba(251,113,133,0.2); }
.badge-purple  { background: var(--purple-dim);  color: var(--purple);  border-color: rgba(167,139,250,0.2); }

/* ════════════════════════════════════════════
   FORMS — Clean with focus glow
   ════════════════════════════════════════════ */
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }

.form-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--t-normal);
}
.form-control:focus {
  outline: none;
  background: var(--bg-input-focus);
  border-color: rgba(34,211,238,0.45);
  box-shadow: 0 0 0 3px var(--cyan-a12), var(--shadow-glow-cyan);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-control-sm { padding: 6px 10px; font-size: var(--text-sm); }

/* ════════════════════════════════════════════
   GLASS CARD — Modern glassmorphism
   ════════════════════════════════════════════ */
.glass-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: 20px;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--glass-highlight);
  pointer-events: none;
}
.glass-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), var(--shadow-glow-cyan);
}

/* ════════════════════════════════════════════
   MODALS — Glassmorphism overlay
   ════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-normal);
  padding: 24px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(0,0,0,0.6);
  transform: scale(0.96) translateY(12px);
  transition: all var(--t-smooth);
  overflow: hidden;
}
.modal-overlay.active .modal-container { transform: scale(1) translateY(0); }

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-faint);
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.modal-title-group { display: flex; align-items: center; gap: 10px; }
.modal-title { font-size: var(--text-lg); font-weight: 700; font-family: var(--font-display); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border-faint);
  background: rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════
   TOAST NOTIFICATIONS — Glass effect
   ════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 380px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.28s ease;
  transition: all 0.25s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.toast.toast-success { border-left: 3px solid var(--emerald); }
.toast.toast-error   { border-left: 3px solid var(--rose); }
.toast.toast-info    { border-left: 3px solid var(--cyan); }
.toast.toast-warning { border-left: 3px solid var(--amber); }

.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--emerald); }
.toast-error   .toast-icon { color: var(--rose); }
.toast-info    .toast-icon { color: var(--cyan); }
.toast-warning .toast-icon { color: var(--amber); }
.toast-body { flex: 1; }
.toast-title { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.toast-msg   { font-size: var(--text-xs); color: var(--text-secondary); }
.toast-close { color: var(--text-dim); padding: 4px; }
.toast-close:hover { color: var(--text-secondary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ════════════════════════════════════════════
   DROPDOWNS — Glass effect
   ════════════════════════════════════════════ */
.discord-select-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  min-width: 180px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--t-normal);
  overflow: hidden;
  padding: 4px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}
.discord-select-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.discord-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--t-fast);
  color: var(--text-secondary);
  border-radius: var(--r-sm);
}
.discord-select-option:hover { background: var(--bg-active); color: var(--text-primary); }

/* ════════════════════════════════════════════
   NOTIFICATIONS DROPDOWN
   ════════════════════════════════════════════ */
.notifications-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 370px;
  max-width: 90vw;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl), var(--shadow-glow-cyan);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--t-smooth);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur-strong)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(140%);
}

body.light-mode .notifications-dropdown,
body.light-mode .discord-select-dropdown {
  background: rgba(255,255,255,0.96);
}
.notifications-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notifications-dropdown-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-faint);
  background: rgba(0,0,0,0.15);
}
.notifications-dropdown-title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
}
.notifications-dropdown-body {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 4px;
}
.notification-item {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  transition: all var(--t-fast);
  position: relative;
  border: 1px solid transparent;
}
.notification-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-faint);
  transform: translateY(-1px);
}
.notification-item.unread {
  background: var(--cyan-a08);
  border-color: var(--cyan-a20);
}
.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
}
.notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}
.notification-item-content { flex: 1; min-width: 0; }
.notification-item-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 2px; }
.notification-item-title { font-size: var(--text-base); font-weight: 600; color: var(--text-primary); }
.notification-item-msg { font-size: var(--text-xs); color: var(--text-secondary); line-height: 1.45; word-break: break-word; }
.notification-item-footer { display: flex; align-items: center; gap: 6px; font-size: 0.65rem; color: var(--text-dim); margin-top: 5px; }

.notifications-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

/* ═══ PULSE DOT ═══ */
.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 2.2s ease-in-out infinite;
  margin-right: 2px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ═══ SECTION TITLES ═══ */
.editor-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* ═══ SEARCH INPUT ═══ */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrap > i {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  font-size: var(--text-sm);
}
.search-input-wrap input { padding-left: 28px; }

/* ═══ UNSAVED BADGE ═══ */
.unsaved-indicator {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--r-full);
  padding: 3px 10px;
}
.unsaved-indicator.active { display: flex; }

/* ═══ MATRIX TABLE ═══ */
.matrix-table-wrap { overflow-x: auto; }
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}
.matrix-table th {
  background: rgba(0,0,0,0.2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-faint);
  vertical-align: middle;
}
.matrix-table tr:hover td { background: var(--bg-hover); }
.matrix-table input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--indigo);
  border-radius: 3px;
}

/* ═══ SELECTION ═══ */
::selection {
  background: var(--cyan-a20);
  color: #fff;
}

/* ════════════════════════════════════════════
   SKELETON LOADING — New component
   ════════════════════════════════════════════ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--bg-overlay);
  border-radius: var(--r-md);
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}
.skeleton * { visibility: hidden; }
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 20%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 80%, transparent 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.8s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 12px;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}
.skeleton-text.wide { width: 80%; }
.skeleton-text.medium { width: 60%; }
.skeleton-text.short { width: 40%; }
.skeleton-text.tiny { width: 25%; }

.skeleton-circle {
  border-radius: 50%;
}
.skeleton-rect {
  border-radius: var(--r-md);
}

.skeleton-card {
  padding: 18px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
}

/* ════════════════════════════════════════════
   CONFIRM DIALOG — Replaces native confirm()
   ════════════════════════════════════════════ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-normal);
  padding: 24px;
}
.confirm-overlay.active { opacity: 1; visibility: visible; }

.confirm-dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-xl);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: all var(--t-smooth);
}
.confirm-overlay.active .confirm-dialog { transform: scale(1); }

.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
}
.confirm-icon.warning { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(251,191,36,0.25); }
.confirm-icon.danger { background: var(--rose-dim); color: var(--rose); border: 1px solid rgba(251,113,133,0.25); }
.confirm-icon.info { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(34,211,238,0.25); }

.confirm-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.confirm-message {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ═══ SECURITY BLOCKED SCREEN ═══ */
#security-blocked-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(239,68,68,0.15) 0%, rgba(7,7,9,0.98) 70%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1), visibility 0.3s;
}
#security-blocked-screen.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.security-card {
  max-width: 520px;
  width: 100%;
  background: var(--glass-bg-strong);
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: var(--r-2xl);
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 20px 80px rgba(0,0,0,0.9), 0 0 40px rgba(239,68,68,0.25);
  animation: cardPopIn 0.4s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
}
.security-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #fbbf24, #ef4444);
}
.security-icon-wrap {
  width: 76px; height: 76px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #ef4444;
  margin-bottom: 20px;
  box-shadow: 0 0 35px rgba(239,68,68,0.35);
  animation: pulse 2s infinite;
}
.security-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 850;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239,68,68,0.15);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.3);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.security-pulse {
  width: 7px; height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444;
}
.security-desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}
.security-info-box {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.security-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.security-row strong { color: #fff; }
.security-btn {
  background: #ef4444;
  color: #fff;
  font-size: var(--text-md);
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 20px rgba(239,68,68,0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.security-btn:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(239,68,68,0.6);
}

/* ═══ REDUCED MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
