/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow Effects */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.content-area {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Header & Glass Navbar */
.glass-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-glow);
  padding: 6px;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition-fast);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-item.active {
  color: var(--accent-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

@media (max-width: 640px) {
  .glass-header {
    padding: 0.5rem 0.75rem;
  }
  .nav-actions {
    gap: 0.35rem;
  }
  .btn-lang {
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
    gap: 0.3rem;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .brand-tag {
    display: none;
  }
}

/* Language Switcher */
.lang-selector-dropdown {
  position: relative;
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-theme-toggle:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
  transform: scale(1.05);
}

.btn-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-lang:hover {
  border-color: var(--accent-primary);
}

.lang-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  min-width: 160px;
  overflow: hidden;
  z-index: 1000;
}

.lang-menu.show {
  display: flex;
}

.lang-menu button {
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-menu button:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--accent-primary);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

/* Teacher Action Buttons */
.btn-teacher-feedback {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: #4338ca;
  transition: all var(--transition-fast);
}

.btn-teacher-feedback:hover {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.5);
  color: #312e81;
}

[data-theme="dark"] .btn-teacher-feedback {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

[data-theme="dark"] .btn-teacher-feedback:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.6);
  color: #c7d2fe;
}

.btn-teacher-order {
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.btn-teacher-order:hover {
  background: var(--bg-card);
  border-color: var(--border-color-hover);
  color: var(--accent-primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Light Mode Defaults (High Contrast & WCAG Compliant) */
.badge-indigo { background: rgba(79, 70, 229, 0.12); color: #4338ca; border: 1px solid rgba(79, 70, 229, 0.3); }
.badge-green  { background: rgba(16, 185, 129, 0.14); color: #065f46; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-amber, .badge-warning { background: rgba(245, 158, 11, 0.15); color: #92400e; border: 1px solid rgba(217, 119, 6, 0.38); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: #854d0e; border: 1px solid rgba(202, 138, 4, 0.38); }
.badge-rose, .badge-red, .badge-danger { background: rgba(220, 38, 38, 0.12); color: #991b1b; border: 1px solid rgba(220, 38, 38, 0.32); }
.badge-blue   { background: rgba(37, 99, 235, 0.12); color: #1e40af; border: 1px solid rgba(37, 99, 235, 0.32); }
.badge-gray, .badge-secondary { background: rgba(148, 163, 184, 0.16); color: #475569; border: 1px solid rgba(148, 163, 184, 0.38); }

/* Dark Mode Overrides (Vibrant Glowing Pastels on Dark Backgrounds) */
[data-theme="dark"] .badge-indigo { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.4); }
[data-theme="dark"] .badge-green  { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.4); }
[data-theme="dark"] .badge-amber, [data-theme="dark"] .badge-warning { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.4); }
[data-theme="dark"] .badge-yellow { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.4); }
[data-theme="dark"] .badge-rose, [data-theme="dark"] .badge-red, [data-theme="dark"] .badge-danger { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); }
[data-theme="dark"] .badge-blue   { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.4); }
[data-theme="dark"] .badge-gray, [data-theme="dark"] .badge-secondary { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

/* Glass Cards */
.glass-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.glass-card:hover {
  border-color: var(--border-color-hover);
}

/* Landing Page / Portal Switcher Hero */
.hero-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.portal-switch-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.portal-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  border: 2px solid var(--border-color);
  transition: var(--transition-normal);
}

.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-primary);
}

.portal-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.portal-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.portal-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Form Dropdown Option Styling for Dark Theme */
.form-input option, .form-select option, select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Modal Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Stacked Modals (e.g. Card Inspector on top of Student Cards Overview) */
#card-inspector-modal {
  z-index: 1100;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
}

.modal-close:hover { color: var(--text-primary); }

/* Dashboard Grids */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-val {
  font-size: 1.8rem;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
}

.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}


/* Tables */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.custom-table th, .custom-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.custom-table th {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
}

.toast {
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  animation: slideIn 0.3s ease;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--info); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 768px), (max-height: 720px) {
  .hero-title { font-size: 2.2rem; }
  .fsrs-button-grid { grid-template-columns: repeat(2, 1fr); }
  .glass-header { padding: 0.6rem 1rem; }
  .nav-links { display: none; }
  .content-area { padding: 1rem 0.75rem 2rem; }

  /* Mobile Flashcard Compact Adaptations for Virtual Keyboards */
  .study-container { padding: 0 0.25rem; }
  .progress-bar-container { margin-bottom: 0.75rem; height: 6px; }
  .study-header { margin-bottom: 0.6rem; }
  body:not(.math-mode) .card-perspective,
  body:not(.math-mode) .flashcard-3d { min-height: 180px; margin-bottom: 0.85rem; }
  body.view-study.math-mode .card-perspective,
  body.view-study.math-mode .flashcard-3d { min-height: 290px; margin-bottom: 0.85rem; }
  .card-face { padding: 1rem 0.75rem; }
  .card-prompt-word { font-size: 1.8rem; margin-bottom: 0.2rem; }
  .card-hint-badge { font-size: 0.78rem; padding: 0.15rem 0.6rem; margin-bottom: 0.35rem; }
  .card-sentence-context { font-size: 0.82rem; margin-top: 0.35rem; max-width: 95%; }
  .card-face p[style*="margin-top:2rem"] { margin-top: 0.5rem !important; font-size: 0.78rem !important; }

  /* Input box & button compactness */
  .glass-card { padding: 0.9rem !important; margin-bottom: 0.85rem !important; }
  .form-group { margin-bottom: 0.4rem !important; }
  .form-input { padding: 0.5rem 0.75rem !important; font-size: 0.95rem !important; }
}


/* ==========================================================================
   Offline Status Indicator Banner & Synchronization UI
   ========================================================================== */
.offline-status-banner {
  width: 100%;
  max-width: 1200px;
  margin: 0.5rem auto 1rem auto;
  padding: 0.65rem 1.25rem;
  border-radius: 14px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.offline-status-banner.hidden {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
}

.offline-status-banner.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #b45309;
}

[data-theme="dark"] .offline-status-banner.visible {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.22));
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.offline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
  animation: offlinePulse 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes offlinePulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 14px rgba(245, 158, 11, 1);
  }
}

.offline-text {
  line-height: 1.4;
}

.offline-text strong {
  font-weight: 700;
}

/* ==========================================================================
   Personal MiniMind Brain Syncing Indicators
   ========================================================================== */
.minimind-brain-syncing-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.4s ease-out;
}

.syncing-icon-wrapper {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.3));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.syncing-brain-icon {
  font-size: 1.85rem;
  animation: brainFloat 2.5s ease-in-out infinite;
}

.syncing-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1rem;
  animation: sparkleTwinkle 1.8s ease-in-out infinite;
}

@keyframes brainFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.06); }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.4; transform: rotate(0deg) scale(0.8); }
  50% { opacity: 1; transform: rotate(180deg) scale(1.2); }
}

.syncing-content {
  flex: 1;
  min-width: 0;
}

.syncing-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-family: var(--font-heading);
  margin-bottom: 0.2rem;
}

.syncing-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.syncing-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.2);
  overflow: hidden;
  position: relative;
}

.syncing-progress-shimmer {
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  animation: indeterminateShimmer 1.6s infinite ease-in-out;
}

@keyframes indeterminateShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Junior Sync Banner */
.junior-sync-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.85rem 1.4rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(236, 72, 153, 0.22));
  border: 2px solid rgba(129, 140, 248, 0.45);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.25);
  backdrop-filter: blur(14px);
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.4s ease-out;
}

.junior-sync-icon {
  font-size: 1.5rem;
  animation: brainFloat 2.5s infinite ease-in-out;
}

.junior-sync-text {
  line-height: 1.4;
}

.junior-sync-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* =========================================================================
 * App Version Tag & PWA Update Banner
 * ========================================================================= */
.app-version-tag {
  font-size: 0.65rem;
  color: var(--text-muted, #94a3b8);
  opacity: 0.5;
  font-family: monospace;
  margin-left: 0.4rem;
  cursor: pointer;
  user-select: none;
  display: inline-block;
  vertical-align: middle;
  transition: opacity 0.2s ease;
}

.app-version-tag:hover {
  opacity: 0.85;
}

.app-update-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  background: var(--bg-card, #1e293b);
  border: 1px solid var(--accent-primary, #6366f1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary, #fff);
  font-size: 0.9rem;
  animation: fadeIn 0.3s ease-out;
}

.app-update-banner.hidden {
  display: none !important;
}


/* =========================================================================
 * 24. UNIFIED ANNOUNCEMENT & "WAT IS NIEUW?" SYSTEM (v11.25)
 * ========================================================================= */
.ann-nav-btn {
  position: relative;
}

.ann-nav-btn.hidden,
.ann-unread-dot.hidden {
  display: none !important;
}

.ann-unread-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid var(--bg-primary, #ffffff);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: annPulseDot 1.8s infinite ease-in-out;
}

@keyframes annPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.28); opacity: 0.85; }
}

.ann-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.22s ease-out;
}

.ann-modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-glass-card, var(--bg-card));
  color: var(--text-primary);
  border: 1.5px solid var(--border-color-hover, var(--border-color));
  border-radius: 24px;
  padding: 1.85rem 1.75rem 1.6rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.ann-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.ann-modal-close:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.ann-modal-header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.ann-hero-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.85rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.18));
  border: 1.5px solid var(--border-color-hover, rgba(99, 102, 241, 0.35));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.ann-hero-icon {
  font-size: 2.1rem;
  line-height: 1;
}

.ann-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ann-badge-pill {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: var(--accent-gradient, linear-gradient(135deg, #6366f1, #8b5cf6));
  color: #ffffff;
}

.ann-version-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.ann-modal-title {
  margin: 0 0 0.4rem;
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading, inherit);
  line-height: 1.25;
}

.ann-modal-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.ann-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.45rem;
}

.ann-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.ann-feature-item:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-1px);
}

.ann-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-glass-card, var(--bg-card));
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ann-feature-body {
  min-width: 0;
  flex: 1;
}

.ann-feature-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.ann-feature-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.42;
}

.ann-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.ann-btn-cta {
  flex: 1 1 200px;
  padding: 0.7rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 12px;
}

.ann-btn-dismiss {
  padding: 0.7rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 12px;
}

/* Inline Dismissible Announcement Banner */
.ann-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: var(--bg-glass-card, var(--bg-card));
  border: 1.5px solid var(--border-color-hover, var(--accent-primary));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ann-banner-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 240px;
  flex: 1;
}

.ann-banner-icon {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
}

.ann-banner-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.ann-banner-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ann-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ann-banner-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ann-banner-close:hover {
  background: var(--accent-primary);
  color: #ffffff;
}






