/* ================================================================
   NoteSync — Shared Design System
   Company: Sampurna | Brand: #57F1DB (teal) + #89CEFF (blue)
   Theme: Dark, Futuristic, Professional
   ================================================================ */

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

:root {
  /* Brand Colors */
  --brand-pink:    #57F1DB;
  --brand-cyan:    #89CEFF;
  --brand-pink-dark: #2DD4BF;
  --brand-cyan-dark: #00A2E6;

  /* Text drawn ON TOP of a solid brand-color fill (buttons, badges) needs a
     dark ink, not white - these bright teal/blue hues read as near-white
     luminance to the eye, so white text on them glares. Matches the mobile
     app's Material 3 onPrimary/onSecondary tokens. */
  --on-brand:      #003731;
  --on-brand-cyan: #00344D;

  /* Dark Theme Surfaces */
  --bg-base:       #091728;
  --app-backdrop: linear-gradient(135deg, #071723 0%, #0b1930 43%, #17182e 76%, #111827 100%);
  --bg-surface:    #111D30;
  --bg-card:       #1A2437;
  --bg-card-hover: #202C40;
  --bg-elevated:   #263249;
  --bg-input:      #131E31;

  /* Borders */
  --border:        rgba(255,255,255,0.07);
  --border-active: rgba(87, 241, 219,0.4);
  --border-cyan:   rgba(137, 206, 255,0.3);

  /* Text */
  --text-primary:  #DCE1FB;
  --text-secondary:#BACAC5;
  --text-muted:    #859490;

  /* Status */
  --success:       #57F1DB;
  --warning:       #FBBF24;
  --danger:        #FFB4AB;
  --info:          #89CEFF;

  /* Glow Effects */
  --glow-pink:     0 0 20px rgba(87, 241, 219,0.3), 0 0 60px rgba(87, 241, 219,0.1);
  --glow-cyan:     0 0 20px rgba(137, 206, 255,0.3),  0 0 60px rgba(137, 206, 255,0.1);

  /* Gradients */
  --grad-brand:    linear-gradient(135deg, #57F1DB, #89CEFF);
  --grad-card:     linear-gradient(145deg, #151B2D, #0C1324);
  --grad-pink:     linear-gradient(135deg, #57F1DB, #2DD4BF);
  --grad-cyan:     linear-gradient(135deg, #89CEFF, #00A2E6);

  /* Spacing & Layout */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Typography */
  --font-main:     'Inter', system-ui, sans-serif;
  --font-display:  'Space Grotesk', system-ui, sans-serif;

  /* Transitions */
  --trans-fast:    0.15s cubic-bezier(0.4,0,0.2,1);
  --trans-med:     0.3s cubic-bezier(0.4,0,0.2,1);
  --trans-slow:    0.5s cubic-bezier(0.4,0,0.2,1);

  /* Sidebar */
  --sidebar-w:     260px;
  --topbar-h:      64px;
}

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

html { scroll-behavior: smooth; }

/* ── App background ──────────────────────────────────────────────
   A balanced multicolour gradient adds depth without competing with content.
   Slow ambient movement and pointer-transparent layers keep the workspace calm. */
body {
  font-family: var(--font-main);
  background: var(--app-backdrop);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  inset: -14%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 52% 52% at 5% 10%, rgba(60, 206, 185, 0.20), transparent 76%),
    radial-gradient(ellipse 50% 58% at 92% 25%, rgba(83, 152, 223, 0.18), transparent 76%),
    radial-gradient(ellipse 50% 50% at 75% 95%, rgba(139, 106, 202, 0.17), transparent 78%),
    radial-gradient(ellipse 44% 40% at 15% 90%, rgba(203, 126, 149, 0.10), transparent 76%);
  animation: bgGlowDrift 18s ease-in-out -4s infinite alternate;
}
@keyframes bgGlowDrift {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to { transform: translate3d(4%, 3%, 0) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 100% 0%, transparent 49.8%, rgba(137, 206, 255, 0.075) 50%, transparent 50.2%),
    radial-gradient(ellipse at 100% 0%, transparent 59.8%, rgba(137, 206, 255, 0.05) 60%, transparent 60.2%),
    radial-gradient(ellipse at 0% 100%, transparent 49.8%, rgba(87, 241, 219, 0.05) 50%, transparent 50.2%);
  background-size: 760px 540px, 760px 540px, 620px 420px;
  background-position: top right, top right, bottom left;
  background-repeat: no-repeat;
}

@media (max-width: 640px) {
  body::before { opacity: 0.55; }
}

/* ── Auth Pages ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease both;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-brand);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo img { height: 36px; }

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ── App Layout ─────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--trans-med);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo img { height: 18px; width:auto; object-fit:contain; }

.sidebar-logo-text {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.7px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(87, 241, 219,0.15);
  border: 1px solid rgba(87, 241, 219,0.3);
  color: var(--brand-pink);
  letter-spacing: 0.5px;
  margin-left: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 16px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--trans-fast);
  position: relative;
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  border-color: var(--border);
}

.nav-item.active {
  background: rgba(87, 241, 219,0.1);
  color: var(--brand-pink);
  border-color: rgba(87, 241, 219,0.25);
}

.nav-item.active .nav-icon { color: var(--brand-pink); }

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--brand-pink);
  color: var(--on-brand);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--trans-fast);
}

.sidebar-user:hover { background: rgba(255,255,255,0.05); }

.sidebar-signout {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
  color: var(--text-muted);
  transition: color var(--trans-fast);
}
.sidebar-user:hover .sidebar-signout { color: var(--brand-pink); }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.avatar-pink { background: rgba(87, 241, 219,0.2); color: var(--brand-pink); border: 1px solid rgba(87, 241, 219,0.3); }
.avatar-cyan { background: rgba(137, 206, 255,0.15); color: var(--brand-cyan); border: 1px solid rgba(137, 206, 255,0.3); }

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

/* ── Main Content ───────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: rgba(13,17,32,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── Page Content ───────────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 32px clamp(20px, 2.5vw, 48px);
  width: 100%;
  max-width: 100%;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--trans-fast), transform var(--trans-fast);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255,255,255,0.12);
}

.card-glow-pink::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: var(--grad-pink);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-glow-cyan::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 2px;
  background: var(--grad-cyan);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* ── Stat Cards ─────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--trans-med);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), transparent);
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(87, 241, 219,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon-pink { background: rgba(87, 241, 219,0.12); border: 1px solid rgba(87, 241, 219,0.2); color: var(--brand-pink); }
.stat-icon-cyan { background: rgba(137, 206, 255,0.1); border: 1px solid rgba(137, 206, 255,0.2); color: var(--brand-cyan); }
.stat-icon-green { background: rgba(0,229,160,0.1); border: 1px solid rgba(0,229,160,0.2); color: var(--success); }
.stat-icon-yellow { background: rgba(255,184,0,0.1); border: 1px solid rgba(255,184,0,0.2); color: var(--warning); }
.stat-icon-purple { background: rgba(147,51,234,0.1); border: 1px solid rgba(147,51,234,0.2); color: #9333EA; }

.stat-info { flex: 1; }
.stat-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
.stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  transition: all var(--trans-fast);
  white-space: nowrap;
  font-family: var(--font-main);
}

.btn-primary {
  background: var(--grad-pink);
  color: var(--on-brand);
  box-shadow: 0 4px 16px rgba(87, 241, 219,0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(87, 241, 219,0.45);
}

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

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.btn-outline-pink {
  background: transparent;
  color: var(--brand-pink);
  border: 1px solid rgba(87, 241, 219,0.4);
}

.btn-outline-pink:hover {
  background: rgba(87, 241, 219,0.1);
  border-color: var(--brand-pink);
}

.btn-outline-cyan {
  background: transparent;
  color: var(--brand-cyan);
  border: 1px solid rgba(137, 206, 255,0.4);
}

.btn-outline-cyan:hover {
  background: rgba(137, 206, 255,0.1);
  border-color: var(--brand-cyan);
}

.btn-danger {
  background: rgba(255,77,109,0.15);
  color: var(--danger);
  border: 1px solid rgba(255,77,109,0.3);
}

.btn-danger:hover { background: rgba(255,77,109,0.25); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-main);
  transition: all var(--trans-fast);
  outline: none;
}

.form-control:focus {
  border-color: rgba(87, 241, 219,0.5);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(87, 241, 219,0.1);
}

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

.form-control-wrap {
  position: relative;
}

.form-control-wrap .form-control {
  padding-left: 40px;
}

.form-control-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23BACAC5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* ── Tables ─────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

tbody tr {
  transition: background var(--trans-fast);
}

tbody tr:hover { background: rgba(255,255,255,0.025); }

.td-primary { color: var(--text-primary); font-weight: 500; }

/* ── Badges / Pills ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-green  { background: rgba(0,229,160,0.12); color: var(--success); border: 1px solid rgba(0,229,160,0.2); }
.badge-red    { background: rgba(255,77,109,0.12); color: var(--danger); border: 1px solid rgba(255,77,109,0.2); }
.badge-yellow { background: rgba(255,184,0,0.12); color: var(--warning); border: 1px solid rgba(255,184,0,0.2); }
.badge-pink   { background: rgba(87, 241, 219,0.12); color: var(--brand-pink); border: 1px solid rgba(87, 241, 219,0.2); }
.badge-cyan   { background: rgba(137, 206, 255,0.1); color: var(--brand-cyan); border: 1px solid rgba(137, 206, 255,0.2); }
.badge-gray   { background: rgba(255,255,255,0.06); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-purple { background: rgba(147,51,234,0.12); color: #A78BFA; border: 1px solid rgba(147,51,234,0.2); }

/* ── Tabs ───────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  width: fit-content;
  margin-bottom: 24px;
}

.tab {
  padding: 8px 20px;
  border-radius: calc(var(--radius-md) - 2px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
  border: none;
  background: transparent;
  font-family: var(--font-main);
}

.tab:hover { color: var(--text-primary); }

.tab.active {
  background: rgba(87, 241, 219,0.15);
  color: var(--brand-pink);
  box-shadow: 0 0 0 1px rgba(87, 241, 219,0.25);
}

/* ── Modals ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.modal-lg { max-width: 680px; }

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

.modal-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--trans-fast);
}

.modal-close:hover { background: rgba(255,77,109,0.15); color: var(--danger); }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-success { background: rgba(0,229,160,0.08); border-color: rgba(0,229,160,0.25); color: var(--success); }
.alert-danger   { background: rgba(255,77,109,0.08); border-color: rgba(255,77,109,0.25); color: var(--danger); }
.alert-warning  { background: rgba(255,184,0,0.08); border-color: rgba(255,184,0,0.25); color: var(--warning); }
.alert-info     { background: rgba(137, 206, 255,0.08); border-color: rgba(137, 206, 255,0.25); color: var(--brand-cyan); }

/* ── Search Box ─────────────────────────────────────────────────── */
.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 14px 9px 38px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-main);
  transition: all var(--trans-fast);
  outline: none;
}

.search-box input:focus {
  border-color: rgba(87, 241, 219,0.4);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(87, 241, 219,0.08);
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

/* ── Progress / Loading ─────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-brand);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(87, 241, 219,0.2);
  border-top-color: var(--brand-pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Toast Notifications ────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideRight 0.3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: all;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--brand-cyan); }

/* ── Grid helpers ───────────────────────────────────────────────── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ── Typography helpers ─────────────────────────────────────────── */
.text-pink  { color: var(--brand-pink); }
.text-cyan  { color: var(--brand-cyan); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.font-display { font-family: var(--font-display); }
.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-sm  { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg  { font-size: 18px; }
.text-xl  { font-size: 24px; }
.text-2xl { font-size: 32px; }

/* ── Spacing helpers ────────────────────────────────────────────── */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-desc { color: var(--text-secondary); font-size: 14px; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp  { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin      { to { transform: rotate(360deg); } }
@keyframes pulse     { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
@keyframes float     { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes glowPulse { 0%,100% { box-shadow: var(--glow-pink); } 50% { box-shadow: none; } }

.animate-fade-up  { animation: fadeInUp 0.4s ease both; }
.animate-pulse    { animation: pulse 2s ease-in-out infinite; }
.animate-float    { animation: float 3s ease-in-out infinite; }

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ── Recording Pulse ─────────────────────────────────────────────── */
.rec-dot {
  width: 12px;
  height: 12px;
  background: var(--danger);
  border-radius: 50%;
  animation: recPulse 1.2s ease-in-out infinite;
}

@keyframes recPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,77,109,0.7); }
  50%     { box-shadow: 0 0 0 8px rgba(255,77,109,0); }
}

/* ── Divider ─────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Empty State ─────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Gradient Text ───────────────────────────────────────────────── */
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(87, 241, 219,0.4); }

/* ── Chip / Tag ──────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.chip-pink { background: rgba(87, 241, 219,0.1); border-color: rgba(87, 241, 219,0.25); color: var(--brand-pink); }
.chip-cyan { background: rgba(137, 206, 255,0.08); border-color: rgba(137, 206, 255,0.2); color: var(--brand-cyan); }

/* ── Floating particles ──────────────────────────────────────────── */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: float 6s ease-in-out infinite;
}

/* ── Glass topbar refinement ─────────────────────────────────────── */
.topbar {
  background: rgba(11,15,26,0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 10px 30px -20px rgba(0,0,0,0.8);
}
.topbar-title { letter-spacing: -0.3px; }
.topbar-title.topbar-accent::before {
  content: ''; display: inline-block; width: 4px; height: 18px;
  background: var(--grad-brand); border-radius: 4px;
  margin-right: 12px; vertical-align: -3px;
  box-shadow: 0 0 12px rgba(87, 241, 219,0.6);
}

/* ── Sidebar: gradient edge + glow logo ──────────────────────────── */
.sidebar {
  background: linear-gradient(180deg, #0B1020 0%, #090C16 100%);
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 1px 0 0 rgba(255,255,255,0.03), 24px 0 60px -40px rgba(0,0,0,0.9);
}
.sidebar-logo img { filter: drop-shadow(0 0 14px rgba(87, 241, 219,0.35)); transition: filter var(--trans-med); }
.sidebar-logo:hover img { filter: drop-shadow(0 0 22px rgba(87, 241, 219,0.6)); }

/* Animated active nav indicator */
.nav-item { position: relative; overflow: hidden; }
.nav-item::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%; border-radius: 4px; background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(87, 241, 219,0.7); transition: transform var(--trans-med);
}
.nav-item.active::before { transform: translateY(-50%) scaleY(1); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(87, 241, 219,0.16), rgba(87, 241, 219,0.02));
  box-shadow: inset 0 0 0 1px rgba(87, 241, 219,0.18);
}
.nav-item:hover .nav-icon { transform: scale(1.15); }
.nav-icon { transition: transform var(--trans-fast); }

/* ── Cards: glass + animated gradient glow border on hover ───────── */
.card, .stat-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -28px rgba(0,0,0,0.9);
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(87, 241, 219,0.5), rgba(137, 206, 255,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity var(--trans-med); pointer-events: none;
}
.card:hover { transform: translateY(-3px); border-color: transparent; }
.card:hover::after { opacity: 1; }

.stat-card { transition: transform var(--trans-med), box-shadow var(--trans-med), border-color var(--trans-med); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--grad-brand); opacity: 0; transition: opacity var(--trans-med);
}
.stat-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 24px 50px -24px rgba(87, 241, 219,0.4); }
.stat-card:hover::before { opacity: 1; }
.stat-card:hover .stat-icon { transform: scale(1.08) rotate(-4deg); box-shadow: 0 0 24px rgba(87, 241, 219,0.35); }
.stat-icon { transition: transform var(--trans-med), box-shadow var(--trans-med); }
.stat-value { background: linear-gradient(180deg, #fff, #b9c4dd); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Buttons: shine sweep + crisper glow ─────────────────────────── */
.btn { position: relative; overflow: hidden; letter-spacing: 0.2px; }
.btn::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn:hover::after { left: 140%; }
.btn-primary { background: linear-gradient(135deg, #2DD4BF, #57F1DB 45%, #89CEFF 140%); background-size: 200% 100%; transition: all var(--trans-fast), background-position 0.6s ease; }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 8px 30px rgba(87, 241, 219,0.5), 0 0 0 1px rgba(255,255,255,0.08) inset; }

/* ── Inputs: glow focus ring ─────────────────────────────────────── */
.form-control:focus {
  border-color: rgba(87, 241, 219,0.6);
  box-shadow: 0 0 0 3px rgba(87, 241, 219,0.12), 0 0 24px -6px rgba(87, 241, 219,0.5);
}

/* ── Tables: hover row highlight ─────────────────────────────────── */
tbody tr { transition: background var(--trans-fast); }
tbody tr:hover { background: rgba(87, 241, 219,0.05); }
.table-wrap { background: rgba(255,255,255,0.015); }

/* ── Page title gradient accent ──────────────────────────────────── */
.page-title { letter-spacing: -0.5px; }

/* ── Badges glow ─────────────────────────────────────────────────── */
.badge { box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset; }

/* ── Section reveal on load (stagger for direct grid children) ───── */
.grid-4 > *, .grid-3 > *, .grid-2 > * { animation: slideUp 0.5s cubic-bezier(0.22,1,0.36,1) both; }
.grid-4 > *:nth-child(1){animation-delay:.04s}.grid-4 > *:nth-child(2){animation-delay:.10s}
.grid-4 > *:nth-child(3){animation-delay:.16s}.grid-4 > *:nth-child(4){animation-delay:.22s}
.grid-4 > *:nth-child(5){animation-delay:.28s}.grid-4 > *:nth-child(6){animation-delay:.34s}
.grid-3 > *:nth-child(1){animation-delay:.05s}.grid-3 > *:nth-child(2){animation-delay:.12s}
.grid-3 > *:nth-child(3){animation-delay:.19s}.grid-3 > *:nth-child(4){animation-delay:.26s}

/* ── Floating ambient orbs (decorative, injected per page) ───────── */
.fx-orb {
  position: fixed; border-radius: 50%; filter: blur(60px); opacity: 0.5;
  pointer-events: none; z-index: 0; animation: orbFloat 16s ease-in-out infinite alternate;
}
.fx-orb.pink { background: radial-gradient(circle, rgba(87, 241, 219,0.5), transparent 70%); }
.fx-orb.cyan { background: radial-gradient(circle, rgba(137, 206, 255,0.45), transparent 70%); }
@keyframes orbFloat {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,-30px) scale(1.2); }
}

/* ── Shimmer utility for loading/hero accents ────────────────────── */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ── Scrollbar accent ────────────────────────────────────────────── */
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(87, 241, 219,0.4), rgba(137, 206, 255,0.4)); }

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

/* ── Mobile: collapse sidebar, full-bleed content ────────────────── */
@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .page-content { padding: 20px 16px; }
}
.mobile-sidebar-toggle{display:none;width:36px;height:36px;flex:0 0 36px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.035);color:var(--text-primary);align-items:center;justify-content:center;flex-direction:column;gap:4px;cursor:pointer}.mobile-sidebar-toggle span{display:block;width:18px;height:2px;border-radius:9px;background:currentColor}.mobile-sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(2,6,18,.68);backdrop-filter:blur(3px);z-index:1090}.mobile-sidebar-overlay.open{display:block}@media(max-width:880px){.mobile-sidebar-toggle{display:flex}.sidebar.mobile-open{transform:translateX(0)!important;z-index:1100;box-shadow:25px 0 70px rgba(0,0,0,.55)}body.mobile-nav-open{overflow:hidden}}

/* ================================================================
   ✦✦ POLISH v3 — bigger type · deeper glow · live background ✦✦
   ================================================================ */

/* ── 1. BALANCED TYPOGRAPHY (fits at 100% zoom, all aspect ratios) ─ */
body { font-size: 14.5px; letter-spacing: 0.1px; }

.topbar-title       { font-size: 18px !important; }
.page-title         { font-size: 23px !important; }
.page-desc          { font-size: 14px !important; }
.stat-value         { font-size: 27px !important; }
.stat-label         { font-size: 12px !important; }
.stat-change        { font-size: 12px !important; }
.nav-item           { font-size: 14px !important; padding: 10px 14px !important; }
.nav-section-label  { font-size: 10.5px !important; }
.btn                { font-size: 14px !important; }
.btn-sm             { font-size: 12.5px !important; }
.btn-lg             { font-size: 15px !important; }
.form-label         { font-size: 13px !important; }
.form-control       { font-size: 14px !important; }
table               { font-size: 13.5px !important; }
th                  { font-size: 12px !important; }
.badge              { font-size: 11.5px !important; }
.chip               { font-size: 12.5px !important; }
.card .page-title   { font-size: 17px !important; }
.sidebar-user-name  { font-size: 14px !important; }
.text-sm  { font-size: 12.5px !important; }
.text-base{ font-size: 14.5px !important; }
.text-lg  { font-size: 17px !important; }
.text-xl  { font-size: 21px !important; }
.text-2xl { font-size: 28px !important; }

/* keep icon padding intact on wrapped inputs (fixes overlap) */
.form-control-wrap .form-control { padding-left: 42px !important; }
select.form-control { padding-right: 38px !important; }

/* ── 2. LIVING ANIMATED BACKGROUND ───────────────────────────────── */
/* drifting grid (kept) + slow rotating conic glow sweep + star field */
.bg-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* Designed ambient background for the two login/marketing pages.
   Four calm layers, each doing one job:
     mesh     - soft, asymmetric colour pools (the actual "design"), barely moving
     grain    - fine noise so the glow reads as a textured surface, not a flat
                CSS gradient (the single biggest lever between "premium" and
                "cheap gradient" at this scale)
     stars    - faint static points for depth, no twinkle/flicker
     vignette - darkens the edges so the mesh sits behind the content instead
                of competing with it
   No spinning or sweeping layers — everything here moves, if at all, over
   40-50s, so it reads as atmosphere rather than an animation. */
.bg-fx .mesh {
  position: absolute; inset: -15%;
  background:
    radial-gradient(38% 32% at 12% 18%, rgba(87, 241, 219,0.20), transparent 70%),
    radial-gradient(34% 30% at 88% 12%, rgba(137, 206, 255,0.16), transparent 70%),
    radial-gradient(42% 38% at 60% 92%, rgba(45,212,191,0.14), transparent 70%),
    radial-gradient(30% 26% at 8% 88%, rgba(137, 206, 255,0.10), transparent 70%);
  filter: blur(90px);
  animation: meshDrift 48s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-2.5%,2%) scale(1.05); }
}

.bg-fx .grain {
  position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-fx .stars {
  position: absolute; inset: 0; opacity: 0.45;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(137, 206, 255,0.45), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(87, 241, 219,0.45), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(137, 206, 255,0.35), transparent),
    radial-gradient(1px 1px at 60% 15%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(87, 241, 219,0.4), transparent);
  background-size: 100% 100%;
}

.bg-fx .vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 75% 65% at 50% 38%, transparent 35%, rgba(3,6,14,0.55) 100%);
}

.bg-fx .sweep, .bg-fx .ribbon, .bg-fx .orb { display: none; }

/* ── 3. DEEPER GLOW + POLISH ─────────────────────────────────────── */
:root {
  --glow-pink: 0 0 24px rgba(87, 241, 219,0.45), 0 0 70px rgba(87, 241, 219,0.18);
  --glow-cyan: 0 0 24px rgba(137, 206, 255,0.45),  0 0 70px rgba(137, 206, 255,0.18);
}

/* glowing gradient headings */
.page-title, .topbar-title, .auth-title, .login-card-title, .hero-title, .brand-headline {
  text-shadow: 0 0 30px rgba(87, 241, 219,0.25);
}
.grad-text { filter: drop-shadow(0 0 18px rgba(87, 241, 219,0.35)); }

/* stat value glow */
.stat-value { text-shadow: 0 0 24px rgba(255,255,255,0.12); }

/* cards: stronger depth + glow on hover */
.card, .stat-card {
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 50px -30px rgba(0,0,0,0.95);
}
.card:hover {
  box-shadow: 0 24px 60px -28px rgba(87, 241, 219,0.45), 0 0 0 1px rgba(87, 241, 219,0.15);
}
.stat-card:hover {
  box-shadow: 0 28px 60px -26px rgba(87, 241, 219,0.5), 0 0 40px -10px rgba(137, 206, 255,0.25);
}

/* stat icons glow softly at rest, brighter on hover */
.stat-icon-pink { box-shadow: 0 0 20px -4px rgba(87, 241, 219,0.55); }
.stat-icon-cyan { box-shadow: 0 0 20px -4px rgba(137, 206, 255,0.55); }
.stat-icon-green { box-shadow: 0 0 20px -4px rgba(0,229,160,0.55); }
.stat-icon-yellow { box-shadow: 0 0 20px -4px rgba(255,184,0,0.55); }
.stat-icon-purple { box-shadow: 0 0 20px -4px rgba(147,51,234,0.55); }

/* nav active item glows */
.nav-item.active { box-shadow: inset 0 0 0 1px rgba(87, 241, 219,0.25), 0 0 22px -6px rgba(87, 241, 219,0.5); }

/* buttons: brighter glow */
.btn-primary { box-shadow: 0 6px 24px rgba(87, 241, 219,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset; }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(87, 241, 219,0.6), 0 0 30px rgba(137, 206, 255,0.25); }
.btn-outline-pink:hover { box-shadow: 0 0 22px -4px rgba(87, 241, 219,0.5); }
.btn-outline-cyan:hover { box-shadow: 0 0 22px -4px rgba(137, 206, 255,0.5); }

/* badges glow */
.badge-pink, .chip-pink { box-shadow: 0 0 14px -4px rgba(87, 241, 219,0.55); }
.badge-cyan, .chip-cyan { box-shadow: 0 0 14px -4px rgba(137, 206, 255,0.55); }
.badge-green { box-shadow: 0 0 14px -4px rgba(0,229,160,0.5); }

/* topbar accent bar glows brighter (dashboard only) */
.topbar-title.topbar-accent::before { height: 22px !important; box-shadow: 0 0 16px rgba(87, 241, 219,0.8); }

/* sidebar logo stronger glow */
.sidebar-logo img { filter: drop-shadow(0 0 18px rgba(87, 241, 219,0.5)); }

/* inputs glow on focus (brighter) */
.form-control:focus { box-shadow: 0 0 0 3px rgba(87, 241, 219,0.15), 0 0 30px -6px rgba(87, 241, 219,0.6); }

/* scrollbar a touch wider for presence */
::-webkit-scrollbar { width: 8px; height: 8px; }

/* avatars subtle glow */
.avatar-pink { box-shadow: 0 0 16px -4px rgba(87, 241, 219,0.5); }
.avatar-cyan { box-shadow: 0 0 16px -4px rgba(137, 206, 255,0.5); }

/* ================================================================
   ✦✦✦ STYLE v4 — signature waveform · ambient flow · load reveal ✦✦✦
   ================================================================ */

/* ── SIGNATURE: animated audio waveform (ties to meeting/transcription) ── */
.waveform { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; }
.waveform i {
  width: 3px; border-radius: 3px; display: block;
  background: linear-gradient(180deg, var(--brand-cyan), var(--brand-pink));
  box-shadow: 0 0 10px rgba(137, 206, 255,0.5);
  animation: wave 1.1s ease-in-out infinite;
}
.waveform i:nth-child(1){ height:40%; animation-delay:-0.9s }
.waveform i:nth-child(2){ height:75%; animation-delay:-0.7s }
.waveform i:nth-child(3){ height:100%;animation-delay:-0.5s }
.waveform i:nth-child(4){ height:60%; animation-delay:-0.3s }
.waveform i:nth-child(5){ height:90%; animation-delay:-0.6s }
.waveform i:nth-child(6){ height:45%; animation-delay:-0.2s }
.waveform i:nth-child(7){ height:80%; animation-delay:-0.4s }
@keyframes wave { 0%,100% { transform: scaleY(0.4); opacity:0.7; } 50% { transform: scaleY(1); opacity:1; } }

/* big hero waveform variant for login panels */
.waveform-lg { height: 56px; gap: 5px; }
.waveform-lg i { width: 5px; }

/* ── AMBIENT: flowing aurora ribbon behind content ── */
.bg-fx .ribbon {
  position: absolute; left: -20%; right: -20%; top: 30%; height: 320px;
  background: linear-gradient(90deg, transparent, rgba(87, 241, 219,0.10), rgba(137, 206, 255,0.10), transparent);
  filter: blur(60px); transform: rotate(-8deg);
  animation: ribbonFlow 26s ease-in-out infinite alternate;
}
@keyframes ribbonFlow {
  0%   { transform: rotate(-8deg) translateX(-8%) translateY(0); opacity:0.7; }
  100% { transform: rotate(-5deg) translateX(8%) translateY(-30px); opacity:1; }
}

/* ── PAGE-LOAD REVEAL: content rises in sequence ── */
.page-content > * { animation: rise 0.6s cubic-bezier(0.22,1,0.36,1) both; }
.page-content > *:nth-child(1){animation-delay:.02s}
.page-content > *:nth-child(2){animation-delay:.10s}
.page-content > *:nth-child(3){animation-delay:.18s}
.page-content > *:nth-child(4){animation-delay:.26s}
.page-content > *:nth-child(5){animation-delay:.34s}
.page-content > *:nth-child(6){animation-delay:.42s}
@keyframes rise { from { opacity:0; transform: translateY(22px); } to { opacity:1; transform: translateY(0); } }

/* ── SHIMMER sweep across card top edge on hover ── */
.card { position: relative; }
.card::before {
  content: ''; position: absolute; top: 0; left: -60%; width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-cyan), var(--brand-pink), transparent);
  opacity: 0; transition: opacity .3s; z-index: 3;
}
.card:hover::before { opacity: 1; animation: edgeSweep 1.1s ease forwards; }
@keyframes edgeSweep { from { left:-60%; } to { left:100%; } }

/* ── STAT CARDS: animated gradient ring accent ── */
.stat-icon { position: relative; overflow: visible; }
.stat-icon::after {
  content: ''; position: absolute; inset: -3px; border-radius: inherit;
  background: conic-gradient(from 0deg, var(--brand-pink), var(--brand-cyan), var(--brand-pink));
  opacity: 0; transition: opacity .3s; z-index: -1; filter: blur(4px);
}
.stat-card:hover .stat-icon::after { opacity: 0.8; animation: ringSpin 3s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ── BUTTONS: animated gradient border on outline buttons ── */
.btn-outline-pink, .btn-outline-cyan { position: relative; z-index: 0; }

/* ── SIDEBAR: glowing animated rail under logo ── */
.sidebar-logo { position: relative; }
.sidebar-logo::after {
  content: ''; position: absolute; left: 20px; right: 20px; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-pink), var(--brand-cyan), transparent);
  background-size: 200% 100%; animation: shimmer 4s linear infinite; opacity: 0.7;
}

/* ── LINKS / interactive hover lift ── */
.org-item:hover, tbody tr:hover { box-shadow: inset 3px 0 0 var(--brand-pink); }

/* ── headings get a refined gradient underline accent ── */
.page-header .page-title { position: relative; display: inline-block; }
/* respect reduced motion for all the new stuff */
@media (prefers-reduced-motion: reduce) {
  .waveform i, .bg-fx .ribbon, .page-content > *, .card::before,
  .stat-icon::after, .sidebar-logo::after { animation: none !important; }
}

/* ================================================================
   ✦ ICONS + GLASS v5 ✦
   ================================================================ */
.lic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.ic-host { display: inline-flex; align-items: center; justify-content: center; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.nav-icon .lic { width: 19px; height: 19px; }
.stat-icon .lic { width: 24px; height: 24px; }
.btn .lic { width: 16px; height: 16px; margin-right: -2px; }

/* ── GLASS EVERYWHERE ── */
.card, .stat-card, .modal, .table-wrap, .topbar, .sidebar,
.cred-hint, .feature-mini-card, .tabs, .search-box,
.alert, .pending-card, .chip {
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.card, .stat-card, .modal {
  background:
    linear-gradient(150deg, rgba(255,255,255,0.06), rgba(255,255,255,0.015)),
    rgba(15,20,34,0.55) !important;
  border: 1px solid rgba(255,255,255,0.09);
}
.topbar { background: rgba(12,16,28,0.5) !important; }
.modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.form-control {
  background: rgba(255,255,255,0.04) !important;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.qa-icon .lic, .stat-icon .lic { width: 24px; height: 24px; }

/* centered tabs (meeting detail) + tab icon alignment */
.tabs-center { justify-content: center; }
.tab { display: inline-flex; align-items: center; gap: 7px; }
.tab .lic { width: 16px; height: 16px; }

/* input field icons + misc icon slots sizing */
.form-control-icon { display: inline-flex; align-items: center; justify-content: center; }
.form-control-icon .lic { width: 17px; height: 17px; }
.show-pw-btn .lic { width: 18px; height: 18px; }
.meeting-thumb .lic, .meeting-thumb svg { width: 22px; height: 22px; }
.empty-icon .lic { width: 40px; height: 40px; }
.btn .lic { width: 16px; height: 16px; }
.modal-close .lic { width: 16px; height: 16px; }

/* ================================================================
   ✦ CUSTOM DROPDOWN (glass) — replaces native <select> option lists
   ================================================================ */
.card:has(.xdd.open) { overflow: visible; }
.xdd { position: relative; display: inline-block; }
.xdd.open { z-index: 9000; isolation: isolate; }
.xdd-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; user-select: none;
}
.xdd-trigger .xdd-caret { display:inline-flex; transition: transform .2s ease; opacity:.7; flex-shrink:0; }
.xdd-trigger .xdd-caret .lic { width:14px; height:14px; }
.xdd.open .xdd-trigger .xdd-caret { transform: rotate(180deg); }
.xdd.open .xdd-trigger { border-color: rgba(87, 241, 219,0.5) !important; }

.xdd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%;
  max-height: 280px; overflow-y: auto; z-index: 9001;
  background: linear-gradient(150deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)), rgba(13,17,30,0.92);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04) inset;
  padding: 6px;
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.xdd.open .xdd-menu,
.xdd-menu.xdd-menu-portaled { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.xdd-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: calc(var(--radius-md) - 3px);
  font-size: 13.5px; color: var(--text-secondary); cursor: pointer;
  white-space: nowrap; transition: background .12s ease, color .12s ease;
}
.xdd-opt:hover { background: rgba(87, 241, 219,0.12); color: var(--text-primary); }
.xdd-opt.selected { background: rgba(87, 241, 219,0.16); color: var(--text-primary); font-weight: 600; }
.xdd-opt .opt-flag { font-size: 15px; line-height: 1; }

.xdd-menu::-webkit-scrollbar { width: 6px; }

/* ================================================================
   ✦ DATE RANGE PICKER (glass) — calendar icon + From/To popup
   ================================================================ */
.xdrp { position: relative; display: inline-block; }
.xdrp.open { z-index: 9000; isolation: isolate; }
.xdrp-trigger {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none; white-space: nowrap;
}
.xdrp-trigger .lic { width: 16px; height: 16px; opacity: .75; flex-shrink: 0; }
.xdrp.open .xdrp-trigger, .xdrp.has-value .xdrp-trigger { border-color: rgba(87, 241, 219,0.5) !important; color: var(--text-primary); }
.xdrp.has-value .xdrp-trigger .lic { color: var(--brand-pink); opacity: 1; }

.xdrp-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 280px;
  z-index: 9001;
  background: linear-gradient(150deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)), rgba(13,17,30,0.92);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04) inset;
  padding: 16px;
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.xdrp.open .xdrp-panel,
.xdrp-panel.xdrp-panel-portaled { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.xdd-menu-portaled, .xdrp-panel-portaled { z-index: 99999 !important; }
.xdrp-panel label { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 6px; }
.xdrp-field { margin-bottom: 14px; }
.xdrp-field:last-of-type { margin-bottom: 16px; }
.xdrp-panel input[type="date"] {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 10px; color: var(--text-primary);
  font-family: var(--font-main); font-size: 13px; outline: none;
  color-scheme: dark;
}
.xdrp-panel input[type="date"]:focus { border-color: rgba(87, 241, 219,0.5); }
.xdrp-actions { display: flex; justify-content: space-between; gap: 8px; }

@media (max-width: 880px) { .xdrp-panel { right: auto; left: 0; } }

/* ================================================================
   ✦ FIREFOX GLASS-EFFECT FIX ✦
   ================================================================
   backdrop-filter's saturate() pass renders as a strong teal/cyan
   colour cast across the glass panels (cards, table, tabs, sidebar, etc.)
   in Firefox — Gecko composites saturate() differently than Chromium when
   several semi-transparent glass layers stack on top of the teal/blue
   background glow. Scoped strictly to Firefox via the -moz-appearance
   feature check so Chrome/Edge/Safari keep the original glass effect
   exactly as before; only the saturate() boost is dropped for Firefox. */
@supports (-moz-appearance: none) {
  .card, .stat-card, .modal, .table-wrap, .topbar, .sidebar,
  .cred-hint, .feature-mini-card, .tabs, .search-box,
  .alert, .pending-card, .chip {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .xdd-menu, .xdrp-panel {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
}

/* ── Global Page Loader ─────────────────────────────────────────── */
.global-loader {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  height: calc(100vh - 72px);
  background: rgba(7,17,34,.86); backdrop-filter: blur(3px);
  transition: opacity .25s ease, visibility .25s ease;
}
.global-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.global-loader-content {
  display:flex; align-items:center; gap:10px;
  padding:13px 18px; border-radius:12px;
  border:1px solid rgba(137, 206, 255,.22);
  background:rgba(13,20,38,.92); box-shadow:0 10px 28px rgba(0,0,0,.28);
  backdrop-filter:blur(12px); white-space:nowrap;
}
.global-loader-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid rgba(137, 206, 255,.14);
  border-top-color: var(--brand-pink); border-right-color:var(--brand-cyan);
  animation: spin .7s linear infinite;
}
.global-loader-title { color:var(--text-secondary); font-size:12px; font-weight:650; }

/* ── Global Back Button ─────────────────────────────────────────── */
.back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary);
  cursor: pointer; transition: all .15s ease;
}
.back-btn:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-active); }
.back-btn svg { width: 18px; height: 18px; }
.page-header-row { display: flex; align-items: center; gap: 12px; }

/* ── Seller admin: phone layout ───────────────────────────────────
   Keep wide data tables scrollable inside their card while every other
   control follows the viewport. This prevents a wide topbar/filter from
   clipping the complete page on 360–430px phones. */
@media (max-width: 880px) {
  html, body, .app-layout, .main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .app-layout { display: block; }
  .main-content { flex: none; overflow-x: clip; }

  .topbar {
    min-height: var(--topbar-h);
    height: auto;
    padding: 10px 12px;
    gap: 9px;
    flex-wrap: wrap;
  }
  .topbar-title {
    flex: 1 1 150px;
    min-width: 0;
    font-size: 16px !important;
    line-height: 1.2;
  }
  .topbar-actions {
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
    gap: 8px;
    flex-wrap: wrap;
  }
  .topbar-actions:empty { display: none; }
  .topbar-actions .search-box { flex: 1 1 190px; width: auto; min-width: 0; }
  .topbar-actions .xdrp,
  .topbar-actions .xdd { flex: 1 1 145px; min-width: 0; }
  .topbar-actions .xdrp-trigger,
  .topbar-actions .xdd-trigger { width: 100%; }

  .page-content { width: 100%; max-width: 100%; min-width: 0; padding: 18px 12px 28px; }
  .page-content > *, .page-header, .card, .stat-card { min-width: 0; max-width: 100%; }
  .page-header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .page-header > * { min-width: 0; max-width: 100%; }
  .page-header > :last-child:not(:first-child) { width: 100%; }
  .page-desc { overflow-wrap: anywhere; line-height: 1.45; }

  .grid-2, .grid-3, .grid-4, .dash-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .card { padding: 18px 16px; }
  .stat-card { padding: 16px; }

  .tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }
  .tab { flex: 0 0 auto; padding: 8px 14px; }

  .filter-bar { width: 100%; align-items: stretch; }
  .filter-bar .xdd, .filter-bar .xdrp { width: 100% !important; flex: 1 1 100%; }

  /* The card never overflows; only its data rows can be swiped sideways. */
  .card:has(> .table-wrap) { overflow: hidden !important; }
  .table-wrap { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { width: max-content; min-width: 680px; }

  .xdrp-panel { left: 0; right: auto; min-width: min(280px, calc(100vw - 24px)); }
}

@media (max-width: 430px) {
  .page-title { font-size: 20px !important; }
  .topbar-actions .btn { padding-inline: 13px; }
  .modal-overlay { padding: 12px; }
  .modal { padding: 20px 16px; max-height: calc(100dvh - 24px); overflow-y: auto; }
}
