/* ═══════════════════════════════════════════════════════════
   ENARMlab — 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 Ember Element Overrides ── */
body.theme-ember .sidebar-capsule {
  background: rgba(20, 18, 16, 0.7);
  border-color: rgba(217, 119, 50, 0.1);
}

body.theme-ember .panel {
  background: linear-gradient(145deg, rgba(30, 26, 23, 0.92) 0%, rgba(20, 18, 16, 0.5) 100%);
  border-color: rgba(217, 119, 50, 0.08);
}

body.theme-ember .panel::before {
  background: linear-gradient(90deg, transparent, rgba(217, 119, 50, 0.15), 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-ember {
  --bg-app:
    radial-gradient(ellipse at 10% 0%, rgba(217, 119, 50, 0.18) 0%, transparent 38%),
    radial-gradient(ellipse at 85% 15%, rgba(99, 60, 150, 0.12) 0%, transparent 36%),
    radial-gradient(circle at 50% 90%, rgba(217, 119, 50, 0.06) 0%, transparent 42%),
    linear-gradient(160deg, #12100e 0%, #161318 40%, #110f0d 100%);
  --bg-sidebar: #141210;
  --app-chrome-bg: #141210;
  --bg-card: #1e1a17;
  --bg-card-hover: #28231e;
  --accent-green: #d97732;
  --accent-orange: #e8a44c;
  --accent-blue: #8b9cf7;
  --accent-purple: #c4a882;
  --accent-red: #e85d5d;
  --border: rgba(217, 119, 50, 0.16);
  --text-primary: #f5f0eb;
  --text-secondary: #b0a598;
  --text-muted: #7a7068;
  --logo-mark-color: #d97732;
  --logo-mark-shadow: rgba(217, 119, 50, 0.45);
}


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);
}

.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="ember"] {
  background: linear-gradient(135deg, #12100e 50%, #d97732 50%);
  box-shadow: 0 0 10px rgba(217, 119, 50, 0.5);
}


.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;
}

.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);
}

/* ── 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;
}

@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;
}

.stat-card#card-sesiones:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !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;
  }

  #view-dashboard .stats-grid>.stat-card:first-child {
    order: 1;
  }

  #view-dashboard #card-sesiones {
    order: 2;
  }

  #view-dashboard #card-rango {
    order: 3;
    grid-column: 1 / -1;
    min-height: 150px;
  }

  #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;
  }

  .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;
  }

  /* 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 .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-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 .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-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;
}

@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;
  }

  .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;
  }
}
