/* Student Dark Notebook - Modern Theme System */

/* Dark Theme (Default) */
:root,
[data-theme="dark"] {
  /* Background Colors */
  --bg-dark: #0f0f0f;
  --bg-paper: #1a1a1a;
  --bg-card: #252525;
  --bg-elevated: #2a2a2a;
  
  /* Border Colors */
  --border-sketch: #2a2a2a;
  --border-light: #3a3a3a;
  
  /* Text Colors */
  --text-primary: #e0e0e0;
  --text-secondary: #9e9e9e;
  --text-muted: #616161;
  
  /* Accent Colors */
  --accent-primary: #7c4dff;
  --accent-secondary: #00bcd4;
  --accent-success: #4caf50;
  --accent-warning: #ff9800;
  --accent-danger: #f44336;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7c4dff 0%, #00bcd4 100%);
  --gradient-card: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 4px 20px rgba(124, 77, 255, 0.3);
  
  /* Legacy support */
  --accent-red: #f44336;
  --sketch-shadow: rgba(0, 0, 0, 0.7);
  --bg-primary: var(--bg-elevated); /* Alias for backward compatibility */
}

/* Light Theme (Muted) */
[data-theme="light"] {
  /* Background Colors - приглушенные, не ярко белые */
  --bg-dark: #f5f5f7;
  --bg-paper: #fafafa;
  --bg-card: #ffffff;
  --bg-elevated: #f8f8f8;
  
  /* Border Colors */
  --border-sketch: #e5e5e7;
  --border-light: #d1d1d6;
  
  /* Text Colors */
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-muted: #86868b;
  
  /* Accent Colors - более мягкие для светлой темы */
  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-card: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  
  /* Shadows - более мягкие для светлой темы */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-accent: 0 4px 16px rgba(99, 102, 241, 0.2);
  
  /* Legacy support */
  --accent-red: #ef4444;
  --sketch-shadow: rgba(0, 0, 0, 0.15);
  --bg-primary: var(--bg-elevated); /* Alias for backward compatibility */
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-dark);
  background-image: none;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="light"] body {
  background-color: var(--bg-dark);
}

/* Unified Font for All Elements */
body, h1, h2, h3, h4, h5, h6, .auth-title, .logo, input, select, textarea, button {
  font-family: 'Inter', 'Roboto', sans-serif !important;
  letter-spacing: 0.3px;
}

h1, h2, h3, .auth-title, .logo {
  font-weight: 600;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 88px 32px 32px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .container {
    padding: 88px 16px 24px;
  }
}

/* Top Bar - Brex style (clean, minimal) */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-sketch);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

[data-theme="light"] .top-bar {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.menu-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  color: var(--text-primary);
  font-size: 20px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: scale(1.05);
  box-shadow: var(--shadow-accent);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border-sketch);
  color: var(--text-primary);
  font-size: 18px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  transform: scale(1.05);
  box-shadow: var(--shadow-accent);
}

.username {
  font-family: 'Inter', 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 600;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 6px 16px;
  border-radius: 20px;
  background-color: rgba(124, 77, 255, 0.1);
  border: 1px solid rgba(124, 77, 255, 0.2);
}

/* Sidebar Navigation */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

[data-theme="light"] .mobile-menu-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-paper);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-sketch);
  padding: 24px;
  z-index: 999;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .sidebar {
  background: rgba(250, 250, 250, 0.98);
}

.sidebar.active {
  left: 0;
}

/* ПК: навбар всегда виден, гамбургер скрыт */
@media (min-width: 1024px) {
  .sidebar {
    left: 0;
    width: 260px;
  }
  .sidebar .close-menu {
    display: none;
  }
  .menu-toggle {
    display: none;
  }
  .top-bar {
    left: 260px;
    padding-left: 24px;
  }
  .container {
    margin-left: 260px;
  }
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-sketch);
}

.logo {
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.close-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 24px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-menu:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: #fff;
  transform: rotate(90deg);
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  margin-bottom: 6px;
}

.nav-menu a,
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 15px;
  border: 1px solid transparent;
}

.nav-menu a:hover,
.nav-link:hover {
  background: var(--bg-card);
  border-color: var(--border-light);
  transform: translateX(4px);
  color: var(--accent-primary);
}

.nav-menu a::before,
.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 0 3px 3px 0;
  transition: height 0.3s ease;
}

.nav-menu a:hover::before,
.nav-link:hover::before {
  height: 60%;
}

.nav-divider {
  height: 2px;
  background: var(--border-sketch);
  margin: 15px 0;
}

/* Auth Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="light"] .auth-box {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.auth-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.auth-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.6;
}

.auth-form {
  margin-bottom: 20px;
}

.auth-login-page {
  background: var(--bg-dark);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(124, 77, 255, 0.08) 0%, transparent 50%);
}

.auth-login-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-login-header .auth-title {
  margin-bottom: 8px;
}

.auth-login-header .auth-subtitle {
  margin-bottom: 0;
}

.auth-login-box .error-message,
.auth-login-box .success-message {
  margin-bottom: 20px;
}

.auth-submit {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 8px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-sketch);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.1);
  transform: translateY(-1px);
}

[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--accent-primary);
  filter: brightness(1.1);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  width: auto;
  border-radius: 8px;
}

.btn-icon {
  background: none;
  border: 2px solid var(--border-sketch);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.btn-danger:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
}

.auth-link {
  text-align: center;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

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

/* Messages */
.error-message,
.success-message {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid;
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(10px);
}

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

.error-message {
  background: rgba(244, 67, 54, 0.1);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

.error-message::before {
  content: '⚠️';
  font-size: 20px;
}

.success-message {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--accent-success);
  color: var(--accent-success);
}

.success-message::before {
  content: '✅';
  font-size: 20px;
}

/* Page Content */
.page-content {
  padding: 32px 0;
  animation: fadeIn 0.4s ease;
}

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

.page-title {
  font-size: 32px;
  margin-bottom: 40px;
  text-align: left;
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

[data-theme="light"] .page-title {
  font-weight: 600;
}

.section-title {
  font-size: 22px;
  margin: 30px 0 20px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--border-sketch);
}

/* Day Section Titles */
.day-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 3px dashed var(--border-sketch);
}

.day-section:last-child {
  border-bottom: none;
}

.day-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-primary);
  text-align: center;
}

.mobile-day-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--border-sketch);
}

.mobile-day-section:last-child {
  border-bottom: none;
}

.mobile-day-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 15px;
  padding: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border-sketch);
  border-radius: 6px;
  text-align: center;
  font-family: 'Inter', 'Roboto', sans-serif;
}

.empty-day-notice {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 20px;
}

/* Cards */
.schedule-grid,
.grades-container,
.recommendations-grid,
.tasks-list,
.debts-list {
  display: grid;
  gap: 20px;
}

.schedule-card,
.grade-card,
.recommendation-card,
.task-card,
.debt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.schedule-card:hover,
.grade-card:hover,
.recommendation-card:hover,
.task-card:hover,
.debt-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Desktop Schedule - Horizontal Grid Layout */
.schedule-desktop {
  display: none;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  width: 100%;
  padding: 0;
  margin: 0 auto;
  max-width: 1800px;
}

.day-column {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 400px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.day-column:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.day-header {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warning) 100%);
  padding: 16px 12px;
  text-align: center;
  border-bottom: 3px solid var(--bg-dark);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.day-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.day-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.day-lessons {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  background: var(--bg-card);
}

.empty-lesson-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 15px;
  text-align: center;
  flex: 1;
  background: var(--bg-paper);
  border-radius: 8px;
  border: 2px dashed var(--border-sketch);
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.empty-text {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.lesson-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-sketch);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.lesson-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-warning) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lesson-item:hover::before {
  opacity: 1;
}

.lesson-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.lesson-time-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warning) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(139, 69, 69, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lesson-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-subject-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-sketch);
}

.lesson-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 0;
}

.meta-item {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 5px;
}

.lesson-extras {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-sketch);
  flex-wrap: wrap;
}

.extras-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 5px;
  border: 2px solid;
}

.tasks-badge {
  background: rgba(139, 69, 69, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.debts-badge {
  background: rgba(214, 48, 49, 0.2);
  border-color: var(--accent-danger);
  color: var(--accent-danger);
}

/* Mobile Schedule - Card View */
.schedule-mobile {
  display: grid;
  gap: 16px;
  padding: 0;
}

.schedule-mobile-item {
  background: linear-gradient(135deg, var(--bg-paper) 0%, var(--bg-card) 100%);
  border: 3px solid var(--border-sketch);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.schedule-mobile-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-warning) 100%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.schedule-mobile-item:hover::before {
  opacity: 1;
}

.schedule-mobile-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 69, 69, 0.3);
}

.mobile-lesson-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-sketch);
}

.mobile-lesson-time {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-warning) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(139, 69, 69, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-lesson-subject {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  color: var(--text-primary);
  line-height: 1.3;
}

.mobile-lesson-details {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--bg-dark);
  border-radius: 6px;
  border: 2px solid var(--border-sketch);
}

.mobile-lesson-extras {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--border-sketch);
}

.mobile-tasks,
.mobile-debts {
  margin-bottom: 12px;
}

.mobile-tasks:last-child,
.mobile-debts:last-child {
  margin-bottom: 0;
}

.mobile-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-mini-item {
  background: var(--bg-paper);
  border: 2px solid var(--border-sketch);
  border-radius: 6px;
  padding: 9px 11px;
  margin-bottom: 7px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mobile-mini-item:last-child {
  margin-bottom: 0;
}

.mobile-mini-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-dark);
  transform: translateX(2px);
}

.mobile-mini-item.completed {
  opacity: 0.5;
  text-decoration: line-through;
}

.mobile-mini-item.overdue {
  border-color: var(--accent-danger);
  background: rgba(214, 48, 49, 0.15);
}

.mobile-mini-date {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

/* Grade Cards */
.grades-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.grade-card {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.grade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.grade-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

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

.grade-subject {
  font-size: 22px;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.grade-teacher {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.grade-inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

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

.grade-input-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.grade-input-group input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-sketch);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.3s ease;
}

.grade-input-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.grade-total {
  text-align: center;
  padding: 16px;
  background: var(--gradient-primary);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-md);
}

/* Tasks */
.task-card.completed {
  opacity: 0.6;
  border-color: var(--accent-primary);
}

.task-card.overdue {
  border-color: var(--accent-danger);
  background: rgba(231, 76, 60, 0.05);
}

.task-header {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.task-checkbox-form input[type="checkbox"] {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.task-subject {
  color: var(--accent-primary);
  font-size: 14px;
  margin-bottom: 5px;
}

.task-title {
  font-size: 16px;
  font-weight: 600;
}

.task-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 10px 0;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-sketch);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Debts */
.debt-card.urgent {
  border-color: var(--accent-warning);
}

.debt-card.urgent::before {
  background: var(--accent-warning);
  opacity: 1;
}

.debt-card.overdue {
  border-color: var(--accent-danger);
  background: rgba(244, 67, 54, 0.08);
}

.debt-card.overdue::before {
  background: var(--accent-danger);
  opacity: 1;
}

.debt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.debt-subject {
  color: var(--accent-primary);
  font-size: 18px;
}

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

.debt-description {
  margin: 10px 0;
  font-size: 16px;
}

.debt-footer {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-sketch);
  font-size: 14px;
  color: var(--text-secondary);
}

/* Interactive Calculator */
.interactive-calculator {
  margin-top: 20px;
  padding: 15px;
  background: var(--bg-dark);
  border: 2px solid var(--border-sketch);
  border-radius: 6px;
}

.slider-group {
  margin-bottom: 20px;
}

.slider-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.slider-group label span {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 16px;
}

.score-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-sketch);
  outline: none;
  -webkit-appearance: none;
  transition: all 0.3s ease;
}

.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.score-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-accent);
}

.score-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient-primary);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.score-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-accent);
}

.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-dark);
}

.score-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 2px solid var(--bg-dark);
}

.calculated-result {
  margin-top: 20px;
  padding: 20px;
  background: var(--gradient-primary);
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.calculated-result strong {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

/* Rating */
.rating-table {
  background: var(--bg-card);
  border: 2px solid var(--border-sketch);
  border-radius: 8px;
  overflow: hidden;
}

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

.rating-table th,
.rating-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-sketch);
}

.rating-table th {
  background: var(--bg-dark);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.rating-table tr.current-user {
  background: rgba(124, 179, 66, 0.1);
  border: 2px solid var(--accent-primary);
}

.position {
  font-size: 24px;
  width: 80px;
}

.student-name {
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-primary);
  color: #fff;
  border-radius: 12px;
  font-size: 12px;
  margin-left: 10px;
}

.points {
  text-align: right;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-primary);
}

/* Admin Panel */
.admin-sections {
  display: grid;
  gap: 30px;
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-section:hover {
  box-shadow: var(--shadow-md);
}

.admin-section h3 {
  margin-bottom: 28px;
  font-size: 22px;
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

[data-theme="light"] .admin-section h3 {
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-form .form-group {
  margin-bottom: 0;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
  font-size: 18px;
  background: var(--bg-card);
  border: 2px dashed var(--border-sketch);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.empty-state p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
}

.calculator-info,
.rating-info,
.week-info {
  text-align: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-sketch);
  border-radius: 12px;
  margin-bottom: 32px;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-weight: 500;
}

/* Notification Styles */
.notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-paper);
  border: 3px solid var(--accent-red);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  z-index: 9999;
  box-shadow: 0 10px 50px var(--sketch-shadow);
  animation: slideIn 0.5s ease-out;
  max-width: 500px;
  width: 90%;
}

.notification.success {
  border-color: var(--accent-primary);
}

.notification-image {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 2px solid var(--border-sketch);
}

.notification-text {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 600;
}

.notification-subtext {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 10px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
}

.notification.fade-out {
  animation: fadeOut 0.5s ease-out forwards;
}

.error-message-with-image {
  background: rgba(214, 48, 49, 0.1);
  border: 2px solid var(--accent-danger);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}

.error-message-with-image img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 2px solid var(--accent-danger);
}

.error-message-with-image p {
  color: #ff6b6b;
  font-size: 16px;
  font-weight: 600;
}

/* Responsive */
/* Student Chat Layout Responsive */
@media (max-width: 1200px) {
  .page-content > div[style*="grid-template-columns: 280px 1fr 280px"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .page-content > div[style*="grid-template-columns: 280px 1fr 280px"] > div:first-child,
  .page-content > div[style*="grid-template-columns: 280px 1fr 280px"] > div:last-child {
    position: static !important;
    margin-bottom: 20px;
  }
}

/* Улучшенная типографика для всех заголовков */
h1, h2, h3, h4, h5, h6 {
  transition: color 0.3s ease;
}

/* Улучшенные ссылки */
a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшенные скроллбары */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elevated);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 5px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--border-light);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

@media (max-width: 768px) {
  .container {
    padding: 88px 16px 24px;
  }
  
  .page-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
  
  .page-content {
    padding: 24px 0;
  }
  
  /* Улучшенная адаптивность для карточек */
  .grades-container,
  .recommendations-grid {
    grid-template-columns: 1fr !important;
  }
  
  /* Адаптивные формы */
  .form-row {
    grid-template-columns: 1fr !important;
  }
  
  /* Адаптивные кнопки */
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 14px;
  }
  
  /* Адаптивные вкладки */
  .admin-tabs,
  .teacher-tabs {
    flex-direction: column;
    gap: 4px;
  }
  
  .admin-tab-btn,
  .teacher-tab-btn {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    margin-right: 0;
  }
  
  .auth-box {
    padding: 30px 20px;
  }
  
  .auth-title {
    font-size: 22px;
  }
  
  .page-title {
    font-size: 24px;
  }
  
  .grade-inputs {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .day-title {
    font-size: 20px;
  }
  
  .mobile-day-title {
    font-size: 18px;
  }
  
  .schedule-details {
    flex-direction: column;
    gap: 8px;
  }
  
  .notification {
    width: 95%;
    padding: 20px;
  }
  
  .notification-image {
    width: 150px;
    height: 150px;
  }
  
  .notification-text {
    font-size: 16px;
  }
  
  .error-message-with-image img {
    width: 120px;
    height: 120px;
  }
  
  .top-bar {
    padding: 0 10px;
  }
  
  .username {
    font-size: 14px;
  }
  
  .section-title {
    font-size: 18px;
  }
  
  .task-footer,
  .debt-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .rating-table th,
  .rating-table td {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .position {
    font-size: 18px;
    width: 50px;
  }
  
  .points {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .auth-title {
    font-size: 24px;
  }
  
  .auth-box {
    padding: 32px 24px;
  }
  
  .page-title {
    font-size: 22px;
    margin-bottom: 24px;
  }
  
  .notification-image {
    width: 120px;
    height: 120px;
  }
  
  .btn-primary {
    font-size: 15px;
    padding: 14px 24px;
  }
  
  .schedule-card,
  .grade-card,
  .task-card,
  .debt-card {
    padding: 20px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .top-bar {
    padding: 0 16px;
    height: 64px;
  }
  
  .username {
    font-size: 13px;
    padding: 4px 12px;
  }
  
  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

@media (min-width: 1200px) {
  .recommendations-grid,
  .grades-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  /* Show desktop horizontal schedule on large screens */
  .schedule-desktop {
    display: block;
  }
  
  .schedule-mobile {
    display: none;
  }
  
  .week-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  
  .day-name {
    font-size: 17px;
  }
  
  .lesson-subject-name {
    font-size: 16px;
  }
  
  /* Улучшенные отступы для больших экранов */
  .container {
    max-width: 1400px;
  }
  
  .page-content {
    padding: 40px 0;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  /* Tablet view - show 3 columns */
  .schedule-desktop {
    display: block;
  }
  
  .schedule-mobile {
    display: none;
  }
  
  .week-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  
  .day-column {
    min-height: 350px;
  }
  
  .day-name {
    font-size: 16px;
  }
  
  .recommendations-grid,
  .grades-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1400px) {
  .week-grid {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .grades-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== CYBERPUNK THEME — STUDENT SECTION (приглушённые цвета, малые скругления) ========== */
body.section-students {
  --cyber-bg: #0d0d10;
  --cyber-panel: #14141a;
  --cyber-surface: #18181f;
  --cyber-border: #22222c;
  --cyber-yellow: #a89920;
  --cyber-yellow-dim: rgba(168, 153, 32, 0.12);
  --cyber-cyan: #3d8a94;
  --cyber-cyan-dim: rgba(61, 138, 148, 0.12);
  --cyber-red: #c94a5c;
  --cyber-green: #2d9d5a;
  --cyber-text: #d8d8de;
  --cyber-muted: #6e6e7a;
  --cyber-glow-yellow: 0 0 12px rgba(168, 153, 32, 0.15);
  --cyber-glow-cyan: 0 0 12px rgba(61, 138, 148, 0.15);
  --cyber-font-display: 'Orbitron', 'Rajdhani', sans-serif;
  --cyber-font-body: 'Rajdhani', 'Inter', sans-serif;
  /* Override theme vars for inline styles on student pages */
  --bg-dark: var(--cyber-bg);
  --bg-card: var(--cyber-panel);
  --bg-elevated: var(--cyber-surface);
  --border-sketch: var(--cyber-border);
  --border-light: #2a2a35;
  --text-primary: var(--cyber-text);
  --text-secondary: var(--cyber-muted);
  --accent-primary: var(--cyber-yellow);
  --accent-secondary: var(--cyber-cyan);
  --accent-danger: var(--cyber-red);
  --accent-success: var(--cyber-green);
  --accent-warning: #b8922e;
  --gradient-primary: linear-gradient(135deg, #a89920 0%, #3d8a94 100%);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-accent: var(--cyber-glow-yellow);
  --radius-sm: 4px;
}

body.section-students {
  background: var(--cyber-bg);
  color: var(--cyber-text);
  font-family: var(--cyber-font-body);
}

body.section-students .container {
  padding-top: 72px;
}

/* Top bar — dark bar, neon accent */
body.section-students .top-bar {
  background: var(--cyber-panel);
  border-bottom: 1px solid var(--cyber-border);
  box-shadow: 0 2px 0 var(--cyber-yellow-dim);
}

body.section-students .username {
  font-family: var(--cyber-font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cyber-yellow);
  background: transparent;
  border: 1px solid var(--cyber-yellow);
  -webkit-text-fill-color: var(--cyber-yellow);
}

body.section-students .theme-toggle {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-yellow);
  border-radius: var(--radius-sm);
}

body.section-students .theme-toggle:hover {
  background: var(--cyber-yellow-dim);
  color: var(--cyber-yellow);
  border-color: var(--cyber-yellow);
  box-shadow: none;
}

body.section-students .menu-toggle {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-yellow);
  border-radius: var(--radius-sm);
}

body.section-students .menu-toggle:hover {
  background: var(--cyber-yellow-dim);
  color: var(--cyber-yellow);
  border-color: var(--cyber-yellow);
  box-shadow: none;
}

/* Sidebar — dark panel, neon links */
body.section-students .sidebar {
  background: var(--cyber-panel);
  border-right: 1px solid var(--cyber-border);
  box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

body.section-students .sidebar-header {
  border-bottom-color: var(--cyber-border);
}

body.section-students .logo {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyber-yellow);
  -webkit-text-fill-color: var(--cyber-yellow);
  text-shadow: none;
}

body.section-students .close-menu {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-muted);
  border-radius: var(--radius-sm);
}

body.section-students .close-menu:hover {
  background: var(--cyber-red);
  border-color: var(--cyber-red);
  color: #fff;
}

body.section-students .nav-menu a,
body.section-students .nav-link {
  color: var(--cyber-muted);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--cyber-font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.section-students .nav-menu a:hover,
body.section-students .nav-link:hover {
  background: var(--cyber-yellow-dim);
  border-color: var(--cyber-border);
  color: var(--cyber-yellow);
  transform: translateX(2px);
  box-shadow: none;
}

body.section-students .nav-menu a::before,
body.section-students .nav-link::before {
  background: var(--cyber-yellow);
}

body.section-students .nav-divider {
  background: var(--cyber-border);
}

/* Page title — Orbitron, yellow */
body.section-students .page-title {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyber-yellow);
  text-shadow: none;
}

body.section-students .section-title {
  font-family: var(--cyber-font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cyber-cyan);
  border-bottom-color: var(--cyber-cyan);
}

/* Cards — dark, sharp corners, neon border */
body.section-students .schedule-card,
body.section-students .grade-card,
body.section-students .recommendation-card,
body.section-students .task-card,
body.section-students .debt-card {
  background: var(--cyber-panel);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

body.section-students .schedule-card:hover,
body.section-students .grade-card:hover,
body.section-students .recommendation-card:hover,
body.section-students .task-card:hover,
body.section-students .debt-card:hover {
  border-color: var(--cyber-yellow);
  box-shadow: var(--shadow-md);
}

body.section-students .grade-card::before {
  background: var(--cyber-yellow);
}

body.section-students .grade-subject {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyber-yellow);
  -webkit-text-fill-color: var(--cyber-yellow);
}

body.section-students .grade-teacher {
  color: var(--cyber-muted);
}

body.section-students .grade-total {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-yellow);
  color: var(--cyber-yellow);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

body.section-students .grade-input-group input {
  background: var(--cyber-bg);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
  color: var(--cyber-text);
}

body.section-students .grade-input-group input:focus {
  border-color: var(--cyber-yellow);
  box-shadow: 0 0 0 2px var(--cyber-yellow-dim);
}

/* Task cards */
body.section-students .task-subject {
  color: var(--cyber-cyan);
  font-family: var(--cyber-font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
}

body.section-students .task-title {
  color: var(--cyber-text);
  font-family: var(--cyber-font-body);
}

body.section-students .task-card.overdue {
  border-color: var(--cyber-red);
  background: rgba(255, 0, 60, 0.06);
}

body.section-students .task-card.completed {
  border-color: var(--cyber-cyan);
  opacity: 0.85;
}

/* Buttons — приглушённые, малые скругления */
body.section-students .btn-primary {
  background: var(--cyber-yellow-dim);
  color: var(--cyber-yellow);
  border: 1px solid var(--cyber-yellow);
  border-radius: var(--radius-sm);
  font-family: var(--cyber-font-body);
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: none;
}

body.section-students .btn-primary:hover {
  background: rgba(168, 153, 32, 0.2);
  color: var(--cyber-yellow);
  border-color: var(--cyber-yellow);
  box-shadow: none;
  transform: translateY(-1px);
}

body.section-students .btn-secondary {
  background: transparent;
  color: var(--cyber-cyan);
  border: 1px solid var(--cyber-cyan);
  border-radius: var(--radius-sm);
  font-family: var(--cyber-font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.section-students .btn-secondary:hover {
  background: var(--cyber-cyan-dim);
  border-color: var(--cyber-cyan);
  color: var(--cyber-cyan);
  box-shadow: none;
}

body.section-students .btn-danger {
  background: transparent;
  color: var(--cyber-red);
  border: 1px solid var(--cyber-red);
  border-radius: var(--radius-sm);
}

body.section-students .btn-danger:hover {
  background: rgba(201, 74, 92, 0.12);
  border-color: var(--cyber-red);
  color: var(--cyber-red);
  box-shadow: none;
}

body.section-students .btn-sm {
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

/* Forms */
body.section-students .form-group label {
  color: var(--cyber-muted);
  font-family: var(--cyber-font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.section-students .form-group input,
body.section-students .form-group select,
body.section-students .form-group textarea {
  background: var(--cyber-bg);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
  color: var(--cyber-text);
  font-family: var(--cyber-font-body);
}

body.section-students .form-group input:focus,
body.section-students .form-group select:focus,
body.section-students .form-group textarea:focus {
  border-color: var(--cyber-yellow);
  box-shadow: 0 0 0 2px var(--cyber-yellow-dim);
  background: var(--cyber-surface);
}

body.section-students .page-content input,
body.section-students .page-content select,
body.section-students .page-content textarea {
  border-radius: var(--radius-sm) !important;
}

body.section-students .page-content .btn-primary {
  border-radius: var(--radius-sm) !important;
}

body.section-students .student-panel {
  border-radius: var(--radius-sm) !important;
}

body.section-students .board-note-item {
  border-radius: var(--radius-sm) !important;
}

/* Messages */
body.section-students .success-message {
  background: rgba(45, 157, 90, 0.1);
  border: 1px solid var(--cyber-green);
  color: var(--cyber-green);
  border-radius: var(--radius-sm);
}

body.section-students .error-message {
  background: rgba(201, 74, 92, 0.1);
  border: 1px solid var(--cyber-red);
  color: #d86a7a;
  border-radius: var(--radius-sm);
}

/* Day columns, schedule */
body.section-students .day-column {
  background: var(--cyber-panel);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
}

body.section-students .day-column:hover {
  border-color: var(--cyber-cyan);
  box-shadow: var(--shadow-md);
}

body.section-students .day-name {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cyber-cyan);
}

body.section-students .lesson-item {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  color: var(--cyber-text);
}

body.section-students .lesson-item:hover {
  border-color: var(--cyber-yellow);
}

body.section-students .lesson-subject-name {
  color: var(--cyber-yellow);
  font-family: var(--cyber-font-body);
  font-weight: 600;
}

/* Empty state */
body.section-students .empty-state {
  background: var(--cyber-panel);
  border: 1px dashed var(--cyber-border);
  color: var(--cyber-muted);
  border-radius: var(--radius-sm);
}

body.section-students .empty-state p {
  font-family: var(--cyber-font-body);
}

/* Mobile overlay */
body.section-students .mobile-menu-overlay {
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(8px);
}

/* Inline hints / links */
body.section-students a:not(.btn-primary):not(.btn-secondary):not(.nav-link):not(.nav-menu a) {
  color: var(--cyber-cyan);
}

body.section-students a:not(.btn-primary):not(.btn-secondary):not(.nav-link):not(.nav-menu a):hover {
  color: var(--cyber-yellow);
}

/* Rating table */
body.section-students .rating-table table {
  border-color: var(--cyber-border);
}

body.section-students .rating-table th {
  font-family: var(--cyber-font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cyber-yellow);
  border-color: var(--cyber-border);
}

body.section-students .rating-table td {
  border-color: var(--cyber-border);
  color: var(--cyber-text);
}

body.section-students .rating-table .current-user {
  background: var(--cyber-yellow-dim);
  border-left: 3px solid var(--cyber-yellow);
}

/* Calculator sliders */
body.section-students .score-slider {
  accent-color: var(--cyber-yellow);
}

body.section-students .calculated-result {
  color: var(--cyber-yellow);
  font-family: var(--cyber-font-display);
}

body.section-students .recommendation-card h4 {
  font-family: var(--cyber-font-display);
  color: var(--cyber-yellow);
}

body.section-students .advice {
  color: var(--cyber-cyan);
  font-family: var(--cyber-font-body);
}

/* Week info, rating info, calculator info — angular panels */
body.section-students .week-info,
body.section-students .rating-info,
body.section-students .calculator-info {
  background: var(--cyber-panel);
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  color: var(--cyber-text);
}

body.section-students .week-info:hover,
body.section-students .rating-info:hover {
  border-color: var(--cyber-cyan);
}

/* Code / formula blocks */
body.section-students code {
  background: var(--cyber-bg);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
  color: var(--cyber-yellow);
  font-family: 'Rajdhani', monospace;
  letter-spacing: 0.02em;
}

/* Scrollbar — subtle cyber */
body.section-students ::-webkit-scrollbar-thumb {
  background: var(--cyber-border);
  border-radius: 0;
}

body.section-students ::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-muted);
}

/* Student dashboard — адаптивная сетка */
.student-dashboard {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .student-dashboard {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .student-dashboard .student-sidebar-right {
    position: static !important;
    top: auto !important;
  }
}

@media (max-width: 768px) {
  .student-dashboard .note-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .student-dashboard .note-form-row select {
    width: 100% !important;
    max-width: 100%;
  }
  .student-dashboard .note-form-row > div:last-child {
    width: 100%;
    max-width: 100%;
  }
  .student-dashboard .note-form-row .btn-primary {
    width: 100%;
  }
}

/* Headman dashboard — как у студентов: навбар | контент | быстрый доступ */
.headman-dashboard {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .headman-dashboard {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .headman-dashboard .headman-sidebar-right {
    position: static !important;
    top: auto !important;
  }
}

/* Headman dashboard — мобильная адаптация */
@media (max-width: 768px) {
  body.section-admin .page-content,
  body.section-admin .container {
    overflow-x: hidden;
  }
  .headman-dashboard .headman-main,
  .headman-dashboard .headman-sidebar-right {
    min-width: 0;
  }
  .headman-dashboard .users-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px !important;
  }
  .headman-dashboard .admin-tabs {
    gap: 4px;
    padding-bottom: 4px;
  }
  .headman-dashboard .admin-tab-btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  .headman-dashboard .form-row,
  .headman-dashboard .admin-form .form-row {
    flex-direction: column;
    align-items: stretch !important;
  }
  .headman-dashboard .form-group {
    min-width: 0;
  }
  .headman-dashboard .form-group input,
  .headman-dashboard .form-group select {
    width: 100%;
    max-width: 100%;
  }
  .headman-dashboard .users-list > div {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .headman-dashboard .users-list > div > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  .headman-dashboard .important-notes-list > div > div,
  .headman-dashboard .quick-links-list > div,
  .headman-dashboard .subjects-list > div > div {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .headman-dashboard .important-notes-list > div > div > div:first-child,
  .headman-dashboard .quick-links-list > div > a,
  .headman-dashboard .subjects-list > div > div > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  .headman-dashboard .headman-sidebar-right > div {
    padding: 16px !important;
  }
}

@media (max-width: 480px) {
  .headman-dashboard .users-grid {
    grid-template-columns: 1fr !important;
  }
  .headman-dashboard .admin-tab-btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
  }
}

/* Обрезка длинного логина в шапке на мобильных */
@media (max-width: 768px) {
  body.section-admin .top-bar .username {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ========== CYBERPUNK THEME — ADMIN SECTION (приглушённые, малые скругления) ========== */
body.section-admin {
  --cyber-bg: #0d0d10;
  --cyber-panel: #14141a;
  --cyber-surface: #18181f;
  --cyber-border: #22222c;
  --cyber-yellow: #a89920;
  --cyber-yellow-dim: rgba(168, 153, 32, 0.12);
  --cyber-cyan: #3d8a94;
  --cyber-cyan-dim: rgba(61, 138, 148, 0.12);
  --cyber-red: #c94a5c;
  --cyber-green: #2d9d5a;
  --cyber-text: #d8d8de;
  --cyber-muted: #6e6e7a;
  --cyber-font-display: 'Orbitron', 'Rajdhani', sans-serif;
  --cyber-font-body: 'Rajdhani', 'Inter', sans-serif;
  --radius-sm: 4px;
  --bg-dark: var(--cyber-bg);
  --bg-card: var(--cyber-panel);
  --bg-elevated: var(--cyber-surface);
  --border-sketch: var(--cyber-border);
  --text-primary: var(--cyber-text);
  --text-secondary: var(--cyber-muted);
  --accent-primary: var(--cyber-yellow);
  --accent-secondary: var(--cyber-cyan);
  --accent-danger: var(--cyber-red);
  --accent-success: var(--cyber-green);
  --accent-warning: #b8922e;
  --gradient-primary: linear-gradient(135deg, #a89920 0%, #3d8a94 100%);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
}

body.section-admin {
  background: var(--cyber-bg);
  color: var(--cyber-text);
  font-family: var(--cyber-font-body);
}

body.section-admin .page-title {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyber-yellow);
  text-shadow: none;
}

body.section-admin .admin-tabs {
  border-bottom-color: var(--cyber-border);
  gap: 4px;
}

body.section-admin .admin-tab-btn {
  background: transparent;
  color: var(--cyber-muted);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--cyber-font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.section-admin .admin-tab-btn:hover {
  color: var(--cyber-cyan);
  background: var(--cyber-cyan-dim);
  border-color: var(--cyber-border);
}

body.section-admin .admin-tab-btn.active {
  color: var(--cyber-yellow);
  border-bottom-color: var(--cyber-yellow);
  background: var(--cyber-yellow-dim);
  font-weight: 600;
  border-color: var(--cyber-yellow);
}

body.section-admin .admin-tab-content {
  animation: fadeIn 0.3s ease;
}

body.section-admin .admin-section h3,
body.section-admin .page-content h3 {
  font-family: var(--cyber-font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--cyber-yellow);
}

body.section-admin .btn-primary {
  background: var(--cyber-yellow-dim);
  color: var(--cyber-yellow);
  border: 1px solid var(--cyber-yellow);
  border-radius: var(--radius-sm) !important;
  font-family: var(--cyber-font-body);
  font-weight: 600;
  letter-spacing: 0.03em;
}

body.section-admin .btn-primary:hover {
  background: rgba(168, 153, 32, 0.2);
  color: var(--cyber-yellow);
  border-color: var(--cyber-yellow);
  box-shadow: none;
  transform: translateY(-1px);
}

body.section-admin .btn-secondary {
  background: transparent;
  color: var(--cyber-cyan);
  border: 1px solid var(--cyber-cyan);
  border-radius: var(--radius-sm);
  font-family: var(--cyber-font-body);
  font-weight: 500;
  letter-spacing: 0.03em;
}

body.section-admin .btn-secondary:hover {
  background: var(--cyber-cyan-dim);
  border-color: var(--cyber-cyan);
  color: var(--cyber-cyan);
  box-shadow: none;
}

body.section-admin .success-message {
  background: rgba(45, 157, 90, 0.1);
  border: 1px solid var(--cyber-green);
  color: var(--cyber-green);
  border-radius: var(--radius-sm);
}

body.section-admin .error-message {
  background: rgba(201, 74, 92, 0.1);
  border: 1px solid var(--cyber-red);
  color: #d86a7a;
  border-radius: var(--radius-sm);
}

body.section-admin input[type="text"],
body.section-admin input[type="password"],
body.section-admin select,
body.section-admin textarea {
  background: var(--cyber-bg) !important;
  border: 1px solid var(--cyber-border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--cyber-text) !important;
  font-family: var(--cyber-font-body) !important;
}

body.section-admin input:focus,
body.section-admin select:focus,
body.section-admin textarea:focus {
  border-color: var(--cyber-yellow) !important;
  box-shadow: 0 0 0 2px var(--cyber-yellow-dim) !important;
}

body.section-admin label {
  color: var(--cyber-muted) !important;
  font-family: var(--cyber-font-body) !important;
}

body.section-admin .admin-section {
  background: var(--cyber-panel);
  border: 1px solid var(--cyber-border);
  border-radius: var(--radius-sm);
}

body.section-admin .admin-section:hover {
  border-color: var(--cyber-yellow);
  box-shadow: var(--shadow-md);
}

body.section-admin .admin-panel {
  border-radius: var(--radius-sm) !important;
}

body.section-admin [style*="background: var(--bg-card)"],
body.section-admin [style*="background:var(--bg-card)"] {
  border-radius: var(--radius-sm) !important;
}

body.section-admin .admin-badge {
  padding: 6px 12px;
  background: var(--cyber-yellow-dim);
  border: 1px solid var(--cyber-yellow);
  color: var(--cyber-yellow);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

body.section-admin #passwordModal > div,
body.section-admin #editModal > div,
body.section-admin #groupModal > div {
  background: var(--cyber-panel) !important;
  border: 1px solid var(--cyber-yellow) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
}

body.section-admin #passwordModal h3,
body.section-admin #editModal h3,
body.section-admin #groupModal h3 {
  color: var(--cyber-yellow) !important;
  font-family: var(--cyber-font-display) !important;
}

body.section-admin ::-webkit-scrollbar-thumb {
  background: var(--cyber-border);
  border-radius: 0;
}

body.section-admin ::-webkit-scrollbar-thumb:hover {
  background: var(--cyber-muted);
}

body.section-admin .username {
  font-family: var(--cyber-font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cyber-yellow);
  background: transparent !important;
  border: 1px solid var(--cyber-yellow) !important;
  -webkit-text-fill-color: var(--cyber-yellow);
  border-radius: var(--radius-sm);
}

body.section-admin .theme-toggle,
body.section-admin .menu-toggle {
  background: var(--cyber-surface) !important;
  border: 1px solid var(--cyber-border) !important;
  color: var(--cyber-yellow);
  border-radius: var(--radius-sm);
}

body.section-admin .theme-toggle:hover,
body.section-admin .menu-toggle:hover {
  background: var(--cyber-yellow-dim) !important;
  border-color: var(--cyber-yellow) !important;
  color: var(--cyber-yellow);
  box-shadow: none;
}

@media (max-width: 768px) {
  body.section-admin .admin-grid {
    grid-template-columns: 1fr !important;
  }
  body.section-admin .admin-actions {
    grid-template-columns: 1fr !important;
  }
  body.section-admin .groups-grid {
    grid-template-columns: 1fr !important;
  }
}

body.section-admin .admin-icon-btn {
  background: var(--cyber-surface);
  border: 1px solid var(--cyber-border);
  color: var(--cyber-muted);
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  line-height: 1;
}

body.section-admin .admin-icon-btn:hover {
  background: var(--cyber-cyan-dim);
  border-color: var(--cyber-cyan);
  color: var(--cyber-cyan);
}

body.section-admin .admin-icon-btn-danger:hover {
  background: rgba(201, 74, 92, 0.15);
  border-color: var(--cyber-red);
  color: var(--cyber-red);
}

body.section-admin .group-card:hover {
  border-color: var(--cyber-yellow);
  box-shadow: var(--shadow-md);
}

body.section-admin .group-card:hover .group-card-bar {
  opacity: 1;
}

body.section-admin #editGroupModal > div {
  background: var(--cyber-panel) !important;
  border: 1px solid var(--cyber-yellow) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
}
