/* ═══════════════════════════════════════════════════════════
   ENARMax — Dashboard Premium Theme
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Color Palette matching screenshot */
  --bg-app:
    radial-gradient(circle at 15% 50%, #161d2e, transparent 40%),
    radial-gradient(circle at 85% 20%, #161d2e, transparent 40%),
    radial-gradient(circle at 50% 85%, #161d2e, transparent 40%), #0a0e17;
  /* Very dark navy */
  --bg-sidebar: #111623;
  --app-chrome-bg: #111623;
  --bg-card: #171d2e;
  --bg-card-hover: #1f263a;

  --border: rgba(255, 255, 255, 0.05);

  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accents */
  --accent-green: #05c07f;
  --accent-orange: #f37a20;
  --accent-blue: #3b82f6;
  --accent-purple: #8fa6ca;
  --accent-red: #ef4444;
  --logo-mark-color: #05c07f;
  --logo-mark-shadow: rgba(5, 192, 127, 0.42);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --sidebar-w: 260px;
  --mobile-nav-height: 65px;
  --mobile-nav-bottom-gap: 20px;
  --mobile-nav-clearance: calc(var(--mobile-nav-height) + var(--mobile-nav-bottom-gap) + 18px);
}

/* ── Light Mode Overrides ──────────────────────────────── */
body.light-mode {
  --bg-app: #f1f5f9;
  --bg-sidebar: #ffffff;
  --app-chrome-bg: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;

  --border: rgba(0, 0, 0, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-green: #059669;
  --logo-mark-color: #047857;
  --logo-mark-shadow: rgba(4, 120, 87, 0.28);
}

/* ── Custom Premium Scrollbar ────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.light-mode ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ── Global Keyframes & Animations ────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutRight {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

@keyframes pulseSoft {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes liquidGlassDrift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(2%, -4%, 0) scale(1.03);
  }
}

@keyframes liquidGlassSheen {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

@keyframes floatElement {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* ── Light Mode Element Overrides ── */
body.light-mode .stat-card,
body.light-mode .panel {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.light-mode .stat-card::before,
body.light-mode .panel::before {
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.8),
      transparent);
}

body.light-mode .stat-value {
  text-shadow: none;
}

/* ── Theme Premium Element Overrides ── */
body.theme-premium .stat-card,
body.theme-premium .panel,
body.theme-premium-pink .stat-card,
body.theme-premium-pink .panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.theme-premium .stat-card:hover,
body.theme-premium .panel:hover,
body.theme-premium-pink .stat-card:hover,
body.theme-premium-pink .panel:hover {
  background: var(--bg-card-hover);
}

body.theme-premium .stat-card::before,
body.theme-premium .panel::before,
body.theme-premium-pink .stat-card::before,
body.theme-premium-pink .panel::before {
  background: linear-gradient(90deg,
      transparent,
      var(--premium-glow, rgba(106, 80, 136, 0.4)),
      transparent);
}

body.theme-premium .stat-value,
body.theme-premium-pink .stat-value {
  text-shadow: none;
}

/* ── Theme Black & White Element Overrides ── */
body.theme-black-white .sidebar-capsule {
  background: rgba(0, 0, 0, 0.86);
  border-color: rgba(255, 255, 255, 0.14);
}

body.theme-black-white .panel {
  background: linear-gradient(145deg, #111111 0%, #070707 100%);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-black-white .panel::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

body.theme-forest {
  --bg-app: #08271d;
  --bg-sidebar: #0a3325;
  --app-chrome-bg: #0a3325;
  --bg-card: #114030;
  --bg-card-hover: #16523e;
  --accent-green: #b7e140;
  /* Lime green */
  --accent-blue: #93c5fd;
  /* Soft blue */
  --accent-purple: #c084fc;
  --border: rgba(183, 225, 64, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #a8c1b5;
  --logo-mark-color: #d4ff63;
  --logo-mark-shadow: rgba(183, 225, 64, 0.4);
}

body.theme-ocean {
  --bg-app: #191f78;
  --bg-sidebar: #1d258d;
  --app-chrome-bg: #1d258d;
  --bg-card: #252da3;
  --bg-card-hover: #2b35c0;
  --accent-green: #d6deff;
  /* Light bluish */
  --accent-blue: #60a5fa;
  --accent-purple: #a5b4fc;
  --border: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #c2c9ff;
  --logo-mark-color: #edf2ff;
  --logo-mark-shadow: rgba(96, 165, 250, 0.45);
}

body.theme-sunset {
  --bg-app: #2d142c;
  --bg-sidebar: #3d1a3b;
  --app-chrome-bg: #3d1a3b;
  --bg-card: #51224f;
  --bg-card-hover: #662c64;
  --accent-green: #ee4540;
  /* Ruby/Coral */
  --accent-blue: #f59e0b;
  /* Amber */
  --accent-purple: #ec4899;
  /* Pink */
  --border: rgba(238, 69, 64, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #d9a5d7;
  --logo-mark-color: #ffb09b;
  --logo-mark-shadow: rgba(238, 69, 64, 0.45);
}

body.theme-navy-gold {
  --bg-app: radial-gradient(circle at 10% 0%, #223f71 0%, #152b53 48%, #0f1f3f 100%);
  --bg-sidebar: #102545;
  --app-chrome-bg: #102545;
  --bg-card: #1a335f;
  --bg-card-hover: #224275;
  --accent-green: #d2caa6;
  --accent-blue: #8ea1ca;
  --accent-purple: #d2caa6;
  --border: rgba(210, 202, 166, 0.22);
  --text-primary: #f7f3e6;
  --text-secondary: #c4ccdc;
  --logo-mark-color: #d2caa6;
  --logo-mark-shadow: rgba(210, 202, 166, 0.5);
}

body.theme-black-teal {
  --bg-app: radial-gradient(circle at 18% 0%, #0f2825 0%, #000000 46%, #000000 100%);
  --bg-sidebar: #050505;
  --app-chrome-bg: #050505;
  --bg-card: #0c0c0c;
  --bg-card-hover: #161616;
  --accent-green: #15b9a6;
  --accent-blue: #3ccfc0;
  --accent-purple: #74e5da;
  --border: rgba(21, 185, 166, 0.25);
  --text-primary: #e8f5f3;
  --text-secondary: #8dc9c2;
  --logo-mark-color: #15b9a6;
  --logo-mark-shadow: rgba(21, 185, 166, 0.48);
}

body.theme-black-white {
  --bg-app: #000000;
  --bg-sidebar: #000000;
  --app-chrome-bg: #000000;
  --bg-card: #0d0d0d;
  --bg-card-hover: #181818;
  --accent-green: #ffffff;
  --accent-orange: #ffffff;
  --accent-blue: #e5e5e5;
  --accent-purple: #d4d4d4;
  --accent-red: #ffffff;
  --border: rgba(255, 255, 255, 0.16);
  --text-primary: #ffffff;
  --text-secondary: #d4d4d4;
  --text-muted: #a3a3a3;
  --logo-mark-color: #ffffff;
  --logo-mark-shadow: rgba(255, 255, 255, 0.38);
}


body.theme-premium {
  --bg-app: radial-gradient(circle at 0% 0%, #6a5088 0%, #050505 50%);
  --bg-sidebar: rgba(10, 10, 10, 0.95);
  --app-chrome-bg: #0a0a0a;
  --bg-card: rgba(20, 20, 25, 0.5);
  --bg-card-hover: rgba(30, 30, 40, 0.7);
  --accent-green: #a78bfa;
  /* Lavender accent instead of green */
  --accent-blue: #8b5cf6;
  --accent-purple: #c4b5fd;
  --border: rgba(106, 80, 136, 0.3);
  --premium-glow: rgba(106, 80, 136, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --logo-mark-color: #ddd0ff;
  --logo-mark-shadow: rgba(167, 139, 250, 0.5);
}

body.theme-premium-pink {
  /* Igual al premium (negro) pero con degradado/acento rosa */
  --bg-app: radial-gradient(circle at 0% 0%, #ec4899 0%, #050505 50%);
  --bg-sidebar: rgba(10, 10, 10, 0.95);
  --app-chrome-bg: #0a0a0a;
  --bg-card: rgba(20, 20, 25, 0.5);
  --bg-card-hover: rgba(30, 30, 40, 0.7);
  --accent-green: #f472b6;
  --accent-blue: #ec4899;
  --accent-purple: #fbcfe8;
  --border: rgba(236, 72, 153, 0.3);
  --premium-glow: rgba(236, 72, 153, 0.4);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --logo-mark-color: #ffc5e8;
  --logo-mark-shadow: rgba(244, 114, 182, 0.55);
}

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

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  /* App stays 100vh, content scrolls */
}

/* ── Layout ────────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Responsive */
@media (min-width: 769px) {
  .mobile-only-mas,
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 24px 32px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) and (max-aspect-ratio: 5/4) {
  :root {
    --sidebar-w: 220px;
  }

  .main-content {
    padding: 22px 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr !important;
  }

  .comunidad-grid {
    grid-template-columns: 1fr !important;
  }

  #view-refuerzos .refuerzos-grid {
    grid-template-columns: 1fr !important;
  }

  .exam-layout {
    gap: 16px;
  }

  .exam-navigator {
    width: 160px;
    max-height: 520px;
  }

  .case-card,
  .question-card {
    padding: 22px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-top: 15px;
  }

  .header-left {
    width: 100%;
  }

  .flame-widget {
    width: 100%;
    justify-content: center;
  }

  .fail-actions {
    flex-direction: column;
  }
}

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: transparent;
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  flex-shrink: 0;
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s;
}

.sidebar-capsule {
  background: rgba(17, 22, 35, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transition: padding 0.3s;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-capsule::-webkit-scrollbar {
  display: none;
}

body.light-mode .sidebar-capsule {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

body.theme-premium .sidebar-capsule,
body.theme-premium-pink .sidebar-capsule {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sidebar.collapsed {
  width: 96px;
  padding: 24px 12px;
}

.sidebar.collapsed .sidebar-capsule {
  padding: 24px 8px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  padding: 0 4px;
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  gap: 20px;
  padding: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: color 0.3s, background 0.3s, opacity 0.3s;
  flex: 0 0 auto;
}

.sidebar .logo-mark-sidebar {
  width: 62px;
  height: 85px;
  transform: translateY(13px);
}

.sidebar.collapsed .logo-text {
  display: none;
}

.logo-text {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 2px;
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
}

.logo-accent {
  font-weight: 800;
  color: var(--accent-green);
}

.logo-mark {
  display: inline-block;
  background-color: var(--logo-mark-color);
  -webkit-mask-image: url("logo-e-mask.png");
  mask-image: url("logo-e-mask.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  filter: drop-shadow(0 0 9px var(--logo-mark-shadow));
  transform: translateY(7px);
  user-select: none;
}

.logo-mark-auth {
  width: 66px;
  height: 91px;
}

.logo-mark-sidebar {
  width: 52px;
  height: 71px;
}

.sidebar.collapsed .logo-mark-sidebar {
  width: 54px;
  height: 74px;
  transform: translateY(12px);
}

.logo-svg,
.logo-mark {
  animation: floatElement 4s ease-in-out infinite;
}

.logo-svg {
  filter: drop-shadow(0 0 8px rgba(5, 192, 127, 0.4));
}

.sidebar-toggle-floating {
  position: fixed;
  top: 24px;
  left: calc(var(--sidebar-w) + 8px);
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed~.sidebar-toggle-floating {
  left: calc(96px + 8px);
}

.sidebar-toggle-floating:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: scale(1.05);
  /* Ligeramente más dinámico */
}

.logo-accent {
  color: var(--accent-green);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.sidebar.collapsed .user-profile {
  padding: 12px 0;
  justify-content: center;
  border: none;
  background: transparent;
}

.sidebar.collapsed .user-info {
  display: none;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(5, 192, 127, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent-green);
  flex-shrink: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 700;
}

.user-status {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, opacity 0.2s;
  text-align: left;
  white-space: nowrap;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 14px;
}

.sidebar.collapsed .nav-item span:last-child {
  display: none;
}

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

.nav-item.active {
  background: rgba(5, 192, 127, 0.1);
  color: var(--accent-green);
  font-weight: 700;
}

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

.nav-icon svg {
  width: 20px;
  height: 20px;
}

.sidebar-bottom {
  margin-top: auto;
}

/* ── Main Content ──────────────────────────────────────── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 60px;
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
  backface-visibility: hidden;
  transform: translateZ(0);
  contain: layout style;
}

.view {
  display: none;
  width: 100%;
}

.view.active {
  display: block;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-page {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top left, rgba(5, 192, 127, 0.2), transparent 34%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 32%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.profile-back-btn {
  margin-bottom: 22px;
}

.profile-hero-body {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

.profile-hero-avatar {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: var(--accent-green);
  background: linear-gradient(135deg, rgba(5, 192, 127, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(5, 192, 127, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.profile-hero-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
}

.profile-hero-subtitle {
  margin: 0;
  max-width: 700px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.profile-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.profile-stat-card {
  padding: 22px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--border);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.14);
}

.profile-stat-label,
.profile-mini-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.profile-stat-value {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
  color: var(--text-primary);
}

.profile-stat-note {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
}

.profile-panel {
  padding: 24px;
  border-radius: 24px;
}

.profile-panel-head {
  margin-bottom: 18px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-form-span {
  grid-column: 1 / -1;
}

.profile-inline-action,
.profile-inline-search {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.profile-inline-action .text-input,
.profile-inline-search .text-input {
  flex: 1;
}

.profile-inline-action .btn-secondary,
.profile-inline-search .btn-primary {
  flex-shrink: 0;
}

.profile-action-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.profile-action-row > * {
  flex: 1;
}

.profile-privacy-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.profile-privacy-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-privacy-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-switch {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 32px;
  flex-shrink: 0;
  cursor: pointer;
}

.profile-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.profile-switch-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.profile-switch input:checked + .profile-switch-slider {
  background: rgba(5, 192, 127, 0.85);
  border-color: rgba(5, 192, 127, 0.9);
}

.profile-switch input:checked + .profile-switch-slider::after {
  transform: translateX(24px);
}

.profile-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-mini-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.profile-mini-card strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-primary);
}

.profile-results-box {
  margin-top: 14px;
  padding: 15px;
  background: var(--bg-main);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.profile-section-divider {
  height: 1px;
  margin: 22px 0 18px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.profile-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text-primary);
}

.profile-requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 50px;
}

@media (max-width: 1100px) {
  .profile-hero-body {
    grid-template-columns: auto 1fr;
  }

  .profile-hero-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .profile-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .profile-hero-body {
    grid-template-columns: 1fr;
  }

  .profile-hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 24px;
  }

  .profile-form-grid,
  .profile-stats-grid,
  .profile-mini-grid {
    grid-template-columns: 1fr;
  }

  .profile-action-row,
  .profile-inline-action,
  .profile-inline-search,
  .profile-hero-actions {
    flex-direction: column;
  }

  .profile-privacy-toggle {
    align-items: flex-start;
  }

  .profile-panel {
    padding: 18px;
    border-radius: 20px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ── Dashboard Header ──────────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-mobile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.dashboard-hero-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-hero-kicker {
  display: none;
}

.dashboard-greeting-title {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.dashboard-greeting-title::before {
  content: "Hola, ";
}

.dashboard-greeting-title .user-name {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.dashboard-hero-quote {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.dashboard-hero-avatar {
  display: none;
  padding: 0;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.dashboard-hero-bell {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.dashboard-hero-bell svg {
  width: 24px;
  height: 24px;
}

.dashboard-hero-bell:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.notif-badge {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff6b6b, #ef4444);
  color: #fff;
  border: 2px solid var(--bg-card);
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.28);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transform: translate(35%, -35%);
  transform-origin: center;
  place-items: center;
  white-space: nowrap;
}

.notif-badge:empty {
  width: 12px;
  min-width: 12px;
  height: 12px;
  padding: 0;
  border-width: 2px;
}

.notif-badge:not(:empty) {
  min-width: 20px;
}

@media (min-width: 769px) {
  #view-dashboard .dashboard-mobile-hero {
    width: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }

  #view-dashboard .dashboard-mobile-hero::before,
  #view-dashboard .dashboard-mobile-hero::after {
    display: none;
  }

  #view-dashboard .dashboard-hero-avatar {
    display: none !important;
  }

  #view-dashboard .dashboard-hero-kicker {
    display: none !important;
  }

  #view-dashboard .dashboard-greeting-title {
    font-size: 32px;
    color: var(--text-primary);
  }

  #view-dashboard .dashboard-greeting-title::before {
    content: "Hola, ";
  }

  #view-dashboard .dashboard-hero-quote {
    display: block;
  }

  #view-dashboard .dashboard-hero-bell {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: none;
  }

  #view-dashboard .dashboard-hero-bell svg {
    width: 24px;
    height: 24px;
  }
}

.countdown-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(5, 192, 127, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(5, 192, 127, 0.2);
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  min-width: 250px;
  box-shadow: 0 4px 15px rgba(5, 192, 127, 0.1);
}

.countdown-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-green);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.countdown-timer {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cd-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-item span {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.cd-item label {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-muted);
}

.cd-sep {
  font-size: 18px;
  font-weight: 800;
  color: var(--border);
  margin-top: -12px;
}

.header-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.header-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0;
}

.flame-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(243, 122, 32, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(243, 122, 32, 0.2);
  padding: 12px 24px;
  border-radius: 100px;
  box-shadow: 0 5px 20px rgba(243, 122, 32, 0.15);
}

.flame-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.flame-info {
  display: flex;
  flex-direction: column;
}

.flame-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.5px;
}

.flame-val {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

body.tablet-layout.tablet-sidebar-expanded .flame-widget {
  width: auto;
  min-width: 160px;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 22px;
}

body.tablet-layout.tablet-sidebar-expanded .flame-icon {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

body.tablet-layout.tablet-sidebar-expanded .flame-lbl {
  font-size: 9px;
}

body.tablet-layout.tablet-sidebar-expanded .flame-val {
  font-size: 14px;
}

/* ── Stats Grid ────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: linear-gradient(145deg,
      rgba(23, 29, 46, 0.9) 0%,
      rgba(17, 22, 35, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
  overflow: hidden;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

.stat-card:nth-child(5) {
  animation-delay: 0.5s;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  opacity: 0.5;
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 30px;
  position: relative;
  z-index: 10;
}

.green-icon {
  background: rgba(5, 192, 127, 0.15);
  color: var(--accent-green);
  box-shadow: 0 0 15px rgba(5, 192, 127, 0.2);
}

.blue-icon {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.purple-icon {
  background: rgba(143, 166, 202, 0.15);
  color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(143, 166, 202, 0.2);
}

.orange-icon {
  background: rgba(243, 122, 32, 0.15);
  color: var(--accent-orange);
  box-shadow: 0 0 15px rgba(243, 122, 32, 0.2);
}


.performance-stat-card .stat-card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.performance-stat-card .stat-icon {
  margin-bottom: 0;
}

.performance-stat-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.performance-stat-caption {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.performance-session-pill {
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(243, 122, 32, 0.12);
  border: 1px solid rgba(243, 122, 32, 0.22);
  text-align: center;
}

.performance-session-pill span {
  display: block;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.performance-session-pill small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.coin-stat-card {
  border-top: 3px solid #f4c542 !important;
  background:
    radial-gradient(circle at 78% 16%, rgba(244, 197, 66, 0.16), rgba(244, 197, 66, 0) 36%),
    linear-gradient(145deg, rgba(32, 27, 12, 0.92), rgba(17, 22, 35, 0.46)) !important;
}

.coin-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.coin-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffe38a, #d99a19);
  border: 1px solid rgba(255, 243, 176, 0.65);
  box-shadow: 0 10px 24px rgba(217, 154, 25, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
  flex: 0 0 auto;
}

.coin-icon img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.coin-stat-note {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.stat-value-sub {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.stat-progress-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.stat-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* ── Action Cards ──────────────────────────────────────── */
.action-card {
  border-top: 3px solid var(--accent-blue) !important;
  background: linear-gradient(180deg,
      rgba(59, 130, 246, 0.05) 0%,
      transparent 100%) !important;
  padding: 24px;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.6s;
}

.action-btn {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-hover) !important;
  border: 1px solid var(--border) !important;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px !important;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.action-btn:nth-child(1) {
  animation-delay: 0.7s;
}

.action-btn:nth-child(2) {
  animation-delay: 0.8s;
}

.action-btn:nth-child(3) {
  animation-delay: 0.9s;
}

.action-btn:hover {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  transform: translateX(4px);
}

.action-btn-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn-icon {
  font-size: 16px;
}

.action-btn-arrow {
  color: var(--accent-blue);
  font-weight: bold;
  font-size: 16px;
}

/* Flashcards */
.flashcards-home-card,
.flashcards-shell,
.flashcards-more-item {
  --flash-primary: var(--accent-green);
  --flash-secondary: var(--accent-blue);
  --flash-warn: var(--accent-orange);
  --flash-primary-soft: color-mix(in srgb, var(--flash-primary) 16%, transparent);
  --flash-primary-mid: color-mix(in srgb, var(--flash-primary) 28%, transparent);
  --flash-secondary-soft: color-mix(in srgb, var(--flash-secondary) 14%, transparent);
  --flash-warn-soft: color-mix(in srgb, var(--flash-warn) 14%, transparent);
  --flash-border: color-mix(in srgb, var(--flash-primary) 24%, var(--border));
  --flash-surface: color-mix(in srgb, var(--bg-card) 86%, var(--flash-primary) 14%);
  --flash-surface-deep: color-mix(in srgb, var(--bg-card) 90%, #000 10%);
}

.flashcards-home-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(210px, 0.55fr) auto;
  gap: 22px;
  align-items: center;
  margin: 24px 0 28px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(5, 192, 127, 0.18);
  background:
    radial-gradient(circle at 12% 8%, rgba(5, 192, 127, 0.22), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(10, 16, 30, 0.96), rgba(22, 30, 50, 0.82));
  border-color: var(--flash-border);
  background:
    radial-gradient(circle at 12% 8%, var(--flash-primary-mid), transparent 30%),
    radial-gradient(circle at 82% 16%, var(--flash-secondary-soft), transparent 28%),
    linear-gradient(135deg, var(--flash-surface-deep), var(--flash-surface));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  isolation: isolate;
}

.flashcards-home-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 36%, rgba(5, 192, 127, 0.08));
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 36%, var(--flash-primary-soft));
  pointer-events: none;
  z-index: -1;
}

.flashcards-home-glow {
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -170px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(5, 192, 127, 0.22), transparent 65%);
  background: radial-gradient(circle, var(--flash-primary-mid), transparent 65%);
  filter: blur(2px);
  pointer-events: none;
}

.flashcards-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5, 192, 127, 0.11);
  border: 1px solid rgba(5, 192, 127, 0.18);
  background: var(--flash-primary-soft);
  border-color: var(--flash-border);
  color: var(--flash-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flashcards-home-content h2 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  color: var(--text-primary);
}

.flashcards-home-content p {
  margin: 0;
  max-width: 680px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14px;
}

.flashcards-source-note {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px !important;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--flash-border);
  background: color-mix(in srgb, var(--flash-primary) 10%, transparent);
  color: var(--text-secondary);
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.35 !important;
}

.flashcards-source-note::before {
  content: "Fuente";
  margin-right: 8px;
  color: var(--flash-primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flashcards-source-note-hero {
  margin-top: 16px !important;
}

.flashcards-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.flashcards-home-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: color-mix(in srgb, var(--flash-primary) 8%, transparent);
  border-color: color-mix(in srgb, var(--flash-primary) 14%, var(--border));
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.flashcards-home-preview {
  position: relative;
  min-height: 145px;
}

.flash-mini-card {
  position: absolute;
  width: 164px;
  min-height: 104px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--flash-primary) 20%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(145deg, color-mix(in srgb, var(--flash-primary) 14%, rgba(255, 255, 255, 0.08)), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.flash-mini-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--flash-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.flash-mini-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.2;
}

.flash-mini-card-a {
  right: 42px;
  top: 4px;
  transform: rotate(-7deg);
}

.flash-mini-card-b {
  right: 0;
  bottom: 0;
  transform: rotate(8deg);
}

.flashcards-home-btn {
  min-width: 150px;
  justify-content: center;
  white-space: nowrap;
}

.flashcards-home-card .flashcards-home-btn {
  background: linear-gradient(135deg, var(--flash-primary), var(--flash-secondary));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--flash-primary) 26%, transparent);
}

.flashcards-home-card .flashcards-home-btn:hover {
  box-shadow: 0 16px 32px color-mix(in srgb, var(--flash-primary) 34%, transparent);
}

.flashcards-home-card.is-locked .flashcards-home-btn,
.flashcards-home-btn:disabled {
  cursor: not-allowed;
  opacity: 0.78;
  filter: saturate(0.75);
  box-shadow: none;
}

.flashcards-home-card.is-admin-ready {
  border-color: color-mix(in srgb, var(--flash-primary) 48%, var(--border));
}

.flashcards-more-item {
  position: relative;
  overflow: hidden;
}

.flashcards-more-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(5, 192, 127, 0.08), transparent 48%, rgba(59, 130, 246, 0.06));
  background: linear-gradient(115deg, var(--flash-primary-soft), transparent 48%, var(--flash-secondary-soft));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.flashcards-more-item > * {
  position: relative;
  z-index: 1;
}

.flashcards-more-item:hover::before,
.flashcards-more-item.is-admin-ready::before {
  opacity: 1;
}

.flashcards-more-item.is-locked:hover::before {
  opacity: 0;
}

.flashcards-more-item.is-locked {
  cursor: not-allowed !important;
  opacity: 0.78;
  filter: saturate(0.82);
}

.flashcards-more-item.is-locked:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
  transform: none;
}

.soon-badge {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(243, 122, 32, 0.14);
  border: 1px solid rgba(243, 122, 32, 0.26);
  background: var(--flash-warn-soft);
  border-color: color-mix(in srgb, var(--flash-warn) 28%, var(--border));
  color: var(--flash-warn);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flashcards-more-item.is-admin-ready .soon-badge {
  background: rgba(5, 192, 127, 0.12);
  border-color: rgba(5, 192, 127, 0.24);
  background: var(--flash-primary-soft);
  border-color: var(--flash-border);
  color: var(--flash-primary);
}

.flashcards-more-stack {
  position: relative;
  width: 58px;
  height: 46px;
  flex: 0 0 auto;
}

.flashcards-more-stack span {
  position: absolute;
  width: 42px;
  height: 30px;
  right: 0;
  top: 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(5, 192, 127, 0.22), rgba(59, 130, 246, 0.08));
  border-color: color-mix(in srgb, var(--flash-primary) 22%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(145deg, var(--flash-primary-mid), var(--flash-secondary-soft));
}

.flashcards-more-stack span:nth-child(1) {
  transform: translateX(-16px) rotate(-10deg);
}

.flashcards-more-stack span:nth-child(2) {
  transform: translateX(-8px) rotate(-2deg);
}

.flashcards-more-stack span:nth-child(3) {
  transform: rotate(8deg);
}

.flashcards-shell {
  display: grid;
  gap: 22px;
}

.flashcards-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.65fr);
  gap: 28px;
  align-items: center;
  overflow: hidden;
  border-radius: 28px;
  border-color: rgba(5, 192, 127, 0.16);
  border-color: var(--flash-border);
  background:
    radial-gradient(circle at 14% 18%, rgba(5, 192, 127, 0.14), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(59, 130, 246, 0.13), transparent 28%),
    linear-gradient(145deg, rgba(19, 26, 42, 0.96), rgba(9, 13, 24, 0.82));
  background:
    radial-gradient(circle at 14% 18%, var(--flash-primary-soft), transparent 28%),
    radial-gradient(circle at 78% 24%, var(--flash-secondary-soft), transparent 28%),
    linear-gradient(145deg, var(--flash-surface), var(--flash-surface-deep));
}

.flashcards-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.flashcards-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

.flashcards-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.flashcards-hero-actions .btn-secondary {
  border-color: var(--flash-border);
  background: color-mix(in srgb, var(--flash-primary) 8%, transparent);
}

.flashcards-hero-actions .btn-secondary:hover {
  background: color-mix(in srgb, var(--flash-primary) 14%, transparent);
}

.flashcards-hero-actions .btn-ghost:hover {
  color: var(--flash-primary);
  background: color-mix(in srgb, var(--flash-primary) 10%, transparent);
}

.flashcards-hero-art {
  position: relative;
  min-height: 260px;
}

.flash-orbit-card {
  position: absolute;
  width: 178px;
  min-height: 118px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.035));
  border-color: color-mix(in srgb, var(--flash-primary) 20%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(145deg, color-mix(in srgb, var(--flash-primary) 14%, rgba(255, 255, 255, 0.08)), rgba(255, 255, 255, 0.035));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: floatElement 5s ease-in-out infinite;
}

.flash-orbit-card span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(5, 192, 127, 0.13);
  background: var(--flash-primary-soft);
  color: var(--flash-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.flash-orbit-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 22px;
}

.flash-orbit-card-1 {
  right: 74px;
  top: 10px;
  transform: rotate(-8deg);
}

.flash-orbit-card-2 {
  right: 8px;
  top: 92px;
  transform: rotate(7deg);
  animation-delay: 0.5s;
}

.flash-orbit-card-3 {
  right: 116px;
  bottom: 6px;
  transform: rotate(3deg);
  animation-delay: 1s;
}

.flashcards-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.flashcards-stat {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  border-color: color-mix(in srgb, var(--flash-primary) 14%, var(--border));
  background: color-mix(in srgb, var(--flash-primary) 6%, transparent);
}

.flashcards-stat span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flashcards-stat strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 30px;
}

.flashcards-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.45fr);
  gap: 22px;
}

.flashcards-specialties-panel,
.flashcards-workbench {
  border-radius: 24px;
}

.flashcards-specialty-grid {
  display: grid;
  gap: 12px;
}

.flashcards-specialty-tile {
  width: 100%;
  text-align: left;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.028);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.flashcards-specialty-tile:hover,
.flashcards-specialty-tile.active {
  transform: translateY(-2px);
  border-color: rgba(5, 192, 127, 0.28);
  background: rgba(5, 192, 127, 0.07);
  border-color: var(--flash-border);
  background: color-mix(in srgb, var(--flash-primary) 9%, transparent);
}

.flashcards-specialty-code {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 9px;
  border-radius: 10px;
  background: rgba(5, 192, 127, 0.12);
  background: var(--flash-primary-soft);
  color: var(--flash-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.flashcards-specialty-tile.tone-blue .flashcards-specialty-code {
  background: rgba(59, 130, 246, 0.13);
  background: var(--flash-secondary-soft);
  color: var(--flash-secondary);
}

.flashcards-specialty-tile.tone-rose .flashcards-specialty-code {
  background: rgba(236, 72, 153, 0.13);
  background: color-mix(in srgb, var(--accent-purple) 16%, transparent);
  color: var(--accent-purple);
}

.flashcards-specialty-tile.tone-orange .flashcards-specialty-code {
  background: rgba(243, 122, 32, 0.13);
  background: var(--flash-warn-soft);
  color: var(--flash-warn);
}

.flashcards-specialty-tile strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.flashcards-specialty-tile p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

.flashcards-specialty-tile small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flashcards-topic-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.flashcards-topic-chip,
.flashcards-topic-empty {
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.025);
  padding: 16px;
}

.flashcards-topic-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.flashcards-topic-chip span {
  color: var(--text-primary);
  font-weight: 800;
}

.flashcards-topic-chip strong {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(5, 192, 127, 0.12);
  background: var(--flash-primary-soft);
  color: var(--flash-primary);
}

.flashcards-topic-empty span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 900;
}

.flashcards-topic-empty p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.flashcards-stack-stage {
  min-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 16px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(5, 192, 127, 0.1), transparent 35%);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, var(--flash-primary-soft), transparent 35%);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  padding: 28px;
}

.flashcards-empty-card,
.flashcard-study-card {
  width: 100%;
  max-width: 640px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--flash-primary) 18%, rgba(255, 255, 255, 0.08));
  background: linear-gradient(145deg, color-mix(in srgb, var(--flash-primary) 12%, rgba(255, 255, 255, 0.08)), rgba(255, 255, 255, 0.04));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  padding: 28px;
}

.flashcards-empty-card span,
.flashcard-study-card span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(5, 192, 127, 0.12);
  background: var(--flash-primary-soft);
  color: var(--flash-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flashcards-empty-card h3,
.flashcard-study-card h3 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.flashcards-empty-card p,
.flashcard-study-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.flashcard-study-card {
  display: grid;
  gap: 10px;
  transform: none;
}

.flashcard-study-media {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 6px 0 2px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--flash-primary) 18%, var(--border));
  border-radius: 18px;
  background: color-mix(in srgb, var(--flash-primary) 7%, transparent);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-align: left;
}

.flashcard-study-media:hover {
  transform: translateY(-1px);
  border-color: var(--flash-border);
  background: color-mix(in srgb, var(--flash-primary) 10%, transparent);
}

.flashcard-study-card small {
  display: block;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.flashcard-study-image {
  display: block;
  width: 100%;
  max-height: 124px;
  object-fit: cover;
  margin: 0;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--flash-primary) 18%, var(--border));
  background: color-mix(in srgb, var(--bg-card) 72%, #ffffff 28%);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.flashcard-study-zoom {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: var(--flash-primary) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

.flashcard-modal-content {
  width: min(1100px, 94vw);
  max-height: none;
  overflow: visible;
  padding: 26px;
  border-radius: 24px;
  position: relative;
  margin: 0 auto;
}

.flashcard-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--flash-border);
  background: color-mix(in srgb, var(--flash-primary) 10%, var(--bg-card));
  color: var(--text-primary);
  cursor: pointer;
  font-size: 18px;
}

.flashcard-modal-head {
  margin-bottom: 18px;
  padding-right: 52px;
}

.flashcard-modal-head h3 {
  margin: 8px 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  color: var(--text-primary);
}

.flashcard-modal-head p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.flashcard-modal-image {
  display: block;
  width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--flash-primary) 18%, var(--border));
  background: color-mix(in srgb, var(--bg-card) 72%, #ffffff 28%);
}

#flashcard-image-modal {
  align-items: flex-start !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 24px 0;
}

body.flashcard-modal-open .main-content {
  overflow: hidden !important;
}

body.flashcard-modal-open .mobile-nav,
body.flashcard-modal-open .mobile-top-bar {
  pointer-events: none;
}

body.light-mode .flashcards-home-card,
body.light-mode .flashcards-hero {
  background:
    radial-gradient(circle at 14% 16%, var(--flash-primary-soft), transparent 30%),
    radial-gradient(circle at 82% 18%, var(--flash-secondary-soft), transparent 30%),
    linear-gradient(145deg, #ffffff, #f8fafc);
}

/* ── Dashboard Bottom ──────────────────────────────────── */
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel {
  background: linear-gradient(145deg,
      rgba(23, 29, 46, 0.9) 0%,
      rgba(17, 22, 35, 0.4) 100%);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel:nth-child(1) {
  animation-delay: 0.5s;
}

.panel:nth-child(2) {
  animation-delay: 0.6s;
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.08),
      transparent);
  opacity: 0.5;
}

/* ── Logistics Overview ────────────────────────────────── */
.overview-panel {
  padding-bottom: 25px;
}

.ov-title {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  font-weight: 500;
}

.ov-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.light-mode .ov-value,
body.theme-premium .ov-value,
body.theme-premium-pink .ov-value {
  text-shadow: none;
}

.overview-bar-wrapper {
  display: flex;
  height: 32px;
  gap: 3px;
}

.ov-segment {
  height: 100%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ov-solid {
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-top-right-radius: 2px;
  border-bottom-right-radius: 2px;
  position: relative;
  z-index: 2;
}

.ov-striped {
  background: repeating-linear-gradient(-45deg,
      var(--accent-green),
      var(--accent-green) 8px,
      rgba(5, 192, 127, 0.1) 8px,
      rgba(5, 192, 127, 0.1) 16px);
  border-radius: 2px;
}

.ov-dotted {
  background-color: transparent;
  background-image:
    radial-gradient(rgba(148, 163, 184, 0.5) 1px, transparent 1px),
    radial-gradient(rgba(148, 163, 184, 0.2) 1px, transparent 1px);
  background-size:
    12px 12px,
    8px 8px;
  background-position:
    0 0,
    4px 4px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .ov-striped,
body.theme-premium .ov-striped,
body.theme-premium-pink .ov-striped {
  background: repeating-linear-gradient(-45deg,
      var(--accent-green),
      var(--accent-green) 8px,
      rgba(168, 108, 36, 0.2) 8px,
      rgba(168, 108, 36, 0.2) 16px);
}

body.light-mode .ov-dotted,
body.theme-premium .ov-dotted,
body.theme-premium-pink .ov-dotted {
  background-image: radial-gradient(rgba(100, 116, 139, 0.3) 1px,
      transparent 1px);
  border-color: rgba(0, 0, 0, 0.05);
}

/* ── Theme Circles ─────────────────────────────────────── */
.theme-options {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.theme-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    outline 0.2s ease,
    box-shadow 0.2s ease;
  border: none;
  outline: 2px solid transparent;
  outline-offset: 3px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.theme-circle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.theme-circle.active {
  transform: scale(1.1) translateY(-2px);
  outline: 2px solid var(--accent-green);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Theme Dual Colors - Exact matches to CSS */
.theme-circle[data-theme="dark"] {
  background: linear-gradient(135deg, #111623 50%, #05c07f 50%);
}

.theme-circle[data-theme="light"] {
  background: linear-gradient(135deg, #f1f5f9 50%, #059669 50%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.1),
    0 44px 6px rgba(0, 0, 0, 0.1);
}

.theme-circle[data-theme="forest"] {
  background: linear-gradient(135deg, #0a3325 50%, #b7e140 50%);
}

.theme-circle[data-theme="ocean"] {
  background: linear-gradient(135deg, #1d258d 50%, #d6deff 50%);
}

.theme-circle[data-theme="sunset"] {
  background: linear-gradient(135deg, #3d1a3b 50%, #ee4540 50%);
}

.theme-circle[data-theme="navy-gold"] {
  background: linear-gradient(135deg, #152b53 50%, #d2caa6 50%);
  box-shadow: 0 0 10px rgba(210, 202, 166, 0.45);
}

.theme-circle[data-theme="black-teal"] {
  background: linear-gradient(135deg, #000000 50%, #15b9a6 50%);
  box-shadow: 0 0 10px rgba(21, 185, 166, 0.5);
}

.theme-circle[data-theme="black-white"] {
  background: linear-gradient(135deg, #000000 50%, #ffffff 50%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.28);
}


.theme-circle[data-theme="premium"] {
  background: linear-gradient(135deg, #050505 50%, #6a5088 50%);
  box-shadow: 0 0 10px rgba(106, 80, 136, 0.5);
}

.theme-circle[data-theme="premium-pink"] {
  background: linear-gradient(135deg, #050505 50%, #ec4899 50%);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.55);
}

.chart-section {
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-bottom: 40px;
  padding-top: 10px;
  margin-top: 20px;
  flex: 1;
  min-height: 200px;
}

.chart-line {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  position: relative;
  height: 40px;
  display: flex;
  align-items: flex-start;
}

.chart-line span {
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 11px;
  color: var(--text-muted);
}

.chart-bars {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 0;
  height: calc(100% - 50px);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  z-index: 2;
  padding: 0 20px;
}

.c-bar {
  width: 40px;
  background: linear-gradient(180deg,
      var(--accent-green) 0%,
      rgba(5, 192, 127, 0.7) 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 1s ease;
  z-index: 2;
  box-shadow: 0 -4px 12px rgba(5, 192, 127, 0.3);
}

.c-bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

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

.stats-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.stats-export-btn:hover {
  border-color: color-mix(in srgb, var(--accent-blue) 35%, var(--border));
  color: var(--accent-blue);
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-icon {
  width: 20px;
  text-align: center;
}

.title-icon.green-text {
  color: var(--accent-green);
}

.title-icon.orange-text {
  color: var(--accent-orange);
}

.title-icon.blue-text {
  color: var(--accent-blue);
}

.title-icon.text-gray {
  color: var(--text-muted);
}

.panel-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.7s;
}

.stats-demo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -4px 0 24px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(90, 231, 173, 0.18);
  background:
    radial-gradient(circle at top right, rgba(90, 231, 173, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.stats-demo-banner-copy {
  display: grid;
  gap: 4px;
}

.stats-demo-banner-copy strong {
  font-size: 14px;
  color: var(--text-primary);
}

.stats-demo-banner-copy span {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.stats-demo-banner-btn,
.stats-premium-overlay-btn {
  white-space: nowrap;
}

.stats-premium-lock-card,
.stats-free-preview-card {
  position: relative;
  overflow: hidden;
}

.stats-premium-overlay {
  display: none;
}

body.stats-demo-preview .stats-free-preview-card::after {
  content: "Vista gratis";
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ddfff1;
  background: rgba(90, 231, 173, 0.14);
  border: 1px solid rgba(90, 231, 173, 0.18);
}

body.stats-demo-preview .stats-premium-lock-card > *:not(.stats-premium-overlay) {
  filter: blur(4px) saturate(0.9);
  opacity: 0.42;
  transform: scale(0.995);
  pointer-events: none;
  user-select: none;
}

body.stats-demo-preview .stats-premium-lock-card .stats-premium-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(9, 14, 25, 0.48), rgba(9, 14, 25, 0.82));
  z-index: 3;
}

.stats-premium-overlay-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(243, 122, 32, 0.16);
  border: 1px solid rgba(243, 122, 32, 0.28);
  color: #ffd8b3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stats-premium-overlay strong {
  font-size: 1.05rem;
  color: #fff;
}

.stats-premium-overlay p {
  margin: 0;
  max-width: 34ch;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.88);
}

body.stats-demo-preview .stats-free-preview-card {
  border-color: rgba(90, 231, 173, 0.12);
  box-shadow: 0 14px 28px rgba(10, 16, 26, 0.12);
}

.chart-placeholder {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-bottom: 30px;
  margin-top: 20px;
}

.chart-line {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  position: relative;
  height: 30px;
}

.chart-line span {
  position: absolute;
  left: 0;
  bottom: -8px;
  font-size: 11px;
  color: var(--text-muted);
}

.chart-bars {
  position: absolute;
  bottom: 30px;
  left: 40px;
  right: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  z-index: 2;
}

.c-bar {
  width: 20px;
  background: var(--accent-green);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  transition: height 1s ease;
  z-index: 2;
}

.c-bar::after {
  content: attr(data-label);
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Puntos de falla */
.btn-refuerzo {
  background: rgba(5, 192, 127, 0.1);
  color: var(--accent-green);
  cursor: pointer;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 800;
  border: none;
  border-radius: 100px;
  transition: 0.2s;
}

.btn-refuerzo:hover {
  background: rgba(5, 192, 127, 0.2);
}

.fail-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 10px;
}

.btn-fail-action {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}

.btn-fail-action:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.green-bg {
  background: rgba(5, 192, 127, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(5, 192, 127, 0.3);
}

.blue-bg {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.orange-bg {
  background: rgba(243, 122, 32, 0.15);
  color: var(--accent-orange);
  border: 1px solid rgba(243, 122, 32, 0.3);
}

.fail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fail-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.fail-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.fail-item-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.fail-item-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.fail-item-badge {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

/* ── General List / Post Grids ──────────────────── */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mas-container {
  gap: 24px;
}

.more-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.more-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.more-section-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.more-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.more-section-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
}

.list-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.list-item-content h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.list-item-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.post-item {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.post-item .list-item-content {
  flex: 1;
  min-width: 300px;
}

.post-item .time-stamp {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 10px;
  font-weight: 500;
}

.badge {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
}

.pomodoro-hub-panel {
  position: relative;
  overflow: hidden;
}

.pomodoro-hub-panel::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(5, 192, 127, 0.16) 0%, rgba(5, 192, 127, 0) 68%);
  pointer-events: none;
}

.pomodoro-hub-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pomodoro-hub-grid {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(260px, 0.95fr);
  gap: 18px;
}

.pomodoro-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.pomodoro-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.pomodoro-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pomodoro-logo-badge,
.pomodoro-logo-inline,
.pomodoro-logo-title,
.pomodoro-reveal-icon,
.pomo-icon {
  display: inline-block;
  object-fit: contain;
  flex-shrink: 0;
}

.pomodoro-logo-badge {
  width: 22px;
  height: 22px;
}

.pomodoro-logo-inline {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
}

.pomodoro-logo-title {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: -4px;
}

.pomodoro-mode-badge.is-focus {
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
}

.pomodoro-mode-badge.is-break {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-blue);
}

.pomodoro-mode-badge.is-long-break {
  background: rgba(243, 122, 32, 0.14);
  color: var(--accent-orange);
}

.pomodoro-ring-wrap {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.pomodoro-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pomodoro-ring-track,
.pomodoro-ring-progress {
  fill: none;
  stroke-width: 14;
}

.pomodoro-ring-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.pomodoro-ring-progress {
  stroke: var(--accent-green);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}

.pomodoro-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.pomodoro-ring-center strong {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.pomodoro-ring-center span {
  font-size: 15px;
  color: var(--text-secondary);
}

.pomodoro-ring-center small {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pomodoro-progress-copy {
  font-size: 13px;
  color: var(--text-secondary);
}

.pomodoro-hero-actions,
.pomodoro-inline-actions,
.pomodoro-settings-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pomodoro-metrics-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pomodoro-metric,
.pomodoro-inline-summary {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pomodoro-metric span,
.pomodoro-inline-summary span,
.pomodoro-inline-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pomodoro-metric strong,
.pomodoro-inline-summary strong,
.pomodoro-recommended-focus strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
}

.pomodoro-card-title {
  margin: 8px 0 14px;
  font-size: 1.15rem;
}

.pomodoro-goal-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.pomodoro-goal-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green), #62e6b7);
  border-radius: inherit;
  transition: width 0.4s ease;
}

.pomodoro-goal-copy {
  margin-top: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pomodoro-specialty-copy,
.pomodoro-specialty-summary {
  color: var(--text-secondary);
  line-height: 1.6;
}

.pomodoro-specialties-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pomodoro-specialty-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pomodoro-specialty-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(98, 230, 183, 0.38);
}

.pomodoro-specialty-chip.is-active {
  background: rgba(5, 192, 127, 0.14);
  border-color: rgba(5, 192, 127, 0.42);
  box-shadow: 0 12px 24px rgba(5, 192, 127, 0.14);
  color: var(--accent-green);
}

.pomodoro-recommended-focus {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(88, 166, 255, 0.08);
  border: 1px solid rgba(88, 166, 255, 0.16);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.pomodoro-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pomodoro-toggles {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pomodoro-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.pomodoro-toggle input {
  accent-color: var(--accent-green);
}

.pomodoro-settings-footer {
  margin-top: 18px;
  justify-content: space-between;
}

.pomodoro-settings-footer span {
  font-size: 12px;
  color: var(--text-muted);
}

.pomodoro-week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 220px;
}

.pomodoro-week-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pomodoro-week-bar-track {
  width: 100%;
  min-height: 170px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.pomodoro-week-bar-fill {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(98, 230, 183, 0.94) 0%, rgba(5, 192, 127, 0.7) 100%);
  min-height: 0;
  transition: height 0.4s ease;
}

.pomodoro-week-bar strong {
  font-size: 1rem;
  font-weight: 800;
}

.pomodoro-week-bar span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.pomodoro-log-card {
  grid-column: 1 / -1;
}

.pomodoro-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pomodoro-log-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pomodoro-log-item h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.pomodoro-log-item p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.pomodoro-log-item span {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .pomodoro-hub-grid {
    grid-template-columns: 1fr;
  }

  .pomodoro-log-card {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .pomodoro-card {
    padding: 18px;
    border-radius: 20px;
  }

  .pomodoro-settings-grid,
  .pomodoro-specialties-grid,
  .pomodoro-metrics-grid {
    grid-template-columns: 1fr;
  }

  .pomodoro-week-bars {
    gap: 8px;
    min-height: 180px;
  }

  .pomodoro-week-bar-track {
    min-height: 130px;
  }

  .pomodoro-recommended-focus,
  .pomodoro-hero-actions,
  .pomodoro-inline-actions,
  .pomodoro-settings-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Settings Form ──────────────────── */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.text-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 4px rgba(5, 192, 127, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.text-input option {
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.settings-panel {
  border-top: 3px solid var(--accent-green);
  transition: transform 0.2s;
}

.settings-panel:hover {
  transform: translateY(-4px);
}

.admin-preview-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-preview-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-preview-btn:hover {
  border-color: var(--accent-green);
}

.admin-preview-btn.active {
  background: linear-gradient(135deg, var(--accent-green), #049f6a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(5, 192, 127, 0.25);
}

/* Evita que la bienvenida aparezca un instante antes de restaurar la sesión en la PWA. */
.app-startup-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 50% 38%, rgba(5, 192, 127, 0.16), transparent 27%),
    #0a0e17;
  transition: opacity .22s ease, visibility .22s ease;
}
.app-startup-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.app-startup-logo { width: 42px; height: 58px; }
.app-startup-name {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.app-startup-name span { color: #05c07f; }
.app-startup-loader {
  width: 23px;
  height: 23px;
  margin-top: 4px;
  border: 2px solid rgba(255,255,255,.16);
  border-top-color: #05c07f;
  border-radius: 50%;
  animation: appStartupSpin .8s linear infinite;
}
@keyframes appStartupSpin { to { transform: rotate(360deg); } }

.dashboard-upgrade-cta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  margin: -12px 0 26px;
  padding: 14px 18px;
  border: 1px solid rgba(250, 204, 21, 0.44);
  border-radius: 16px;
  background: linear-gradient(105deg, rgba(250, 204, 21, 0.16), rgba(245, 158, 11, 0.08));
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.dashboard-upgrade-cta[hidden] { display: none !important; }

/* Valoración de la aplicación */
.rating-modal {
  position: fixed;
  inset: 0;
  z-index: 4600;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 8, 18, .76);
  backdrop-filter: blur(10px);
}
.rating-modal[hidden] { display: none; }
.rating-card {
  position: relative;
  width: min(100%, 500px);
  padding: 34px;
  border: 1px solid rgba(250, 204, 21, .3);
  border-radius: 24px;
  background: radial-gradient(circle at 92% 0, rgba(250,204,21,.15), transparent 34%), var(--bg-card);
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.rating-kicker { color: #fde68a; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.rating-card h2 { margin: 9px 0 8px; font-size: 1.45rem; }
.rating-card > p { margin: 0 0 20px; color: var(--text-secondary); line-height: 1.5; }
.rating-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; color: var(--text-secondary); font-size: 28px; cursor: pointer; }
.rating-stars { display: flex; justify-content: center; gap: 5px; margin: 8px 0; }
.rating-star { position: relative; width: 43px; border: 0; padding: 0; background: transparent; color: #475569; font-size: 2.5rem; line-height: 1; cursor: pointer; transition: transform .15s ease; }
.rating-star:hover { transform: translateY(-3px) scale(1.08); }
.rating-star.is-full { color: #fbbf24; }
.rating-star.is-half { color: transparent; background: linear-gradient(90deg, #fbbf24 50%, #475569 50%); -webkit-background-clip: text; background-clip: text; }
.rating-value-label { min-height: 20px; margin: 4px 0 16px; text-align: center; color: #fde68a; font-size: .85rem; font-weight: 700; }
.rating-card textarea { width: 100%; resize: vertical; }
.rating-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.admin-ratings-summary { margin: 14px 0; padding: 16px; border-radius: 12px; background: rgba(250,204,21,.08); color: var(--text-secondary); }
.admin-ratings-average { color: #fde047; font-size: 1.65rem; font-weight: 800; }
.admin-rating-stars { color: #fbbf24; letter-spacing: 1px; }
@media (max-width: 560px) {
  .rating-modal { align-items: end; padding: 0; }
  .rating-card { width: 100%; border-radius: 24px 24px 0 0; padding: 30px 20px calc(24px + env(safe-area-inset-bottom)); }
  .rating-star { width: 40px; font-size: 2.3rem; }
  .rating-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .rating-actions #rating-submit { grid-column: 1 / -1; }
}

.dashboard-upgrade-cta:hover {
  transform: translateY(-2px);
  border-color: #fde047;
  background: linear-gradient(105deg, rgba(250, 204, 21, 0.24), rgba(245, 158, 11, 0.12));
}

.dashboard-upgrade-crown {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.17);
  font-size: 22px;
}

.dashboard-upgrade-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; }
.dashboard-upgrade-copy small { color: #fde68a; font-size: 0.66rem; font-weight: 800; letter-spacing: .09em; }
.dashboard-upgrade-copy strong { font-size: .92rem; }
.dashboard-upgrade-arrow { color: #fde047; font-size: 1.45rem; font-weight: 700; }

@media (max-width: 560px) {
  .dashboard-upgrade-cta { margin: -6px 0 20px; padding: 12px 14px; }
  .dashboard-upgrade-copy strong { font-size: .84rem; }
}

.admin-section-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.admin-section-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-section-tab.active {
  border-color: var(--accent-green);
  background: rgba(5, 192, 127, 0.14);
  color: var(--accent-green);
}

.admin-users-page-panel {
  max-width: 1120px;
}

@media (max-width: 768px) {
  .admin-sidebar-nav { display: none !important; }
}

/* ── Buttons (General) ──────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-green) 0%, #049f6a 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s;
  box-shadow: 0 4px 12px rgba(5, 192, 127, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(5, 192, 127, 0.3);
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-ghost:hover {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
}

.premium-contact-box {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at top right, rgba(5, 192, 127, 0.12), transparent 45%);
}

.premium-contact-box--compact {
  margin-top: -2px;
}

.premium-contact-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.premium-contact-copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.premium-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.premium-contact-link {
  display: inline-flex;
  flex: 1 1 150px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.premium-contact-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.premium-contact-link.is-whatsapp {
  background: linear-gradient(135deg, #25d366, #149c52);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.24);
}

.premium-contact-link.is-instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d 55%, #fcb045);
  box-shadow: 0 10px 22px rgba(225, 48, 108, 0.24);
}

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

.premium-contact-icon svg {
  width: 18px;
  height: 18px;
}

.premium-pricing-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(90, 231, 173, 0.16), rgba(38, 97, 255, 0.10)),
    rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.premium-pricing-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(13, 19, 33, 0.18);
  border-color: rgba(90, 231, 173, 0.35);
}

.premium-pricing-toggle.is-open {
  border-color: rgba(90, 231, 173, 0.4);
  box-shadow: 0 18px 34px rgba(23, 201, 145, 0.14);
}

.premium-pricing-toggle-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.premium-pricing-toggle.is-open .premium-pricing-toggle-icon {
  transform: rotate(180deg);
}

.premium-pricing-panel {
  margin: 0 0 16px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(23, 201, 145, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.premium-pricing-head {
  margin-bottom: 16px;
}

.premium-pricing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(90, 231, 173, 0.12);
  color: #9cf2cf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.premium-pricing-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-primary);
}

.premium-pricing-copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.premium-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.premium-plan-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 19, 0.58);
  box-shadow: 0 20px 34px rgba(8, 11, 20, 0.18);
}

.premium-plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 36%);
}

.premium-plan-card--featured {
  border-color: rgba(90, 231, 173, 0.26);
  background:
    radial-gradient(circle at top right, rgba(90, 231, 173, 0.18), transparent 38%),
    linear-gradient(155deg, rgba(7, 13, 22, 0.94), rgba(10, 32, 33, 0.92));
  box-shadow: 0 24px 42px rgba(11, 21, 29, 0.28), 0 0 0 1px rgba(90, 231, 173, 0.08);
}

.premium-plan-card--free {
  border-color: rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(circle at top right, rgba(71, 85, 105, 0.16), transparent 34%),
    linear-gradient(155deg, rgba(14, 18, 27, 0.96), rgba(16, 18, 28, 0.94));
  box-shadow: 0 12px 22px rgba(8, 11, 20, 0.14);
}

.premium-plan-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.premium-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.premium-plan-badge--promo {
  color: #1f241f;
  background: linear-gradient(135deg, #ffe8a3, #ffd05b);
}

.premium-plan-badge--accent {
  color: #ddfff1;
  background: rgba(90, 231, 173, 0.16);
}

.premium-plan-badge--neutral {
  color: #dfe7ff;
  background: rgba(148, 163, 184, 0.18);
}

.premium-plan-name {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: #fff;
}

.premium-plan-caption {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.86);
}

.premium-plan-price-wrap {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-plan-price-wrap--free {
  background: rgba(59, 130, 246, 0.08);
}

.premium-plan-price-old {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.62);
  text-decoration: line-through;
}

.premium-plan-price-main-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 6px;
}

.premium-plan-price-main {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  color: #fff;
}

.premium-plan-card--featured .premium-plan-price-main {
  color: #96f7d1;
}

.premium-plan-card--free .premium-plan-name,
.premium-plan-card--free .premium-plan-price-main {
  color: #d7dfef;
}

.premium-plan-card--free .premium-plan-caption,
.premium-plan-card--free .premium-plan-price-note,
.premium-plan-card--free .premium-plan-list li {
  color: rgba(203, 213, 225, 0.78);
}

.premium-plan-card--free .premium-plan-list li::before {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.08);
}

.premium-plan-price-currency {
  font-size: 13px;
  font-weight: 800;
  color: rgba(226, 232, 240, 0.76);
  padding-bottom: 4px;
}

.premium-plan-price-note {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.82);
}

.premium-plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.premium-plan-list li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(236, 241, 247, 0.92);
}

.premium-plan-list li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5ae7ad, #2fb6ff);
  box-shadow: 0 0 0 4px rgba(90, 231, 173, 0.12);
}

.premium-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 16px;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #25d366, #149c52);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 26px rgba(37, 211, 102, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.premium-plan-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 18px 30px rgba(37, 211, 102, 0.3);
}

.redeem-modal-content {
  scrollbar-width: thin;
}

.redeem-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 20, 0.72);
  backdrop-filter: blur(12px);
}

.redeem-modal-content {
  position: relative;
  width: min(94vw, 780px);
  max-height: min(88vh, 800px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(108, 231, 181, 0.25);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(32, 203, 140, 0.17), transparent 32%),
    linear-gradient(145deg, #121d38 0%, #0a1328 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.redeem-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
}

.redeem-modal-header { text-align: center; padding: 2px 38px 0; }
.redeem-modal-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #83f5bf;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.redeem-modal-header h2 { margin: 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.035em; }
.redeem-modal-reason { max-width: 580px; margin: 10px auto 22px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; text-align: center; }
.redeem-transfer-intro { margin-bottom: 18px; border-color: rgba(108, 231, 181, 0.2); background: rgba(255, 255, 255, 0.045); }
.redeem-transfer-intro .premium-contact-title::before { content: "01"; margin-right: 9px; color: #83f5bf; font-size: 0.7rem; letter-spacing: 0.08em; }

.redeem-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.redeem-plan-card {
  min-height: 128px;
  padding: 17px;
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
}
.redeem-plan-card:hover { transform: translateY(-3px); filter: none; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2); }
.redeem-plan-card--2026 { border-color: rgba(91, 231, 169, 0.38); }
.redeem-plan-card--2027 { border-color: rgba(138, 162, 255, 0.42); }
.redeem-plan-card--squad { grid-column: 1 / -1; min-height: 104px; border-color: rgba(250, 204, 21, 0.52); background: linear-gradient(100deg, rgba(250, 204, 21, 0.15), rgba(245, 158, 11, 0.06)); }
.redeem-plan-card strong { color: #fff; font-size: 1rem; }
.redeem-plan-tag { color: var(--text-muted); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; }
.redeem-plan-card--squad .redeem-plan-tag { color: #fde68a; }
.redeem-plan-price { margin-top: auto; color: #8ef5c3; font-size: 1.1rem; font-weight: 850; }
.redeem-plan-card--2027 .redeem-plan-price { color: #bfcaff; }
.redeem-plan-card--squad .redeem-plan-price { color: #fde68a; }

@media (max-width: 560px) {
  .redeem-modal-overlay { align-items: flex-end; padding: 0; }
  .redeem-modal-content { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; }
  .redeem-plan-grid { grid-template-columns: 1fr; }
  .redeem-plan-card--squad { grid-column: auto; }
}

@media (min-width: 1024px) {
  .premium-pricing-panel {
    padding: 24px;
  }

  .premium-pricing-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.92fr);
    gap: 20px;
  }

  .premium-plan-card {
    padding: 24px;
    border-radius: 24px;
  }

  .premium-plan-card--featured {
    transform: translateY(-4px) scale(1.01);
  }

  .premium-plan-name {
    font-size: 1.2rem;
  }

  .premium-plan-caption,
  .premium-plan-list li {
    font-size: 13.5px;
  }

  .premium-plan-price-main {
    font-size: 2.4rem;
  }

  .premium-plan-price-note {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .stats-demo-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-premium-overlay {
    padding: 18px !important;
  }

  .premium-pricing-panel {
    padding: 16px;
  }

  .premium-pricing-grid {
    grid-template-columns: 1fr;
  }

  .premium-plan-card {
    padding: 16px;
  }

  .premium-plan-price-main {
    font-size: 1.8rem;
  }
}

/* ── EXAM VIEW ──────────────────── */
.exam-head.test-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
  background: var(--bg-sidebar);
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* ── Dynamic Animations ────────────────────────────────────── */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 122, 32, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(243, 122, 32, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(243, 122, 32, 0);
  }
}

@keyframes floatAnim {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Content Entry */
.modal-overlay[style*="display: flex"] .modal-content {
  animation: fadeInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Flame Widget Idle Animation */
.flame-widget {
  animation:
    pulseGlow 2.5s infinite,
    floatAnim 5s ease-in-out infinite;
}

@media (min-width: 769px) {
  .flame-widget {
    animation: floatAnim 8s ease-in-out infinite;
  }
}

/* Stat Cards Entry Stagger */
/* Removed: .view.active .stat-card animation rules as they are now handled by .stat-card itself */

/* Enhanced Hover states */
.btn-primary {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), filter 0.25s;
}

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

.stat-card {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}

.exam-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.exam-progress-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  max-width: 300px;
}

#q-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 100px;
  transition: width 0.3s;
}

.exam-timer {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-orange);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.exam-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.exam-navigator {
  width: 200px;
  background: var(--bg-card);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  flex-shrink: 0;
}

.exam-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-card,
.question-card {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.case-card {
  border-top: 3px solid var(--accent-blue);
}

.case-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.case-text {
  line-height: 1.8;
  font-size: 15px;
  color: #cad5e2;
  letter-spacing: 0.2px;
}

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

.q-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.btn-flag {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-flag.active {
  background: rgba(243, 122, 32, 0.15);
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.5;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.option-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.option-btn.selected {
  background: rgba(5, 192, 127, 0.15);
  border-color: var(--accent-green);
}

.option-btn.correct-ans {
  background: rgba(5, 192, 127, 0.2);
  border-color: var(--accent-green);
}

.option-btn.wrong-ans {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--accent-red);
}

.nav-dot {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}

.nav-dot:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-dot.answered {
  background: rgba(5, 192, 127, 0.2);
  color: var(--accent-green);
}

.nav-dot.current {
  background: var(--accent-blue);
  color: #fff;
}

.nav-dot.flagged {
  border: 1px solid var(--accent-orange);
}

.exam-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.btn-nav {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}

.btn-nav.primary {
  background: var(--accent-blue);
  color: #fff;
}

.feedback-card {
  background: rgba(5, 192, 127, 0.05);
  border: 1px solid rgba(5, 192, 127, 0.2);
  padding: 20px;
  border-radius: var(--radius-md);
}

.feedback-card h3 {
  font-size: 14px;
  color: var(--accent-green);
  margin-bottom: 10px;
}

.feedback-card.wrong {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
}

.feedback-card.wrong h3 {
  color: var(--accent-red);
}

.feedback-gpc {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
}

/* ── RESULTS VIEW ──────────────────── */
.results-panel {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.results-panel .panel-title {
  justify-content: center;
  font-size: 24px;
  margin-bottom: 40px;
}

.results-score-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  margin-bottom: 40px;
}

.score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 8px solid var(--accent-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-pct {
  font-size: 40px;
  font-weight: 900;
}

.score-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
}

.score-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.s-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s-val {
  font-size: 24px;
  font-weight: 800;
}

.s-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.text-green {
  color: var(--accent-green);
}

.text-red {
  color: var(--accent-red);
}

.text-gray {
  color: var(--text-muted);
}

.results-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ── Setup Redesign ──────────────────── */
.setup-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.setup-header {
  text-align: center;
}

.setup-title {
  font-size: 38px;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.setup-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.preset-card:nth-child(1) {
  animation-delay: 0.1s;
}

.preset-card:nth-child(2) {
  animation-delay: 0.2s;
}

.preset-card:nth-child(3) {
  animation-delay: 0.3s;
}

.preset-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
}

.preset-card.active {
  border-width: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.preset-card.active.green-p {
  border-color: var(--accent-green);
  background: rgba(5, 192, 127, 0.05);
}

.preset-card.active.blue-p {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

.preset-card.active.trophy-p {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.preset-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.preset-icon.trophy {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.preset-icon.bolt {
  background: rgba(5, 192, 127, 0.1);
  color: var(--accent-green);
}

.preset-icon.flame {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
}

.preset-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preset-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.preset-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.premium-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #f8d477;
  background: rgba(248, 212, 119, 0.12);
  border: 1px solid rgba(248, 212, 119, 0.35);
  padding: 2px 6px;
  border-radius: 999px;
}

.pomo-icon,
.flame-icon,
.title-icon,
.action-btn-icon,
.preset-icon,
.btn-icon,
.search-icon,
.stat-icon,
.label-icon,
.check-mark {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.demo-locked {
  opacity: 0.55 !important;
  position: relative;
}

.demo-locked::after {
  content: "\1F512";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  background: rgba(12, 18, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8d477;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

input.demo-locked,
textarea.demo-locked {
  cursor: not-allowed;
}

.setup-panel-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-icon {
  color: var(--accent-green);
  font-size: 16px;
}

.section-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.mode-toggle-grid,
.difficulty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mode-toggle-btn,
.diff-btn,
.time-toggle-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.mode-toggle-btn:hover,
.diff-btn:hover,
.time-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mode-toggle-btn.active,
.diff-btn.active,
.time-toggle-btn.active {
  border-color: var(--accent-green);
  background: rgba(5, 192, 127, 0.05);
  color: var(--accent-green);
}

.spec-selection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.spec-item-random {
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at top right, rgba(90, 231, 173, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.02);
}

.spec-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.spec-item .check-mark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  transition: 0.2s;
}

.spec-item.checked {
  border-color: var(--accent-green);
  background: rgba(5, 192, 127, 0.03);
}

.spec-item.checked .check-mark {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: #fff;
}

.search-box-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 20px;
  color: var(--text-muted);
}

#setup-topic-filter {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 18px 20px 18px 50px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
}

#setup-topic-filter:focus {
  outline: none;
  border-color: var(--accent-green);
}

.temario-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
  gap: 18px;
  margin: 24px 0 16px;
  align-items: stretch;
}

.temario-search-shell,
.temario-stat {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(5, 192, 127, 0.08) 0%, rgba(5, 192, 127, 0.02) 100%),
    rgba(255, 255, 255, 0.02);
  border-radius: 18px;
}

.temario-search-shell {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.temario-search-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.temario-search-label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.temario-search-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-primary);
}

.temario-clear-btn {
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.temario-clear-btn:hover {
  background: rgba(5, 192, 127, 0.08);
  color: var(--accent-green);
}

.temario-search-frame {
  position: relative;
}

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

.temario-search-input {
  width: 100%;
  background: rgba(8, 15, 25, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 18px 16px 48px;
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.temario-search-input:focus {
  outline: none;
  border-color: rgba(5, 192, 127, 0.45);
  box-shadow: 0 0 0 4px rgba(5, 192, 127, 0.08);
  background: rgba(8, 15, 25, 0.65);
}

.temario-search-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.temario-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.temario-stat {
  padding: 18px 16px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.temario-stat-value {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: var(--text-primary);
}

.temario-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.temario-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.temario-results-summary {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.temario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.temario-card {
  width: 100%;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(5, 192, 127, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
  border-radius: 20px;
  padding: 18px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 182px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.temario-card:hover {
  transform: translateY(-4px);
  border-color: rgba(5, 192, 127, 0.32);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.temario-card.is-empty {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015));
}

.temario-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.temario-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: var(--text-primary);
}

.temario-card-parent {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-blue);
  text-transform: uppercase;
}

.temario-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

.temario-count--positive {
  color: var(--accent-green);
  background: rgba(5, 192, 127, 0.12);
}

.temario-card-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.temario-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.temario-card-cta {
  color: var(--text-primary);
  font-weight: 700;
}

.temario-card-meta {
  color: var(--text-muted);
}

.temario-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 28px;
}

.temario-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.temario-empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.temario-empty p {
  margin: 0;
  max-width: 480px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.temario-empty .btn-primary,
.temario-empty .btn-ghost {
  margin-top: 16px;
}

.scale-lab-panel {
  overflow: hidden;
}

.scale-lab-shell {
  display: grid;
  gap: 16px;
}

.scale-simple-intro {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
  background:
    radial-gradient(circle at top right, rgba(5, 192, 127, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 14px;
}

.scale-simple-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
}

.scale-guide-list {
  display: grid;
  gap: 10px;
}

.scale-guide-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.scale-guide-step {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
}

.scale-search-shell {
  margin-top: 2px;
}

.scale-lab-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(5, 192, 127, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.02);
}

.scale-lab-title {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
}

.scale-lab-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scale-lab-stat {
  min-height: 110px;
}

.scale-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.scale-method-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.scale-method-card h3,
.scale-focus-title,
.scale-card-title {
  margin: 0;
  color: var(--text-primary);
}

.scale-method-card p,
.scale-focus-subtitle,
.scale-focus-trigger,
.scale-focus-helper,
.scale-card-subtitle,
.scale-card-track,
.scale-card-trigger,
.scale-card-note,
.scale-focus-notes p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.scale-method-step {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
  font-weight: 800;
  font-family: var(--font-mono);
}

.scale-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.scale-filter-shell {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 16px;
}

.scale-chip-group {
  display: grid;
  gap: 10px;
}

.scale-chip-label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-blue);
}

.scale-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scale-filter-chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.scale-filter-chip:hover,
.scale-filter-chip.is-active {
  border-color: rgba(5, 192, 127, 0.35);
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
}

.scale-focus-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px 22px;
  background:
    radial-gradient(circle at top right, rgba(243, 122, 32, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  display: grid;
  gap: 14px;
}

.scale-focus-head,
.scale-card-head,
.scale-card-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.scale-focus-kicker,
.scale-focus-question-label,
.scale-focus-label,
.scale-card-label {
  margin: 0;
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.scale-focus-question {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.08rem;
  line-height: 1.45;
}

.scale-focus-trigger,
.scale-focus-mini-note {
  margin: 0;
}

.scale-focus-actions,
.scale-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scale-focus-answer {
  display: none;
  gap: 16px;
}

.scale-focus-answer.is-visible {
  display: grid;
}

.scale-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.scale-focus-simple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scale-focus-simple-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 8px;
}

.scale-focus-block,
.scale-card-block {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.scale-focus-primary {
  border: 1px solid rgba(5, 192, 127, 0.16);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(5, 192, 127, 0.08), transparent 38%),
    rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 12px;
}

.scale-focus-section-head {
  display: grid;
  gap: 6px;
}

.scale-focus-mini-note {
  color: var(--text-secondary);
  line-height: 1.5;
}

.scale-focus-memory {
  background: rgba(255, 255, 255, 0.02);
}

.scale-focus-explanation {
  background: rgba(255, 255, 255, 0.025);
}

.scale-focus-block ul,
.scale-card-section ul,
.scale-card-block ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
}

.scale-focus-notes {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.scale-focus-notes p {
  margin: 0;
}

.scale-explanation-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.scale-explanation-item {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 6px;
}

.scale-explanation-item strong {
  color: var(--text-primary);
  font-size: 12px;
}

.scale-explanation-item p,
.scale-explanation-warning {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.scale-explanation-warning {
  color: var(--accent-orange);
}

.scale-criteria-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.scale-criteria-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.scale-focus-primary .scale-criteria-row {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.045);
}

.scale-criteria-text {
  color: var(--text-secondary);
  line-height: 1.5;
}

.scale-criteria-points {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-mono);
}

.scale-focus-empty {
  min-height: 220px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.02);
}

.scale-focus-empty-icon {
  font-size: 32px;
  color: var(--accent-blue);
}

.scale-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.scale-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  background:
    radial-gradient(circle at top right, rgba(5, 192, 127, 0.05), transparent 35%),
    rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.scale-card-expanded {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.scale-card-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 8px;
}

.scale-card-track {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scale-card-hook,
.scale-card-next {
  font-size: 12px;
  color: var(--text-muted);
}

.scale-card-actions {
  justify-content: flex-end;
}

.scale-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.scale-status-badge.is-new {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.scale-status-badge.is-due {
  background: rgba(243, 122, 32, 0.14);
  color: var(--accent-orange);
}

.scale-status-badge.is-progress {
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent-blue);
}

.scale-status-badge.is-mastered {
  background: rgba(5, 192, 127, 0.14);
  color: var(--accent-green);
}

.scale-card-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.scale-card-details summary {
  cursor: pointer;
  color: var(--text-primary);
  font-weight: 700;
}

.scale-card-details-body {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

@media (max-width: 900px) {
  .temario-toolbar {
    grid-template-columns: 1fr;
  }

  .scale-lab-hero,
  .scale-toolbar,
  .scale-focus-simple-grid,
  .scale-focus-grid,
  .scale-method-grid {
    grid-template-columns: 1fr;
  }

  .scale-lab-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(26, 30, 41, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  max-height: 250px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.suggestions-dropdown.active {
  display: block;
}

.suggestion-item {
  padding: 14px 20px;
  cursor: pointer;
  transition: 0.2s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--text-secondary);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(5, 192, 127, 0.1);
  color: var(--accent-green);
}

.selected-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
}

.topic-tag {
  background: rgba(5, 192, 127, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.3s ease;
}

.topic-tag .remove-tag {
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
}

.topic-tag .remove-tag:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.setup-footer-controls {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.control-group {
  width: 100%;
}

.premium-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
  margin: 20px 0;
}

body.light-mode .premium-slider {
  background: rgba(0, 0, 0, 0.1);
}

.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-green);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-green);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.time-selection-row {
  display: flex;
  gap: 12px;
}

.time-toggle-btn {
  flex: 1;
  padding: 14px;
}

.time-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

#setup-time-minutes {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  text-align: center;
}

.time-unit {
  position: absolute;
  right: 15px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
}

.setup-actions-row {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.btn-panel-back {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: none;
  padding: 18px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-finish-setup {
  flex: 2;
  background: linear-gradient(135deg, var(--accent-green) 0%, #049f6a 100%);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s;
  box-shadow: 0 4px 15px rgba(5, 192, 127, 0.2);
}

.btn-finish-setup:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(5, 192, 127, 0.4);
  filter: brightness(1.05);
}

.green-text {
  color: var(--accent-green);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* ── Pomodoro Floating Widget ─────────────────────────── */
.pomodoro-widget-shell {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1105;
  --pomodoro-accent: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.pomodoro-floating-widget {
  position: relative;
  background: rgba(26, 32, 44, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  border-left: 3px solid var(--pomodoro-accent);
  cursor: pointer;
}

.pomodoro-floating-widget:hover {
  transform: translateY(-2px);
  background: rgba(26, 32, 44, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

.pomodoro-hide-btn,
.pomodoro-reveal-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 32, 44, 0.92);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pomodoro-hide-btn:hover,
.pomodoro-reveal-tab:hover {
  transform: translateY(-1px);
  background: rgba(26, 32, 44, 1);
  border-color: rgba(255, 255, 255, 0.24);
}

.pomodoro-hide-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pomodoro-reveal-tab {
  position: absolute;
  right: 0;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px 0 0 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
}

.pomodoro-reveal-text {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pomodoro-reveal-icon {
  width: 18px;
  height: 18px;
}

.pomodoro-widget-shell.is-collapsed .pomodoro-floating-widget {
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 20px));
}

.pomodoro-widget-shell.is-collapsed .pomodoro-reveal-tab {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.pomo-mini-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pomo-icon {
  width: 24px;
  height: 24px;
}

.pomo-time-mini {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-green);
  font-variant-numeric: tabular-nums;
  min-width: 65px;
  text-align: center;
}

.pomo-actions {
  display: flex;
  gap: 6px;
}

.btn-pomo-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: 0.2s;
}

.btn-pomo-mini:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-pomo-mini.active {
  background: var(--pomodoro-accent);
  border-color: var(--pomodoro-accent);
}

.pomo-sessions-mini {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 12px;
}

@media (max-width: 768px) {
  .pomodoro-widget-shell {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(var(--mobile-nav-clearance) + env(safe-area-inset-bottom, 0px));
  }

  .pomodoro-floating-widget {
    gap: 10px;
    padding: 10px 12px;
  }

  .pomo-time-mini {
    min-width: 58px;
    font-size: 1.2rem;
  }

  .pomodoro-reveal-tab {
    padding: 9px 10px;
  }

  .pomodoro-reveal-text {
    display: none;
  }
}

/* ── Notification Banner ────────────────────────────── */
.notif-banner {
  position: fixed;
  top: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-orange);
  padding: 16px 20px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 320px;
  max-width: 95%;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.notif-banner.active {
  transform: translateX(-50%) translateY(0);
}

.notif-banner-icon {
  width: 40px;
  height: 40px;
  background: rgba(243, 122, 32, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.notif-banner-content {
  flex: 1;
}

.notif-banner-title {
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.notif-banner-desc {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
}

.notif-banner-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

.pomo-icon.running {
  animation: pulse-tomato 2s infinite ease-in-out;
}

@keyframes pulse-tomato {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px var(--accent-green));
  }

  50% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px var(--accent-green));
  }

  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px var(--accent-green));
  }
}

/* ── Calculator Styles ─────────────────────────────────── */
.calc-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.calc-inputs {
  min-width: 0; /* prevent grid overflow on small screens */
}

#view-calculadora .text-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#view-calculadora .input-group p {
  overflow-wrap: anywhere;
}

.calc-input-group {
  margin-bottom: 24px;
}

.calc-result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: rgba(5, 192, 127, 0.05);
  border: 2px dashed var(--accent-green);
  border-radius: var(--radius-xl);
}

.calc-score-val {
  font-size: 48px;
  font-weight: 900;
  color: var(--accent-green);
  margin-bottom: 12px;
}

.calc-status {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 8px;
}

.calculator-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.calculator-table th,
.calculator-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.calculator-table th {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.calculator-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.tag-safe {
  background: var(--accent-green);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
}

.tag-risk {
  background: var(--accent-orange);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
}

.tag-danger {
  background: var(--accent-red);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
}

/* ── Mobile Navigation (Bottom Bar) ───────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: calc(var(--mobile-nav-bottom-gap) + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: calc(100vw - 32px);
  max-width: 400px;
  height: var(--mobile-nav-height);
  background:
    radial-gradient(circle at 14% -12%, rgba(255, 255, 255, 0.34), transparent 26%),
    radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.18), transparent 24%),
    radial-gradient(circle at 50% 140%, rgba(5, 192, 127, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 22%, rgba(255, 255, 255, 0.03) 48%, rgba(255, 255, 255, 0.01) 100%),
    rgba(11, 15, 25, 0.68);
  backdrop-filter: blur(30px) saturate(200%) contrast(1.05);
  -webkit-backdrop-filter: blur(30px) saturate(200%) contrast(1.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-left-color: rgba(255, 255, 255, 0.16);
  border-right-color: rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  box-shadow:
    0 24px 55px rgba(0, 0, 0, 0.46),
    0 10px 26px rgba(5, 192, 127, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -16px 28px rgba(255, 255, 255, 0.04),
    inset 14px 0 24px rgba(255, 255, 255, 0.03);
  padding: 0 12px;
  isolation: isolate;
  backface-visibility: hidden;
  will-change: transform;
}

.mobile-nav::before,
.mobile-nav::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.mobile-nav::before {
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(circle at 86% 82%, rgba(255, 255, 255, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06) 34%, rgba(255, 255, 255, 0.01) 72%);
  opacity: 0.82;
  filter: blur(0.4px);
}

.mobile-nav::after {
  left: 18px;
  right: 18px;
  top: 6px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 8%, rgba(255, 255, 255, 0.32) 34%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.18) 100%);
  filter: blur(9px);
  opacity: 0.28;
}

.mobile-nav > * {
  position: relative;
  z-index: 2;
}

body.light-mode .mobile-nav,
body.theme-premium .mobile-nav,
body.theme-premium-pink .mobile-nav {
  background:
    radial-gradient(circle at 14% -10%, rgba(255, 255, 255, 0.96), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.09), transparent 24%),
    radial-gradient(circle at 50% 140%, rgba(5, 192, 127, 0.11), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46) 38%, rgba(255, 255, 255, 0.24) 100%),
    rgba(241, 245, 249, 0.68);
  border-color: rgba(255, 255, 255, 0.66);
  box-shadow:
    0 20px 44px rgba(15, 23, 42, 0.14),
    0 8px 20px rgba(5, 192, 127, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -12px 22px rgba(148, 163, 184, 0.14);
}

body.light-mode .mobile-nav::before,
body.theme-premium .mobile-nav::before,
body.theme-premium-pink .mobile-nav::before {
  opacity: 0.68;
}

body.light-mode .mobile-nav::after,
body.theme-premium .mobile-nav::after,
body.theme-premium-pink .mobile-nav::after {
  opacity: 0.44;
}

.mobile-nav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  background: none;
  border: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.mobile-nav-item > * {
  position: relative;
  z-index: 1;
}

.mobile-nav-item::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: scale(0.88) translateY(6px);
  transition: opacity 0.3s ease, transform 0.32s ease, border-color 0.32s ease, box-shadow 0.32s ease;
}

.mobile-nav-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%) scaleX(0.2);
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(5, 192, 127, 0), var(--accent-green), rgba(5, 192, 127, 0));
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  z-index: 2;
}

.mobile-nav-item svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.mobile-nav-item span {
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-item.active {
  color: var(--accent-green);
}

.mobile-nav-item.active:not(.mobile-nav-fab) {
  transform: translateY(-1px);
}

.mobile-nav-item.active:not(.mobile-nav-fab)::before {
  opacity: 1;
  transform: scale(1) translateY(0);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.mobile-nav-item.active svg {
  transform: translateY(-4px) scale(1.05);
  filter: drop-shadow(0 4px 10px rgba(5, 192, 127, 0.25));
}

.mobile-nav-item.active span {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.mobile-nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

/* ── Mobile Nav Center FAB ── */
body.light-mode .mobile-nav-item.active:not(.mobile-nav-fab)::before,
body.theme-premium .mobile-nav-item.active:not(.mobile-nav-fab)::before,
body.theme-premium-pink .mobile-nav-item.active:not(.mobile-nav-fab)::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.34));
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(148, 163, 184, 0.18);
}

.mobile-nav-fab-container {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 60px;
  position: relative;
  z-index: 2;
  margin-top: -30px;
  /* Lift it out of the bar */
}

.mobile-nav-fab-container::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 84px;
  height: 26px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03) 60%, rgba(255, 255, 255, 0) 100%);
  filter: blur(10px);
  opacity: 0.7;
  pointer-events: none;
}

.mobile-nav-item.mobile-nav-fab {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.03) 30%),
    linear-gradient(145deg, #1ae19a 0%, #05c07f 52%, #048c61 100%);
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 18px 34px rgba(5, 192, 127, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  position: absolute;
  top: 0;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  overflow: visible;
  isolation: isolate;
}

body.light-mode .mobile-nav-item.mobile-nav-fab {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04) 30%),
    linear-gradient(145deg, #1ae19a 0%, #05c07f 52%, #048c61 100%);
}

.mobile-nav-item.mobile-nav-fab::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(5, 192, 127, 0.28) 0%, rgba(5, 192, 127, 0.14) 42%, rgba(5, 192, 127, 0) 72%);
  filter: blur(12px);
  z-index: -1;
}

.mobile-nav-item.mobile-nav-fab:active {
  transform: scale(0.95);
}

.mobile-nav-item.mobile-nav-fab.active {
  color: #fff;
}

.mobile-nav-item.mobile-nav-fab::after {
  display: none;
}

.mobile-nav-item.mobile-nav-fab svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
}

.mobile-nav-item.mobile-nav-fab.active svg {
  transform: translateY(0);
}

/* ── Mobile Top Header ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav::before,
  .mobile-nav::after {
    animation: none;
  }
}

.mobile-top-bar {
  display: none;
}

/* ── Mobile Overrides ─────────────────────────────────── */
@media (max-width: 768px) {
  html,
  body {
    overscroll-behavior-y: none;
  }

  .mobile-top-bar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(60px + env(safe-area-inset-top, 0px));
    background: var(--app-chrome-bg);
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) 12px 0;
    box-shadow: none;
    border: none;
    isolation: isolate;
  }

  .mobile-top-bar::before {
    content: "";
    position: absolute;
    inset: -2px 0 0 0;
    background: var(--app-chrome-bg);
    z-index: -1;
  }

  .mobile-top-bar .sidebar-logo {
    margin-bottom: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .mobile-top-bar .user-actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    gap: 8px !important;
  }

  body.dashboard-mobile-hero-active .mobile-top-bar #btn-user-profile-mobile {
    display: none !important;
  }

  body.dashboard-mobile-hero-active .mobile-top-bar .user-actions {
    gap: 0 !important;
  }

  .mobile-top-bar #btn-user-profile-mobile {
    width: 34px !important;
    height: 34px !important;
    margin: 0;
  }

  .mobile-top-bar .logo-text {
    font-size: 18px;
  }

  .mobile-top-bar .logo-mark-sidebar {
    width: 32px;
    height: 44px;
    transform: none !important;
    animation: none !important;
  }

  #theme-selector-container.theme-options {
    display: grid;
    grid-template-columns: repeat(5, 38px);
    grid-template-rows: repeat(2, 38px);
    justify-content: center;
    gap: 10px;
    overflow: visible;
    padding: 4px 0 10px;
  }

  #theme-selector-container.theme-options .theme-circle {
    width: 38px;
    height: 38px;
    outline-offset: 2px;
  }

  /* Layout adjustments */
  body {
    overscroll-behavior-y: none;
    /* iOS overscroll prevention */
  }

  .sidebar {
    display: none;
    /* Hide desktop sidebar */
  }

  .sidebar-toggle-floating {
    display: none !important;
  }

  .setup-container {
    margin-top: 20px;
  }

  .main-content {
    flex: 1;
    min-width: 0;
    width: 100vw;
    padding: 16px;
    padding-top: calc(76px + env(safe-area-inset-top, 0px));
    /* Increased space for the top bar */
    height: 100vh;
    padding-bottom: calc(var(--mobile-nav-clearance) + 28px + env(safe-area-inset-bottom, 0px));
    /* Space for floating nav pill */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Momentum scrolling */
    scrollbar-width: none;
    /* Firefox */
    will-change: scroll-position;
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: layout style;
  }

  #view-dashboard .dashboard-header {
    margin-top: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
  }

  #view-dashboard .dashboard-mobile-hero {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px 16px;
    border-radius: 28px;
    background:
      radial-gradient(circle at 14% 18%, rgba(5, 192, 127, 0.14), rgba(5, 192, 127, 0) 28%),
      radial-gradient(circle at 86% 14%, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0) 26%),
      linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
      var(--bg-card);
    border: 1px solid var(--border);
    box-shadow:
      0 18px 36px rgba(15, 23, 42, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
  }

  #view-dashboard .dashboard-mobile-hero::before,
  #view-dashboard .dashboard-mobile-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
  }

  #view-dashboard .dashboard-mobile-hero::before {
    width: 170px;
    height: 170px;
    left: -62px;
    bottom: -88px;
    background: radial-gradient(circle, rgba(5, 192, 127, 0.16), rgba(5, 192, 127, 0) 68%);
  }

  #view-dashboard .dashboard-mobile-hero::after {
    width: 180px;
    height: 180px;
    right: -76px;
    top: -110px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 70%);
  }

  #view-dashboard .dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  #view-dashboard .dashboard-hero-kicker {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
  }

  #view-dashboard .dashboard-greeting-title {
    font-size: clamp(24px, 6.5vw, 31px);
    color: var(--text-primary);
  }

  #view-dashboard .dashboard-greeting-title::before {
    content: none;
  }

  #view-dashboard .dashboard-hero-quote {
    display: none;
  }

  #view-dashboard .dashboard-hero-avatar {
    display: flex !important;
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, rgba(5, 192, 127, 0.2), rgba(255, 255, 255, 0.08)) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(5, 192, 127, 0.28) !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12) !important;
  }

  #view-dashboard .dashboard-hero-bell {
    width: 64px;
    height: 64px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow:
      0 12px 24px rgba(15, 23, 42, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  #view-dashboard .dashboard-hero-bell svg {
    width: 28px;
    height: 28px;
  }

  #view-dashboard #notif-badge-main {
    top: 8px;
    right: 8px;
    border-color: var(--bg-card);
    transform: translate(28%, -28%);
  }

  #view-dashboard .countdown-widget {
    grid-column: 1 / 2;
    width: 100%;
    margin-left: 0;
    min-width: 0;
    height: 100%;
    border-radius: 24px;
    padding: 14px 14px;
  }

  #view-dashboard .flame-widget {
    grid-column: 2 / 3;
    width: 100%;
    min-width: 0;
    height: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 22px;
    padding: 10px 8px;
    flex-direction: column;
    text-align: center;
  }

  #view-dashboard .flame-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }

  #view-dashboard .flame-info {
    align-items: center;
  }

  #view-dashboard .flame-lbl {
    display: none;
  }

  #view-dashboard .flame-val {
    font-size: 13px;
    line-height: 1.1;
  }

  .main-content::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar completely */
  }

  .panel,
  .setup-panel-main {
    padding: 20px;
    border-radius: 20px;
  }

  .mobile-nav {
    display: flex;
    /* Show bottom bar */
  }

  /* Grid adjustments */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
  }

  #view-dashboard .stats-grid>.stat-card:first-child {
    order: 1;
  }

  #view-dashboard #card-rango {
    order: 3;
    grid-column: 1 / -1;
    min-height: 132px;
  }

  #view-dashboard .stats-grid .stat-card.coin-stat-card {
    order: 2;
  }

  #view-dashboard .stats-grid .stat-card.action-card {
    order: 4;
    grid-column: 1 / -1;
  }

  .comunidad-grid {
    grid-template-columns: 1fr !important;
  }

  .comunidad-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px;
  }

  .comunidad-header .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .panel-header--ranking {
    flex-direction: column;
    align-items: flex-start;
  }

  .ranking-filter {
    width: 100%;
    justify-content: space-between;
  }

  .ranking-filter-btn {
    flex: 1;
    text-align: center;
  }

  .specs-grid,
  .calc-grid,
  .temario-grid,
  .dashboard-bottom,
  .charts-grid,
  .presets-grid,
  .mode-toggle-grid,
  .difficulty-grid,
  .time-toggle-grid,
  .spec-selection-grid {
    grid-template-columns: 1fr !important;
  }

  /* Make stat cards inside smaller on mobile */
  .stats-grid .stat-card {
    padding: 16px;
    min-height: 132px;
    justify-content: space-between;
  }

  .stats-grid .performance-stat-card .stat-card-topline,
  .stats-grid .coin-stat-head {
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  .stats-grid .performance-stat-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .stats-grid .performance-session-pill {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .stats-grid .performance-session-pill span {
    font-size: 20px;
  }

  .stats-grid .performance-session-pill small {
    margin-top: 0;
  }

  .stats-grid .coin-icon {
    width: 30px;
    height: 30px;
  }

  .stats-grid .coin-stat-head {
    margin-bottom: 12px;
  }

  .stats-grid .coin-stat-note {
    display: block;
    font-size: 10px;
    line-height: 1.25;
  }

  .stats-grid .stat-icon {
    width: 24px;
    height: 24px;
    font-size: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
  }

  .stats-grid .stat-label {
    font-size: 9px;
    margin-bottom: 4px;
  }

  .stats-grid .stat-value {
    font-size: 24px;
  }

  .stats-grid .stat-value-sub {
    font-size: 14px;
  }

  .action-card .stat-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 12px !important;
    margin-bottom: 0;
  }

  .action-card {
    padding: 16px !important;
  }

  #view-dashboard .stats-grid .action-card > div:first-child {
    margin-bottom: 10px !important;
  }

  #view-dashboard .stats-grid .action-card .action-btn {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 11px !important;
  }

  #view-dashboard .stats-grid .action-card .action-btn-icon {
    display: none;
  }

  /* Header scaling */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
  }

  #view-refuerzos .dashboard-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #view-refuerzos .dashboard-header .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  #view-refuerzos .refuerzos-grid {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column;
  }

  #view-refuerzos .refuerzos-right {
    order: 1;
  }

  #view-refuerzos .refuerzos-left {
    order: 2;
  }

  #view-refuerzos .refuerzos-sticky {
    position: static !important;
    top: auto !important;
  }

  .flame-widget {
    align-self: flex-start;
    width: 100%;
    justify-content: center;
  }

  .header-title {
    font-size: 24px;
  }

  .countdown-widget {
    width: 100%;
    margin-left: 0;
  }

  .countdown-timer .cd-item span {
    font-size: 20px;
  }

  /* Setup/Exam section */
  .setup-section {
    padding: 0;
  }

  .setup-panel-main {
    padding: 24px;
    gap: 24px;
  }

  .setup-actions-row {
    flex-direction: column;
  }

  .search-box-container input {
    font-size: 13px;
    padding: 14px 14px 14px 40px;
  }

  .temario-search-input {
    font-size: 13px;
    padding: 14px 14px 14px 42px;
  }

  .temario-search-top,
  .temario-results-head,
  .temario-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .temario-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .temario-stat {
    min-height: 94px;
  }

  .temario-card {
    min-height: 0;
  }

  .control-group {
    width: 100%;
  }

  .setup-footer-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .setup-footer-controls>div {
    display: flex;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    padding: 14px 20px;
    justify-content: center;
  }

  /* Exam interface */
  .exam-layout {
    flex-direction: column;
  }

  .exam-navigator {
    width: 100%;
    order: 2;
    /* Put navigator below the question on mobile */
  }

  .exam-content-area {
    order: 1;
  }

  .exam-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .exam-header-bar>div:last-child {
    display: flex;
    justify-content: stretch;
    width: 100%;
  }

  .exam-header-bar .btn-secondary,
  .exam-header-bar .btn-danger {
    flex: 1;
  }

  .exam-timer {
    text-align: center;
  }

  .exam-header {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 15px;
  }

  .exam-head.test-stats {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .fail-actions {
    flex-direction: column;
  }

  .btn-fail-action {
    width: 100%;
  }

  .exam-meta {
    width: 100%;
    justify-content: space-between;
  }

  .question-number {
    font-size: 18px;
  }

  /* Active Exam Banner Mobile */
  #active-exam-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px !important;
    gap: 16px !important;
  }

  #active-exam-banner>div:last-child {
    width: 100%;
    margin-top: 5px;
  }

  #active-exam-banner button {
    flex: 1;
  }

  .question-body {
    padding: 20px 15px;
  }

  .question-text {
    font-size: 18px;
  }

  .option-btn {
    padding: 16px;
  }

  /* Modals */
  .modal-content {
    width: 90%;
    padding: 20px;
  }

  /* Refuerzo para Calculadora en Móvil */
  .calc-result-card {
    padding: 24px !important;
    border-radius: 16px !important;
    margin-top: 10px;
  }

  .calc-score-val {
    font-size: 32px !important;
  }

  .calculator-table th,
  .calculator-table td {
    padding: 10px 8px !important;
    font-size: 11px !important;
    white-space: nowrap;
  }
}

/* Very small screens */
@media (max-width: 400px) {
  #view-dashboard .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }

  #view-dashboard .stats-grid .stat-card {
    min-height: 124px;
    padding: 14px;
  }

  #view-dashboard .stats-grid .stat-value {
    font-size: 22px;
  }

  #view-dashboard .stats-grid .stat-value-sub {
    font-size: 13px;
  }

  #view-dashboard .stats-grid .stat-label {
    font-size: 8px;
  }

  #view-dashboard .dashboard-header {
    grid-template-columns: minmax(0, 2.7fr) minmax(0, 1fr);
    gap: 10px;
  }

  #view-dashboard .dashboard-mobile-hero {
    padding: 16px 14px;
    gap: 10px;
  }

  #view-dashboard .dashboard-hero-avatar {
    width: 64px !important;
    height: 64px !important;
    font-size: 26px !important;
  }

  #view-dashboard .dashboard-hero-bell {
    width: 58px;
    height: 58px;
  }

  #view-dashboard .dashboard-hero-bell svg {
    width: 24px;
    height: 24px;
  }

  #view-dashboard .dashboard-greeting-title {
    font-size: 24px;
  }

  #view-dashboard .dashboard-hero-kicker {
    font-size: 14px;
  }

  #view-dashboard .countdown-widget {
    padding: 12px 10px;
    border-radius: 20px;
  }

  #view-dashboard .flame-widget {
    padding: 8px 6px;
    border-radius: 18px;
  }

  #view-dashboard .flame-val {
    font-size: 12px;
  }

  .mobile-nav-item {
    font-size: 9px;
    padding: 6px 8px;
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }
}

/* ── Toast Notifications ───────────────────────────────── */
#notification-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10001;
  /* Must be above auth overlay (10000) */
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notif-modal-content {
  width: 90%;
  max-width: 400px;
}

.notif-list-scroll {
  max-height: 400px;
}

#community-broadcast-message {
  min-height: 160px;
  resize: vertical;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-blue);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  min-width: 250px;
  max-width: 350px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.toast-error {
  border-left-color: var(--accent-red);
}

.toast.toast-success {
  border-left-color: var(--accent-green);
}

.toast.toast-warning {
  border-left-color: var(--accent-orange);
}

@media (min-width: 992px) {
  .notif-modal-content {
    width: min(92vw, 640px) !important;
    max-width: 640px !important;
    padding: 30px !important;
  }

  .notif-list-scroll {
    max-height: min(68vh, 620px) !important;
    padding-right: 10px !important;
  }
}

.toast.hiding {
  animation: fadeOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Auth Screen ───────────────────────────────────────── */
body.exam-loading-active {
  overflow: hidden;
}

.exam-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.exam-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.exam-loading-card {
  width: min(92vw, 460px);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 15, 28, 0.94));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exam-loading-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.exam-loading-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.1;
  font-weight: 800;
  color: var(--text-primary);
}

.exam-loading-detail {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.exam-loading-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

.exam-loading-fill {
  position: relative;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: width;
  overflow: hidden;
}

.exam-loading-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 44%, rgba(255, 255, 255, 0.58) 50%, rgba(255, 255, 255, 0.2) 56%, transparent 100%);
  transform: translateX(-100%);
  animation: examLoadingSweep 1.35s linear infinite;
}

.exam-loading-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.exam-loading-percent {
  color: var(--accent-green);
  font-family: "JetBrains Mono", monospace;
}

@keyframes examLoadingSweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@media (max-width: 640px) {
  .exam-loading-overlay {
    padding: 18px;
  }

  .exam-loading-card {
    padding: 20px 18px;
  }

  .exam-loading-title {
    font-size: 22px;
  }
}

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px 14px;
  z-index: 10000;
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(16px, 2.2vw, 24px) clamp(14px, 2.4vw, 20px);
  width: min(92vw, 380px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: floatElement 6s ease-in-out infinite alternate;
  box-sizing: border-box;
}

.auth-container.auth-register-mode {
  width: min(94vw, 680px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px 20px;
}

.auth-container.auth-register-mode .auth-logo {
  margin-bottom: 8px;
  transform: scale(0.88);
}

.auth-container.auth-register-mode .auth-title {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.auth-container.auth-register-mode .auth-subtitle {
  margin-bottom: 12px;
  max-width: 52ch;
}

.auth-container.auth-register-mode .auth-provider-btn {
  order: 4;
  margin-top: 2px;
}

.auth-container.auth-register-mode .auth-divider {
  order: 5;
}

.auth-container.auth-register-mode .auth-form {
  order: 6;
}

.auth-container.auth-google-profile-mode #group-auth-email,
.auth-container.auth-google-profile-mode #group-auth-password {
  display: none !important;
}

.auth-logo {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.auth-title {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.15;
}

.auth-subtitle {
  font-size: clamp(0.8rem, 1.25vw, 0.88rem);
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 36ch;
  line-height: 1.45;
}

.auth-form {
  width: 100%;
  text-align: left;
}

.auth-form.auth-form-register {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.auth-form.auth-form-register > .input-group {
  margin-top: 0 !important;
  min-width: 0;
}

.auth-form.auth-form-register #group-auth-specialty {
  grid-column: 1 / -1;
}

.auth-form.auth-form-register .auth-submit {
  grid-column: 1 / -1;
  margin-top: 4px !important;
}

.auth-form .input-group label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.auth-submit {
  padding: 11px 12px;
  font-size: 14px;
}

.auth-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 14px 0;
  color: var(--text-muted);
  font-size: 14px;
}

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

.auth-divider span {
  padding: 0 10px;
}

.auth-provider-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}

.auth-provider-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.auth-footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .auth-overlay {
    padding: 14px 10px;
    align-items: flex-start;
  }

  .auth-container {
    margin-top: 6px;
    border-radius: 16px;
    padding: 16px 14px;
    width: min(96vw, 350px);
  }

  .auth-container.auth-register-mode {
    width: min(96vw, 390px);
    max-height: calc(100dvh - 28px);
    padding: 14px 12px;
  }

  .auth-container.auth-register-mode .auth-logo {
    display: none;
  }

  .auth-form.auth-form-register {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .auth-form.auth-form-register #group-auth-specialty {
    grid-column: auto;
  }

  .auth-subtitle {
    margin-bottom: 12px;
  }

  .auth-divider {
    margin: 12px 0;
  }

  .auth-footer {
    margin-top: 12px;
    font-size: 12px;
  }
}

/* ── Community Leaderboard ──────────────────────────────── */
.leaderboard-list {
  display: flex;
  flex-direction: column;
}

.panel-header--ranking {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ranking-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.ranking-filter-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ranking-filter-btn:hover {
  color: var(--text-primary);
}

.ranking-filter-btn.active {
  background: linear-gradient(135deg, rgba(5, 192, 127, 0.95), rgba(59, 130, 246, 0.95));
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 192, 127, 0.18);
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.lb-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.lb-current-user {
  background: rgba(5, 192, 127, 0.1) !important;
  border-bottom: 1px solid rgba(5, 192, 127, 0.2);
}

.lb-rank {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 40px;
}

.lb-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  /* Force minimum width to prevent deformation */
  flex-shrink: 0;
  /* Prevent squeezing in flex containers */
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-score {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.lb-flame {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-orange);
  background: rgba(243, 122, 32, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.lb-badge {
  background: var(--accent-green);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.community-name-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  vertical-align: middle;
}

.community-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-premium-badge {
  width: 18px;
  height: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  font-size: 11px;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
}

.community-score-inline {
  color: var(--text-muted);
  white-space: nowrap;
}

@media (max-width: 768px) {
  body.tablet-layout .mobile-top-bar,
  body.tablet-layout .mobile-nav,
  body.tablet-layout .mobile-only,
  body.tablet-layout .mobile-only-mas {
    display: none !important;
  }

  body.tablet-layout .sidebar {
    display: flex !important;
  }

  body.tablet-layout .sidebar-toggle-floating {
    display: flex !important;
  }

  body.tablet-layout .main-content {
    width: auto;
    padding: 20px 18px 24px;
    padding-top: 20px;
    padding-bottom: 24px;
    height: 100vh;
  }
}

/* Typography + Study Plus */
body {
  --font-ui: "Plus Jakarta Sans", sans-serif;
  --font-display: "Sora", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", monospace;
}

body.font-clinical {
  --font-ui: "Plus Jakarta Sans", sans-serif;
  --font-display: "Sora", sans-serif;
}

body.font-sora {
  --font-ui: "Sora", sans-serif;
  --font-display: "Sora", sans-serif;
}

body.font-inter {
  --font-ui: "Inter", sans-serif;
  --font-display: "Inter", sans-serif;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.panel-title,
.header-title,
.dashboard-greeting-title,
.profile-hero-title,
.today-title,
.dashboard-section-title,
.notebook-editor-title {
  font-family: var(--font-display) !important;
  letter-spacing: -0.02em;
}

.stat-value,
.stat-progress-val,
.score-pct,
.s-val,
.cd-item span,
.pomo-time-mini,
#timer-text,
#stats-global-precision,
#stats-total-questions,
.profile-stat-value,
.temario-stat-value,
.flame-val,
.today-task-index,
.coverage-meter-value,
.calendar-cell-label,
.history-summary-stat-value {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
}



.theme-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 14px;
}

.study-plus-shell {
  display: grid;
  gap: 20px;
}

.study-plus-intro {
  padding: 22px 24px;
}

.today-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 20px;
}

.today-side-stack {
  display: grid;
  gap: 20px;
}

.today-main-card,
.today-focus-card,
.today-coverage-card,
.dashboard-review-card,
.dashboard-notebook-card,
.dashboard-calendar-card,
.results-postmortem,
.history-study-summary,
.notebook-editor-panel {
  border-radius: 20px;
}

.today-main-head,
.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.today-eyebrow,
.dashboard-section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.today-title {
  margin: 0;
  font-size: 2rem;
}

.today-subtitle,
.dashboard-coverage-summary,
.dashboard-calendar-summary,
.results-next-action,
.notebook-editor-meta,
.history-study-summary-copy {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.today-chip-row,
.review-tray-counts,
.history-list-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.today-chip,
.review-pill,
.review-item-tag,
.notebook-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.16);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.today-chip {
  padding: 8px 12px;
}

.today-chip--muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.review-pill--late {
  background: rgba(243, 122, 32, 0.12);
  border-color: rgba(243, 122, 32, 0.2);
}

.review-pill--done {
  background: rgba(5, 192, 127, 0.1);
  border-color: rgba(5, 192, 127, 0.18);
}

.today-plan-list,
.dashboard-review-queue,
.dashboard-notebook-preview,
.results-postmortem-list,
.notebook-list {
  display: grid;
  gap: 12px;
}

.today-empty {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

.today-plan-task,
.review-queue-item,
.dashboard-notebook-item,
.results-postmortem-item,
.notebook-list-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.02);
}

.today-plan-task {
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: flex-start;
}

.today-task-index {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 192, 127, 0.12);
  color: var(--accent-green);
  font-weight: 800;
}

.today-task-title,
.dashboard-section-title,
.notebook-editor-title,
.review-item-title,
.dashboard-notebook-title,
.notebook-list-title {
  margin: 0;
  color: var(--text-primary);
}

.today-task-detail,
.review-item-meta,
.dashboard-notebook-meta,
.results-postmortem-item,
.notebook-list-meta {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.today-task-actions,
.today-main-actions,
.notebook-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.today-main-actions {
  margin-top: 18px;
}

.today-next-action {
  min-height: 112px;
}

.dashboard-coverage-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.coverage-meter {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr auto;
  gap: 12px;
  align-items: center;
}

.coverage-meter-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.coverage-meter-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.coverage-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(5, 192, 127, 0.5), var(--accent-green));
}

.coverage-meter-fill.is-risk {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.55), var(--accent-red));
}

.coverage-meter-value {
  font-size: 12px;
  color: var(--text-primary);
}

.dashboard-study-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.9fr);
  gap: 20px;
}

.review-item-top,
.dashboard-notebook-top,
.notebook-list-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-calendar-heatmap,
.history-study-summary-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  position: relative;
  overflow: hidden;
}

.calendar-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--heat, 0.08);
  background: linear-gradient(180deg, rgba(5, 192, 127, 0.16), rgba(5, 192, 127, 0.78));
}

.calendar-cell--placeholder {
  background: transparent;
  border-style: dashed;
  opacity: 0.35;
}

.calendar-cell--placeholder::before {
  display: none;
}

.calendar-cell-label {
  position: relative;
  z-index: 1;
  font-size: 10px;
  color: var(--text-muted);
}

.results-postmortem {
  padding: 24px;
}

.results-postmortem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.results-postmortem-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.results-postmortem-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.notebook-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.notebook-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  gap: 18px;
  align-items: start;
}

.notebook-list {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
}

.notebook-list-item.is-active {
  border-color: rgba(5, 192, 127, 0.28);
  background: rgba(5, 192, 127, 0.06);
}

.notebook-editor-panel {
  position: sticky;
  top: 90px;
}

.notebook-editor-meta {
  margin-bottom: 16px;
}

.history-study-summary {
  margin: 20px 0 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.history-study-summary-layout {
  display: grid;
  gap: 18px;
}

.history-study-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.history-study-summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: min(100%, 360px);
}

.history-summary-stat {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 4px;
}

.history-summary-stat-label,
.history-summary-stat-note,
.history-study-summary-weekdays span,
.history-study-summary-legend {
  font-size: 11px;
  color: var(--text-muted);
}

.history-summary-stat-value {
  font-size: 24px;
  color: var(--text-primary);
}

.history-study-summary-calendar {
  display: grid;
  gap: 8px;
}

.history-study-summary-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.history-study-summary-weekdays span {
  text-align: center;
  font-weight: 700;
}

.history-study-summary-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.history-study-summary-legend-scale {
  display: inline-grid;
  grid-template-columns: repeat(4, 12px);
  gap: 6px;
}

.history-study-summary-legend-scale i {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(5, 192, 127, 0.18);
  display: inline-block;
}

.history-study-summary-legend-scale i:nth-child(2) {
  background: rgba(5, 192, 127, 0.32);
}

.history-study-summary-legend-scale i:nth-child(3) {
  background: rgba(5, 192, 127, 0.5);
}

.history-study-summary-legend-scale i:nth-child(4) {
  background: rgba(5, 192, 127, 0.7);
}

@media (max-width: 1100px) {
  .today-shell,
  .dashboard-study-grid,
  .results-postmortem-grid,
  .notebook-layout {
    grid-template-columns: 1fr;
  }

  .history-study-summary-head {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .study-plus-shell {
    gap: 16px;
  }

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

  .today-shell,
  .dashboard-study-grid {
    gap: 16px;
  }

  .today-main-head,
  .dashboard-section-head,
  .history-study-summary-head {
    flex-direction: column;
    align-items: stretch;
  }

  .today-plan-task {
    grid-template-columns: 1fr;
  }

  .today-task-actions,
  .today-main-actions,
  .notebook-toolbar {
    flex-direction: column;
  }

  .history-study-summary-stats {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (max-width: 1100px) {
  .flashcards-home-card,
  .flashcards-hero,
  .flashcards-layout {
    grid-template-columns: 1fr;
  }

  .flashcards-home-preview {
    display: none;
  }

  .flashcards-home-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .flashcards-home-card {
    margin: 0 0 20px;
    padding: 20px;
    border-radius: 24px;
  }

  .flashcards-home-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .flashcards-hero {
    padding: 22px;
  }

  .flashcards-hero-art {
    display: none;
  }

  .flashcards-stats-row {
    grid-template-columns: 1fr;
  }

  .flashcards-topic-list {
    grid-template-columns: 1fr;
  }

  .flashcard-study-media {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .flashcard-study-image {
    max-height: 180px;
  }

  .flashcards-stack-stage {
    min-height: 230px;
    padding: 16px;
  }

  .flashcards-empty-card,
  .flashcard-study-card {
    padding: 20px;
    border-radius: 22px;
  }

  .flashcard-modal-content {
    width: min(96vw, 96vw);
    padding: 20px;
  }

  #flashcard-image-modal {
    padding: 10px 0 18px;
  }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════ */

/* Promote panels into their own compositing layer to prevent
   full-page repaints during scroll. contain: content tells the
   browser child layout/paint can't affect siblings. */
.panel,
.chart-card,
.stat-card,
.preset-card,
.list-item {
  contain: content;
}

/* On mobile, backdrop-filter on every .panel is the #1 GPU killer.
   Each blurred element forces a separate offscreen render pass on
   every scroll frame. Remove it on small screens. */
@media (max-width: 768px) {
  .panel,
  .stat-card,
  .sidebar-capsule,
  .chart-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Disable infinite float/pulse animations that run while scrolling */
  .logo-svg,
  .logo-mark {
    animation: none !important;
  }

  /* Simplify panel ::before pseudo (gradient border-top highlight) */
  .panel::before {
    display: none;
  }
}

/* Users who prefer reduced motion — also benefits low-end devices */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE STYLES — Premium Redesign
   ═══════════════════════════════════════════════════════════ */

/* ── Base Container ── */
.landing-page {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #060a13;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 1; visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  color: #e2e8f0;
  scroll-behavior: smooth;
}
.landing-page.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.landing-page *,
.landing-page *::before,
.landing-page *::after { box-sizing: border-box; }

/* ── Animated Background ── */
.landing-bg-effects {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  overflow: hidden;
}
.landing-logo-watermark {
  position: absolute;
  width: clamp(580px, 74vw, 1040px);
  aspect-ratio: 1 / 1.35;
  top: clamp(42px, 9vh, 120px);
  right: clamp(-260px, -12vw, -70px);
  background-image: url("logo-e-mask.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: var(--landing-logo-opacity, 0.24);
  mix-blend-mode: screen;
  transform:
    translate3d(var(--landing-logo-x, 0px), var(--landing-logo-y, 0px), 0)
    rotate(var(--landing-logo-rotate, -7deg))
    scale(var(--landing-logo-scale, 1));
  transform-origin: 52% 42%;
  filter:
    saturate(1.35)
    brightness(1.65)
    drop-shadow(0 0 80px rgba(5, 192, 127, 0.22));
  will-change: transform, opacity;
}
.landing-orb {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.35;
}
.landing-orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #05c07f 0%, transparent 70%);
  top: -10%; left: -5%;
  animation: orbFloat1 18s ease-in-out infinite;
}
.landing-orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  top: 40%; right: -10%;
  animation: orbFloat2 22s ease-in-out infinite;
}
.landing-orb--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -5%; left: 30%;
  animation: orbFloat3 20s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, 60px) scale(1.1); }
  66% { transform: translate(-40px, 30px) scale(0.95); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-60px, -40px) scale(1.08); }
  66% { transform: translate(30px, 50px) scale(0.92); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -30px) scale(1.12); }
}
.landing-grid-overlay {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Sticky Nav ── */
.landing-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 10, 19, 0.75);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.landing-nav {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
}
.landing-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.landing-logo-img {
  width: 27px; height: 38px;
  transform: translateY(0);
}
.landing-logo-text {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 1.3rem; font-weight: 700;
  color: #fff;
}
.landing-logo-accent { color: #05c07f; }
.landing-nav-links {
  display: flex; gap: 32px;
}
.landing-nav-link {
  color: #94a3b8; text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.landing-nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: #05c07f; border-radius: 2px;
  transition: width 0.3s ease;
}
.landing-nav-link:hover { color: #fff; }
.landing-nav-link:hover::after { width: 100%; }
.landing-nav-actions {
  display: flex; gap: 12px; align-items: center;
}

/* ── Buttons ── */
.landing-btn-ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.12);
  color: #e2e8f0; padding: 8px 20px;
  border-radius: 10px; font-size: 0.9rem;
  font-weight: 600; cursor: pointer;
  transition: all 0.25s ease;
}
.landing-btn-ghost:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}
.landing-btn-cta {
  background: linear-gradient(135deg, #05c07f 0%, #049f6a 100%);
  color: #fff; border: none; padding: 10px 24px;
  border-radius: 12px; font-size: 0.9rem;
  font-weight: 700; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(5, 192, 127, 0.25);
  display: inline-flex; align-items: center; gap: 8px;
}
.landing-btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(5, 192, 127, 0.4);
  filter: brightness(1.08);
}
.landing-btn-cta--lg {
  padding: 16px 36px; font-size: 1.05rem;
  border-radius: 14px;
}
.landing-btn-outline {
  display: inline-flex; align-items: center; gap: 6px;
  color: #94a3b8; text-decoration: none;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 14px 28px; border-radius: 14px;
  font-size: 1rem; font-weight: 600;
  transition: all 0.25s ease;
}
.landing-btn-outline:hover {
  color: #fff; border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
}

/* ── Hamburger ── */
.landing-hamburger {
  display: none; flex-direction: column;
  gap: 5px; background: none; border: none;
  cursor: pointer; padding: 6px;
}
.landing-hamburger span {
  display: block; width: 22px; height: 2px;
  background: #e2e8f0; border-radius: 2px;
  transition: 0.3s;
}
.landing-mobile-menu {
  display: none; flex-direction: column;
  gap: 4px; padding: 16px 24px 20px;
  background: rgba(6, 10, 19, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky; top: 60px; z-index: 99;
}
.landing-mobile-menu.open { display: flex; }
.landing-mobile-link {
  color: #94a3b8; text-decoration: none;
  padding: 12px 0; font-size: 1rem;
  font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color 0.2s;
}
.landing-mobile-link:hover { color: #fff; }

/* ── Main Container ── */
.landing-main {
  position: relative; z-index: 1;
  flex: 1; display: flex; flex-direction: column;
  align-items: center;
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 24px;
}

/* ── Hero ── */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
  padding: 80px 0 60px;
  width: 100%;
  animation: landingFadeIn 0.8s ease backwards;
}
@keyframes landingFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content { display: flex; flex-direction: column; gap: 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; width: fit-content;
  background: rgba(5, 192, 127, 0.1);
  border: 1px solid rgba(5, 192, 127, 0.25);
  border-radius: 100px; font-size: 0.85rem;
  font-weight: 600; color: #05c07f;
}
.hero-badge-dot {
  width: 8px; height: 8px;
  background: #05c07f; border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}
.landing-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 3.4rem; font-weight: 800;
  line-height: 1.15; color: #fff;
  background: none; -webkit-text-fill-color: unset;
}
.landing-title-gradient {
  background: linear-gradient(135deg, #05c07f 0%, #3b82f6 50%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.landing-subtitle {
  font-size: 1.15rem; color: #94a3b8;
  line-height: 1.7; max-width: 520px;
}
.landing-cta-group {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-top: 8px;
}
.hero-cta-note {
  margin: -10px 0 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}
.hero-trust {
  display: flex; align-items: center; gap: 14px;
  margin-top: 6px;
}
.hero-trust-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; color: #062e21; background: #48dca2;
  font-weight: 900;
}
.hero-trust-text {
  font-size: 0.85rem; color: #94a3b8;
}
.landing-platforms {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2px;
}
.landing-platforms-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.landing-platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.landing-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #dbeafe;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.landing-platform-chip svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  fill: currentColor;
}
.landing-platform-chip--windows { color: #71c7f2; }
.landing-platform-chip--apple { color: #f8fafc; }
.landing-platform-chip--android { color: #a4c639; }

/* ── Hero Mockup ── */
.hero-visual {
  display: flex; justify-content: center; align-items: center;
  animation: landingFadeIn 0.8s ease 0.2s backwards;
}
.hero-mockup {
  width: 100%; max-width: 460px;
  background: #0f1420;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.04);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s ease;
}
.hero-mockup:hover {
  transform: perspective(1000px) rotateY(0) rotateX(0);
}
.hero-mockup-bar {
  display: flex; gap: 6px; padding: 12px 16px;
  background: #0a0e17; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mockup-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.mockup-dot--r { background: #ef4444; }
.mockup-dot--y { background: #eab308; }
.mockup-dot--g { background: #22c55e; }
.hero-mockup-body { padding: 20px; }
.mockup-q-badge {
  display: inline-block; padding: 4px 10px;
  background: rgba(5,192,127,0.12); color: #05c07f;
  font-size: 0.75rem; font-weight: 600;
  border-radius: 6px; margin-bottom: 14px;
}
.mockup-q-text {
  font-size: 0.88rem; color: #cbd5e1;
  line-height: 1.5; margin-bottom: 16px;
}
.mockup-options { display: flex; flex-direction: column; gap: 8px; }
.mockup-option {
  padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.8rem; color: #94a3b8;
  transition: all 0.2s;
}
.mockup-option--selected {
  border-color: rgba(5,192,127,0.5);
  background: rgba(5,192,127,0.08);
  color: #05c07f;
}
.mockup-timer {
  text-align: right; margin-top: 14px;
  font-size: 0.82rem; color: #64748b;
  font-weight: 600; font-family: 'IBM Plex Mono', monospace;
}
.hero-showcase {
  position: relative;
  width: min(100%, 560px);
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.hero-showcase::before {
  content: "";
  position: absolute;
  inset: 44px 18px 12px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 22%, rgba(5, 192, 127, 0.25), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(59, 130, 246, 0.2), transparent 30%);
  filter: blur(18px);
  opacity: 0.8;
  z-index: -1;
}
.hero-device {
  margin: 0;
  overflow: hidden;
  background: rgba(8, 13, 26, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}
.hero-device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-device--desktop {
  width: min(100%, 520px);
  aspect-ratio: 1.92 / 1;
  border-radius: 18px;
  transform: perspective(1100px) rotateY(-6deg) rotateX(2deg) translateX(-8px);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}
.hero-device--desktop:hover {
  transform: perspective(1100px) rotateY(-2deg) rotateX(1deg) translateX(-4px) translateY(-4px);
  box-shadow:
    0 30px 86px rgba(0, 0, 0, 0.54),
    0 0 42px rgba(5, 192, 127, 0.12);
}
.hero-device-bar {
  display: flex;
  gap: 6px;
  padding: 11px 14px;
  background: rgba(6, 10, 19, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-device--desktop img {
  height: calc(100% - 33px);
  object-position: left top;
}
.hero-device--phone {
  position: absolute;
  right: -6px;
  bottom: 2px;
  width: min(38vw, 174px);
  aspect-ratio: 590 / 1280;
  border: 7px solid rgba(7, 10, 18, 0.95);
  border-radius: 28px;
  transform: rotate(3deg);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(45, 212, 191, 0.18);
}

/* ── Stats Counter ── */
.landing-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 40px; padding: 40px 0;
  width: 100%; margin: 20px 0 40px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  animation: landingFadeIn 0.8s ease 0.3s backwards;
}
.landing-stat-item { text-align: center; }
.landing-stat-number {
  display: block; font-family: 'Sora', sans-serif;
  font-size: 2rem; font-weight: 800; color: #fff;
}
.landing-stat-label {
  display: block; font-size: 0.85rem;
  color: #64748b; margin-top: 4px; font-weight: 500;
}
.landing-stat-divider {
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.08);
}

/* ── Sections ── */
.landing-section {
  width: 100%; padding: 80px 0;
}
.landing-section-header {
  text-align: center; margin-bottom: 60px;
}
.landing-section-badge {
  display: inline-block; padding: 5px 14px;
  background: rgba(5,192,127,0.1);
  border: 1px solid rgba(5,192,127,0.2);
  color: #05c07f; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 16px; letter-spacing: 0.02em;
}
.landing-section-title {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 2.4rem; font-weight: 800;
  color: #fff; margin-bottom: 16px;
  line-height: 1.2;
}
.landing-section-desc {
  font-size: 1.05rem; color: #94a3b8;
  max-width: 600px; margin: 0 auto;
  line-height: 1.6;
}

/* ── Features Grid ── */
.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.landing-page .feature-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px; padding: 32px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative; overflow: hidden;
  text-align: left;
}
.landing-page .feature-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(5,192,127,0.3), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.landing-page .feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.landing-page .feature-card:hover::before { opacity: 1; }
.feature-card--accent {
  border-color: rgba(5,192,127,0.2) !important;
  background: rgba(5,192,127,0.04) !important;
}
.feature-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(5,192,127,0.12);
  color: #05c07f; margin-bottom: 20px;
}
.feature-card-icon--blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.feature-card-icon--purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.feature-card-icon--orange { background: rgba(243,122,32,0.12); color: #f37a20; }
.feature-card-icon--red { background: rgba(239,68,68,0.12); color: #ef4444; }
.feature-card-icon--teal { background: rgba(6,182,212,0.12); color: #06b6d4; }
.landing-page .feature-title {
  font-size: 1.15rem; font-weight: 700;
  color: #fff; margin-bottom: 10px;
}
.landing-page .feature-desc {
  font-size: 0.9rem; color: #94a3b8;
  line-height: 1.6;
}
.feature-tag {
  display: inline-block; margin-top: 16px;
  padding: 4px 10px; background: rgba(5,192,127,0.15);
  color: #05c07f; border-radius: 6px;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.03em;
}

/* ── Steps (How It Works) ── */
.landing-steps {
  display: flex; flex-direction: column;
  align-items: center; gap: 0;
  max-width: 550px; margin: 0 auto;
}
.landing-step {
  display: flex; align-items: flex-start; gap: 24px;
  padding: 28px; width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  transition: all 0.3s ease;
}
.landing-step:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(5,192,127,0.2);
  transform: translateX(6px);
}
.landing-step-number {
  min-width: 44px; height: 44px;
  border-radius: 12px; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #05c07f, #049f6a);
  color: #fff; font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
}
.landing-step-content h3 {
  font-size: 1.1rem; font-weight: 700;
  color: #fff; margin-bottom: 6px;
}
.landing-step-content p {
  font-size: 0.9rem; color: #94a3b8; line-height: 1.6;
}
.landing-step-connector {
  width: 2px; height: 28px;
  background: rgba(5,192,127,0.2); margin: 0 auto;
  border-radius: 2px;
}

/* ── Specialties ── */
.landing-specialties-grid {
  display: flex; flex-wrap: wrap;
  gap: 14px; justify-content: center;
}
.specialty-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px; font-size: 0.95rem;
  font-weight: 600; color: #e2e8f0;
  transition: all 0.3s ease;
}
.specialty-pill:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-3px);
}
.specialty-pill-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}

/* ── FAQ Accordion ── */
.landing-faq-list {
  max-width: 700px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
}
.landing-faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; overflow: hidden;
  transition: border-color 0.3s;
}
.landing-faq-item[open] {
  border-color: rgba(5,192,127,0.2);
}
.landing-faq-item summary {
  padding: 20px 24px; font-size: 1rem;
  font-weight: 600; color: #fff;
  cursor: pointer; list-style: none;
  display: flex; align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}
.landing-faq-item summary::-webkit-details-marker { display: none; }
.landing-faq-item summary::after {
  content: '+'; font-size: 1.4rem;
  color: #64748b; font-weight: 300;
  transition: transform 0.3s;
}
.landing-faq-item[open] summary::after {
  content: '−'; transform: rotate(180deg);
  color: #05c07f;
}
.landing-faq-item summary:hover { color: #05c07f; }
.landing-faq-item p {
  padding: 0 24px 20px; margin: 0;
  font-size: 0.92rem; color: #94a3b8;
  line-height: 1.7;
}

/* ── Final CTA ── */
.landing-final-cta {
  position: relative; text-align: center;
  padding: 80px 40px; margin: 40px 0;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px; overflow: hidden;
  width: 100%;
}
.landing-final-cta-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(5,192,127,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.landing-final-logo {
  width: 52px; height: 72px;
  margin-bottom: 24px;
  transform: translateY(0);
  position: relative; z-index: 1;
}
.landing-final-cta h2 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: 2rem; font-weight: 800;
  color: #fff; margin-bottom: 14px;
  position: relative; z-index: 1;
}
.landing-final-cta p {
  font-size: 1.05rem; color: #94a3b8;
  max-width: 500px; margin: 0 auto 28px;
  line-height: 1.6; position: relative; z-index: 1;
}
.landing-final-cta .landing-btn-cta {
  position: relative; z-index: 1;
}

/* -- Interactive landing demo -- */
.landing-demo-section { padding-top: 70px; }
.landing-demo-section .landing-section-header { margin-bottom: 42px; }
.landing-demo-card {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid rgba(91, 222, 169, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(5, 192, 127, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(18, 27, 43, 0.96), rgba(7, 12, 23, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}
.landing-demo-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.landing-demo-specialty { padding: 6px 11px; border-radius: 999px; color: #6ee7b7; background: rgba(5, 192, 127, 0.12); font-size: 0.76rem; font-weight: 800; }
.landing-demo-progress { color: #64748b; font-size: 0.76rem; font-weight: 700; }
.landing-demo-case { margin: 0 0 18px; color: #cbd5e1; font-size: 1rem; line-height: 1.75; }
.landing-demo-question { margin: 0 0 20px; color: #fff; font-size: 1.14rem; line-height: 1.5; }
.landing-demo-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.landing-demo-option { padding: 15px 16px; border: 1px solid rgba(255,255,255,0.09); border-radius: 13px; color: #b9c6d8; background: rgba(255,255,255,0.035); font: inherit; font-size: 0.88rem; line-height: 1.4; text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.landing-demo-option:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(91, 222, 169, 0.42); background: rgba(5, 192, 127, 0.07); }
.landing-demo-option.is-correct { border-color: #42dc9b; color: #d8ffed; background: rgba(5, 192, 127, 0.14); }
.landing-demo-option.is-incorrect { border-color: rgba(248, 113, 113, 0.6); color: #fecaca; background: rgba(239, 68, 68, 0.1); }
.landing-demo-option:disabled { cursor: default; }
.landing-demo-feedback { margin-top: 20px; padding: 18px; border-left: 3px solid #42dc9b; border-radius: 4px 13px 13px 4px; background: rgba(5, 192, 127, 0.075); }
.landing-demo-feedback strong { display: block; margin-bottom: 7px; color: #76efbd; }
.landing-demo-feedback p { margin: 0 0 8px; color: #bdc9d8; font-size: .88rem; line-height: 1.6; }
.landing-demo-feedback span { color: #7f91a8; font-size: .78rem; }
.landing-demo-cta { display: none; margin: 22px auto 0; }
.landing-demo-card.is-answered .landing-demo-cta { display: inline-flex; }


/* -- Pricing -- */
.landing-pricing-section { padding-top: 96px; }
.landing-pricing-section .landing-section-header { margin-bottom: 52px; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
  width: 100%;
}
.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 610px;
  padding: 32px 28px 28px;
  background: linear-gradient(145deg, rgba(21, 29, 45, 0.9), rgba(8, 13, 25, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover { transform: translateY(-8px); border-color: rgba(255, 255, 255, 0.2); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34); }
.pricing-card--free { opacity: 0.78; background: linear-gradient(145deg, rgba(22, 29, 42, 0.72), rgba(9, 13, 23, 0.9)); }
.pricing-card--free:hover { opacity: 1; }
.pricing-card--premium {
  border-color: rgba(43, 220, 154, 0.62);
  background: linear-gradient(160deg, rgba(9, 75, 59, 0.92) 0%, rgba(8, 29, 36, 0.98) 48%, rgba(15, 22, 40, 0.98) 100%);
  box-shadow: 0 28px 70px rgba(2, 197, 134, 0.18), 0 0 0 1px rgba(50, 230, 166, 0.12);
}
.pricing-card--premium:hover { border-color: #4ee7ad; box-shadow: 0 32px 78px rgba(2, 197, 134, 0.27), 0 0 34px rgba(5, 192, 127, 0.2); }
.pricing-card--2027 { border-color: rgba(111, 147, 255, 0.5); background: linear-gradient(145deg, rgba(24, 34, 67, 0.92), rgba(10, 16, 35, 0.98)); box-shadow: 0 28px 70px rgba(73, 102, 214, 0.16), 0 0 0 1px rgba(111, 147, 255, 0.1); }
.pricing-card--2027:hover { border-color: #91a9ff; box-shadow: 0 32px 78px rgba(73, 102, 214, 0.25), 0 0 34px rgba(111, 147, 255, 0.16); }
.pricing-card--squad { border-color: rgba(250, 204, 21, 0.58); background: linear-gradient(145deg, rgba(66, 46, 12, 0.92), rgba(27, 20, 8, 0.98)); box-shadow: 0 28px 70px rgba(234, 179, 8, 0.16), 0 0 0 1px rgba(250, 204, 21, 0.12); }
.pricing-card--squad:hover { border-color: #fde047; box-shadow: 0 32px 78px rgba(234, 179, 8, 0.24), 0 0 34px rgba(250, 204, 21, 0.17); }
.pricing-plan-kicker--squad { color: #fde68a; background: rgba(250, 204, 21, 0.14); }
.pricing-original-price { margin-top: 22px; color: #d6c79a; font-size: 0.78rem; font-weight: 650; }
.pricing-savings--squad { color: #fff0a6; background: rgba(250, 204, 21, 0.15); }
.pricing-action--squad { color: #211700; background: linear-gradient(135deg, #fde047, #f59e0b); box-shadow: 0 13px 28px rgba(245, 158, 11, 0.25); }
.pricing-action--squad:hover { box-shadow: 0 17px 34px rgba(245, 158, 11, 0.36); }
.pricing-card-glow { position: absolute; width: 300px; height: 220px; top: -125px; right: -70px; border-radius: 50%; background: rgba(46, 238, 163, 0.3); filter: blur(55px); pointer-events: none; }
.pricing-card-glow--blue { background: rgba(111, 147, 255, 0.3); }
.pricing-card-heading { position: relative; z-index: 1; }
.pricing-plan-kicker { display: inline-block; margin-bottom: 14px; color: #93a4ba; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.pricing-plan-kicker--premium { color: #83f8bd; }
.pricing-plan-kicker--future { color: #9db5ff; }
.pricing-card h3 { margin: 0 0 10px; color: #fff; font-family: 'Sora', 'Inter', sans-serif; font-size: 1.45rem; line-height: 1.25; }
.pricing-card-heading p { min-height: 48px; margin: 0; color: #9dacbd; font-size: 0.9rem; line-height: 1.6; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin: 26px 0 10px; color: #fff; }
.pricing-currency { align-self: flex-start; margin-top: 11px; font-size: 1.35rem; font-weight: 700; }
.pricing-amount { font-family: 'Sora', 'Inter', sans-serif; font-size: 3.55rem; font-weight: 800; letter-spacing: -0.08em; line-height: 1; }
.pricing-period { margin-left: 4px; color: #8fa0b7; font-size: 0.77rem; font-weight: 700; }
.pricing-savings { min-height: 24px; width: fit-content; padding: 5px 9px; border-radius: 7px; color: #a5f5c8; background: rgba(66, 225, 150, 0.12); font-size: 0.73rem; font-weight: 700; }
.pricing-savings--future { color: #b5c6ff; background: rgba(106, 139, 255, 0.15); }
.pricing-divider { height: 1px; margin: 22px 0 18px; background: rgba(255, 255, 255, 0.1); }
.pricing-list-label { margin: 0 0 13px; color: #dce7f4; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.pricing-features { display: flex; flex: 1; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pricing-features li { display: flex; gap: 10px; align-items: flex-start; color: #dce7f4; font-size: 0.87rem; line-height: 1.45; }
.pricing-check, .pricing-muted-icon { display: inline-flex; flex: 0 0 18px; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; color: #052d20; background: #53e5a7; font-size: 0.75rem; font-weight: 900; }
.pricing-features--limited li { color: #91a0b3; }
.pricing-features--limited .pricing-check { color: #526274; background: rgba(137, 156, 178, 0.2); }
.pricing-muted-icon { color: #657489; background: rgba(110, 126, 146, 0.14); }
.pricing-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 49px; margin-top: 28px; border-radius: 13px; font: inherit; font-size: 0.9rem; font-weight: 800; cursor: pointer; transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease; }
.pricing-action:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pricing-action--free { border: 1px solid rgba(255, 255, 255, 0.16); color: #dce7f4; background: rgba(255, 255, 255, 0.05); }
.pricing-action--premium { border: 1px solid #8cffc5; color: #053d2a; background: linear-gradient(135deg, #a8ffd0, #36d992); box-shadow: 0 10px 25px rgba(6, 235, 146, 0.22); }
.pricing-action--future { border: 1px solid rgba(164, 185, 255, 0.5); color: #e9edff; background: linear-gradient(135deg, #405ac5, #697be4); }
.pricing-action:disabled { cursor: wait; opacity: .68; transform: none; filter: none; }
.pricing-trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 34px; color: #aab8ca; font-size: .8rem; font-weight: 700; }
.pricing-footnote { margin: 27px 0 0; color: #64748b; text-align: center; font-size: 0.78rem; }
/* ── Footer ── */
.landing-footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 0; text-align: left;
  color: #64748b; font-size: 0.9rem;
}
.landing-footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 40px 40px;
  display: flex; justify-content: space-between;
  gap: 60px;
}
.landing-footer-brand {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 300px;
}
.landing-footer-logo {
  width: 30px; height: 42px;
  transform: translateY(0);
}
.landing-footer-tagline {
  font-size: 0.88rem; color: #64748b; line-height: 1.5;
}
.landing-footer-links-grid {
  display: flex; gap: 80px;
}
.landing-footer-col {
  display: flex; flex-direction: column; gap: 10px;
}
.landing-footer-col h4 {
  color: #e2e8f0; font-size: 0.85rem;
  font-weight: 700; margin-bottom: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.landing-footer-col a {
  color: #64748b; text-decoration: none;
  font-size: 0.88rem; transition: color 0.2s;
}
.landing-footer-col a:hover { color: #05c07f; }
.landing-footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 20px 40px; text-align: center;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-size: 0.82rem; color: #475569;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .landing-logo-watermark {
    width: clamp(520px, 92vw, 820px);
    top: 70px;
    right: -220px;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center; gap: 40px;
    padding: 60px 0 40px;
  }
  .hero-content { align-items: center; }
  .landing-subtitle { max-width: 100%; }
  .landing-cta-group { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-mockup { max-width: 380px;
    transform: none;
  }
  .hero-mockup:hover { transform: none; }
  .hero-showcase {
    width: min(100%, 560px);
    min-height: 390px;
  }
  .hero-device--desktop {
    transform: none;
  }
  .hero-device--desktop:hover {
    transform: translateY(-4px);
  }
  .hero-device--phone {
    right: 16px;
    width: min(34vw, 150px);
  }
  .landing-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .landing-logo-watermark {
    width: 600px;
    top: 34px;
    right: -300px;
    opacity: var(--landing-logo-opacity, 0.16);
  }
  .landing-nav-links { display: none; }
  .landing-nav-actions { display: none; }
  .landing-hamburger { display: flex; }
  .landing-nav { padding: 12px 20px; }
  .landing-title { font-size: 2.2rem; }
  .landing-section-title { font-size: 1.8rem; }
  .landing-features-grid {
    grid-template-columns: 1fr;
  }
  .landing-stats {
    flex-wrap: wrap; gap: 20px;
    padding: 24px 20px;
  }
  .landing-stat-divider { display: none; }
  .landing-stat-item { flex: 1 1 40%; }
  .landing-footer-inner {
    flex-direction: column; gap: 40px;
    padding: 40px 24px 30px;
  }
  .landing-footer-links-grid { gap: 40px; }
  .landing-footer-bottom { padding: 16px 24px; }
  .landing-hero { padding: 40px 0 30px; }
  .landing-section { padding: 50px 0; }
  .landing-final-cta { padding: 50px 24px; margin: 20px 0; }
  .landing-final-cta h2 { font-size: 1.5rem; }
  .landing-cta-group { flex-direction: column; align-items: stretch; }
  .landing-btn-cta--lg { justify-content: center; }
  .landing-btn-outline { justify-content: center; }
  .landing-platforms {
    align-items: center;
  }
  .landing-platform-list {
    justify-content: center;
  }
  .landing-platform-chip {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .hero-showcase {
    min-height: 360px;
    width: min(100%, 430px);
  }
  .hero-device--desktop {
    width: min(100%, 390px);
    border-radius: 16px;
  }
  .hero-device--phone {
    right: 4px;
    bottom: 0;
    width: min(38vw, 132px);
    border-width: 6px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-logo-watermark {
    transform: rotate(-7deg) scale(1);
    will-change: auto;
  }
  .hero-device--desktop,
  .hero-device--desktop:hover {
    transform: none;
  }
}


.referrals-page {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.referrals-back-btn {
  margin-bottom: 18px;
}

.referrals-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
  padding: 34px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 14% 18%, rgba(244, 197, 66, 0.18), rgba(244, 197, 66, 0) 32%),
    linear-gradient(145deg, rgba(23, 29, 46, 0.96), rgba(10, 16, 28, 0.86));
  border: 1px solid rgba(244, 197, 66, 0.22);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.referrals-kicker,
.referrals-panel-label {
  display: block;
  color: #f4c542;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.referrals-hero h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 0.98;
  max-width: 760px;
}

.referrals-hero p,
.referrals-code-panel p,
.referrals-withdraw-panel p,
.referrals-info-card p {
  color: var(--text-secondary);
  line-height: 1.55;
}

.referrals-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: 16px;
}

.referrals-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.referrals-wallet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.referrals-wallet-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffe38a, #d99a19);
  border: 1px solid rgba(255, 243, 176, 0.7);
  box-shadow: 0 18px 34px rgba(217, 154, 25, 0.35);
  margin-bottom: 16px;
}

.referrals-wallet-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.referrals-wallet-card span,
.referrals-wallet-card small {
  color: var(--text-secondary);
  font-weight: 700;
}

.referrals-wallet-card strong {
  color: var(--text-primary);
  font-size: 52px;
  line-height: 1;
  margin: 8px 0;
}

.referrals-code-panel,
.referrals-withdraw-panel {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  padding: 24px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.referrals-code-panel strong {
  display: block;
  color: var(--text-primary);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.04em;
}

.referrals-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.referrals-card-showcase {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 197, 66, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(23, 29, 46, 0.92), rgba(9, 13, 22, 0.98));
  border: 1px solid rgba(244, 197, 66, 0.18);
}

.referrals-coin-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.586 / 1;
  min-height: 220px;
  padding: 24px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(145deg, #111827 0%, #082f34 48%, #070a12 100%);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.referrals-coin-card::before {
  content: "";
  position: absolute;
  inset: auto -22% -44% 18%;
  height: 76%;
  border-radius: 999px;
  background: rgba(244, 197, 66, 0.18);
  transform: rotate(-12deg);
}

.referrals-coin-card::after {
  content: "Tarjeta visual";
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(255, 255, 255, 0.26);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.referrals-coin-card-top,
.referrals-coin-card-bottom,
.referrals-coin-card-number,
.referrals-coin-card-chip {
  position: relative;
  z-index: 1;
}

.referrals-coin-card-top,
.referrals-coin-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.referrals-coin-card-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.referrals-coin-card-brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px;
}

.referrals-coin-card-type {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(244, 197, 66, 0.18);
  color: #f4c542;
  font-size: 11px;
  font-weight: 900;
}

.referrals-coin-card-chip {
  width: 54px;
  height: 40px;
  margin-top: 26px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5d878, #a66f1d);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.referrals-coin-card-chip span {
  display: block;
  width: 100%;
  height: 50%;
  border-bottom: 1px solid rgba(81, 49, 8, 0.35);
}

.referrals-coin-card-number {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 22px;
  font-size: clamp(20px, 4.2vw, 30px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.referrals-coin-card-bottom small {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.referrals-coin-card-bottom strong {
  display: block;
  color: #fff;
  font-size: 14px;
  max-width: 180px;
  overflow-wrap: anywhere;
}

.referrals-card-copy h2 {
  color: var(--text-primary);
  margin: 0 0 10px;
}

.referrals-card-copy p {
  color: var(--text-secondary);
  line-height: 1.55;
}

.referrals-info-card {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(23, 29, 46, 0.92), rgba(17, 22, 35, 0.54));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.referrals-info-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(244, 197, 66, 0.14);
  color: #f4c542;
  font-weight: 900;
  margin-bottom: 14px;
}

.referrals-info-card h3,
.referrals-withdraw-panel h2 {
  color: var(--text-primary);
  margin: 0 0 8px;
}

.referrals-progress-box {
  min-width: 300px;
}

.referrals-progress-box span {
  display: block;
  color: var(--text-primary);
  font-weight: 800;
  margin-bottom: 10px;
}

.referrals-progress-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.referrals-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4c542, var(--accent-green));
  transition: width 0.35s ease;
}

.referrals-progress-box small {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
}

.referrals-withdraw-form-panel {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 24px;
  padding: 26px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(23, 29, 46, 0.96), rgba(12, 16, 26, 0.92));
  border: 1px solid rgba(244, 197, 66, 0.22);
}

.referrals-withdraw-form-panel h2 {
  color: var(--text-primary);
  margin: 0 0 10px;
}

.referrals-form-copy p,
.withdrawal-helper {
  color: var(--text-secondary);
  line-height: 1.55;
}

.referrals-withdraw-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(244, 197, 66, 0.08);
  border: 1px solid rgba(244, 197, 66, 0.22);
  line-height: 1.55;
}

.referrals-withdraw-note strong {
  color: var(--text-primary);
}

.referrals-withdraw-form {
  display: grid;
  gap: 14px;
}

.withdrawal-confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.withdrawal-confirm-row input {
  margin-top: 3px;
}

.withdrawal-helper {
  margin: 0;
  font-size: 12px;
}

.withdrawal-admin-list {
  display: grid;
  gap: 14px;
}

.withdrawal-admin-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.withdrawal-admin-card.is-pending {
  border-color: rgba(244, 197, 66, 0.42);
}

.withdrawal-admin-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.withdrawal-admin-head h3 {
  margin: 6px 0 4px;
  color: var(--text-primary);
}

.withdrawal-admin-head p,
.withdrawal-paid-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.withdrawal-status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(244, 197, 66, 0.12);
  color: #f4c542;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.withdrawal-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.withdrawal-admin-grid span {
  overflow-wrap: anywhere;
}

.admin-user-card.is-paid {
  border-color: rgba(5, 192, 127, 0.42);
}

.admin-user-access-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-user-access-toggle .profile-switch {
  transform: scale(.86);
  transform-origin: right center;
}

@media (max-width: 520px) {
  .admin-user-access-toggle {
    align-self: stretch;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .referrals-hero,
  .referrals-info-grid,
  .referrals-card-showcase,
  .referrals-code-panel,
  .referrals-withdraw-panel,
  .referrals-withdraw-form-panel {
    grid-template-columns: 1fr;
  }

  .referrals-hero,
  .referrals-card-showcase,
  .referrals-code-panel,
  .referrals-withdraw-panel,
  .referrals-withdraw-form-panel {
    padding: 20px;
  }

  .referrals-code-panel,
  .referrals-withdraw-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .referrals-progress-box {
    min-width: 0;
  }

  .referrals-coin-card {
    min-height: 204px;
    padding: 20px;
  }

  .withdrawal-admin-head {
    flex-direction: column;
  }

  .withdrawal-admin-head .btn-primary {
    width: 100%;
  }

  .withdrawal-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-card--free { grid-column: 1 / -1; max-width: calc(50% - 11px); justify-self: center; width: 100%; }
}

@media (max-width: 640px) {
  .landing-pricing-section { padding-top: 60px; }
  .landing-pricing-section .landing-section-header { margin-bottom: 34px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 18px; }
  .pricing-card { min-height: auto; margin: 0; padding: 28px 22px 24px; }
  .pricing-card--free { grid-column: auto; max-width: none; }
  .pricing-amount { font-size: 3.15rem; }
  .pricing-card-heading p { min-height: auto; }
  .landing-demo-card { padding: 24px 18px; }
  .landing-demo-options { grid-template-columns: 1fr; }
  .landing-demo-topline { align-items: flex-start; }
}

/* Transferencia Premium */
.transfer-modal {
  position: fixed;
  inset: 0;
  z-index: 4200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(12px);
}

.transfer-modal-content {
  position: relative;
  width: min(100%, 680px);
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(90, 231, 173, 0.34);
  border-radius: 26px;
  color: var(--text-primary);
  background: radial-gradient(circle at 88% 0%, rgba(47, 182, 255, 0.17), transparent 36%), radial-gradient(circle at 8% 100%, rgba(90, 231, 173, 0.13), transparent 40%), var(--bg-card);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5), 0 0 50px rgba(90, 231, 173, 0.08);
}

.transfer-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  font-size: 25px;
  cursor: pointer;
}

.transfer-modal-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-green);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.transfer-modal-content h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.2rem); }
.transfer-modal-subtitle { margin: 10px 0 22px; color: var(--text-secondary); line-height: 1.65; }

.transfer-plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(90, 231, 173, 0.22);
  border-radius: 16px;
  background: rgba(90, 231, 173, 0.07);
}

.transfer-plan-summary span,
.transfer-data-row span,
.transfer-reference-box > span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.transfer-plan-amount { flex: 0 0 auto; color: var(--accent-green); font-size: 1.42rem; font-weight: 900; }

.transfer-bank-card {
  overflow: hidden;
  border: 1px solid rgba(47, 182, 255, 0.23);
  border-radius: 19px;
  background: rgba(7, 16, 32, 0.48);
}

.transfer-bank-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.transfer-bank-logo { color: #55a9ff; font-size: 1.18rem; font-weight: 900; letter-spacing: 0.12em; }
.transfer-data-row { padding: 15px 18px; border-bottom: 1px solid var(--border); }
.transfer-data-row--copy { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.transfer-data-row strong { overflow-wrap: anywhere; }

.transfer-copy-btn {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid rgba(47, 182, 255, 0.35);
  border-radius: 10px;
  color: #75c2ff;
  background: rgba(47, 182, 255, 0.09);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.transfer-copy-btn:hover { transform: translateY(-1px); background: rgba(47, 182, 255, 0.16); }

.transfer-reference-box {
  margin: 16px;
  padding: 19px;
  border: 1px solid rgba(90, 231, 173, 0.35);
  border-radius: 15px;
  text-align: center;
  background: linear-gradient(135deg, rgba(90, 231, 173, 0.1), rgba(47, 182, 255, 0.07));
}

.transfer-reference-box > strong {
  display: block;
  margin: 7px 0 12px;
  color: var(--accent-green);
  font-size: clamp(1.75rem, 7vw, 2.55rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
}

.transfer-copy-btn--reference { color: #08141d; border-color: transparent; background: linear-gradient(135deg, #5ae7ad, #2fb6ff); }
.transfer-reference-box p, .transfer-security-note { margin: 12px 0 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.5; }
.transfer-steps { margin: 18px 0; padding-left: 22px; color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; }
.transfer-steps li + li { margin-top: 7px; }

.transfer-status {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.82rem;
  line-height: 1.45;
}

.transfer-status.is-success { color: var(--accent-green); background: rgba(90, 231, 173, 0.1); }
.transfer-modal-actions { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr); gap: 12px; }
.transfer-modal-actions button { width: 100%; }

.transfer-referral-group { margin: 18px 0 12px; }
.transfer-referral-group label span { color: var(--text-muted); font-weight: 500; }
.transfer-confirmation-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
  cursor: pointer;
}
.transfer-confirmation-check input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--accent-green); }
.transfer-confirmation-check a { color: var(--accent-green); }

.payment-pending-banner {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 10px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(246, 99, 99, 0.52);
  border-radius: 14px;
  color: #ffd0d0;
  background: linear-gradient(135deg, rgba(182, 45, 45, 0.3), rgba(134, 30, 30, 0.14));
}
.payment-pending-banner[hidden] { display: none; }
.payment-pending-banner__icon {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #de4b4b;
  font-weight: 900;
}
.payment-pending-banner strong { display: block; color: #fff0f0; font-size: 0.9rem; }
.payment-pending-banner p { margin: 4px 0 0; font-size: 0.8rem; line-height: 1.45; }

@media (max-width: 560px) {
  .transfer-modal { align-items: flex-start; padding: 10px; }
  .transfer-modal-content { max-height: none; padding: 25px 17px; border-radius: 20px; }
  .transfer-plan-summary, .transfer-data-row--copy { align-items: flex-start; }
  .transfer-modal-actions { grid-template-columns: 1fr; }
}

/* Ajustes finales para que la interfaz se sienta nativa en pantallas pequeñas. */
@media (max-width: 768px) {
  html, body, .app-layout { min-height: 100dvh; }
  body { overflow-x: hidden; }
  .app-layout { width: 100%; }
  .main-content {
    height: 100dvh;
    min-height: 100dvh;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .view { min-width: 0; }
  .panel, .setup-panel-main { min-width: 0; }
  input, select, textarea, button { touch-action: manipulation; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1rem); }
  .panel-header { gap: 12px; }
  .panel-header > .btn-ghost,
  .profile-action-row > button,
  .settings-form > .btn-primary { min-height: 44px; }
  .admin-section-tabs { margin: 16px -4px 20px; padding: 0 4px 10px; scrollbar-width: none; }
  .admin-section-tabs::-webkit-scrollbar { display: none; }
  .admin-section-tab { min-height: 42px; display: inline-flex; align-items: center; }
  .withdrawal-admin-list, .list-grid { min-width: 0; }
  .withdrawal-admin-list .list-item { min-width: 0; overflow-wrap: anywhere; }
  .chart-card, .chart-container, canvas { max-width: 100%; }
}

@media (max-width: 390px) {
  .main-content { padding-left: 12px; padding-right: 12px; }
  .panel, .setup-panel-main { padding: 16px; border-radius: 18px; }
  .mobile-nav { width: calc(100vw - 24px); }
  .panel-header { align-items: flex-start; }
  .panel-header .btn-ghost { padding: 8px 10px; font-size: 12px; }
}

/* Página completa de compra Premium */
.redeem-modal-overlay {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: rgba(2, 7, 18, .88);
}
.redeem-modal-content {
  width: 100%;
  height: 100dvh;
  max-height: none;
  padding: clamp(68px, 7vw, 96px) clamp(20px, 7vw, 96px) clamp(40px, 6vw, 72px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 7% 3%, rgba(5, 192, 127, .20), transparent 27%),
    radial-gradient(circle at 92% 11%, rgba(59, 130, 246, .19), transparent 30%),
    linear-gradient(145deg, #091226 0%, #0c1730 48%, #080f20 100%);
  box-shadow: none;
}
.redeem-modal-content > :not(.redeem-modal-close) { width: min(100%, 1120px); margin-left: auto; margin-right: auto; }
.redeem-modal-close { position: fixed; top: max(18px, env(safe-area-inset-top, 0px)); right: max(22px, env(safe-area-inset-right, 0px)); z-index: 2; width: 42px; height: 42px; }
.redeem-modal-header { padding: 0 52px; }
.redeem-modal-header h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.055em; }
.redeem-modal-reason { max-width: 680px; margin-bottom: 14px; font-size: 1rem; }
.redeem-hero-proof { display: flex; justify-content: center; gap: 10px 20px; flex-wrap: wrap; margin-bottom: 26px; color: #b9f7d6; font-size: .78rem; font-weight: 750; }
.redeem-hero-proof span { padding: 7px 11px; border: 1px solid rgba(90,231,173,.2); border-radius: 999px; background: rgba(5,192,127,.07); }
.redeem-transfer-intro { max-width: 820px !important; margin-bottom: 24px; padding: 19px 22px; border-radius: 18px; }
.redeem-transfer-intro .premium-contact-title { font-size: 1rem; }
.redeem-transfer-intro .premium-contact-copy { max-width: 650px; font-size: .88rem; }
.redeem-plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.redeem-plan-card,
.redeem-plan-card--squad { grid-column: auto; min-height: 290px; margin: 0; padding: 22px; border-radius: 21px; background: linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.035)); }
.redeem-plan-card--2026 { box-shadow: inset 0 1px 0 rgba(142,245,195,.13); }
.redeem-plan-card--2027 { box-shadow: inset 0 1px 0 rgba(191,202,255,.15); }
.redeem-plan-card--squad { background: linear-gradient(145deg, rgba(250,204,21,.19), rgba(245,158,11,.07)); }
.redeem-plan-card:hover { transform: translateY(-6px); border-color: rgba(142,245,195,.75); box-shadow: 0 20px 46px rgba(0,0,0,.28); }
.redeem-plan-card strong { margin-top: 4px; font-size: 1.22rem; }
.redeem-plan-tag { min-height: 28px; line-height: 1.35; }
.redeem-plan-card-copy { color: #b4c1d6; font-size: .83rem; line-height: 1.5; }
.redeem-plan-benefits { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.09); color: #d9e8f8; font-size: .75rem; font-weight: 700; line-height: 1.5; }
.redeem-plan-original-price { margin-top: auto; color: rgba(254, 226, 226, .78); font-size: .76rem; font-weight: 700; text-decoration: line-through; }
.redeem-plan-card--squad .redeem-plan-price { margin-top: 0; }
.redeem-plan-price { margin-top: auto; font-size: 1.45rem; }
.redeem-plan-select { color: #dfffee; font-size: .8rem; font-weight: 800; }
.redeem-confidence-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 auto 26px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.08); }
.redeem-confidence-strip div { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 12px 16px; background: rgba(10,20,42,.86); }
.redeem-confidence-strip strong { color: #78f1b8; font: 800 .75rem 'IBM Plex Mono', monospace; }
.redeem-confidence-strip span { color: #c9d6e8; font-size: .78rem; font-weight: 650; line-height: 1.35; }
.redeem-modal-content .premium-pricing-toggle { position: relative; display: flex; width: min(100%, 820px); min-height: 54px; margin: 0 auto 14px !important; justify-content: center; text-align: center; }
.redeem-modal-content .premium-pricing-toggle-icon { position: absolute; right: 18px; }
.redeem-modal-content .premium-pricing-panel { max-width: 1120px; }
.redeem-modal-content > .input-group,
.redeem-modal-content > div[style*="align-items: flex-start"],
.redeem-modal-content > #btn-redeem-submit,
.redeem-modal-content > p[style*="codes"] { max-width: 720px; }
.redeem-modal-content > #btn-redeem-submit { display: flex; align-items: center; justify-content: center; min-height: 54px; margin: 8px auto 0 !important; text-align: center; }

@media (max-width: 768px) {
  .redeem-modal-content { padding: calc(70px + env(safe-area-inset-top, 0px)) 18px calc(34px + env(safe-area-inset-bottom, 0px)); }
  .redeem-modal-header { padding: 0 40px; }
  .redeem-modal-header h2 { font-size: 2rem; }
  .redeem-modal-reason { font-size: .9rem; }
  .redeem-hero-proof { gap: 7px; margin-bottom: 20px; }
  .redeem-hero-proof span { padding: 6px 8px; font-size: .69rem; }
  .redeem-plan-grid { grid-template-columns: 1fr; gap: 12px; }
  .redeem-plan-card,
  .redeem-plan-card--squad { min-height: 220px; padding: 18px; }
  .redeem-confidence-strip { grid-template-columns: 1fr; }
  .redeem-confidence-strip div { min-height: 48px; }
  .redeem-modal-content .premium-pricing-panel { padding: 16px; }
}

.transfer-squad-members {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(250, 204, 21, .35);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(250,204,21,.11), rgba(245,158,11,.04));
}
.transfer-squad-members[hidden] { display: none; }
.transfer-squad-members-kicker { color: #fde68a; font-size: .66rem; font-weight: 850; letter-spacing: .1em; }
.transfer-squad-members h3 { margin: 6px 0; color: #fff; font-size: 1rem; }
.transfer-squad-members p { margin: 0; color: var(--text-secondary); font-size: .78rem; line-height: 1.5; }
.transfer-squad-members-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.transfer-squad-members-grid label { display: grid; gap: 6px; color: #f8fafc; font-size: .75rem; font-weight: 750; }
.transfer-squad-members-grid .text-input { min-width: 0; }
.withdrawal-admin-grid-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .transfer-squad-members-grid { grid-template-columns: 1fr; } }
