/* ============================================
   KPSS & TYT Koçluk Yönetim Sistemi
   Premium Dark Theme Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Colors - Soothing Light Theme */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-input: #ffffff;

  /* Unified Theme Accent Variable Controls */
  --accent-rgb: 13, 148, 136; /* Calm Teal */
  --accent-color: #0d9488;
  --accent-color-light: #14b8a6;
  --accent-secondary-rgb: 56, 189, 248; /* Sky Blue */
  --accent-secondary: #0ea5e9;
  --accent-secondary-light: #38bdf8;

  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: var(--accent-color-light);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #334155, #475569);
  --gradient-secondary: linear-gradient(135deg, #0ea5e9, #38bdf8);
  --gradient-success: linear-gradient(135deg, #059669, #10b981);
  --gradient-danger: linear-gradient(135deg, #dc2626, #f87171);
  --gradient-warning: linear-gradient(135deg, #d97706, #fbbf24);
  --gradient-info: linear-gradient(135deg, #2563eb, #60a5fa);
  --gradient-bg: #f8f9fa;

  --glow-primary: 0 4px 12px rgba(15, 23, 42, 0.08);
  --glow-success: 0 4px 12px rgba(13, 148, 136, 0.06);
  --glow-danger: 0 4px 12px rgba(220, 38, 38, 0.06);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Sidebar */
  --sidebar-width: 280px;
  --sidebar-collapsed: 72px;

  /* Font Sizes */
  --font-xs: 0.7rem;
  --font-sm: 0.8rem;
  --font-base: 0.9rem;
  --font-md: 1rem;
  --font-lg: 1.15rem;
  --font-xl: 1.4rem;
  --font-2xl: 1.75rem;
  --font-3xl: 2.2rem;
}

/* ============================================
   Global Reset & Base
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Softer background particles (only 2 blobs, very low opacity) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 15%, rgba(var(--accent-rgb), 0.03) 0%, transparent 60%),
    radial-gradient(circle at 85% 85%, rgba(var(--accent-secondary-rgb), 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: rgba(var(--accent-rgb), 0.3);
  color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(var(--accent-rgb), 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-rgb), 0.6);
}

/* ============================================
   App Container
   ============================================ */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: rgba(10, 12, 22, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.sidebar-header .logo-icon {
  width: 44px;
  height: 44px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--glow-primary);
}

.sidebar-header .logo-text h2 {
  font-size: var(--font-md);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.sidebar-header .logo-text span {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: 400;
}

/* Navigation Items */
.sidebar-nav {
  flex: 1;
  padding: var(--space-lg) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.nav-section-label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-base);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: all var(--transition-base);
}

.nav-item:hover {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text-primary);
}

.nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item .nav-icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.nav-item .nav-badge {
  margin-left: auto;
  background: var(--gradient-primary);
  color: #fff;
  font-size: var(--font-xs);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-footer .footer-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
}

.sidebar-footer .footer-btn:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
  flex: 1;
  margin-left: 0;
  padding: var(--space-xl) var(--space-lg);
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Section Base */
.section {
  display: none;
  animation: fadeInUp 0.4s ease;
}

.section.active {
  display: block;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.section-header h1 {
  font-size: var(--font-2xl);
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--font-base);
  margin-top: var(--space-xs);
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(20px);
  transition: all var(--transition-base);
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.purple::before { background: var(--gradient-primary); }
.stat-card.pink::before { background: var(--gradient-secondary); }
.stat-card.green::before { background: var(--gradient-success); }
.stat-card.blue::before { background: var(--gradient-info); }
.stat-card.orange::before { background: var(--gradient-danger); }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
}

.stat-card.purple .stat-icon { background: rgba(var(--accent-rgb), 0.15); }
.stat-card.pink .stat-icon { background: rgba(var(--accent-secondary-rgb), 0.15); }
.stat-card.green .stat-icon { background: rgba(16, 185, 129, 0.15); }
.stat-card.blue .stat-icon { background: rgba(59, 130, 246, 0.15); }
.stat-card.orange .stat-icon { background: rgba(249, 115, 22, 0.15); }

.stat-card .stat-value {
  font-size: var(--font-2xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--font-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(var(--accent-rgb), 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--gradient-danger);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--gradient-success);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 25px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: var(--font-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ============================================
   Forms
   ============================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-base);
  transition: all var(--transition-base);
  outline: none;
}

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

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

.form-group select {
  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='%239ca3c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 200px;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: var(--font-sm);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--accent-rgb), 0.05);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.data-table tbody td {
  padding: 12px 18px;
  font-size: var(--font-base);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.06);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   Badges & Pills
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge-exam {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--text-accent);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}

.badge-exam.tyt {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Priority Badges */
.priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-low {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Status Badges */
.status-not-started {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.status-in-progress {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar.lg {
  height: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.progress-percentage {
  font-weight: 700;
  color: var(--text-accent);
}

/* ============================================
   Modals
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}



.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-header h2 {
  font-size: var(--font-xl);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-md);
}

/* ============================================
   Student Selector
   ============================================ */
.student-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  backdrop-filter: blur(12px);
}

.student-selector label {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.student-selector select {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-base);
  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='%239ca3c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-base);
}

.student-selector select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* ============================================
   Student Cards (List view)
   ============================================ */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.student-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.student-card:hover::before {
  opacity: 1;
}

.student-card .student-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.student-card .student-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.student-card .student-name {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.student-card .student-email {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.student-card .student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.student-card .student-progress {
  margin-top: var(--space-md);
}

.student-card .student-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

/* ============================================
   Subject Accordion
   ============================================ */
.subjects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.subject-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: all var(--transition-base);
}

.subject-item:hover {
  border-color: var(--border-hover);
}

.subject-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}

.subject-header:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.subject-header .subject-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.subject-header .subject-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.subject-header h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.subject-header .subject-count {
  font-size: var(--font-sm);
  color: var(--text-muted);
}

.subject-header .chevron {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform var(--transition-base);
}

.subject-item.open .subject-header .chevron {
  transform: rotate(180deg);
}

.subject-body {
  display: none;
  padding: 0 var(--space-xl) var(--space-xl);
}

.subject-item.open .subject-body {
  display: block;
  animation: fadeInUp 0.3s ease;
}

.subject-body .add-topic-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.subject-body .add-topic-row input {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-sm);
  outline: none;
  transition: all var(--transition-base);
}

.subject-body .add-topic-row input:focus {
  border-color: var(--border-focus);
}

/* Topic List within Subject */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.topic-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  background: rgba(10, 12, 22, 0.5);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.topic-item:hover {
  background: rgba(var(--accent-rgb), 0.05);
  border-color: rgba(var(--accent-rgb), 0.15);
}

.topic-item .topic-name {
  flex: 1;
  font-size: var(--font-base);
  font-weight: 500;
}

.topic-item .topic-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.topic-item select {
  padding: 4px 28px 4px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-xs);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.topic-item select:focus {
  border-color: var(--border-focus);
}

.topic-item .delete-topic {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.topic-item .delete-topic:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* ============================================
   Weekly Plan
   ============================================ */
.weeks-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.week-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.week-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: rgba(var(--accent-rgb), 0.05);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.week-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--font-lg);
  font-weight: 700;
}

.week-header .week-dates {
  font-size: var(--font-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.week-header .week-progress-mini {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.week-body {
  padding: var(--space-xl);
}

.week-body .week-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.week-plan-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(10, 12, 22, 0.5);
  border: 1px solid rgba(var(--accent-rgb), 0.08);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.week-plan-item:hover {
  border-color: rgba(var(--accent-rgb), 0.2);
}

.week-plan-item .item-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  flex-shrink: 0;
  background: transparent;
  color: transparent;
  font-size: 0.7rem;
}

.week-plan-item .item-checkbox:hover {
  border-color: var(--border-hover);
}

.week-plan-item .item-checkbox.checked {
  background: var(--gradient-success);
  border-color: #10b981;
  color: #fff;
}

.week-plan-item .item-subject {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-accent);
  min-width: 100px;
}

.week-plan-item .item-topic {
  flex: 1;
  font-size: var(--font-base);
}

.week-plan-item .item-notes {
  font-size: var(--font-sm);
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-plan-item .item-delete {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.week-plan-item .item-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.add-week-item-row {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.add-week-item-row select,
.add-week-item-row input {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-sm);
  outline: none;
  transition: all var(--transition-base);
}

.add-week-item-row select:focus,
.add-week-item-row input:focus {
  border-color: var(--border-focus);
}

.add-week-item-row select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
  cursor: pointer;
}

/* ============================================
   Progress Section
   ============================================ */
.progress-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
}

.progress-card h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.progress-subject-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.progress-subject-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.progress-subject-item .subject-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-subject-item .subject-label span {
  font-size: var(--font-sm);
  font-weight: 600;
}

.progress-subject-item .subject-label .count {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* Chart Area */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
}

.chart-card h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.donut-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.donut-svg {
  width: 180px;
  height: 180px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-sm);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.empty-state p {
  font-size: var(--font-base);
  color: var(--text-muted);
  max-width: 400px;
  margin-bottom: var(--space-lg);
}

/* ============================================
   Countdown Timer
   ============================================ */
.countdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
  text-align: center;
}

.countdown-card h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.countdown-display {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-unit .value {
  font-size: var(--font-3xl);
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.countdown-unit .label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: var(--space-xs);
}

/* ============================================
   Dashboard Specific
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.recent-activity {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(12px);
}

.recent-activity h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.activity-item:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.activity-item .activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(var(--accent-rgb), 0.1);
  flex-shrink: 0;
}

.activity-item .activity-text {
  flex: 1;
  font-size: var(--font-sm);
}

.activity-item .activity-time {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.3s ease;
  min-width: 300px;
  max-width: 450px;
}

.toast.success { border-left: 3px solid #10b981; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid #3b82f6; }

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  font-size: 1.1rem;
}

.toast-message {
  flex: 1;
  font-size: var(--font-sm);
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
}

/* ============================================
   File input styling
   ============================================ */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .sidebar,
  .btn,
  .toast-container,
  .modal-overlay,
  .student-selector,
  .section-header .btn,
  .add-topic-row,
  .topic-controls select,
  .delete-topic,
  .item-delete,
  .item-checkbox,
  .add-week-item-row,
  .week-header .btn,
  .sidebar-footer {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 10px !important;
  }

  .section {
    display: block !important;
  }

  .card,
  .glass-card,
  .stat-card,
  .student-card,
  .subject-item,
  .week-card,
  .progress-card {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .section-header h1,
  .stat-card .stat-value,
  .subject-header h3,
  .week-header h3 {
    background: none !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }

  .data-table {
    border: 1px solid #ccc;
  }

  .data-table thead th {
    background: #f5f5f5 !important;
    color: #000 !important;
  }

  .data-table tbody td {
    border-bottom: 1px solid #eee;
    color: #000;
  }

  .badge {
    border: 1px solid #999 !important;
    color: #000 !important;
    background: #f0f0f0 !important;
  }

  .progress-bar {
    background: #eee !important;
  }

  .progress-fill {
    background: #666 !important;
  }

  .progress-fill::after {
    display: none;
  }

  .subject-body {
    display: block !important;
  }

  @page {
    margin: 1cm;
  }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .main-content {
    padding: var(--space-lg);
  }

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

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: var(--space-md);
  }

  .mobile-menu-btn {
    display: flex !important;
  }

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

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

  .form-row {
    flex-direction: column;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-content {
    max-width: 100%;
    margin: var(--space-md);
    max-height: 90vh;
  }

  .topic-item {
    flex-wrap: wrap;
  }

  .topic-item .topic-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .week-plan-item {
    flex-wrap: wrap;
  }

  .donut-chart {
    flex-direction: column;
  }

  .countdown-display {
    gap: var(--space-md);
  }

  .countdown-unit .value {
    font-size: var(--font-2xl);
  }
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none !important;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 101;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.mobile-overlay.active {
  display: block;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--text-accent); }
.font-bold { font-weight: 700; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* Pulse animation for countdown */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ============================================
   Drag & Drop Weekly Layout
   ============================================ */
.weekly-dnd-layout {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  margin-top: var(--space-lg);
}

.dnd-sidebar {
  flex: 0 0 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: sticky;
  top: calc(var(--space-xl) * 2);
  max-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}

#sidebar-content-topics, #sidebar-content-videos {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.dnd-sidebar h3 {
  font-size: var(--font-md);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.dnd-topics-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-right: var(--space-xs);
}

.dnd-topic-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);

  padding: 10px var(--space-sm);
  cursor: grab;
  font-size: var(--font-sm);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
}
.dnd-topic-card:active {
  cursor: grabbing;
}

.dnd-topic-card:hover {
  border-color: var(--border-hover);
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-1px);
}

.dnd-topic-card .dnd-subject {
  font-size: var(--font-xs);
  color: var(--text-accent);
  font-weight: 600;
}

.dnd-topic-card.dragging {
  opacity: 0.5;
  background: var(--bg-input);
}

.dnd-topic-card.planned {
  border-left: 3px solid #10b981;
  background: rgba(16, 185, 129, 0.03);
  display: flex;
  flex-direction: row;
  align-items: center;
}

.dnd-main {
  flex: 1;
}

@media (max-width: 768px) {
  .weekly-dnd-layout {
    flex-direction: column;
  }
  .dnd-sidebar {
    position: static;
    flex: none;
    width: 100%;
    max-height: 300px;
  }
}
/* ============================================
   Days Grid & Activities
   ============================================ */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
}

.day-column {
  background: rgba(10, 12, 22, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 250px;
  min-width: 180px;
  transition: all var(--transition-fast);
}

.day-column.drag-over {
  background: rgba(16, 185, 129, 0.05);
  box-shadow: inset 0 0 0 2px #10b981;
}

.day-header {
  padding: var(--space-sm);
  text-align: center;
  font-size: var(--font-sm);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--accent-rgb), 0.05);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.day-items {
  flex: 1;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.day-items .week-plan-item {
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-sm);
  gap: var(--space-xs);
}

.item-header-top {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: flex-start;
  gap: 4px;
}

.item-header-left {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  flex: 1;
}

.item-subject {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-accent);
  display: block;
}

.item-topic {
  font-size: var(--font-sm);
  display: block;
  line-height: 1.2;
}

.activities-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  width: 100%;
}

.activity-badge {
  font-size: 0.65rem;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 3px;
}

.activity-badge:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.activity-badge.active {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: var(--text-accent);
  color: #fff;
}

.activity-badge.active.success {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
}

.activity-badge.active.warning {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
}

.activity-badge.active.danger {
  background: rgba(239, 68, 68, 0.2);
  border-color: #f87171;
}

.activity-badge.active.info {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
}
/* Fix for Add Week Item Row overflow */
.add-week-item-row {
  width: 100%;
  box-sizing: border-box;
}

.add-week-item-row select,
.add-week-item-row input {
  flex: 1 1 150px;
  min-width: 0;
  max-width: 100%;
}

.add-week-item-row .btn {
  flex: 0 0 auto;
}

/* Ensure container doesn't expand past 100% width */
.week-card, .week-body {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure the main container doesn't force a horizontal scroll on body */
.weeks-container {
  max-width: 100%;
  overflow-x: hidden;
}

.days-grid {
  /* This is correct, it allows days-grid to scroll within its parent without expanding the parent */
  max-width: 100%;
  box-sizing: border-box;
}
/* Flexbox overflow fix */
.dnd-main {
  min-width: 0 !important;
}

.weekly-dnd-layout {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.weeks-container {
  min-width: 0;
}

/* Time Badge and Conflict Warning Styles */
.item-time-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--text-accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
  margin-top: 4px;
  font-weight: 500;
  user-select: none;
}

.item-time-badge:hover {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: var(--text-accent);
  color: #fff;
}

.item-time-badge.empty {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
}

.item-time-badge.empty:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.conflict-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 4px;
  margin-left: 4px;
  font-weight: 600;
  animation: pulse-border 2.5s infinite;
}

@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  70% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.day-hours-summary {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: var(--space-xs);
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.day-hours-summary.target-met {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
}

.day-hours-summary.empty {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ============================================
   Student Portal & Mock Exam Styling
   ============================================ */

.hidden {
  display: none !important;
}

/* Sidebar Role Selector styling */
.role-switcher-wrapper select {
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
  font-weight: 600;
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary);
}

.role-switcher-wrapper select:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-primary);
}

/* SVG Chart Line styling */
.chart-line {
  stroke: url(#chart-gradient);
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0px 4px 10px rgba(var(--accent-rgb), 0.4));
}

.chart-point {
  fill: var(--accent-color);
  stroke: var(--text-primary);
  stroke-width: 2;
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
}

.chart-point:hover {
  r: 7;
  fill: #3b82f6;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}

.chart-text {
  font-size: 10px;
  fill: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

/* Accuracy Badge colors */
.accuracy-excellent {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.accuracy-good {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.accuracy-average {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.accuracy-poor {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Dynamic styling for mock exams inputs */
.score-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.score-input-group label {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  font-weight: 600;
}

.score-input-group div {
  display: flex;
  gap: 6px;
  align-items: center;
}

.score-input-group input {
  padding: 6px 10px;
  font-size: var(--font-sm);
  width: 100%;
}

.score-input-group span {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

/* ============================================
   Exam Subject Cards Grid Layout
   ============================================ */
.exam-subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.exam-subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
}

.exam-subject-card:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.01);
}

.exam-subject-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: var(--space-xs);
}

.exam-subject-card-title {
  font-weight: 700;
  font-size: var(--font-sm);
  color: var(--text-accent);
}

.exam-subject-card-max {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.exam-subject-inputs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.exam-subject-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exam-subject-input-group label {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.exam-subject-input-group input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px;
  text-align: center;
  font-size: var(--font-md);
  font-weight: 600;
  width: 100%;
}

.exam-subject-input-group input:focus {
  border-color: var(--text-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
}

/* ============================================
   Weekly program sidebar tabs
   ============================================ */
.sidebar-tab {
  transition: all var(--transition-fast);
}

.sidebar-tab.active {
  color: var(--text-primary) !important;
  border-bottom: 2px solid var(--text-accent) !important;
}

.sidebar-tab:not(.active) {
  color: var(--text-muted) !important;
  border-bottom: 2px solid transparent !important;
}

.video-drag-card {
  border-left: 3px solid var(--text-accent) !important;
  background: rgba(var(--accent-rgb), 0.03) !important;
}

.video-drag-card:hover {
  background: rgba(var(--accent-rgb), 0.08) !important;
  border-color: var(--text-accent) !important;
}

/* ============================================
   Unified Login Portal
   ============================================ */
.login-portal-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 8% 8%, rgba(var(--accent-rgb), 0.18) 0%, rgba(0,0,0,0) 35%),
              radial-gradient(circle at 92% 92%, rgba(59, 130, 246, 0.15) 0%, rgba(0,0,0,0) 35%),
              #07080e;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  overflow-y: auto;
  padding: var(--space-lg);
}

.login-portal-container.hidden {
  display: none !important;
}

.login-card {
  background: rgba(20, 23, 38, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.6),
              0 0 30px rgba(var(--accent-rgb), 0.08);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-normal);
}

.login-card input, .login-card select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: var(--font-sm);
}

.login-card input:focus, .login-card select:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
  outline: none;
}

/* Card hover glow and smooth transition */
.card {
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(var(--accent-rgb), 0.05);
}

/* Weekly Plan Queue Reordering Controls */
.item-order-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0.3;
  transition: opacity 0.15s ease;
  margin-right: 4px;
}

.week-plan-item:hover .item-order-controls {
  opacity: 1;
}

.order-btn:hover {
  color: var(--text-accent);
  transform: scale(1.2);
}

/* ============================================
   App Header & Navigation
   ============================================ */
.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 32px 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-area .logo-icon {
  width: 40px;
  height: 40px;
  background: #334155;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.logo-area .logo-text h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.logo-area .logo-text span {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.header-meta-area {
  display: flex;
  align-items: center;
  gap: 24px;
}

.motivation-quote {
  font-style: italic;
  font-size: 0.82rem;
  color: #64748b;
  max-width: 320px;
  text-align: right;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

/* Segmented Selector in Header */
.role-segmented-selector {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.role-segmented-selector .selector-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
}

.role-segmented-selector .selector-btn .btn-icon {
  font-size: 0.95rem;
}

/* Coach Active Style: Dark Slate */
.role-segmented-selector #selector-role-coach.active {
  background: #334155;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(51, 65, 85, 0.15);
}

/* Student Active Style: Orange/Yellow */
.role-segmented-selector #selector-role-student.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.role-segmented-selector .selector-btn:not(.active):hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

/* Student Tab Buttons */
.student-tabs-row .tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.student-tabs-row .tab-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.student-tabs-row .tab-btn.active {
  background: #334155;
  color: #ffffff;
  border-color: #334155;
  box-shadow: 0 2px 6px rgba(51, 65, 85, 0.15);
}

.student-tabs-row .tab-btn .tab-icon {
  font-size: 1rem;
}

.header-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 12px;
}

.horizontal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
}

.horizontal-nav::-webkit-scrollbar {
  height: 4px;
}

.horizontal-nav .nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  color: #475569;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.horizontal-nav .nav-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.horizontal-nav .nav-item.active {
  background: #334155;
  color: #ffffff;
}

.horizontal-nav .nav-item .nav-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 9999px;
  font-weight: 700;
  margin-left: 4px;
}

.header-action-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   Master Detail Students Layout
   ============================================ */
.students-master-detail-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.students-portfolio-pane {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
}

.portfolio-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.portfolio-header p {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 4px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-box-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

.search-box-wrapper input {
  width: 100%;
  padding: 10px 12px 10px 36px !important;
  background: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  color: #1e293b !important;
  font-size: 0.85rem !important;
}

.filter-pills-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 90px;
  overflow-y: auto;
  padding-bottom: 4px;
}

.filter-pill {
  background: #f1f5f9;
  border: none;
  color: #475569;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.filter-pill.active {
  background: #334155;
  color: #ffffff;
}

.students-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.student-portfolio-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.student-portfolio-card:hover {
  border-color: #cbd5e1;
  background: #f8f9fa;
  transform: translateY(-1px);
}

.student-portfolio-card.active {
  border-color: #334155;
  background: #f1f5f9;
}

.student-portfolio-card .card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0d9488;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.student-portfolio-card.active .card-avatar {
  background: #334155;
}

.student-portfolio-card .card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator-dot.active {
  background: #10b981;
}

.status-indicator-dot.lead {
  background: #f59e0b;
}

.status-indicator-dot.passive {
  background: #94a3b8;
}

.card-details-row {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-tags-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.student-tag-pill {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.student-portfolio-card.active .student-tag-pill {
  background: #e2e8f0;
}

.student-portfolio-card .card-arrow {
  color: #94a3b8;
  font-size: 0.85rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.student-portfolio-card.active .card-arrow {
  color: #334155;
  transform: translateX(2px);
}

.students-detail-pane {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: var(--space-xl);
  min-height: 500px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.empty-detail-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 450px;
  color: #64748b;
  padding: var(--space-xl);
}

.empty-detail-state .avatar-placeholder {
  width: 72px;
  height: 72px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #94a3b8;
  margin-bottom: var(--space-md);
}

.empty-detail-state h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: var(--space-xs);
}

.empty-detail-state p {
  font-size: 0.85rem;
  max-width: 400px;
  line-height: 1.5;
}

.student-detail-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: var(--space-md);
}

.detail-profile {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0d9488;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-profile h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.detail-profile p {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.detail-stat-card {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.detail-stat-card .stat-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-stat-card .stat-val-highlight {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
  margin-top: 6px;
  margin-bottom: 4px;
}

.detail-stat-card .stat-subtext {
  font-size: 0.72rem;
  color: #64748b;
}

.detail-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: var(--space-md);
}

.detail-section-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: var(--space-md);
}

.shortcut-buttons-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.shortcut-btn {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.shortcut-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.shortcut-btn .btn-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.shortcut-btn strong {
  font-size: 0.8rem;
  color: #334155;
}

.shortcut-btn span {
  font-size: 0.65rem;
  color: #64748b;
}

.detail-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.detail-info-block h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: var(--space-sm);
}

.info-content-box {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: var(--space-md);
  min-height: 150px;
}

.info-content-box p {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.5;
}

.info-content-box .availability-text,
.info-content-box .notes-text {
  color: #475569;
  margin-top: 4px;
  white-space: pre-wrap;
}

.box-divider {
  border: 0;
  border-top: 1px dashed #e2e8f0;
  margin: 12px 0;
}

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

.mini-exam-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid #e2e8f0;
}

.mini-exam-item:last-child {
  border-bottom: none;
}

.mini-exam-item strong {
  font-size: 0.8rem;
  color: #334155;
  display: block;
}

.mini-exam-item .date {
  font-size: 0.68rem;
  color: #94a3b8;
}

.net-score {
  text-align: right;
}

.net-score .net {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0d9488;
  display: block;
}

.net-score .score {
  font-size: 0.7rem;
  color: #64748b;
}

/* Redesign Login Portal to be cohesive light theme */
.login-portal-container {
  background: radial-gradient(circle at 8% 8%, rgba(13, 148, 136, 0.08) 0%, rgba(0,0,0,0) 35%),
              radial-gradient(circle at 92% 92%, rgba(56, 189, 248, 0.06) 0%, rgba(0,0,0,0) 35%),
              #f8f9fa !important;
}

.login-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 45px rgba(15, 23, 42, 0.06), 0 0 30px rgba(13, 148, 136, 0.02) !important;
  color: #0f172a !important;
}

.login-card input, .login-card select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

.login-card input:focus, .login-card select:focus {
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.1) !important;
}

.login-card label {
  color: #475569 !important;
  font-weight: 600 !important;
}

.login-tabs button {
  border-bottom: 2px solid transparent !important;
  color: #94a3b8 !important;
  transition: all 0.2s ease !important;
}

.login-tabs button.active {
  border-bottom: 2px solid #0d9488 !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

.mobile-menu-btn {
  display: none !important;
}

@media (max-width: 1024px) {
  .students-master-detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shortcut-buttons-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   KPSS Milestone & Achievements Styles
   ============================================ */
.milestones-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.milestone-badge-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  cursor: help;
  position: relative;
  user-select: none;
}

.milestone-badge-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.milestone-badge-pill .badge-icon {
  font-size: 1.8rem;
  transition: transform 0.2s ease;
}

.milestone-badge-pill:hover .badge-icon {
  transform: scale(1.15) rotate(5deg);
}

.milestone-badge-pill .badge-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.2;
}

.milestone-badge-pill.locked {
  opacity: 0.35;
  filter: grayscale(100%);
  background: #f8fafc;
}

.milestone-badge-pill.unlocked {
  border-color: rgba(13, 148, 136, 0.3);
  background: rgba(13, 148, 136, 0.02);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.04);
}

.milestone-badge-pill.unlocked .badge-icon {
  filter: drop-shadow(0 2px 4px rgba(13, 148, 136, 0.2));
}

/* Congratulations popup */
.celebration-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease forwards;
}

.celebration-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 45px rgba(13, 148, 136, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: popScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.celebration-icon {
  font-size: 3.8rem;
  width: 84px;
  height: 84px;
  background: rgba(13, 148, 136, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseGold 2s infinite;
  box-shadow: 0 0 20px rgba(13, 148, 136, 0.15);
}

.celebration-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.celebration-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0d9488;
  margin: 0;
  background: rgba(13, 148, 136, 0.04);
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(13, 148, 136, 0.08);
}

.celebration-card p {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.celebration-btn {
  width: 100%;
  padding: 12px 24px;
  background: #334155;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.celebration-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.confetti-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: confettiFall 2.2s ease-out infinite;
  opacity: 0.85;
}

@keyframes pulseGold {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.35); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(13, 148, 136, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

@keyframes confettiFall {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0.5);
    opacity: 0;
  }
}

/* ============================================
   Appearance Customizer Themes
   ============================================ */

/* Theme: Zeytin & Toprak (Doğal) is default */
.theme-natural {
  --accent-rgb: 13, 148, 136;
  --accent-color: #0d9488;
  --accent-color-light: #14b8a6;
  --text-accent: var(--accent-color-light);
  --gradient-primary: linear-gradient(135deg, #0d9488, #14b8a6);
}

/* Theme: Derin Deniz (Mavi) */
.theme-blue {
  --accent-rgb: 14, 165, 233;
  --accent-color: #0ea5e9;
  --accent-color-light: #38bdf8;
  --text-accent: var(--accent-color-light);
  --gradient-primary: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

/* Theme: Gece Yarısı (Koyu) */
.theme-dark {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --bg-card: #111827;
  --bg-glass: rgba(17, 24, 39, 0.95);
  --bg-input: #1f2937;
  --border-color: #374151;
  --border-hover: #4b5563;
  --border-focus: #6b7280;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --accent-rgb: 20, 184, 166;
  --accent-color: #14b8a6;
  --accent-color-light: #2dd4bf;
  --text-accent: var(--accent-color-light);
  --gradient-primary: linear-gradient(135deg, #111827, #1f2937);
  --gradient-bg: #0b0f19;
}

/* Theme: Sakin Lavanta (Mor) */
.theme-purple {
  --accent-rgb: 139, 92, 246;
  --accent-color: #8b5cf6;
  --accent-color-light: #a78bfa;
  --text-accent: var(--accent-color-light);
  --gradient-primary: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* Theme: Günbatımı & Bal (Sarı) */
.theme-yellow {
  --accent-rgb: 245, 158, 11;
  --accent-color: #f59e0b;
  --accent-color-light: #fbbf24;
  --text-accent: var(--accent-color-light);
  --gradient-primary: linear-gradient(135deg, #f59e0b, #fbbf24);
}

/* ============================================
   Appearance Customizer Spacing Densities
   ============================================ */

.density-standard {
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --font-xs: 0.7rem;
  --font-sm: 0.8rem;
  --font-base: 0.9rem;
  --font-md: 1rem;
}

.density-compact {
  --space-xs: 2px;
  --space-sm: 4px;
  --space-md: 10px;
  --space-lg: 14px;
  --space-xl: 18px;
  --font-xs: 0.65rem;
  --font-sm: 0.72rem;
  --font-base: 0.82rem;
  --font-md: 0.92rem;
}

.density-spacious {
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 22px;
  --space-lg: 34px;
  --space-xl: 46px;
  --font-xs: 0.76rem;
  --font-sm: 0.86rem;
  --font-base: 0.96rem;
  --font-md: 1.06rem;
}

/* Coach Notifications CSS */
@keyframes notificationPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.notification-trigger-btn.glowing {
  animation: pulseBell 2s infinite ease-in-out;
}

@keyframes pulseBell {
  0% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0px rgba(239, 68, 68, 0)); }
}

/* Chat message bubble delete hover styling */
.chat-message-bubble:hover .delete-msg-btn {
  display: inline-block !important;
}
.delete-msg-btn {
  transition: all 0.15s ease;
}
.delete-msg-btn:hover {
  color: #ef4444 !important;
  transform: scale(1.2);
}

/* ============================================
   Table Filter Row Styles
   ============================================ */
.table-filter-row th {
  padding: 8px 10px !important;
  background: rgba(var(--accent-rgb), 0.02) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.table-filter-input {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-xs);
  outline: none;
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.table-filter-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.subject-filter-group {
  display: flex;
  gap: 4px;
  min-width: 90px;
  width: 100%;
}

.sub-filter-input {
  width: 30px;
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-xs);
  outline: none;
  transition: all var(--transition-base);
  box-sizing: border-box;
}

.sub-filter-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15);
}

.sub-filter-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

/* ============================================
   ROLE SELECTION SCREEN STYLES
   ============================================ */
.role-selection-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  gap: 24px;
  animation: fadeIn 0.4s ease-out;
}

.role-selection-header {
  text-align: center;
  margin-bottom: 12px;
}

.role-selection-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -1px;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.role-selection-subtitle {
  color: #64748b;
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

.role-cards-container {
  display: flex;
  gap: 24px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

.role-card {
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 24px !important;
  padding: 40px 32px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.04), 0 0 20px rgba(13, 148, 136, 0.01) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer;
  box-sizing: border-box;
}

.role-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.08), 0 0 30px rgba(13, 148, 136, 0.03) !important;
}

.role-card.student-card:hover {
  border-color: #0d9488 !important;
}

.role-card.coach-card:hover {
  border-color: #3b82f6 !important;
}

.role-card-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.role-card.student-card .role-card-icon-wrapper {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}

.role-card.coach-card .role-card-icon-wrapper {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.role-card:hover .role-card-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.role-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.role-card-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 28px 0;
  flex-grow: 1;
}

.role-card-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.role-card.student-card .role-card-btn {
  background: #f1f5f9;
  color: #0f172a;
}

.role-card.student-card:hover .role-card-btn {
  background: #0d9488;
  color: #ffffff;
}

.role-card.coach-card .role-card-btn {
  background: #f1f5f9;
  color: #0f172a;
}

.role-card.coach-card:hover .role-card-btn {
  background: #3b82f6;
  color: #ffffff;
}

/* Back Button Styles */
.back-to-selection-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 20px;
  padding: 6px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.back-to-selection-btn:hover {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.08);
}

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





