/* ========================================
   Leitner Multiplication - CE2
   Design joli, coloré, adapté enfants
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --box-1: #ff6b6b;
  --box-1-light: #ffe0e0;
  --box-2: #ffa94d;
  --box-2-light: #fff0e0;
  --box-3: #ffd43b;
  --box-3-light: #fff9db;
  --box-4: #51cf66;
  --box-4-light: #d3f9d8;
  --mastered: #339af0;
  --mastered-light: #d0ebff;
  --bg: #f8f9ff;
  --card-bg: #ffffff;
  --text: #2b2d42;
  --text-light: #8d99ae;
  --shadow: 0 4px 24px rgba(43, 45, 66, 0.08);
  --shadow-hover: 0 8px 32px rgba(43, 45, 66, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
}

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

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 18px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* ========================================
   LOGIN PAGE
   ======================================== */

.login-page {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 420px;
  width: 100%;
  animation: slideUp 0.5s ease-out;
}

.login-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

.login-card h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 32px;
}

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

.input-group input {
  width: 100%;
  padding: 16px 20px;
  font-size: 22px;
  font-family: inherit;
  font-weight: 700;
  border: 3px solid #e9ecef;
  border-radius: var(--radius-sm);
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: 1px;
}

.input-group input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-hint {
  display: block;
  margin-top: 8px;
  color: var(--text-light);
  font-size: 13px;
}

.error-msg {
  background: #ffe3e3;
  color: #c92a2a;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 600;
  font-size: 15px;
}

.teacher-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.teacher-link:hover {
  color: white;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  font-family: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 20px;
  padding: 16px 32px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  transform: translateY(-1px);
}

.btn-large {
  width: 100%;
  padding: 18px 32px;
  font-size: 22px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-outline {
  background: transparent;
  border: 2px solid #dee2e6;
  color: var(--text-light);
}

.btn-outline:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ========================================
   APP HEADER
   ======================================== */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--card-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
  overflow: visible;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  font-size: 32px;
}

.header-left h1 {
  font-size: 22px;
  font-weight: 800;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.student-name {
  font-weight: 700;
  color: var(--text);
  font-size: 16px;
}

/* ========================================
   BOXES SECTION
   ======================================== */

.boxes-section {
  padding: 32px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.boxes-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  min-width: 110px;
  flex: 1;
  max-width: 140px;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 5px solid;
}

.box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.box-1 { border-color: var(--box-1); }
.box-2 { border-color: var(--box-2); }
.box-3 { border-color: var(--box-3); }
.box-4 { border-color: var(--box-4); }
.box-mastered { border-color: var(--mastered); }

.box-label {
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.box-1 .box-label { color: var(--box-1); }
.box-2 .box-label { color: var(--box-2); }
.box-3 .box-label { color: var(--box-3); }
.box-4 .box-label { color: var(--box-4); }
.box-mastered .box-label { color: var(--mastered); }

.box-count {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.box-desc {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
}

.box-arrow {
  font-size: 24px;
  color: #dee2e6;
  font-weight: 900;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-bar-container {
  background: #e9ecef;
  border-radius: 100px;
  height: 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}

.progress-bar {
  background: linear-gradient(135deg, #51cf66, #339af0);
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
  min-width: 0;
}

.progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* ========================================
   REVIEW START
   ======================================== */

.review-start {
  text-align: center;
}

.due-info {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.no-cards-msg {
  font-size: 24px;
  font-weight: 800;
  color: var(--box-4);
  padding: 32px;
  background: var(--box-4-light);
  border-radius: var(--radius);
}

/* ========================================
   REVIEW CARD
   ======================================== */

.review-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
  padding: 24px;
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 480px;
  width: 100%;
  animation: slideUp 0.3s ease-out;
  transition: background 0.3s;
}

.review-card.feedback-correct {
  background: #d3f9d8;
}

.review-card.feedback-incorrect {
  background: #ffe3e3;
}

.review-box-indicator {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.box-color-1 { background: var(--box-1-light); color: var(--box-1); }
.box-color-2 { background: var(--box-2-light); color: var(--box-2); }
.box-color-3 { background: var(--box-3-light); color: var(--box-3); }
.box-color-4 { background: var(--box-4-light); color: var(--box-4); }

.review-remaining {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 24px;
}

.review-question {
  font-size: 56px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.review-equals {
  font-size: 40px;
  font-weight: 900;
  color: var(--text-light);
  margin-bottom: 16px;
}

.answer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.answer-input {
  width: 100%;
  padding: 20px;
  font-size: 48px;
  font-family: inherit;
  font-weight: 900;
  border: 4px solid #e9ecef;
  border-radius: var(--radius-sm);
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

.answer-input::-webkit-outer-spin-button,
.answer-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.answer-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

/* ========================================
   FEEDBACK
   ======================================== */

.feedback {
  margin-top: 24px;
}

.feedback-icon {
  font-size: 56px;
  margin-bottom: 12px;
  animation: popIn 0.3s ease-out;
}

.feedback-text {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.5;
}

.feedback-text strong {
  font-weight: 900;
}

/* ========================================
   TEACHER PAGE
   ======================================== */

.teacher-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.teacher-header h1 {
  color: white;
}

.teacher-header .btn-outline {
  border-color: rgba(255,255,255,0.4);
  color: white;
}

.teacher-header .btn-outline:hover {
  border-color: white;
}

.teacher-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.teacher-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  flex: 1;
}

.summary-value {
  font-size: 42px;
  font-weight: 900;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.summary-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.students-section h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
}

.students-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.students-table thead {
  background: #f8f9fa;
}

.students-table th {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  text-align: left;
}

.students-table td {
  padding: 14px 16px;
  border-top: 1px solid #f1f3f5;
  font-size: 15px;
}

.student-row {
  cursor: pointer;
  transition: background 0.15s;
}

.student-row:hover {
  background: #f8f9ff;
}

.student-name-cell {
  font-weight: 700;
}

.box-col {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.box-1-header { color: var(--box-1); }
.box-2-header { color: var(--box-2); }
.box-3-header { color: var(--box-3); }
.box-4-header { color: var(--box-4); }
.mastered-header { color: var(--mastered); }

.table-progress-bar {
  background: #e9ecef;
  border-radius: 100px;
  height: 24px;
  position: relative;
  min-width: 100px;
  overflow: hidden;
}

.table-progress-fill {
  background: linear-gradient(135deg, #51cf66, #339af0);
  height: 100%;
  border-radius: 100px;
  transition: width 0.4s;
}

.table-progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.loading,
.empty-msg {
  text-align: center;
  padding: 48px;
  color: var(--text-light);
  font-weight: 600;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  position: relative;
  animation: slideUp 0.3s ease-out;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f3f5;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover {
  background: #dee2e6;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 20px;
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 24px 0 12px;
}

.modal-boxes {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  flex: 1;
  min-width: 80px;
}

.modal-box span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.modal-box strong {
  font-size: 24px;
  font-weight: 900;
}

.modal-box.box-1 { background: var(--box-1-light); color: var(--box-1); }
.modal-box.box-2 { background: var(--box-2-light); color: var(--box-2); }
.modal-box.box-3 { background: var(--box-3-light); color: var(--box-3); }
.modal-box.box-4 { background: var(--box-4-light); color: var(--box-4); }
.modal-box.box-mastered { background: var(--mastered-light); color: var(--mastered); }

.modal-progress-bar-container {
  background: #e9ecef;
  border-radius: 100px;
  height: 28px;
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}

.modal-progress-bar {
  background: linear-gradient(135deg, #51cf66, #339af0);
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s;
}

.modal-progress-bar-container + span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

#modal-progress-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  margin-top: 4px;
}

.recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.recent-table th {
  background: #f8f9fa;
  padding: 8px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-light);
}

.recent-table td {
  padding: 8px 12px;
  border-top: 1px solid #f1f3f5;
}

/* Settings form in modal */
.settings-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
}

.settings-form label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.settings-form input[type="number"] {
  width: 80px;
  padding: 8px 12px;
  font-size: 18px;
  font-family: inherit;
  font-weight: 700;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  text-align: center;
  outline: none;
}

.settings-form input[type="number"]:focus {
  border-color: #667eea;
}

.settings-saved {
  color: var(--box-4);
  font-weight: 700;
  font-size: 14px;
  animation: fadeIn 0.3s;
}

.settings-section h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 24px 0 12px;
  color: var(--text);
}

.settings-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 8px;
  color: var(--text);
}

.setting-hint {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.tables-config {
  margin: 16px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
}

.tables-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.table-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s;
  border: 2px solid #e9ecef;
}

.table-checkbox:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.table-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.table-checkbox-label {
  font-weight: 700;
  font-size: 14px;
}

.table-order-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.order-item {
  padding: 10px 16px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
  user-select: none;
}

.order-item::before {
  content: '⠿';
  color: #adb5bd;
  font-size: 18px;
}

.order-item:hover {
  border-color: #667eea;
}

.order-item.dragging {
  opacity: 0.5;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-save {
  padding: 8px 20px;
  font-size: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: box-shadow 0.2s;
}

.btn-save:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-danger-zone {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #ffe3e3;
  text-align: right;
}

.btn-danger {
  padding: 10px 24px;
  font-size: 14px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #fa5252;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.shake {
  animation: shake 0.3s ease-out;
}

/* ========================================
   GOOGLE LOGIN BUTTON
   ======================================== */

.btn-google {
  background: white;
  color: #3c4043;
  font-size: 16px;
  padding: 14px 24px;
  border: 2px solid #dadce0;
  gap: 12px;
  width: 100%;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   TEACHER DASHBOARD
   ======================================== */

.dashboard-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.dashboard-welcome {
  margin-bottom: 32px;
}

.dashboard-welcome h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 8px;
}

.dashboard-welcome p {
  color: var(--text-light);
  font-size: 16px;
}

.dashboard-tiles {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-tile {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.dashboard-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.dashboard-tile.tile-placeholder {
  opacity: 0.5;
  cursor: default;
}

.dashboard-tile.tile-placeholder:hover {
  transform: none;
  box-shadow: var(--shadow);
}

.tile-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.tile-content {
  flex: 1;
}

.tile-content h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.tile-content p {
  font-size: 14px;
  color: var(--text-light);
}

.tile-arrow {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-light);
  flex-shrink: 0;
}

/* Teacher profile header */
.teacher-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.teacher-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none;
  border: 2px solid rgba(255,255,255,0.4);
}

.teacher-name-header {
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.settings-btn {
  font-size: 16px;
  padding: 6px 10px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.settings-btn:hover {
  border-color: white;
}

.settings-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 220px;
  z-index: 1000;
}

.dropdown-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-header {
  display: block;
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

.dropdown-divider {
  height: 1px;
  background: #f1f3f5;
  margin: 4px 0;
}

.dropdown-logout {
  color: #e03131;
}

/* ========================================
   SCHEDULE SECTION
   ======================================== */

.schedule-section {
  margin-bottom: 32px;
}

.schedule-section h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-hint {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.schedule-config {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.schedule-box-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f3f5;
  flex-wrap: wrap;
}

.schedule-box-row:last-child {
  border-bottom: none;
}

.schedule-box-label {
  font-weight: 800;
  font-size: 15px;
  min-width: 80px;
  flex-shrink: 0;
}

.schedule-box-label.box-1-label { color: var(--box-1); }
.schedule-box-label.box-2-label { color: var(--box-2); }
.schedule-box-label.box-3-label { color: var(--box-3); }
.schedule-box-label.box-4-label { color: var(--box-4); }

.schedule-days {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-day {
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-day input[type="checkbox"] {
  display: none;
}

.schedule-day-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  color: var(--text-light);
}

.schedule-day input:checked + .schedule-day-label {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.schedule-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.schedule-extra select {
  padding: 6px 10px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.schedule-extra select:focus {
  border-color: #667eea;
}

.schedule-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f3f5;
  flex-wrap: wrap;
}

.schedule-order-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-order-group label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.radio-group {
  display: flex;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.radio-option input[type="radio"] {
  accent-color: #667eea;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.schedule-save-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
  .boxes-container {
    gap: 6px;
  }

  .box {
    min-width: 70px;
    padding: 12px 8px;
  }

  .box-count {
    font-size: 28px;
  }

  .box-arrow {
    font-size: 18px;
  }

  .review-question {
    font-size: 42px;
  }

  .answer-input {
    font-size: 36px;
    padding: 16px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .teacher-summary {
    flex-direction: column;
  }

  .students-table {
    font-size: 13px;
  }

  .students-table th,
  .students-table td {
    padding: 10px 8px;
  }

  .dashboard-tile {
    padding: 16px;
    gap: 12px;
  }

  .tile-icon {
    font-size: 36px;
  }

  .schedule-box-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .teacher-name-header {
    display: none;
  }

  .schedule-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .schedule-save-area {
    margin-left: 0;
  }
}
