/* ═══════════════════════════════════════════════════════════════
   Asback Dev – Premium Turkish Theme CSS
   Red / White / Dark palette with glassmorphism & micro-animations
   ═══════════════════════════════════════════════════════════════ */

/* ─── 21st.dev SaaS Design Tokens ─── */
:root {
  --ink: #ffffff;
  --muted: #8a909d;
  --card: #0e1017;
  --card-hover: #131722;
  --line: rgba(255, 255, 255, 0.06);
  --border: #1a1d26;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --bg: #08090d;
  --bg-sidebar: #07080c;
  --bg-sidebar-main: #08090d;

  /* Accents */
  --accent: #ffffff;
  --accent-2: #8a909d;
  --accent-3: #10b981;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --alert: #38bdf8;
  --red: #f43f5e;
  --red-light: #fb7185;
  --red-dark: #e11d48;
  --red-glow: rgba(244, 63, 94, 0.3);
  --red-subtle: rgba(255, 255, 255, 0.05);

  /* Shadows */
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.65);
  --shadow-red: 0 4px 20px rgba(244, 63, 94, 0.2);

  /* Glass */
  --glass-bg: rgba(14, 16, 23, 0.85);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 16px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* Transition */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Dark Theme (Permanent SaaS Pure Obsidian) ─── */
html, html.theme-dark, body, body.theme-dark {
  --ink: #ffffff;
  --muted: #8a909d;
  --card: #0e1017;
  --card-hover: #131722;
  --line: rgba(255, 255, 255, 0.06);
  --border: #1a1d26;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --bg: #08090d;
  --bg-sidebar: #07080c;
  --bg-sidebar-main: #08090d;
  --accent: #ffffff;
  --accent-2: #8a909d;
  --accent-3: #10b981;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --alert: #38bdf8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.65);
  --shadow-red: 0 4px 20px rgba(244, 63, 94, 0.2);
  --glass-bg: rgba(14, 16, 23, 0.85);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 16px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.3s var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Pristine Obsidian Background System (CRM Studio Aesthetic) ─── */
.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  background: #08090d;
}
.bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 80%);
  opacity: 0.9;
}
.bg-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 1100px;
  height: 450px;
  background: radial-gradient(ellipse 900px 350px at 50% 0%, rgba(227, 10, 23, 0.08) 0%, rgba(99, 102, 241, 0.03) 50%, transparent 80%);
  filter: blur(60px);
  pointer-events: none;
}

/* ─── Layout ─── */
.page {
  padding: 24px 0 80px;
  min-height: 100vh;
}
.shell {
  width: min(1200px, 94vw);
  margin: 0 auto;
}
body.has-sidebar .page {
  padding-left: 272px;
  padding-right: 24px;
}
body.has-sidebar .topbar {
  width: 100%;
  margin: 0 0 20px;
}
body.has-sidebar .shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   LOGIN / HERO PAGE
   ═══════════════════════════════════════ */
.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px);
  padding: 40px 20px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  animation: heroFadeIn 0.8s var(--ease) both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--red-subtle);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: fit-content;
  animation: eyebrowPulse 3s ease-in-out infinite;
}

@keyframes eyebrowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

.hero .muted {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 440px;
}

.alert {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  animation: alertShake 0.5s var(--ease);
}

@keyframes alertShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Hero Status Card */
.hero-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: heroCardFloat 6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes heroCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  animation: pulseRing 2s var(--ease) infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hero-status:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════ */
.topbar {
  width: 100%;
  margin: 0 auto 24px;
  padding: 10px 20px;
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  gap: 16px;
  position: relative;
  z-index: 100;
  transition: all 0.3s var(--ease);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 440px;
}

.topbar-family-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 4px 14px 4px 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.topbar-family-picker:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.06);
}

.family-dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
  flex-shrink: 0;
}

.topbar-family-select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 20px 4px 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.topbar-family-select option {
  background: #090d16;
  color: #ffffff;
  padding: 8px;
}

.picker-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #9ca3af;
}

.topbar-family-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #e5e7eb;
}

.switch-portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  text-decoration: none;
  transition: all 0.2s;
}
.switch-portal-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.brand-text {
  color: #ffffff;
  background: linear-gradient(to bottom, #ffffff, #ffffff, rgba(255, 255, 255, 0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--red-subtle);
}

.profile-menu { position: relative; }
.profile-trigger {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.avatar-placeholder {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #334155);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}
.profile-name {
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
}
.trigger-chevron {
  color: #9ca3af;
  transition: transform 0.2s ease;
}
.profile-menu.open .trigger-chevron {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 150;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dropdown-header {
  padding: 6px 10px 8px;
}
.dropdown-user-name {
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
}
.dropdown-user-role {
  font-size: 11px;
  color: #9ca3af;
}
.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}
.dropdown-danger {
  color: #fb7185 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s ease;
}
.dropdown-danger:hover {
  background: rgba(244, 63, 94, 0.12) !important;
}
.profile-menu:hover .profile-dropdown,
.profile-menu:focus-within .profile-dropdown,
.profile-menu.open .profile-dropdown {
  display: flex;
  animation: dropdownSlide 0.2s var(--ease);
}

@keyframes dropdownSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown a,
.profile-dropdown .dropdown-btn {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: all 0.2s var(--ease);
}
.profile-dropdown a:hover,
.profile-dropdown .dropdown-btn:hover {
  background: var(--red-subtle);
  color: var(--accent);
}

/* ═══════════════════════════════════════
   SIDEBARS
   ═══════════════════════════════════════ */
.sidebar-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  z-index: 990;
  height: 100vh;
  box-shadow: var(--shadow-lg);
}

/* Slim Left Rail */
.slim-sidebar {
  width: 72px;
  background: #000000;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}
.slim-sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.slim-sidebar-bottom {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
}

/* Brand Logo (Turkish flag inspired) */
.slim-brand {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--red-dark) 100%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--shadow-red);
  margin-bottom: 4px;
  transition: transform 0.3s var(--spring);
}
.slim-brand:hover {
  transform: scale(1.08) rotate(-3deg);
}
.brand-mark { letter-spacing: -0.04em; }

.slim-section-divider {
  width: 32px;
  height: 1px;
  background: var(--line);
  margin: 6px auto;
  border-radius: 99px;
}

.slim-families {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}
.family-switch-form {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.slim-family-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--spring);
}
.slim-family-btn:hover {
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.05);
}
.slim-family-btn.active {
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-red);
}

/* Slim Nav Links */
.slim-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}
.slim-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.25s var(--ease);
  position: relative;
  text-decoration: none;
}
.slim-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.slim-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow-red);
}
.slim-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 12px;
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}

/* Main Right Sidebar */
.sidebar {
  width: 240px;
  background: #05070f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.sidebar-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.sidebar-brand-text .strong {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.sidebar-brand-text .muted {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.sidebar-family-selector { margin-bottom: 20px; }
.family-pill {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.family-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 8px var(--accent-3);
}
.family-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
}
.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 8px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.sidebar-link svg {
  opacity: 0.75;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
}
.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}
.sidebar-link:hover svg {
  opacity: 1;
  transform: scale(1.12);
  color: #38bdf8;
}
.sidebar-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.sidebar-link.active svg {
  opacity: 1;
  color: #ffffff;
  filter: none;
}
body.theme-dark .sidebar-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-live-pulse {
  font-size: 0.65rem;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-live-pulse::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseGreen 1.5s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ═══════════════════════════════════════
   CARD COMPONENTS
   ═══════════════════════════════════════ */
.card {
  background: rgba(9, 13, 22, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
}
body.theme-dark .card {
  background: rgba(9, 13, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════
   SECTION HEADER
   ═══════════════════════════════════════ */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(to bottom, #ffffff, #ffffff, rgba(255, 255, 255, 0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.pill, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(31, 41, 55, 0.5);
  border: 1px solid rgba(55, 65, 81, 0.7);
  color: #9ca3af;
  font-weight: 500;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

/* ═══════════════════════════════════════
   STATS GRID
   ═══════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.stat-card:hover::after { opacity: 1; }
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-top: 8px;
  color: var(--ink);
}

/* ═══════════════════════════════════════
   GRID / LAYOUT UTILITIES
   ═══════════════════════════════════════ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.dashboard-grid { margin-top: 16px; }
@media (max-width: 1024px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   LIST ROWS
   ═══════════════════════════════════════ */
.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  gap: 16px;
  transition: all 0.2s var(--ease);
}
.list-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: var(--red-subtle);
}
.list-row .strong {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.list-row .muted {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════
   BADGES
   ═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-ok {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-3);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-danger, .status-alert {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.status-muted {
  background: var(--line);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.table {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(9, 13, 22, 0.6);
  overflow: hidden;
}
.table-row {
  display: grid;
  padding: 14px 18px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  background: transparent;
  color: #e5e7eb;
  transition: background 0.15s ease;
}
.table-row:last-child { border-bottom: none; }
.table-row:hover { background: rgba(255, 255, 255, 0.03); }
.table-row.active-row {
  z-index: 999;
  position: relative;
}
.table-head {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.table-head:hover { background: rgba(255, 255, 255, 0.02); }
.table-empty {
  text-align: center;
  padding: 24px;
  grid-column: 1 / -1;
  color: var(--muted);
}

.table-3 .table-row { grid-template-columns: 1fr 1fr 1fr; }
.table-4 .table-row { grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr; }
.table-5 .table-row { grid-template-columns: 1.5fr 1.5fr 1.5fr 1fr 1.5fr; }
.table-6 .table-row { grid-template-columns: 1.5fr 1.5fr 1fr 1.5fr 1fr 1.5fr; }

@media (max-width: 768px) {
  .table { display: block; overflow-x: auto; }
  .table-row { display: flex; flex-wrap: wrap; padding: 16px; }
  .table-head { display: none; }
}

/* ═══════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
input, select, textarea {
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  width: 100%;
  transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

/* Custom Select */
.select { position: relative; z-index: 10; }
.select-trigger {
  width: 100%;
  text-align: left;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s var(--ease);
}
.select-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  margin-left: 8px;
  margin-top: -3px;
  transition: transform 0.2s var(--ease);
}
.select.open .select-trigger::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.select-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 9999;
}
body.theme-dark .select-options {
  background: #0f1116; /* Solid color to prevent bleed-through */
}
.select.open .select-options { display: block; z-index: 99999; }
.select.open { z-index: 99999 !important; }
.has-open-select, .card:has(.select.open), .toggle-group:has(.select.open), .form-group:has(.select.open), .table-responsive:has(.select.open) { overflow: visible !important; z-index: 9999 !important; }
.select-option {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: background 0.2s var(--ease);
}
.select-option:hover {
  background: var(--red-subtle);
  color: var(--accent);
}
.select-option.selected {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

/* ═══════════════════════════════════════
   BULK BAR & CHECKBOXES
   ═══════════════════════════════════════ */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: var(--red-subtle);
}
.bulk-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bulk-actions form {
  margin: 0;
  display: inline-flex;
}
.table-check.table-5 .table-row { grid-template-columns: 44px repeat(4, 1fr); }
.table-check.table-6 .table-row { grid-template-columns: 40px 1.4fr 1.3fr 1.8fr 1.2fr 130px; }
.accounts-table .table-row {
  padding: 16px 20px;
  min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.table-check.table-7 .table-row { grid-template-columns: 44px repeat(6, 1fr); }
.table-check.table-8 .table-row { grid-template-columns: 44px repeat(7, 1fr); }
.table-check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.table-empty { grid-column: 1 / -1; }
.bulk-checkbox {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; min-width: 18px; max-width: 18px;
  height: 18px; min-height: 18px; max-height: 18px;
  flex: 0 0 18px;
  margin: 0; padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.bulk-checkbox:hover { border-color: var(--accent); }
.bulk-checkbox:active { transform: scale(0.95); }
.bulk-checkbox:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}
.bulk-checkbox::before {
  content: "";
  width: 10px; height: 10px;
  background: #fff;
  transform: scale(0);
  transition: transform 0.15s var(--ease);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
}
.bulk-checkbox:checked {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.bulk-checkbox:checked::before { transform: scale(1); }
.bulk-checkbox:indeterminate {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.14);
}
.bulk-checkbox:indeterminate::before {
  content: "";
  width: 10px; height: 2px;
  border-radius: 99px;
  background: var(--accent);
  clip-path: none;
  transform: scale(1);
}
.bulk-checkbox:disabled { opacity: 0.5; cursor: not-allowed; }
.check-row input.bulk-checkbox { margin-right: 8px; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.ghost-btn, .primary-btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.primary-btn {
  background: linear-gradient(to bottom, #ffffff, rgba(255, 255, 255, 0.96) 60%, rgba(255, 255, 255, 0.7));
  color: #000000;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 16px rgba(255, 255, 255, 0.1);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.primary-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
  color: #000000;
}
.primary-btn:active {
  transform: scale(0.98);
}
.primary-btn.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: none;
}
.primary-btn.danger:hover {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.5);
  color: #ffffff;
  transform: scale(1.02);
}
.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-weight: 500;
}
.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.ghost-btn.danger {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.25);
}
.ghost-btn.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
  color: #ffffff;
}

/* ═══════════════════════════════════════
   NOTICES
   ═══════════════════════════════════════ */
.notice {
  background: var(--red-subtle);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════
   MODALS & TOAST
   ═══════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.3s var(--spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.modal-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ═══════════════════════════════════════
   21ST.DEV NOTIFICATIONS-5 TOAST SYSTEM
   ═══════════════════════════════════════ */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  padding: 14px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-hide {
  opacity: 0 !important;
  transform: translateX(40px) scale(0.95) !important;
  pointer-events: none;
}

.toast-icon {
  margin-top: 2px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon { color: #10b981; }
.toast-info .toast-icon { color: #38bdf8; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-error .toast-icon, .toast-destructive .toast-icon { color: #f43f5e; }

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

.toast-body {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
  word-break: break-word;
}

.toast-dismiss {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.toast-dismiss:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* ═══════════════════════════════════════
   PROFILE & ACCOUNT DETAILS
   ═══════════════════════════════════════ */
.profile-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--line);
  object-fit: cover;
}
.account-detail-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
body.theme-dark .account-detail-profile {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.account-detail-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--line);
  box-shadow: var(--shadow-red);
  margin-bottom: 12px;
  object-fit: cover;
}
.account-detail-name {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.account-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* Guild Lists */
.guilds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}
.guild-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  transition: all 0.2s var(--spring);
}
.guild-item:hover {
  background: var(--red-subtle);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.guild-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.guild-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: var(--ink);
  object-fit: cover;
}
.guild-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.owner-badge {
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 2px 8px;
  border-radius: 100px;
}
.guilds-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}
.guilds-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  filter: grayscale(1);
  opacity: 0.6;
}

/* Danger Button */
.danger-btn {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #f43f5e;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.danger-btn:hover {
  background: #f43f5e;
  color: #fff;
  border-color: #f43f5e;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
  transform: translateY(-1px);
}

/* Meta Items */
.meta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.meta-label {
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.meta-value {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

/* ═══════════════════════════════════════
   MOBILE RESPONSIVENESS
   ═══════════════════════════════════════ */

.sidebar-toggle-mobile {
  display: none;
}

/* Sidebar Backdrop for Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 980;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
body.sidebar-open .sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .sidebar-toggle-mobile {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
  }
  body.has-sidebar .page {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
    z-index: 999;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
  }
  body.sidebar-open .sidebar-wrapper {
    transform: translateX(0);
  }
  .topbar {
    border-radius: 0;
    margin-bottom: 0;
    padding: 10px 16px;
    gap: 10px;
  }
  /* Hide profile role label on tablet */
  .profile-role { display: none; }
  /* Nav username truncation */
  .profile-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-copy { align-items: center; }
  .eyebrow { margin: 0 auto; }
  .hero .muted { max-width: 100%; }
  /* Section head wrap */
  .section-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  /* Grid cols drop to 1 earlier */
  .grid-2 { grid-template-columns: 1fr; }
  /* Bulk bar stack on tablet */
  .bulk-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .bulk-actions { flex-wrap: wrap; }
  /* Voice entry stack */
  .voice-entry {
    flex-direction: column;
    align-items: flex-start;
  }
  .voice-entry-right {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Premium card body single col */
  .premium-card-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .premium-card-footer {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Filter bar stack */
  .filter-bar {
    flex-direction: column;
    gap: 10px;
  }
  .filter-bar .filter-actions {
    width: 100%;
    justify-content: flex-end;
  }
  /* Stats grid 2-col on tablet */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  .page { padding: 12px 0 60px; }
  .shell { width: 96vw; }
  /* Stats 1 col on mobile */
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 { font-size: 22px; }
  /* Section head full stack */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head h2 { font-size: 18px; }
  /* Card padding tight */
  .card { padding: 16px; }
  /* Topbar tight */
  .topbar { padding: 8px 12px; }
  /* Hide theme toggle on very small */
  .theme-toggle-btn { display: none; }
  /* Profile trigger compact */
  .profile-trigger { padding: 6px 10px; }
  .profile-name { max-width: 80px; }
  /* Table scrollable */
  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .table-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
  .table-head { display: none; }
  /* Form rows single col */
  .form-row {
    grid-template-columns: 1fr;
  }
  .grid-form {
    grid-template-columns: 1fr;
  }
  /* Activity type grid 2 cols */
  .activity-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Bulk bar */
  .bulk-bar {
    padding: 10px;
  }
  /* Section head pill */
  .pill { font-size: 11px; padding: 4px 10px; }
  /* Modal full-width */
  .modal { width: 96vw; padding: 20px 16px; }
  .modal-actions { flex-direction: column; gap: 8px; }
  .modal-actions .ghost-btn,
  .modal-actions .primary-btn { width: 100%; justify-content: center; }
  /* Toast positioning */
  .toast-wrap { bottom: 12px; right: 12px; left: 12px; }
  /* Log entry compact */
  .log-entry { padding: 12px; gap: 10px; }
  /* Voice entry on mobile */
  .voice-entry { padding: 12px 14px; }
  .voice-entry-detail { flex-direction: column; gap: 4px; }
  /* Premium card header */
  .premium-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .premium-card-footer {
    flex-direction: column;
    gap: 8px;
  }
  .premium-card-footer .primary-btn,
  .premium-card-footer .ghost-btn,
  .premium-card-footer .outline-danger-btn { width: 100%; justify-content: center; }
  /* Page title */
  .page-big-title { font-size: 20px; }
  /* Assignments table action buttons stack */
  .row-actions { flex-direction: column; align-items: stretch; }
  .row-actions .ghost-btn,
  .row-actions .primary-btn { width: 100%; justify-content: center; }
  /* Pagination compact */
  .pagination { flex-wrap: wrap; gap: 4px; }
  .pagination a, .pagination span { padding: 6px 10px; font-size: 12px; }
}

/* ═══════════════════════════════════════
   SMALL TEXT UTILITIES
   ═══════════════════════════════════════ */
.small { font-size: 11px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
a { color: var(--accent); }

/* ═══════════════════════════════════════
   LOG FEED STYLES
   ═══════════════════════════════════════ */
/* Log Feed Styles */
.log-feed { display: flex; flex-direction: column; gap: 10px; }
.log-entry { display: flex; align-items: flex-start; gap: 16px; padding: 16px 20px; background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); border: 1px solid var(--glass-border); border-radius: var(--radius-md); border-left: 4px solid var(--muted); transition: all 0.2s var(--ease); }
.log-entry:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.log-entry.log-success { border-left-color: var(--accent-3); }
.log-entry.log-warning { border-left-color: var(--warning); }
.log-entry.log-error { border-left-color: var(--danger); }
.log-entry.log-info { border-left-color: var(--muted); }
.log-entry-body { flex: 1; min-width: 0; }
.log-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.log-entry-message { font-size: 13px; color: var(--ink); line-height: 1.5; word-break: break-word; }
.log-entry-time { font-size: 11px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; padding: 16px 20px; background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); border: 1px solid var(--glass-border); border-radius: var(--radius-md); }
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }
.filter-bar .filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.log-modal-meta { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; font-size: 12px; overflow-x: auto; max-height: 300px; color: var(--muted); margin-top: 12px; }

/* Success message */
.success { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); color: var(--accent-3); padding: 12px 18px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* Grid form layout */
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: end; }
.form-action { display: flex; align-items: flex-end; padding-top: 4px; }
.form .actions, .row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ghost-btn.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
.ghost-btn.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.toggle-group { margin-bottom: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; margin-top: 6px; }
.clear-voice-field { margin-top: 8px; }


/* ═══════════════════════════════════════
   STATUS CENTER CARD STYLES
   ═══════════════════════════════════════ */
.voice-entries { display: flex; flex-direction: column; gap: 12px; }
.voice-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all 0.25s var(--ease);
}
.voice-entry:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.voice-entry-info { flex: 1; min-width: 0; }
.voice-entry-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}
/* ─── Custom File Dropzone ─── */
.custom-file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  text-align: center;
  position: relative;
}
.custom-file-dropzone:hover {
  border-color: var(--accent);
  background: var(--red-subtle);
}
.custom-file-dropzone svg {
  color: var(--accent);
  transition: transform 0.2s var(--ease);
}
.custom-file-dropzone:hover svg {
  transform: translateY(-2px);
}
.custom-file-dropzone .file-text {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}
.custom-file-dropzone .file-hint {
  font-size: 11px;
  color: var(--muted);
}

/* ─── Global Announcement Banner ─── */
.announcement-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.announcement-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #38bdf8;
}
.announcement-campaign {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 59, 71, 0.12));
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--accent);
}
.announcement-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}
.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.announcement-btn {
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: opacity 0.2s;
}
.announcement-btn:hover {
  opacity: 0.9;
}
.announcement-close {
  background: transparent;
  border: none;
  color: currentColor;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
  padding: 4px;
}
.announcement-close:hover { opacity: 1; }
.voice-entry-detail {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.voice-entry-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-text { font-size: 14px; font-weight: 500; }

/* Assignments Voice Table Fixes */
.assignments-voice .table-row,
.assignments-vote .table-row {
  min-height: 64px;
  padding: 14px 18px;
}
.assignments-voice .table-row { grid-template-columns: 40px 1.4fr 1.4fr 1.2fr 1.5fr 90px 90px 1.3fr 130px; }
.assignments-vote .table-row { grid-template-columns: 40px 1.4fr 1.2fr 1.3fr 1.3fr 1fr 1.2fr 130px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.2s var(--ease);
}
.pagination a:hover {
  background: var(--red-subtle);
  border-color: var(--accent);
  color: var(--accent);
}
.pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ═══════════════════════════════════════
   ACCOUNT EDIT – SECTIONED FORM
   ═══════════════════════════════════════ */
.edit-section {
  border-bottom: 1px solid var(--line);
}
.edit-section:last-of-type {
  border-bottom: none;
}
.edit-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--line);
}
body.theme-dark .edit-section-header {
  background: rgba(255, 255, 255, 0.02);
}
.edit-section-body {
  padding: 20px 24px;
}

/* Activity Type Radio Cards */
.activity-type-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.activity-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.activity-type-option {
  cursor: pointer;
}
.activity-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s var(--ease);
  text-align: center;
}
.activity-type-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.activity-type-card svg {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.activity-type-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--red-subtle);
}
.activity-type-card:hover svg,
.activity-type-card:hover span {
  color: var(--accent);
}
.activity-type-option input[type="radio"]:checked + .activity-type-card {
  border-color: var(--accent);
  background: var(--red-subtle);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-red);
}
.activity-type-option input[type="radio"]:checked + .activity-type-card svg,
.activity-type-option input[type="radio"]:checked + .activity-type-card span {
  color: var(--accent);
}

/* Activity Quick-Pick Chips */
.activity-chips {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-chips-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.activity-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.activity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.activity-chip:hover {
  border-color: var(--accent);
  background: var(--red-subtle);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.12);
}
.activity-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .activity-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .activity-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Premium Card Layout */
.premium-card { background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: 14px; padding: 0; margin-bottom: 24px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; overflow: visible; }
.premium-card:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); transform: translateY(-2px); }
.premium-card-header { padding: 16px 24px; border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.02); border-radius: 14px 14px 0 0; }
.premium-card-header .title-area { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.premium-card-header .status-area { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.premium-card-body { padding: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.premium-card-footer { padding: 16px 24px; background: rgba(0, 0, 0, 0.1); border-top: 1px solid var(--glass-border); display: flex; justify-content: flex-start; gap: 12px; align-items: center; border-radius: 0 0 14px 14px; }
.copy-input-group { display: flex; align-items: stretch; background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius); overflow: hidden; height:40px; }
.copy-input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2); }
.copy-input-group input { border: none; background: transparent; flex: 1; padding: 0 12px; margin: 0; box-shadow: none !important; color: var(--ink); }
.copy-input-group button { background: rgba(255, 255, 255, 0.03); border: none; border-left: 1px solid var(--input-border); padding: 0 16px; cursor: pointer; color: var(--muted); transition: all 0.2s; display:flex; align-items:center; justify-content:center; }
.copy-input-group button:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.outline-danger-btn:hover { background: var(--danger); color: #fff; }

/* ─── Preset Chips ─── */
.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s var(--ease);
}
.preset-chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  transform: translateY(-1px);
}
.preset-chip.active {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25) !important;
}
.preset-chip.active svg {
  color: var(--accent);
}

/* ─── Feature Toggle Chips (Hover & Active Glow) ─── */
.feature-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  user-select: none;
}
.feature-chip input[type="checkbox"] {
  display: none !important;
}
.feature-chip:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  transform: translateY(-1px);
}
.feature-chip.active {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.22) !important;
}
.feature-chip .chip-svg {
  color: currentColor;
  transition: transform 0.2s var(--ease);
}
.feature-chip.active .chip-svg {
  color: var(--accent);
  transform: scale(1.1);
}

/* ─── Interactive Video Tour & Simulator ─── */
.video-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06070a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}

.tour-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08) 0%, #06070a 80%);
}

.tour-cursor {
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
  z-index: 100;
  transform: translate(-4px, -4px);
  transition: left 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour-cursor svg {
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}
.cursor-clicking {
  animation: cursorPulse 0.4s ease-out;
}
@keyframes cursorPulse {
  0% { transform: scale(1) translate(-4px, -4px); }
  50% { transform: scale(0.8) translate(-4px, -4px); }
  100% { transform: scale(1) translate(-4px, -4px); }
}

.tour-scene-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.tour-scene-card.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.scene-mockup-frame {
  width: 90%;
  max-width: 580px;
  background: rgba(18, 20, 29, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  text-align: left;
  margin-top: 14px;
}

.tour-control-bar {
  background: rgba(10, 12, 18, 0.95);
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tour-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}
.tour-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.3s linear;
}

.tour-steps-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.tour-step-pill {
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.tour-step-pill:hover, .tour-step-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--red-subtle);
}


.primary-btn-wide { padding: 8px 32px; height: 40px; font-weight:600; }
.ghost-btn-wide { padding: 8px 32px; height: 40px; font-weight:600; }
.status-indicators { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.status-indicators .indicator { display: flex; align-items: center; gap: 8px; }
.indicator-icon { font-size: 14px; width:16px; text-align:center; }
.text-success { color: #43b581; }
.text-danger { color: #f04747; }
.page-big-title { font-size: 28px; font-weight: 700; margin-bottom: 8px; border-bottom: 1px solid var(--glass-border); padding-bottom: 16px; margin-top: 0; }

/* ─── Live Audio Pulse Waveform Animation ─── */
.audio-wave-container {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  vertical-align: middle;
}
.audio-wave-bar {
  width: 3px;
  background: #10B981;
  border-radius: 2px;
  animation: audioPulse 1.2s ease-in-out infinite alternate;
}
.audio-wave-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.audio-wave-bar:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.audio-wave-bar:nth-child(3) { height: 60%; animation-delay: 0.5s; }

@keyframes audioPulse {
  0% { height: 20%; opacity: 0.4; transform: scaleY(0.4); }
  100% { height: 100%; opacity: 1; transform: scaleY(1); box-shadow: 0 0 6px #10B981; }
}

/* ═══════════════════════════════════════════════════════════════
   UNIFIED SAAS OBSIDIAN SIDEBAR (Reference Visual Fidelity)
   ═══════════════════════════════════════════════════════════════ */
.sidebar-wrapper {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 248px;
  z-index: 990;
  height: 100vh;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-unified {
  width: 248px;
  height: 100%;
  background: #07080c;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  box-sizing: border-box;
}

.sidebar-brand-unified {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  text-decoration: none;
}

.sidebar-brand-unified img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 14px rgba(227, 10, 23, 0.4);
}

.sidebar-brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-brand-tag {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
  margin-top: 1px;
}

.sidebar-nav-unified {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
}

.sidebar-nav-unified::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav-unified::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar-nav-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 10px 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.sidebar-nav-item svg {
  opacity: 0.75;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.sidebar-nav-item:hover svg {
  opacity: 1;
  color: #ff3344;
}

.sidebar-nav-item.active {
  color: #ffffff;
  background: #141824;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.sidebar-nav-item.active svg {
  opacity: 1;
  color: #ffffff;
}

/* User Profile Card at Bottom of Sidebar */
.sidebar-user-card {
  margin-top: auto;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.sidebar-user-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.sidebar-user-badge {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

/* Sidebar User Popover Menu */
.sidebar-user-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #0d111a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 15px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1050;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-user-popover.open {
  display: flex;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar-popover-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-popover-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-popover-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-popover-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

/* Mobile Header Bar */
.mobile-header-bar {
  display: none;
}

@media (max-width: 900px) {
  .mobile-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #090a0f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 950;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SAAS DASHBOARD TOPBAR & COMPONENTS (Matching Reference Image)
   ═══════════════════════════════════════════════════════════════ */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dash-title-group h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
}

.dash-title-group p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #8f9cae;
}

.dash-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-workspace-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px 14px;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.dash-workspace-picker:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: #111724;
}

.dash-workspace-select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 20px 2px 4px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.dash-workspace-select option {
  background: #090d16;
  color: #fff;
  padding: 8px;
}

.dash-search-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 14px;
  color: #8f9cae;
  width: 220px;
  transition: all 0.2s ease;
}

.dash-search-box:focus-within {
  border-color: rgba(255, 255, 255, 0.25);
  background: #111724;
  color: #fff;
}

.dash-search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.dash-search-box input::placeholder {
  color: #64748b;
}

.dash-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8f9cae;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.dash-icon-btn:hover {
  background: #111724;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.dash-icon-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e30a17;
  box-shadow: 0 0 8px #e30a17;
}

/* 4 KPI Cards Grid (Reference Image Hiyerarşisi) */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1200px) {
  .kpi-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .kpi-grid-4 { grid-template-columns: 1fr; }
}

.kpi-crm-card {
  background: #0e1017;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.kpi-crm-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.kpi-crm-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.kpi-crm-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}

.kpi-crm-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8f9cae;
  margin-top: 4px;
}

.kpi-squircle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-squircle-dark {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi-squircle-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-squircle-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.kpi-squircle-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.kpi-crm-bottom {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kpi-pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.kpi-pill-blue {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.kpi-pill-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.kpi-pill-sub {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

/* Middle Row 2-Column Grid (Revenue & Pipeline Style) */
.dash-middle-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dash-middle-grid { grid-template-columns: 1fr; }
}

.dash-card {
  background: #0e1017;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-card-link {
  font-size: 0.8rem;
  color: #8f9cae;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.dash-card-link:hover { color: #ffffff; }

/* Donut Chart Breakdown */
.pipeline-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.pipeline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pipeline-row:last-child { border-bottom: none; }

.pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

/* Bottom Row 2-Column Grid (Recent Contacts & Activities) */
.dash-bottom-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dash-bottom-grid { grid-template-columns: 1fr; }
}

.recent-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.recent-contact-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.recent-timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 16px;
}

.recent-timeline-item:last-child {
  padding-bottom: 0;
}

.recent-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   DEDICATED MARKETING & PRICING PAGE STYLES
   ═══════════════════════════════════════════════════════════════ */
.pricing-hero {
  text-align: center;
  max-width: 800px;
  margin: 30px auto 40px;
}

.pricing-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.pricing-hero p {
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.6;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 50px;
  align-items: stretch;
}

@media (max-width: 960px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

.plan-card {
  background: #0e1017;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7);
}

.plan-card.plan-featured {
  background: linear-gradient(180deg, rgba(227, 10, 23, 0.08) 0%, rgba(9, 13, 22, 0.95) 100%);
  border: 2px solid #e30a17;
  box-shadow: 0 12px 50px rgba(227, 10, 23, 0.25);
  transform: scale(1.03);
}

.plan-card.plan-featured:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 20px 60px rgba(227, 10, 23, 0.35);
}

.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #e30a17, #ff3344);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(227, 10, 23, 0.5);
  white-space: nowrap;
}

.plan-header {
  margin-bottom: 20px;
}

.plan-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.plan-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  min-height: 40px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0;
}

.plan-price {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
}

.plan-period {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
}

.plan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 24px;
  box-sizing: border-box;
}

.plan-btn-primary {
  background: linear-gradient(135deg, #e30a17 0%, #b90610 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(227, 10, 23, 0.35);
}

.plan-btn-primary:hover {
  box-shadow: 0 8px 30px rgba(227, 10, 23, 0.5);
  transform: translateY(-2px);
}

.plan-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.plan-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.plan-feature-item.disabled {
  color: #475569;
  text-decoration: line-through;
}

.plan-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SAAS USER NAVIGATION PROFILE CARD & DROPDOWN (Reference media_1789363960682.png)
   ═══════════════════════════════════════════════════════════════ */
.saas-nav-user-menu {
  position: relative;
  display: inline-block;
}
.saas-nav-user-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: 12px;
  background: rgba(13, 17, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.saas-nav-user-card:hover {
  background: rgba(22, 28, 44, 0.95);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 14px rgba(227, 10, 23, 0.18);
}
.saas-nav-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.saas-nav-user-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  line-height: 1.25;
  min-width: 60px;
  max-width: 140px;
}
.saas-nav-user-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.saas-nav-user-role {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saas-nav-user-arrow {
  color: #64748b;
  margin-left: 4px;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.saas-nav-user-menu:hover .saas-nav-user-arrow {
  transform: translateX(3px);
  color: #ffffff;
}
.saas-nav-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 240px;
  background: rgba(10, 14, 24, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(227, 10, 23, 0.15);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: navDropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.saas-nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.saas-nav-user-menu:hover .saas-nav-dropdown,
.saas-nav-user-menu:focus-within .saas-nav-dropdown {
  display: flex;
}

/* ═════════════════════════════════════════════════════════════════ */
/* 🌟 DASHBOARD ENHANCEMENTS: CUSTOM SELECT, SEARCH, NOTIFICATIONS, SHADOWS */
/* ═════════════════════════════════════════════════════════════════ */

/* Canvas Interactive Math Background */
#mathGridCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

/* Topbar Back Link to asback.dev */
.dash-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dash-back-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateX(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

/* Custom Select Dropdown for Workspace / Family */
.dash-custom-select-wrap {
  position: relative;
  display: inline-block;
}

.dash-custom-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 14px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  user-select: none;
  height: 40px;
  box-sizing: border-box;
}

.dash-custom-select-trigger:hover,
.dash-custom-select-trigger.active {
  border-color: rgba(56, 189, 248, 0.4);
  background: #101624;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 16px rgba(56, 189, 248, 0.15);
}

.dash-custom-select-trigger .select-chevron {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-custom-select-trigger.active .select-chevron {
  transform: rotate(180deg);
}

.dash-custom-select-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 320px;
  z-index: 1100;
  background: rgba(11, 15, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(56, 189, 248, 0.12);
  padding: 10px;
  display: none;
  animation: selectMenuPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-custom-select-dropdown.show {
  display: block;
}

.dash-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 8px;
}

.dash-dropdown-header-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.dash-dropdown-header-sub {
  font-size: 0.72rem;
  color: #38bdf8;
  font-weight: 600;
}

.dash-family-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 6px;
  text-decoration: none;
}

.dash-family-item:last-child {
  margin-bottom: 0;
}

.dash-family-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(3px);
}

.dash-family-item.active {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
}

.dash-family-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-family-meta {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Quick Search Palette */
.dash-search-wrap {
  position: relative;
  display: inline-block;
}

.dash-search-box {
  height: 40px;
  box-sizing: border-box;
}

.dash-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 1100;
  background: rgba(11, 15, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.85);
  padding: 10px;
  display: none;
  animation: selectMenuPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-search-results.show {
  display: block;
}

.search-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 6px 8px 4px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #f1f5f9;
  transition: all 0.18s ease;
  margin-bottom: 2px;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
}

/* Notification Popover */
.dash-notify-wrap {
  position: relative;
  display: inline-block;
}

.dash-icon-badge {
  animation: pulseBadge 2.2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(227, 10, 23, 0.75); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 7px rgba(227, 10, 23, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(227, 10, 23, 0); }
}

.dash-notify-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 350px;
  z-index: 1100;
  background: rgba(11, 15, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(227, 10, 23, 0.1);
  padding: 14px;
  display: none;
  animation: selectMenuPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-notify-popover.show {
  display: block;
}

.notify-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.notify-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Dynamic Announcements Card (Replaces Founder Console) */
.dash-announcements-section {
  background: linear-gradient(135deg, rgba(14, 18, 28, 0.95) 0%, rgba(20, 16, 32, 0.85) 100%);
  border: 1px solid rgba(227, 10, 23, 0.25);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.85), 0 0 25px rgba(227, 10, 23, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-announcements-section:hover {
  border-color: rgba(227, 10, 23, 0.45);
  box-shadow: 0 20px 44px -10px rgba(0, 0, 0, 0.92), 0 0 32px rgba(227, 10, 23, 0.16);
  transform: translateY(-2px);
}

.dash-announcements-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #e30a17, #7c3aed);
}

/* Enhanced Hover Lifts & Deep Multi-layered Obsidian Shadows */
.kpi-crm-card {
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.8), 0 0 1px 1px rgba(255,255,255,0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.kpi-crm-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 22px 42px -12px rgba(0,0,0,0.92), 0 0 24px -2px rgba(56, 189, 248, 0.2), 0 0 1px 1px rgba(255,255,255,0.16);
}

.dash-card {
  box-shadow: 0 12px 36px -12px rgba(0,0,0,0.8), 0 0 1px 1px rgba(255,255,255,0.06);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.dash-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 48px -12px rgba(0,0,0,0.92), 0 0 20px -4px rgba(227, 10, 23, 0.12);
}

.recent-contact-item {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recent-contact-item:hover {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.5);
}

.recent-timeline-item {
  transition: transform 0.2s ease;
  border-radius: 8px;
  padding: 4px;
}

.recent-timeline-item:hover {
  background: rgba(255, 255, 255, 0.02);
  transform: translateX(4px);
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }

@keyframes selectMenuPop {
  0% { opacity: 0; transform: translateY(-8px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}


