/* ===== 英语教师工作台 - 渐变绿色系主题 ===== */

:root {
  --bg-start: #f0fdf4;
  --bg-end: #d1fae5;
  --sidebar-start: #053f2e;
  --sidebar-end: #065f46;
  --sidebar-active: #10b981;
  --sidebar-active-bg: rgba(16, 185, 129, 0.18);
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #34d399;
  --primary-bg: #ecfdf5;
  --accent: #f59e0b;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-white: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* 行内 SVG 图标默认尺寸，防止无显式宽高时被浏览器无限放大 */
svg {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  flex-shrink: 0;
}

#app { display: flex; height: 100%; overflow: hidden; }

/* ===== Sidebar ===== */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.sidebar-header {
  padding: 20px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, #10b981, #34d399);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16,185,129,0.4);
}

.sidebar-logo svg { width: 22px; height: 22px; }

.sidebar-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.5px;
}

.sidebar-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 10px 20px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 2px;
  font-size: 13.5px;
  user-select: none;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: rgba(255,255,255,0.95);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: #fff;
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--sidebar-active);
  border-radius: 0 2px 2px 0;
}

.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

.nav-section-label {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 14px 6px;
  font-weight: 600;
}

#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 99;
}

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

/* ===== Main Wrapper ===== */
#main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ===== Topbar ===== */
#topbar {
  height: var(--topbar-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  z-index: 50;
}

.hamburger {
  display: none;
  width: 36px; height: 36px;
  border: none;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
}

.hamburger svg { width: 20px; height: 20px; }

.class-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-bg);
  padding: 7px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
}

.class-selector:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.class-selector .class-icon { width: 18px; height: 18px; color: var(--primary-dark); }

.class-selector .class-name { font-weight: 600; font-size: 14px; color: var(--primary-dark); }

.class-selector .dropdown-arrow { width: 14px; height: 14px; color: var(--primary-dark); }

.topbar-spacer { flex: 1; }

.topbar-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.topbar-date { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.topbar-time { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.topbar-user-wrap {
  position: relative;
  cursor: pointer;
}

.topbar-user {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.topbar-settings-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s;
  padding: 6px;
}
.topbar-settings-btn:hover {
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* ===== Content ===== */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

#content::-webkit-scrollbar { width: 6px; }
#content::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.module-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-title svg { width: 24px; height: 24px; color: var(--primary); }

.module-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ===== Cards ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: box-shadow 0.2s;
}

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg { width: 18px; height: 18px; color: var(--primary); }

/* ===== Grid ===== */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ===== Stat Cards ===== */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
}

.stat-card.green::before { background: linear-gradient(180deg, #10b981, #059669); }
.stat-card.blue::before { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.stat-card.amber::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.stat-card.red::before { background: linear-gradient(180deg, #ef4444, #dc2626); }
.stat-card.purple::before { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.green { background: #ecfdf5; color: #059669; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.amber { background: #fffbeb; color: #d97706; }
.stat-icon.red { background: #fef2f2; color: #dc2626; }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }

.stat-icon svg { width: 22px; height: 22px; }

.stat-value { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  white-space: nowrap;
  user-select: none;
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 2px 6px rgba(16,185,129,0.3);
}

.btn-primary:hover { box-shadow: 0 4px 12px rgba(16,185,129,0.4); transform: translateY(-1px); }

.btn-outline {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
}

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

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

.btn-ghost:hover { background: var(--border-light); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

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

.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.data-table th {
  background: #f9fafb;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.data-table tr:hover td { background: #f9fafb; }
.data-table tr:last-child td { border-bottom: none; }

/* Master schedule table */
.ms-table th { font-size: 11px; padding: 6px 4px; }
.ms-table td { font-size: 12px; padding: 6px 4px; vertical-align: top; }
.ms-table .ms-cell-sub { font-size: 11px; color: var(--text-tertiary); }

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green { background: #ecfdf5; color: #059669; }
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-amber { background: #fffbeb; color: #d97706; }
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font);
  background: #fff;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

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

.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* ===== Modal ===== */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#modal-overlay.show { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-title { font-size: 16px; font-weight: 700; }

.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--border-light);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 20px; }

.about-panel { text-align:center; padding:8px 4px 4px; }
.about-logo { width:72px; height:72px; display:block; margin:0 auto 12px; border-radius:18px; box-shadow:var(--shadow-md); }
.about-panel h2 { margin:0; font-size:24px; letter-spacing:-.02em; }
.about-slogan { display:inline-block; margin:10px 0 18px; padding:7px 12px; border-radius:999px; background:var(--primary-bg); color:var(--primary); font-weight:650; }
.about-description { max-width:440px; margin:0 auto 20px; color:var(--text-secondary); line-height:1.7; }
.about-meta { margin:0; padding:0; border:1px solid var(--border-light); border-radius:var(--radius); overflow:hidden; text-align:left; }
.about-meta div { display:flex; justify-content:space-between; gap:20px; padding:11px 14px; }
.about-meta div + div { border-top:1px solid var(--border-light); }
.about-meta dt { color:var(--text-secondary); }
.about-meta dd { margin:0; font-weight:650; color:var(--text-primary); }

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Toast ===== */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  border-left: 4px solid var(--primary);
  max-width: 360px;
}

.toast.success { border-left-color: var(--primary); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success svg { color: var(--primary); }
.toast.error svg { color: var(--danger); }
.toast.warning svg { color: var(--warning); }
.toast.info svg { color: var(--info); }

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

/* ===== Schedule Grid ===== */
.schedule-grid {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.schedule-cell {
  background: #fff;
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.schedule-cell.header { background: #f0fdf4; font-weight: 700; color: var(--primary-dark); }
.schedule-cell.time { background: #f9fafb; font-weight: 600; color: var(--text-secondary); font-size: 11px; }
.schedule-cell.lesson { cursor: pointer; transition: background 0.2s; }
.schedule-cell.lesson:hover { background: var(--primary-bg); }
.schedule-cell-empty { cursor: pointer; transition: background 0.2s; }
.schedule-cell-empty:hover { background: #f0fdf4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); background-size: 20px; background-repeat: no-repeat; background-position: center; }
.schedule-cell.lesson .subject { font-weight: 600; color: var(--primary-dark); }
.schedule-cell.lesson .class-label { font-size: 10px; color: var(--text-tertiary); margin-top: 2px; }
.schedule-cell.lesson .teacher-label { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

.academic-module-header{flex-wrap:nowrap}.academic-module-header>.academic-subject-tabs{flex:1;justify-content:center;margin:0;padding:2px 8px;min-width:0}.academic-subject-tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin}.academic-subject-tab{flex:0 0 auto;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);padding:8px 18px;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.academic-subject-tab:hover{border-color:var(--primary);color:var(--primary)}.academic-subject-tab.active{border-color:var(--primary);background:var(--primary);color:#fff}
.homework-summary{display:grid;grid-template-columns:repeat(3,minmax(0,160px));gap:10px}.homework-summary button{display:flex;align-items:baseline;gap:8px;padding:12px 16px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);color:var(--text-secondary);cursor:pointer}.homework-summary strong{font-size:22px;color:var(--text-primary)}.homework-summary .danger,.homework-summary .danger strong{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 35%,var(--border))}.homework-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.homework-toolbar .tabs{margin-bottom:12px}.homework-task-list{display:grid;gap:10px}.homework-task-card{display:grid;grid-template-columns:minmax(0,1fr) 150px auto;align-items:center;gap:18px;padding:16px 18px;border:1px solid var(--border);border-left:4px solid var(--primary);border-radius:var(--radius-md);background:var(--card-bg);box-shadow:var(--shadow);cursor:pointer}.homework-task-card:hover{box-shadow:var(--shadow-lg)}.homework-task-card.overdue{border-left-color:var(--danger)}.homework-task-title{font-weight:700;color:var(--text-primary)}.homework-task-main p{margin:5px 0 0;color:var(--text-secondary);font-size:13px;line-height:1.5}.homework-task-meta{display:flex;flex-wrap:wrap;gap:6px 12px;margin-top:7px;color:var(--text-tertiary);font-size:12px}.homework-task-progress{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:2px 8px;color:var(--text-secondary);font-size:12px}.homework-task-progress strong{font-size:17px;color:var(--text-primary)}.homework-task-progress .progress-bar{grid-column:1/-1}.homework-subject-label{margin-bottom:14px;padding:10px 12px;border-radius:var(--radius);background:var(--primary-bg);color:var(--primary-dark);font-size:13px;font-weight:650}.homework-preset-list{display:flex;flex-wrap:wrap;gap:8px;margin:-4px 0 16px}.homework-preset{border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-secondary);padding:7px 14px;font:inherit;font-size:13px;cursor:pointer}.homework-preset.active{border-color:var(--primary);background:var(--primary-bg);color:var(--primary-dark);font-weight:700}.homework-deadline-toggle{display:flex;align-items:center;gap:8px;margin-bottom:10px;color:var(--text-primary);font-size:13px;font-weight:650}.homework-detail-content{margin-bottom:12px;padding:12px;border-radius:var(--radius);background:var(--bg-secondary);color:var(--text-secondary);line-height:1.6}.homework-detail-meta{display:flex;gap:16px;color:var(--text-tertiary);font-size:12px}.homework-detail-progress{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:2px 8px;margin:14px 0}.homework-detail-progress strong{font-size:22px}.homework-detail-progress .progress-bar{grid-column:1/-1}.homework-student-results{display:grid;gap:7px;max-height:52vh;overflow-y:auto}.homework-student-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid var(--border-light);border-radius:var(--radius);background:var(--surface)}.homework-student-row.observation{display:grid;grid-template-columns:minmax(120px,.7fr) minmax(180px,1.3fr)}.homework-result-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}.homework-score-input{width:100px}
@media(max-width:768px){.academic-module-header{align-items:flex-start;flex-wrap:wrap}.academic-module-header>div:first-child{order:1}.academic-module-header>.academic-subject-tabs{order:3;flex-basis:calc(100% + 32px);justify-content:flex-start;margin:0 -16px;padding:4px 16px}.academic-module-header>.btn{order:2}.homework-summary{grid-template-columns:repeat(3,1fr)}.homework-summary button{display:grid;gap:0;padding:10px}.homework-task-card{grid-template-columns:1fr auto;gap:10px}.homework-task-progress{grid-column:1/-1;grid-row:2}.homework-task-card>.btn{grid-column:2;grid-row:1}.homework-student-row.observation{grid-template-columns:1fr}.homework-toolbar{align-items:flex-end}.homework-toolbar>.text-sm{display:none}}
.schedule-teacher { font-size: 12px; color: var(--text-secondary); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--primary-light));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 2px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 2px #fff;
}

.timeline-date { font-size: 11px; color: var(--text-tertiary); font-weight: 600; }
.timeline-title { font-size: 14px; font-weight: 600; margin: 2px 0; }
.timeline-desc { font-size: 12px; color: var(--text-secondary); }

/* ===== Quick Action Grid ===== */
.semester-progress-card { padding:18px 20px; border:1px solid color-mix(in srgb,var(--primary) 25%,var(--border)); border-radius:var(--radius-md); background:linear-gradient(135deg,var(--surface),var(--primary-bg)); box-shadow:var(--shadow-sm); }
.semester-progress-head,.semester-progress-dates { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.semester-progress-head>div { display:flex; align-items:baseline; gap:9px; }
.semester-progress-head>div:last-child { text-align:right; }
.semester-progress-head strong { color:var(--text-primary); font-size:15px; }
.semester-progress-head span,.semester-progress-dates { color:var(--text-secondary); font-size:11px; }
.semester-progress-track { height:10px; margin:14px 0 8px; overflow:hidden; border-radius:99px; background:var(--border-light); box-shadow:inset 0 1px 2px rgba(0,0,0,.08); }
.semester-progress-track i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary),var(--primary-light)); transition:width .4s ease; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.quick-action {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #a7f3d0;
}

.quick-action svg { width: 26px; height: 26px; color: var(--primary); margin-bottom: 6px; }
.quick-action span { font-size: 12px; font-weight: 600; display: block; }

/* ===== Resource Cards ===== */
.resource-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  display: block;
}

.resource-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #a7f3d0; }

.resource-card .res-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.resource-card .res-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.resource-card .res-desc { font-size: 12px; color: var(--text-secondary); }

/* ===== Seating Chart ===== */
.seating-grid {
  display: grid;
  gap: 6px;
  justify-content: center;
  padding: 20px 0;
}

.seat {
  width: 64px; height: 50px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  background: #f9fafb;
}

.seat:hover { border-color: var(--primary); }
.seat.selected { border-color: var(--primary); background: var(--primary-bg); }
.seat .seat-name { font-weight: 600; font-size: 12px; }
.seat .seat-num { font-size: 10px; color: var(--text-tertiary); }

.seat-empty { background: #f3f4f6; border: 2px dashed var(--border); }
.seat-teacher { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-weight: 700; }

.blackboard {
  background: linear-gradient(135deg, #059669, #064e3b);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 13px;
}

/* ===== Progress Bar ===== */
.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ===== Checkbox ===== */
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  cursor: pointer;
}

.checkbox-item:hover { background: var(--border-light); }

.custom-checkbox {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  cursor: pointer;
}

.custom-checkbox.checked {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary-dark);
}

.custom-checkbox.checked svg { display: block; }
.custom-checkbox svg { display: none; width: 12px; height: 12px; color: #fff; }

.todo-text { flex: 1; font-size: 13px; }
.todo-text.done { text-decoration: line-through; color: var(--text-tertiary); }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ===== Chart Container ===== */
.chart-container {
  position: relative;
  width: 100%;
  min-height: 120px;
}

.chart-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
}

/* ===== Dropdown Menu ===== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 180px;
  z-index: 60;
  overflow: hidden;
}

.dropdown-menu.show { display: block; animation: modalIn 0.15s ease; }

.dropdown-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
}

.dropdown-item:hover { background: var(--primary-bg); }
.dropdown-item svg { width: 16px; height: 16px; color: var(--primary); }

/* ===== Notes ===== */
.note-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  position: relative;
}

.note-card .note-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.note-card .note-content { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.note-card .note-date { font-size: 11px; color: var(--text-tertiary); margin-top: 6px; }

/* ===== Misc ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  cursor: pointer;
}

.list-item:hover { background: var(--border-light); }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  color: #fff;
}

.divider { height: 1px; background: var(--border-light); margin: 12px 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root { --sidebar-w: 250px; --topbar-h: 54px; }

  #sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }

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

  .hamburger { display: flex; }

  #content { padding: 12px; }

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

  .module-title { font-size: 17px; }
  .module-title svg { width: 20px; height: 20px; }

  .stat-card { padding: 12px; }
  .stat-value { font-size: 20px; }

  .schedule-grid { grid-template-columns: 44px repeat(5, 1fr); font-size: 10px; }
  .schedule-cell { padding: 5px 3px; min-height: 42px; font-size: 10px; }
  .schedule-cell .subject { font-size: 11px; }

  .modal { max-width: 100%; max-height: 90vh; }

  .topbar-datetime { display: none; }
  .topbar-user { display: none; }

  .class-selector { padding: 6px 10px; }
  .class-selector .class-name { font-size: 13px; }

  .table-wrap { font-size: 12px; }
  .data-table th, .data-table td { padding: 7px 8px; }

  .quick-actions { grid-template-columns: repeat(3, 1fr); }

  .seat { width: 52px; height: 42px; }
  .seat .seat-name { font-size: 10px; }

  #toast-container { top: 10px; right: 10px; left: 10px; }
  .toast { max-width: 100%; }

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

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .schedule-grid { grid-template-columns: 36px repeat(5, 1fr); }
  .schedule-cell { padding: 3px 2px; min-height: 36px; }
  .schedule-cell .subject { font-size: 10px; }
  .schedule-cell .class-label { display: none; }
}

/* ===== Loading ===== */
.startup-loading{position:fixed;inset:0;z-index:20000;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;background:var(--bg-start);color:var(--text-primary);transition:opacity .22s ease,visibility .22s ease}.startup-loading.is-hidden{opacity:0;visibility:hidden;pointer-events:none}.startup-loading strong{font-size:18px}.startup-loading span{color:var(--text-secondary);font-size:13px}.startup-pony{font-size:44px;line-height:1;filter:drop-shadow(0 10px 10px color-mix(in srgb,var(--primary) 26%,transparent));animation:pony-jump .85s cubic-bezier(.5,0,.5,1) infinite}@keyframes pony-jump{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-16px) rotate(4deg)}}@media (prefers-reduced-motion:reduce){.startup-pony{animation:none}}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Recitation Grid ===== */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.rec-cell {
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  justify-content: center;
}

.rec-cell:hover { transform: scale(1.05); box-shadow: var(--shadow-md); }
.rec-cell-no { font-size: 10px; opacity: 0.8; }
.rec-cell-name { font-size: 13px; font-weight: 700; }
.rec-cell-status { font-size: 16px; font-weight: 700; }

/* Unit/Page tabs */
.rec-unit-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rec-unit-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--border-light);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.rec-unit-tab:hover { background: var(--primary-bg); color: var(--primary); }
.rec-unit-tab.active { background: var(--primary); color: #fff; }

.rec-page-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.rec-page-tab {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--border-light);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.rec-page-tab:hover { background: var(--primary-bg); color: var(--primary); }
.rec-page-tab.active { background: var(--primary); color: #fff; }

/* Student view */
.rec-student-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-student-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.rec-student-unit {
  min-width: 60px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-bg);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  text-align: center;
  flex-shrink: 0;
}

.rec-student-pages {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 1;
}

.rec-student-cell {
  width: 40px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 10px;
}

.rec-student-cell:hover { transform: scale(1.1); box-shadow: var(--shadow-md); }
.rec-page-name { font-weight: 700; font-size: 11px; }
.rec-page-status { font-size: 14px; font-weight: 700; }

/* Gray stat card */
.stat-card.gray { background: #f3f4f6; }
.stat-icon.gray { background: #9ca3af; }

/* ===== Print ===== */
@media print {
  #sidebar, #topbar, .no-print { display: none !important; }
  #content { padding: 0; overflow: visible; }
  body { background: #fff; }
}

/* ===== Responsive Recitation ===== */
@media (max-width: 768px) {
  .rec-grid { grid-template-columns: repeat(6, 1fr); }
  .rec-cell { min-height: 60px; padding: 6px 2px; }
  .rec-cell-name { font-size: 12px; }
}

@media (max-width: 480px) {
  .rec-grid { grid-template-columns: repeat(4, 1fr); }
  .rec-cell-name { font-size: 12px; }
}

/* ===== Teacher Kit ===== */
.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-item { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border-light); overflow: hidden; transition: all 0.2s; }
.tk-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.tk-item.active { border-color: var(--primary); box-shadow: var(--shadow-md); }
.tk-q { padding: 14px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-primary); }
.tk-num { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.tk-a { padding: 0 16px 16px 56px; color: var(--text-secondary); font-size: 13px; line-height: 1.8; border-top: 1px dashed var(--border-light); margin-top: -4px; padding-top: 12px; }
.tk-a-label { font-weight: 600; color: var(--primary); margin-bottom: 6px; font-size: 12px; }
.tk-input-row { display: flex; gap: 8px; align-items: center; }
.tk-custom-input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font); outline: none; transition: border-color 0.2s; }
.tk-custom-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.tk-edit-area { width: 100%; min-height: 120px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font); line-height: 1.7; resize: vertical; outline: none; }
.tk-edit-area:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg); }
.tk-section-title { font-weight: 700; font-size: 14px; color: var(--text-primary); padding: 8px 0 4px; display: flex; align-items: center; gap: 6px; }
.tk-item.custom .tk-num { background: var(--primary); color: #fff; }

/* ===== Dashboard Expand ===== */
.dash-expand-section { margin-bottom: 16px; animation: slideDown 0.25s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.stat-card-active { box-shadow: 0 0 0 2px var(--primary), var(--shadow-md) !important; }

/* Dashboard Homework expand */
.dash-hw-item { padding: 12px; border-radius: var(--radius-sm); transition: background 0.15s; }
.dash-hw-item:hover { background: #fef9e7; }
.dash-hw-progress { display: flex; align-items: center; gap: 8px; }

/* ===== Schedule Timeline (我的课表) ===== */
.schedule-timeline { margin-top: 8px; }
.schedule-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; border-left: 3px solid transparent; }
.schedule-row:hover { background: var(--bg-tertiary); border-left-color: var(--primary); }
.schedule-time { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.schedule-time-start { font-weight: 700; font-size: 14px; color: var(--primary-dark); }
.schedule-time-end { font-size: 11px; color: var(--text-tertiary); }
.schedule-time-extra { min-width: 60px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.schedule-period { font-size: 12px; color: var(--text-secondary); background: var(--bg-secondary); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.schedule-subject { font-size: 13px; font-weight: 600; white-space: nowrap; }
.schedule-class { font-size: 12px; color: var(--text-secondary); flex: 1; }
.schedule-extras { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border-light); }
.schedule-extra-row { opacity: 0.75; border-left-color: transparent; }
.schedule-extra-row:hover { opacity: 1; background: #faf5ff; }

/* ===== Picture Books ===== */
.pb-categories { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pb-cat { padding: 6px 14px; border-radius: var(--radius-md); background: #fff; border: 1px solid var(--border-light); font-size: 13px; cursor: pointer; transition: all 0.2s; color: var(--text-secondary); }
.pb-cat:hover { border-color: var(--primary); color: var(--primary); }
.pb-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.pb-card { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border-light); overflow: hidden; cursor: pointer; transition: all 0.2s; }
.pb-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.pb-cover { width: 100%; height: 200px; background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pb-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-no-cover { width: 60px; height: 60px; color: var(--text-tertiary); }
.pb-title { padding: 10px 12px 4px; font-weight: 600; font-size: 13px; line-height: 1.4; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-desc { padding: 0 12px 10px; font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.pb-detail { display: flex; gap: 24px; padding: 16px; }
.pb-detail-cover { width: 240px; height: 320px; background: var(--bg-secondary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.pb-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.pb-detail-info { flex: 1; }
.pb-detail-info h2 { margin: 0 0 12px; font-size: 20px; color: var(--text-primary); }

/* ===== Dashboard enhancements ===== */
.stat-rate { position: absolute; top: 8px; right: 12px; font-size: 11px; font-weight: 600; color: var(--primary); background: var(--primary-light); padding: 2px 8px; border-radius: 10px; }
.stat-card { position: relative; }

@media (max-width: 768px) {
  .pb-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pb-detail { flex-direction: column; }
  .pb-detail-cover { width: 100%; height: 240px; }
  .tk-q { font-size: 13px; padding: 12px; }
  .tk-a { padding: 0 12px 12px 48px; }
}

@media (max-width: 480px) {
  .pb-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pb-cover { height: 160px; }
  .pb-title { font-size: 12px; }
}

/* ===== Auth Modal ===== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
  padding: 36px 28px;
  text-align: center;
  animation: authPop 0.35s ease-out;
}

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

.auth-icon {
  width: 72px; height: 72px; margin: 0 auto 16px; overflow: hidden;
  border-radius: 18px; box-shadow: var(--shadow-md);
}
.auth-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }

.auth-card h2 {
  font-size: 22px;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-form {
  text-align: left;
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form input, .auth-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: all 0.2s;
}

.auth-form input:focus, .auth-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 12px;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
}

.auth-toggle {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.auth-toggle a:hover {
  text-decoration: underline;
}
.auth-card-wide { max-width: 460px; max-height: calc(100vh - 40px); overflow: auto; }
.auth-form select { background: var(--surface); color: var(--text-primary); }
.auth-help, .security-question-text { color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.security-question-text { padding: 10px 12px; border-radius: var(--radius); background: var(--primary-bg); }
.profile-security-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.profile-security-section h4 { margin: 0 0 12px; color: var(--text-primary); }
.is-hidden { display: none !important; }

@media (max-width: 480px) {
  .auth-overlay { padding: 10px; }
  .auth-card { padding: 25px 18px; }
}


.development-channel-badge{position:fixed;right:16px;bottom:84px;z-index:189;padding:7px 11px;border-radius:999px;background:#111827;color:#fbbf24;font-size:11px;font-weight:800;letter-spacing:.04em;box-shadow:0 8px 24px #11182740}
.feature-stage-badge{display:inline-flex;margin-left:6px;padding:1px 5px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:9px;font-weight:800;line-height:1.5;vertical-align:middle}
[data-app-channel="development"] .feature-stage-badge{background:#111827;color:#fbbf24}
.feature-building-state{min-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:40px;text-align:center;border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--surface);color:var(--text-secondary)}
.feature-building-state svg{width:46px;height:46px;color:var(--primary)}
.feature-building-state h3{margin:4px 0 0;color:var(--text-primary);font-size:20px}
.feature-building-state p{margin:0;font-size:14px}
.feature-dev-notice{display:flex;align-items:center;gap:10px;margin-bottom:14px;padding:10px 14px;border:1px solid #f59e0b66;border-radius:var(--radius);background:#fffbeb;color:#92400e;font-size:13px}
.feature-dev-notice strong{white-space:nowrap}
.lesson-resource-section{margin-bottom:28px}
.lesson-resource-heading{display:flex;align-items:baseline;gap:10px;margin-bottom:12px}
.lesson-resource-heading h3{margin:0;font-size:16px;color:var(--text-primary)}
.lesson-resource-heading span{font-size:12px;color:var(--text-secondary)}
.lesson-resource-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.lesson-resource-grid .resource-card{position:relative;min-width:0}
.resource-category{display:inline-flex;margin:8px 0 4px;padding:2px 7px;border-radius:999px;background:var(--primary-bg);color:var(--primary);font-size:10px;font-weight:700}
.lesson-resource-fallback{padding:24px;border:1px dashed var(--border);border-radius:var(--radius);background:var(--surface);color:var(--text-secondary);font-size:13px;text-align:center}
@media (max-width:760px){.lesson-resource-grid{grid-template-columns:1fr}.development-channel-badge{right:10px;bottom:76px}.feature-dev-notice{align-items:flex-start;flex-direction:column;gap:3px}}
