/* ============================================
   ClassCheck - Dark Mode Design System
   First Principles UI - Minimal, Data-focused
   ============================================ */

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */

:root {
  /* Backgrounds */
  --bg-base: #0a0a0a;
  --bg-elevated: #141414;
  --bg-surface: #1a1a1a;
  --bg-hover: #252525;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-tertiary: #737373;

  /* Accent */
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.15);

  /* Grade Colors */
  --green-good: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.3);
  --yellow-mid: #eab308;
  --yellow-bg: rgba(234, 179, 8, 0.3);
  --orange-warn: #f97316;
  --orange-bg: rgba(249, 115, 22, 0.3);
  --red-bad: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.3);
  --gray-neutral: #6b7280;
  --gray-bg: rgba(107, 114, 128, 0.3);
  --blue-good: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.3);
  --purple-good: #a855f7;
  --purple-bg: rgba(168, 85, 247, 0.3);
  --pink-good: #ec4899;
  --pink-bg: rgba(236, 72, 153, 0.3);
  --teal-good: #14b8a6;
  --teal-bg: rgba(20, 184, 166, 0.3);
  --lime-good: #84cc16;
  --lime-bg: rgba(132, 204, 22, 0.3);
  --cyan-good: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.3);
  --indigo-good: #6366f1;
  --indigo-bg: rgba(99, 102, 241, 0.3);
  --rose-good: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.3);
  --amber-good: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.3);
  --slate-good: #64748b;
  --slate-bg: rgba(100, 116, 139, 0.3);
  --emerald-good: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.3);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Legacy compatibility */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #3b82f6;
  --white: #ffffff;
  --text: #ffffff;
  --text-light: #a3a3a3;
  --gray-dark: #1a1a1a;
  --gray-light: #0a0a0a;
  --shadow: var(--shadow-sm);
}

/* Light Mode Theme */
[data-theme="light"] {
  --bg-base: #f5f5f5;
  --bg-elevated: #ffffff;
  --bg-surface: #fafafa;
  --bg-hover: #ebebeb;

  --text-primary: #171717;
  --text-secondary: #525252;
  --text-tertiary: #a3a3a3;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-muted: rgba(37, 99, 235, 0.12);

  --green-good: #16a34a;
  --green-bg: rgba(22, 163, 74, 0.25);
  --yellow-mid: #ca8a04;
  --yellow-bg: rgba(202, 138, 4, 0.25);
  --orange-warn: #ea580c;
  --orange-bg: rgba(234, 88, 12, 0.25);
  --red-bad: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.25);
  --gray-neutral: #6b7280;
  --gray-bg: rgba(107, 114, 128, 0.25);
  --blue-good: #2563eb;
  --blue-bg: rgba(37, 99, 235, 0.25);
  --purple-good: #9333ea;
  --purple-bg: rgba(147, 51, 234, 0.25);
  --pink-good: #db2777;
  --pink-bg: rgba(219, 39, 119, 0.25);
  --teal-good: #0d9488;
  --teal-bg: rgba(13, 148, 136, 0.25);
  --lime-good: #65a30d;
  --lime-bg: rgba(101, 163, 13, 0.25);
  --cyan-good: #0891b2;
  --cyan-bg: rgba(8, 145, 178, 0.25);
  --indigo-good: #4f46e5;
  --indigo-bg: rgba(79, 70, 229, 0.25);
  --rose-good: #e11d48;
  --rose-bg: rgba(225, 29, 72, 0.25);
  --amber-good: #d97706;
  --amber-bg: rgba(217, 119, 6, 0.25);
  --slate-good: #475569;
  --slate-bg: rgba(71, 85, 105, 0.25);
  --emerald-good: #059669;
  --emerald-bg: rgba(5, 150, 105, 0.25);

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-strong: rgba(0, 0, 0, 0.2);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --white: #ffffff;
  --text: #171717;
  --text-light: #525252;
  --gray-dark: #e5e5e5;
  --gray-light: #f5f5f5;
}

/* ============================================
   Accessibility Utilities
   ============================================ */

/* Screen reader only - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Enhanced focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion support */
@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;
  }
}

/* Touch target optimization for coarse pointers (touchscreens) */
@media (pointer: coarse) {
  .btn,
  .btn-sm,
  .nav-tile,
  .modal-close,
  .theme-toggle,
  .class-delete-btn,
  button,
  [role="button"],
  a[href] {
    min-height: 44px;
    min-width: 44px;
  }

  .btn-sm {
    padding: 0.625rem 1rem;
  }
}

/* ============================================
   Base Reset & Typography
   ============================================ */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-page {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-card {
  background: var(--bg-elevated);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
}

.auth-card h1 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.auth-card h2 {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23737373' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red-bad);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

/* ============================================
   Auth Links & Trial Info
   ============================================ */

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.auth-links a {
  color: var(--accent);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-links .separator {
  color: var(--text-tertiary);
  margin: 0 0.5rem;
}

.trial-info {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-top: 1rem;
}

.help-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.verify-message {
  text-align: center;
  margin-bottom: 1.5rem;
}

.verify-message .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.verify-message p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.verify-message strong {
  color: var(--text-primary);
}

/* ============================================
   Alerts
   ============================================ */

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--green-bg);
  color: var(--green-good);
  border-color: rgba(34, 197, 94, 0.3);
}

.alert-error {
  background: var(--red-bg);
  color: var(--red-bad);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-warning {
  background: var(--yellow-bg);
  color: var(--yellow-mid);
  border-color: rgba(234, 179, 8, 0.3);
}

.alert a {
  color: inherit;
  font-weight: 600;
}

/* ============================================
   App Layout
   ============================================ */

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   Topbar Navigation
   ============================================ */

.topbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.topbar-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255,255,255,0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.875rem;
}

.logo-text {
  font-weight: 600;
  font-size: 1.125rem;
}

.topbar-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
}

.nav-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  min-width: 4.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.7rem;
  transition: background 0.2s;
}

.nav-tile:hover, .nav-tile.active {
  background: rgba(255,255,255,0.25);
}

.nav-tile .nav-icon {
  font-size: 1.25rem;
  margin-bottom: 0.125rem;
  margin-right: 0;
  opacity: 1;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.topbar-right .user-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.trial-badge-topbar {
  display: inline-block;
  background: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.topbar-right .theme-toggle {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}

.topbar-right .theme-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 500;
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.2s;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.25);
}

/* Topbar Login Form (Public Pages) */
.topbar-login {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.topbar-login input {
  padding: 0.375rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.25rem;
  background: rgba(255,255,255,0.9);
  width: 130px;
  font-size: 0.8rem;
  color: #333;
}

.topbar-login input::placeholder {
  color: #666;
}

.topbar-login input:focus {
  outline: none;
  border-color: white;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.btn-login {
  background: white;
  color: #667eea;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: rgba(255,255,255,0.9);
}

.btn-register {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.2s;
}

.btn-register:hover {
  background: rgba(255,255,255,0.3);
}

/* Topbar Language Switch */
.topbar .lang-switch {
  background: rgba(255,255,255,0.15);
}

.topbar .lang-switch a {
  color: rgba(255,255,255,0.7);
}

.topbar .lang-switch a.active {
  background: rgba(255,255,255,0.2);
  color: white;
}

.topbar .lang-switch a:hover:not(.active) {
  color: white;
}

/* Class Switcher in Topbar */
.class-switcher {
  margin-left: 0.5rem;
}

.class-switcher select {
  padding: 0.4rem 0.75rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.375rem;
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  max-width: 200px;
}

.class-switcher select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
}

.class-switcher select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Legacy Sidebar (kept for class-view sidebar with class list) */
.sidebar {
  width: 260px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 100;
  display: none; /* Hidden by default - topbar replaces it */
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-classes {
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  max-height: 40vh;
  overflow-y: auto;
}

.sidebar-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  font-weight: 600;
}

.sidebar-class-list {
  display: flex;
  flex-direction: column;
}

.class-item {
  padding: 0.5rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.class-item.active {
  background: var(--accent-muted);
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.user-info {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.user-info span {
  display: block;
  color: var(--text-secondary);
}

.trial-badge {
  display: inline-block;
  background: var(--orange-bg);
  color: var(--orange-warn);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* Main Content - Full width with topbar */
.main-content {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}

.main-header {
  background: var(--bg-elevated);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-title h1 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.content {
  padding: 2rem;
  flex: 1;
}

/* ============================================
   Classes Grid
   ============================================ */

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.class-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.class-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.class-card-wrapper {
  position: relative;
}

.class-card-wrapper .class-card {
  display: block;
}

.class-delete-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg-surface);
  color: var(--text-tertiary);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  border: 1px solid var(--border-subtle);
}

.class-card-wrapper:hover .class-delete-btn {
  opacity: 1;
}

.class-delete-btn:hover {
  background: var(--red-bg);
  color: var(--red-bad);
  border-color: rgba(239, 68, 68, 0.3);
}

.class-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.class-subject {
  color: var(--accent);
  font-size: 0.875rem;
}

.class-meta {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}

/* Shared Classes */
.shared-class {
  border-left: 3px solid var(--accent);
}

.shared-info {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.permission-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.permission-badge.edit {
  background: var(--green-bg);
  color: var(--green-good);
}

.permission-badge.read {
  background: var(--yellow-bg);
  color: var(--yellow-mid);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ============================================
   Modal
   ============================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-default);
}

.modal-content.modal-lg {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}

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

.modal-content form {
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ============================================
   Mobile Menu Components (Legacy - kept for compatibility)
   ============================================ */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.5rem;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

.sidebar-overlay.show {
  display: block;
}

/* ============================================
   Responsive - Tablet (< 1024px)
   ============================================ */

@media (max-width: 1024px) {
  /* Sidebar adjustments for tablet */
  .sidebar {
    width: 220px;
  }

  /* Grid column reductions */
  .classes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Form layout optimizations */
  .content {
    padding: 1.5rem;
  }

  .main-header {
    padding: 0.875rem 1.5rem;
  }

  /* Settings two-column to single at tablet */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* Topbar adjustments */
  .nav-tile {
    min-width: 4rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
  }

  .nav-tile .nav-icon {
    font-size: 1.1rem;
  }

  .class-switcher select {
    max-width: 150px;
  }
}

/* ============================================
   Responsive - Mobile (< 768px)
   ============================================ */

@media (max-width: 768px) {
  /* Topbar responsive */
  .topbar-content {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.25rem 0;
  }

  .topbar-logo .logo-text {
    display: none;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .nav-tile {
    min-width: 3.5rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.65rem;
  }

  .nav-tile .nav-icon {
    font-size: 1rem;
  }

  .topbar-login {
    order: 2;
    margin-left: auto;
  }

  .topbar-login input {
    width: 90px;
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
  }

  .topbar-right {
    order: 2;
  }

  .topbar-right .user-name {
    display: none;
  }

  .btn-register {
    display: none;
  }

  .class-switcher {
    order: 3;
    width: 100%;
    margin: 0.5rem 0 0 0;
  }

  .class-switcher select {
    width: 100%;
    max-width: none;
  }

  /* Keep mobile menu for class-view sidebar */
  .mobile-menu-btn {
    display: none;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .main-header {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .header-title {
    display: flex;
    align-items: center;
  }

  .header-title h1 {
    font-size: 1.125rem;
  }

  .header-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .header-actions .btn {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }

  .content {
    padding: 1rem;
  }

  .modal-content {
    max-width: calc(100vw - 2rem);
    margin: 1rem;
  }

  .modal-content form {
    padding: 1rem;
  }

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

  .modal-actions .btn {
    width: 100%;
  }

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

  .class-delete-btn {
    opacity: 1;
  }

  .auth-card {
    padding: 1.5rem;
  }

  .auth-card h1 {
    font-size: 1.25rem;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle {
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: background 0.2s;
}

.theme-toggle:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-light { display: inline; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Light mode scrollbars */
[data-theme="light"] ::-webkit-scrollbar-track { background: var(--bg-surface); }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.3); }

/* ============================================
   Sidebar Section (for public pages)
   ============================================ */

.sidebar-section {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

/* ============================================
   Homepage / Public Pages Styles
   ============================================ */

/* Hero Section */
.hero {
  background: var(--bg-elevated);
  color: var(--text-primary);
  padding: 5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--accent);
}

.hero h2 {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-hero-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-hero-primary:hover {
  background: var(--accent-hover);
}

.btn-hero-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-hero-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Features Section */
.features {
  padding: 4rem 2rem;
  background: var(--bg-base);
}

.features h2 {
  text-align: center;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: all 0.15s;
}

.feature-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Pricing Section */
.pricing {
  padding: 4rem 2rem;
  background: var(--bg-elevated);
}

.pricing h2 {
  text-align: center;
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: all 0.15s;
}

.pricing-card:hover {
  border-color: var(--border-strong);
}

.pricing-card.featured {
  border: 2px solid var(--accent);
}

.pricing-card h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  text-align: left;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--green-good);
  font-weight: bold;
}

/* Public Page Footer */
.home-footer {
  background: var(--bg-surface);
  color: var(--text-tertiary);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copyright {
  font-size: 0.9rem;
}

/* Login Dropdown */
.login-dropdown {
  position: relative;
}

.login-dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  padding: 1.25rem;
  min-width: 280px;
  z-index: 200;
}

.login-dropdown-content.show {
  display: block;
}

.login-dropdown-content .form-group {
  margin-bottom: 0.75rem;
}

.login-dropdown-content input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.login-dropdown-content input::placeholder {
  color: var(--text-tertiary);
}

.login-dropdown-content input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.login-dropdown-content .btn-block {
  margin-top: 0.5rem;
}

.login-error {
  color: var(--red-bad);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  padding: 0.25rem;
  border-radius: 6px;
}

.lang-switch a {
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-tertiary);
  transition: all 0.15s;
}

.lang-switch a.active {
  background: var(--bg-hover);
  color: var(--accent);
}

.lang-switch a:hover:not(.active) {
  color: var(--text-primary);
}

/* Help & Getting Started Pages */
.page-content {
  max-width: 800px;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.page-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.page-content h3 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.page-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  background: var(--accent);
  color: var(--white);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.faq-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.faq-question {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  color: var(--text-primary);
  transition: background 0.15s;
}

.faq-question:hover {
  background: var(--bg-hover);
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-tertiary);
}

.faq-item.open .faq-question::after {
  content: '-';
}

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Homepage Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero h2 {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero {
    width: 100%;
    max-width: 280px;
  }

  .features, .pricing {
    padding: 2.5rem 1rem;
  }

  .page-content h1 {
    font-size: 1.5rem;
  }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in 0.3s ease-out;
  max-width: 100%;
}

.toast.toast-out {
  animation: toast-out 0.2s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 0.875rem;
  color: var(--text-primary);
  word-wrap: break-word;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

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

/* Toast Types */
.toast-success {
  border-color: rgba(34, 197, 94, 0.3);
  background: var(--bg-elevated);
}

.toast-success .toast-icon {
  color: var(--green-good);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
  background: var(--bg-elevated);
}

.toast-error .toast-icon {
  color: var(--red-bad);
}

.toast-warning {
  border-color: rgba(234, 179, 8, 0.3);
  background: var(--bg-elevated);
}

.toast-warning .toast-icon {
  color: var(--yellow-mid);
}

.toast-info {
  border-color: rgba(59, 130, 246, 0.3);
  background: var(--bg-elevated);
}

.toast-info .toast-icon {
  color: var(--accent);
}

/* Toast Responsive */
@media (max-width: 768px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}

/* ============================================
   Confirmation & Prompt Dialogs
   ============================================ */

.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  animation: dialog-overlay-in 0.2s ease-out;
}

.dialog-overlay.dialog-out {
  animation: dialog-overlay-out 0.15s ease-in forwards;
}

@keyframes dialog-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialog-overlay-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.dialog-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-lg);
  animation: dialog-box-in 0.2s ease-out;
}

.dialog-overlay.dialog-out .dialog-box {
  animation: dialog-box-out 0.15s ease-in forwards;
}

@keyframes dialog-box-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes dialog-box-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
}

.dialog-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dialog-header h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.dialog-body {
  padding: 1.5rem;
}

.dialog-message {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

.dialog-input {
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dialog-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.dialog-input::placeholder {
  color: var(--text-tertiary);
}

.dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.dialog-btn {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.dialog-btn-cancel {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.dialog-btn-cancel:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.dialog-btn-confirm {
  background: var(--accent);
  color: var(--white);
}

.dialog-btn-confirm:hover {
  background: var(--accent-hover);
}

.dialog-btn-danger {
  background: var(--red-bad);
  color: var(--white);
}

.dialog-btn-danger:hover {
  background: #dc2626;
}

/* Dialog Responsive */
@media (max-width: 768px) {
  .dialog-box {
    max-width: calc(100vw - 2rem);
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .dialog-btn {
    width: 100%;
  }
}

/* ============================================
   Legal Pages (Datenschutz, Impressum)
   ============================================ */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.legal-content h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.legal-updated {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.legal-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section:last-of-type {
  border-bottom: none;
}

.legal-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.75rem;
  color: var(--text-primary);
}

.legal-section p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.legal-section ul {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.legal-section ul li {
  margin-bottom: 0.5rem;
}

.legal-section a {
  color: var(--accent);
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.legal-footer a {
  color: var(--accent);
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}

.legal-footer .separator {
  color: var(--text-tertiary);
  margin: 0 1rem;
}

/* Auth Footer Links (login/register pages) */
.auth-footer-links {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8rem;
}

.auth-footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
}

.auth-footer-links a:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}

.auth-footer-links .separator {
  color: var(--text-tertiary);
  margin: 0 0.5rem;
}

/* Legal Pages Responsive */
@media (max-width: 768px) {
  .legal-content {
    padding: 1rem;
  }

  .legal-content h1 {
    font-size: 1.5rem;
  }

  .legal-section h2 {
    font-size: 1.125rem;
  }
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
