:root {
  --bg: #f4efe6;
  --paper: #fffaf0;
  --ink: #1f2937;
  --accent: #c2410c;
  --accent-2: #0f766e;
  --line: #d6c9b3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, #ffe8cc 0%, transparent 35%),
    radial-gradient(circle at 80% 20%, #dbeafe 0%, transparent 32%),
    var(--bg);
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 2vw;
  background: rgba(255, 250, 240, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.top-nav-brand {
  font-weight: 800;
  color: #7c2d12;
  text-decoration: none;
}

.top-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.menu-editor-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.menu-item-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr auto;
  gap: 0.6rem;
  align-items: center;
}

.menu-item-row .btn {
  white-space: nowrap;
}

.exercise-editor-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.exercise-item-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.exercise-item-row[hidden] {
  display: none !important;
}

.exercise-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.55rem;
}

.exercise-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.check-inline input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  margin-top: 1rem;
}

.admin-tab {
  flex: 1 1 180px;
  border: 1px solid transparent;
  background: transparent;
  color: #7c2d12;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.72rem 0.95rem;
}

.admin-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.admin-tab-container {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
  margin-top: 0.9rem;
}

.admin-tab-panel[hidden] {
  display: none !important;
}

.operation-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.operation-card {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf5;
  padding: 0.8rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.35rem;
  width: 100%;
  cursor: pointer;
}

.operation-card:hover {
  border-color: #e68a37;
  transform: translateY(-1px);
}

.operation-card.is-active {
  border-color: #c2410c;
  background: #ffedd5;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.14);
}

.operation-card img {
  width: 80px;
  height: 80px;
}

.operation-card h3 {
  margin: 0.15rem 0 0;
}

.operation-card .small {
  margin: 0;
}

.top-nav-links a {
  text-decoration: none;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.top-nav-links a[aria-current="page"] {
  background: #f97316;
  color: #ffffff;
  border-color: #f97316;
}

.container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 2rem 2vw 3rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  box-shadow: 0 14px 30px rgba(31, 41, 55, 0.08);
}

.hero {
  padding: 2rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #efe4ff;
  color: #5b21b6;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1, h2 {
  margin-top: 0;
}

.nav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.table-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #fff0db;
  border: 1px solid #f1c38b;
  color: #9a3412;
  font-weight: 700;
}

button,
.btn {
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--accent-2);
  color: #fff;
}

.btn-plus {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.home-section {
  margin-top: 1.4rem;
}

.quick-dashboard {
  margin-top: 1.2rem;
  background: linear-gradient(140deg, #fff7e6 0%, #eef9ff 100%);
}

.quick-dashboard-controls {
  margin-top: 0.5rem;
}

.quick-dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.quick-dashboard-actions .btn {
  text-align: center;
  font-weight: 800;
}

.quick-dashboard-hint {
  margin: 0.75rem 0 0;
}

.section-header {
  margin-bottom: 0.8rem;
}

.section-header h2,
.section-header p {
  margin: 0;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.feature-card h3,
.feature-card p {
  margin: 0;
}

.feature-kicker {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
  font-weight: 700;
}

.feature-live {
  border-left: 5px solid #0f766e;
}

.feature-soon {
  border-left: 5px solid #9ca3af;
}

.coming-soon {
  margin-top: auto;
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #374151;
  background: #e5e7eb;
}

.section-heading {
  margin-bottom: 0.9rem;
}

.section-heading h2,
.section-heading h3,
.section-heading p {
  margin: 0;
}

.practice-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.2rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.practice-tab {
  flex: 1 1 180px;
  background: transparent;
  color: #7c2d12;
  border: 1px solid transparent;
  padding: 0.8rem 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.practice-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.practice-panel[hidden] {
  display: none !important;
}

.practice-chooser[hidden] {
  display: none !important;
}

.card.is-practicing .quiz-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.quiz-panel {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.quiz-panel #answer {
  width: 7rem;
  min-width: 5.5rem;
  max-width: 12rem;
  display: block;
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.custom-settings {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.quick-start {
  margin-top: 1.4rem;
}

.rekenen-hero {
  background: linear-gradient(140deg, #f3f9ff 0%, #fff7e8 100%);
}

.rekenen-layout {
  display: grid;
  grid-template-columns: minmax(290px, 380px) 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.rekenen-operations {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.rekenen-op-btn {
  border: 1px solid var(--line);
  border-left: 6px solid var(--op-accent, #0f766e);
  border-radius: 12px;
  background: #fff;
  color: inherit;
  width: 100%;
  padding: 0.8rem;
  text-align: left;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.7rem;
}

.rekenen-op-btn.is-active {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.rekenen-op-symbol {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  background: var(--op-accent, #0f766e);
}

.rekenen-op-content {
  display: grid;
  gap: 0.22rem;
}

.rekenen-op-content span {
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.35;
}

.rekenen-exercises {
  min-height: 320px;
}

.rekenen-exercise-list {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.rekenen-exercise-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.rekenen-exercise-item h3,
.rekenen-exercise-item p {
  margin: 0;
}

.rekenen-exercise-item .btn {
  width: fit-content;
}

.rekenen-viewer {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.65rem;
}

.rekenen-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: space-between;
}

.rekenen-viewer-actions .small {
  margin: 0;
}

.rekenen-frame {
  width: 100%;
  min-height: 68vh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.table-card {
  background: linear-gradient(135deg, #fff1d6, #ffdcb0);
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.table-card h3 {
  font-size: 3rem;
  line-height: 1;
  margin: 0.2rem 0 0.8rem;
}

.table-card-1 {
  background: linear-gradient(135deg, #fff3c4, #ffe0a3);
}

.table-card-2 {
  background: linear-gradient(135deg, #dff7ff, #b9ecff);
}

.table-card-5 {
  background: linear-gradient(135deg, #e5f8d5, #c9efb0);
}

.table-card-10 {
  background: linear-gradient(135deg, #ffe0d4, #ffc2af);
}

.table-card-label {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7c2d12;
}

.table-card-actions {
  display: grid;
  gap: 0.65rem;
}

.table-card-actions .btn {
  width: 100%;
  text-align: center;
  font-size: 1rem;
}

.card-toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.75rem;
  font-weight: 700;
  color: #374151;
}

.card-toggle-row input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
  font-weight: 700;
}

.toggle-row input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

textarea {
  min-height: 110px;
}

.small {
  color: #4b5563;
  font-size: 0.9rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.teacher-tabs-card {
  display: grid;
  gap: 0.9rem;
}

.teacher-progress-shortcuts {
  margin-top: 0;
  margin-bottom: 0.2rem;
}

.teacher-progress-shortcuts .btn {
  font-weight: 800;
}

.student-tabs-card {
  display: grid;
  gap: 0.9rem;
}

.teacher-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.teacher-tab {
  flex: 1 1 160px;
  border: 1px solid transparent;
  background: transparent;
  color: #7c2d12;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.7rem 0.95rem;
}

.teacher-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.teacher-tab-container {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.student-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.student-tab {
  flex: 1 1 160px;
  border: 1px solid transparent;
  background: transparent;
  color: #7c2d12;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.7rem 0.95rem;
}

.student-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.student-tab-container {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.9rem;
}

.student-tab-panel[hidden] {
  display: none !important;
}

.skill-overall-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  background: #fff;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.skill-dl-summary-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff8ef;
  padding: 0.8rem;
  margin-bottom: 0.9rem;
  display: grid;
  gap: 0.45rem;
}

.skill-subject-tabs-wrap {
  margin-bottom: 0.7rem;
}

.skill-subject-title {
  margin: 0 0 0.35rem;
}

.skill-subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

.skill-subject-tab {
  flex: 1 1 130px;
  border: 1px solid transparent;
  background: transparent;
  color: #7c2d12;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.skill-subject-tab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.skill-subject-tab:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.skill-dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
}

.skill-dl-metric {
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.55rem;
}

.skill-dl-metric p {
  margin: 0 0 0.2rem;
}

.skill-dl-metric strong {
  font-size: 1.02rem;
  color: #7c2d12;
}

.skill-dl-domain-list {
  display: grid;
  gap: 0.5rem;
}

.skill-dl-domain-item {
  display: grid;
  gap: 0.15rem;
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.skill-dl-domain-item strong {
  color: #7c2d12;
}

.skill-dl-domain-item.is-active {
  border-color: #f97316;
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.12);
}

.growth-visual-block {
  display: grid;
  gap: 0.35rem;
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  padding: 0.55rem;
  background: #fff;
}

.growth-track {
  width: 100%;
  height: 0.8rem;
  border-radius: 999px;
  background: #ece7dd;
  overflow: hidden;
}

.growth-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: 0;
}

.growth-fill.growth-high {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.growth-fill.growth-medium {
  background: linear-gradient(90deg, #60a5fa 0%, #0ea5e9 100%);
}

.growth-fill.growth-low {
  background: linear-gradient(90deg, #f59e0b 0%, #f97316 100%);
}

.growth-fill.growth-neutral {
  background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 100%);
}

.growth-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.growth-chip.growth-high {
  background: #dcfce7;
  color: #166534;
}

.growth-chip.growth-medium {
  background: #dbeafe;
  color: #1d4ed8;
}

.growth-chip.growth-low {
  background: #ffedd5;
  color: #9a3412;
}

.growth-chip.growth-neutral {
  background: #e2e8f0;
  color: #334155;
}

.skill-progress-track {
  width: 100%;
  height: 0.75rem;
  border-radius: 999px;
  background: #ece7dd;
  overflow: hidden;
}

.skill-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9 0%, #22c55e 100%);
  width: 0;
}

.skill-meter-graph-block {
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem 0.5rem;
}

.skill-meter-mini-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  gap: 0.35rem;
  align-items: end;
  min-height: 88px;
}

.skill-meter-mini-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  justify-items: center;
  gap: 0.2rem;
  min-height: 82px;
}

.skill-meter-mini-fill {
  width: 100%;
  max-width: 16px;
  min-height: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22c55e 0%, #0ea5e9 100%);
}

.skill-meter-mini-label {
  font-size: 0.72rem;
  color: #6b7280;
}

.skill-meter-dot-wrap {
  margin-bottom: 0.45rem;
}

.skill-meter-dot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22px, 1fr));
  gap: 0.32rem;
  align-items: start;
}

.skill-meter-dot-item {
  display: grid;
  justify-items: center;
  gap: 0.18rem;
}

.skill-meter-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid #cbd5e1;
  background: #cbd5e1;
}

.skill-meter-dot.is-good {
  background: #22c55e;
  border-color: #16a34a;
}

.skill-meter-dot.is-warn {
  background: #f59e0b;
  border-color: #d97706;
}

.skill-meter-dot.is-neutral {
  background: #94a3b8;
  border-color: #64748b;
}

.skill-meter-dot-label {
  font-size: 0.68rem;
  line-height: 1;
  color: #6b7280;
}

.skill-table-list {
  display: grid;
  gap: 0.65rem;
}

.skill-table-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
  display: grid;
  gap: 0.4rem;
}

.skill-table-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 0.35rem;
}

.skill-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.skill-time-list-wrap {
  border-top: 1px dashed var(--line);
  padding-top: 0.45rem;
}

.skill-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.skill-breakdown-card {
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.5rem;
  display: grid;
  gap: 0.3rem;
}

.skill-breakdown-card p {
  margin: 0;
}

.skill-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.skill-jump-link {
  color: #9a3412;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.skill-jump-link:hover,
.skill-jump-link:focus-visible {
  color: #7c2d12;
}

.skill-breakdown-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.skill-breakdown-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.skill-breakdown-track.speed span {
  background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%);
}

.skill-time-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.2rem;
}

.skill-level-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.skill-level-badge {
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #111827;
}

.skill-level-badge.level-1 { background: #8dd3f7; }
.skill-level-badge.level-2 { background: #86efac; }
.skill-level-badge.level-3 { background: #fcd34d; }
.skill-level-badge.level-4 { background: #fdba74; }
.skill-level-badge.level-5 { background: #f87171; }

.student-table-overview-card {
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
}

.student-table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.55rem;
}

.student-table-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.55rem;
}

.student-table-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.6rem;
}

.student-table-mode-tab {
  border: 1px solid #e8d8c4;
  background: #fff;
  color: #7c2d12;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.student-table-mode-tab.is-active {
  background: #7c2d12;
  border-color: #7c2d12;
  color: #fff7ed;
}

.student-table-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.5rem;
}

.student-table-mode-card {
  border: 1px solid #f0ddca;
  border-radius: 10px;
  padding: 0.5rem;
  display: grid;
  gap: 0.25rem;
  background: #fffaf4;
}

.student-table-mode-card.status-good {
  background: #ecfdf3;
  border-color: #86efac;
}

.student-table-mode-card.status-warn {
  background: #fff7ed;
  border-color: #fdba74;
}

.student-table-mode-card.status-neutral {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.student-table-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.student-table-mode-head h4 {
  margin: 0;
  color: #7c2d12;
}

.student-table-card-simple {
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.55rem;
  display: grid;
  gap: 0.3rem;
}

.student-table-card-simple h4 {
  margin: 0;
  color: #7c2d12;
}

.student-table-pill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.student-table-pill-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.student-table-overview-grid {
  display: grid;
  grid-template-columns: minmax(56px, 70px) repeat(3, minmax(170px, 1fr));
  gap: 0.45rem;
  align-items: start;
}

.student-table-overview-head {
  font-size: 0.78rem;
  font-weight: 800;
  color: #7c2d12;
}

.student-table-overview-cell {
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.42rem;
  display: grid;
  gap: 0.15rem;
}

.student-table-overview-cell.table-name {
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #7c2d12;
  background: #fff7ed;
}

.student-table-status {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.08rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.student-table-status.status-good {
  background: #dcfce7;
  color: #166534;
}

.student-table-status.status-warn {
  background: #ffedd5;
  color: #9a3412;
}

.student-table-status.status-neutral {
  background: #e2e8f0;
  color: #334155;
}

.teacher-tab-panel[hidden] {
  display: none !important;
}

.planning-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.9rem;
}

.planning-subtab {
  flex: 1 1 170px;
  border: 1px solid transparent;
  background: transparent;
  color: #7c2d12;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.6rem 0.85rem;
}

.planning-subtab.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(194, 65, 12, 0.16);
}

.planning-panel[hidden] {
  display: none !important;
}

.dashboard-header-card {
  background: linear-gradient(140deg, #fff7e6 0%, #eef9ff 100%);
}

.auth-card {
  display: flex;
  flex-direction: column;
}

.auth-pre {
  margin-top: 1rem;
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 10px;
  border: 1px solid #1f2937;
  padding: 0.75rem;
  min-height: 140px;
  overflow: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.class-code-box {
  margin-top: 0.9rem;
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.teacher-class-progress {
  margin-top: 0.6rem;
}

.teacher-class-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.55rem;
}

.teacher-progress-metric {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
  display: grid;
  gap: 0.2rem;
}

.teacher-progress-metric p {
  margin: 0;
}

.teacher-progress-metric strong {
  font-size: 1.08rem;
  color: #9a3412;
}

.teacher-progress-metric.progress-tone-good {
  border-color: #86efac;
  background: #f0fdf4;
}

.teacher-progress-metric.progress-tone-warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.teacher-progress-metric.progress-tone-bad {
  border-color: #fca5a5;
  background: #fef2f2;
}

.teacher-class-progress-last {
  margin-top: 0.55rem;
}

.teacher-tables-focus-block {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem;
}

.teacher-tables-focus-block h4 {
  margin: 0 0 0.5rem;
  color: #7c2d12;
}

.teacher-table-mastery-wrap {
  display: grid;
  gap: 0.6rem;
}

.teacher-table-matrix {
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.55rem;
  display: grid;
  gap: 0.45rem;
}

.teacher-table-matrix h5 {
  margin: 0;
  color: #7c2d12;
  font-size: 0.86rem;
}

.teacher-table-matrix-row {
  display: grid;
  gap: 0.3rem;
}

.teacher-table-matrix-row.compact {
  gap: 0.2rem;
}

.teacher-table-matrix-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.teacher-table-chip-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.2rem;
}

.teacher-table-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.25rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 700;
}

.teacher-student-table-matrix {
  margin-top: 0.18rem;
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.45rem;
  display: grid;
  gap: 0.3rem;
}

.teacher-table-mastery-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.teacher-table-mastery-list {
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.55rem;
}

.teacher-table-mastery-list p {
  margin: 0;
}

.teacher-table-mastery-list p + p {
  margin-top: 0.25rem;
}

.teacher-realtime-board {
  margin-top: 0.65rem;
}

.teacher-realtime-summary {
  margin: 0 0 0.45rem;
}

.teacher-realtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}

.teacher-realtime-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.6rem;
  display: grid;
  gap: 0.35rem;
  cursor: pointer;
}

.teacher-realtime-card.is-selected {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.22);
}

.teacher-realtime-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.teacher-live-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.teacher-live-status.live-status-active {
  background: #dcfce7;
  color: #166534;
}

.teacher-live-status.live-status-idle {
  background: #fef3c7;
  color: #92400e;
}

.teacher-live-status.live-status-offline {
  background: #e5e7eb;
  color: #4b5563;
}

.teacher-realtime-activity {
  margin: 0;
  color: #374151;
}

.teacher-live-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.teacher-live-student-detail {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
}

.teacher-live-student-detail h4 {
  margin: 0 0 0.45rem;
  color: #7c2d12;
}

.teacher-live-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
}

.teacher-live-detail-item {
  border: 1px dashed #f0ddca;
  border-radius: 10px;
  background: #fffaf4;
  padding: 0.5rem;
}

.teacher-live-detail-item p {
  margin: 0 0 0.2rem;
}

.teacher-live-detail-item strong {
  color: #7c2d12;
}

.live-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.live-dot.live-dot-good {
  background: #22c55e;
}

.live-dot.live-dot-warn {
  background: #f59e0b;
}

.live-dot.live-dot-bad {
  background: #ef4444;
}

.live-dot.live-dot-neutral {
  background: #cbd5e1;
}

.teacher-visual-panel {
  margin-top: 0.65rem;
}

.teacher-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem;
}

.teacher-visual-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0.75rem;
}

.teacher-visual-card h4 {
  margin: 0;
  color: #7c2d12;
}

.teacher-visual-card .small {
  margin: 0.3rem 0 0.6rem;
}

.teacher-dl-view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.teacher-dl-view-btn {
  border: 1px solid #d9c9af;
  background: #fff;
  color: #7c2d12;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.teacher-dl-view-btn.is-active {
  background: #7c2d12;
  border-color: #7c2d12;
  color: #fff7ed;
}

.teacher-dl-range-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 0.3rem;
  margin-left: 0.3rem;
}

.teacher-dl-range-btn {
  border: 1px solid #d9c9af;
  background: #fff;
  color: #7c2d12;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.teacher-dl-range-btn.is-active {
  background: #b45309;
  border-color: #b45309;
  color: #fff7ed;
}

.teacher-dl-track-wrap {
  position: relative;
  height: 58px;
  margin-top: 0.2rem;
}

.teacher-dl-line-wrap {
  margin-top: 0.2rem;
  border: 1px solid #f0ddca;
  border-radius: 10px;
  background: #fffaf3;
  padding: 0.25rem 0.35rem 0.15rem;
}

.teacher-dl-line-chart {
  width: 100%;
  height: 118px;
  display: block;
}

.teacher-dl-axis {
  stroke: #d1d5db;
  stroke-width: 1.4;
}

.teacher-dl-axis-label {
  fill: #9ca3af;
  font-size: 4px;
  font-weight: 700;
}

.teacher-dl-growth-line {
  stroke: #2563eb;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.teacher-dl-growth-point {
  stroke: #fff;
  stroke-width: 1.2;
}

.teacher-dl-growth-point.start {
  fill: #f97316;
}

.teacher-dl-growth-point.current {
  fill: #2563eb;
}

.teacher-dl-growth-point.mid {
  fill: #94a3b8;
}

.teacher-dl-point-label {
  fill: #475569;
  font-size: 4px;
  font-weight: 700;
}

.teacher-dl-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 26px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 35%, #bbf7d0 100%);
  border: 1px solid #f3d1ab;
}

.teacher-dl-milestone {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  font-size: 0.73rem;
  font-weight: 700;
  color: #6b7280;
}

.teacher-dl-marker {
  position: absolute;
  top: 21px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.teacher-dl-marker.start {
  background: #f97316;
}

.teacher-dl-marker.current {
  background: #2563eb;
}

.teacher-dl-meta {
  margin-top: 0.4rem;
  display: grid;
  gap: 0.2rem;
  font-size: 0.84rem;
  color: #374151;
}

.teacher-domain-list {
  display: grid;
  gap: 0.45rem;
}

.teacher-domain-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) minmax(120px, 1fr) 48px;
  align-items: center;
  gap: 0.5rem;
}

.teacher-domain-label {
  font-size: 0.83rem;
  color: #374151;
}

.teacher-domain-track {
  height: 12px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.teacher-domain-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.teacher-domain-fill.progress-tone-good {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}

.teacher-domain-fill.progress-tone-warn {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}

.teacher-domain-fill.progress-tone-bad {
  background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
}

.teacher-domain-fill.progress-tone-neutral {
  background: linear-gradient(90deg, #6b7280 0%, #9ca3af 100%);
}

.teacher-domain-value {
  font-size: 0.82rem;
  text-align: right;
  color: #374151;
  font-weight: 700;
}

.teacher-students-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.teacher-student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
  background: #fff;
}

.teacher-student-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.teacher-student-progress {
  color: #374151;
}

.teacher-student-progress.progress-tone-good {
  color: #166534;
  font-weight: 700;
}

.teacher-student-progress.progress-tone-warn {
  color: #92400e;
  font-weight: 700;
}

.teacher-student-progress.progress-tone-bad {
  color: #991b1b;
  font-weight: 700;
}

.teacher-student-progress.progress-tone-neutral {
  color: #4b5563;
}

.teacher-student-table-mastery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.1rem;
}

.teacher-mastery-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #334155;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  line-height: 1.25;
}

.teacher-mastery-chip.mastery-good,
.teacher-table-chip.mastery-good {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.teacher-mastery-chip.mastery-warn,
.teacher-table-chip.mastery-warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.teacher-mastery-chip.mastery-bad,
.teacher-table-chip.mastery-bad {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.teacher-mastery-chip.mastery-neutral,
.teacher-table-chip.mastery-neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.student-password-line strong {
  color: #7c2d12;
  letter-spacing: 0.04em;
}

.teacher-student-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.teacher-student-actions .btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.86rem;
}

.weekly-task-list,
.student-task-list,
.student-result-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.weekly-overview-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.weekly-overview-task-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.weekly-overview-task-head,
.weekly-overview-task-meta,
.weekly-overview-student-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.weekly-overview-student-grid {
  display: grid;
  gap: 0.35rem;
}

.weekly-overview-student-row {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
}

.weekly-overview-selfreport {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  background: #fffaf4;
}

.weekly-overview-selfreport summary {
  cursor: pointer;
  color: #7c2d12;
  font-weight: 700;
}

.weekly-overview-selfreport-body {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.3rem;
}

.task-target-list {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.task-create-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.7rem 0.9rem;
  align-items: start;
}

.task-create-field {
  min-width: 0;
}

.task-create-field-wide {
  grid-column: 1 / -1;
}

.task-create-field .small {
  margin: 0.2rem 0 0.35rem;
}

.task-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.4rem 0.8rem;
}

.task-target-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: #0f172a;
}

.task-target-option input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.weekly-task-item,
.student-task-item,
.student-result-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.2rem;
}

.student-goal-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem 0.9rem;
  margin-top: 0.8rem;
}

.student-goal-form-wide {
  grid-column: 1 / -1;
}

.student-goal-form textarea {
  resize: vertical;
  min-height: 90px;
}

.student-goal-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.student-goal-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.student-goal-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.student-goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.student-goal-status {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.student-goal-status-selected {
  background: #eef2ff;
  color: #3730a3;
}

.student-goal-status-working {
  background: #ffedd5;
  color: #9a3412;
}

.student-goal-status-completed {
  background: #dcfce7;
  color: #166534;
}

.student-goal-progress-track {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.student-goal-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f97316, #0ea5e9);
}

.student-goal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.weekly-task-toggle {
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.weekly-task-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.weekly-task-head .weekly-task-toggle {
  flex: 1;
}

.weekly-task-head .weekly-task-assign-btn {
  white-space: nowrap;
}

.weekly-task-assigned-pill {
  opacity: 0.8;
  cursor: default;
}

.weekly-task-body {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
}

.weekly-plan-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  display: grid;
  gap: 0.2rem;
  text-align: left;
  color: inherit;
}

.weekly-plan-item.is-active {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.student-task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.student-task-print-header {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.65rem 0.75rem;
}

.student-task-print-meta {
  display: grid;
  gap: 0.15rem;
}

.student-task-print-meta .small {
  margin: 0;
}

.student-task-checklist {
  display: grid;
  gap: 0.55rem;
}

.student-task-filter-wrap {
  margin-top: 0.6rem;
}

.student-own-task-card {
  margin-top: 0.6rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.student-own-task-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.6rem 0.8rem;
}

.student-own-task-group[hidden] {
  display: none !important;
}

.student-own-task-form-wide {
  grid-column: 1 / -1;
}

.student-own-task-collapsible {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffaf4;
  padding: 0.45rem 0.55rem;
}

.student-own-task-collapsible summary {
  cursor: pointer;
  font-weight: 700;
  color: #7c2d12;
}

.student-own-task-collapsible-body {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.student-own-task-collapsible-body > div {
  min-width: 0;
}

.student-own-task-actions {
  display: flex;
  align-items: end;
}

.student-task-filter-wrap input {
  margin-top: 0.3rem;
}

.student-weektask-group-list {
  display: grid;
  gap: 0.6rem;
}

.student-weektask-group-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.student-weektask-group-toggle {
  width: 100%;
  border: none;
  background: #fff7ed;
  color: #7c2d12;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
}

.student-weektask-group-body {
  display: grid;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.6rem;
}

.student-weektask-group-body[hidden] {
  display: none;
}

.student-task-row {
  padding: 0.6rem 0.7rem;
}

.student-task-row-main {
  display: grid;
  gap: 0.2rem;
}

.student-task-title-toggle {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  text-align: left;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.student-task-title-toggle:hover {
  color: #9a3412;
}

.student-task-details {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.2rem;
}

.student-task-details[hidden] {
  display: none;
}

.student-task-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  cursor: pointer;
}

.student-task-check input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
}

.student-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.student-metric-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.7rem;
}

.student-metric-card p,
.student-metric-card strong {
  margin: 0;
}

.student-metric-card strong {
  display: block;
  font-size: 1.45rem;
  color: #7c2d12;
}

.board-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.board-content {
  width: min(920px, 95vw);
  text-align: center;
  color: #fff;
}

.board-label {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #cbd5e1;
}

.board-code {
  margin: 0;
  font-size: clamp(4rem, 15vw, 12rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #f97316;
}

.board-class {
  margin: 1rem 0 1.5rem;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
}

.setting-note {
  margin: 0.8rem 0 0;
}

.result {
  font-size: 1.1rem;
  font-weight: 700;
}

.timer-display {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #9a3412;
}

.is-hidden {
  display: none;
}

.ok {
  color: #166534;
}

.bad {
  color: #991b1b;
}

.worksheet-controls {
  margin-bottom: 1.2rem;
}

.worksheet-sheet {
  padding: 1.5rem;
}

.worksheet-meta {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1rem;
  margin-bottom: 1rem;
}

.line-field {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  min-height: 2.4rem;
}

.line-field span:last-child {
  flex: 1;
  border-bottom: 2px solid var(--line);
  min-height: 1.6rem;
}

.worksheet-grid {
  display: block;
}

.worksheet-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.15rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--line);
}

.worksheet-number {
  width: 2rem;
  color: #92400e;
  font-weight: 700;
}

.worksheet-sum {
  letter-spacing: 0.02em;
}

.question-visual,
.fill-ten-visual {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  margin: 0.9rem 0 0.35rem;
}

.fill-ten-visual--worksheet {
  margin: 0;
  align-items: center;
}

.fill-ten-target {
  color: var(--text);
  font-size: var(--fill-ten-target-size, 1.6rem);
  font-weight: 800;
  text-align: center;
  line-height: 1;
  padding-bottom: 0.05rem;
}

.fill-ten-row {
  display: flex;
  gap: 0.8rem;
  align-items: stretch;
  justify-content: center;
}

.fill-ten-box {
  width: var(--fill-ten-box-width, 4.8rem);
  min-width: var(--fill-ten-box-width, 4.8rem);
  min-height: var(--fill-ten-box-height, 3.4rem);
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: 0.95rem;
  background: #fff;
  color: var(--text);
  font-size: var(--fill-ten-box-font-size, 1.35rem);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.fill-ten-box.is-empty {
  background: #fff7ed;
  border-style: dashed;
  color: #c2410c;
}

.fill-ten-box.is-filled {
  background: #fff;
}

.fill-ten-sum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: 0.35rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 0.95rem;
  background: #fff;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.quiz-question-nav {
  flex-wrap: wrap;
}

.quiz-progress-toggle {
  margin-top: 0.7rem;
}

#progressPanel[hidden] {
  display: none !important;
}

.question-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.question-dot {
  width: 0.95rem;
  height: 0.95rem;
  padding: 0;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #e5e7eb;
  box-shadow: none;
  flex: 0 0 auto;
}

.question-dot.is-active {
  outline: 3px solid rgba(14, 165, 233, 0.22);
  outline-offset: 2px;
}

.question-dot.is-wrong {
  background: #ef4444;
  border-color: #b91c1c;
}

.question-dot.is-correct {
  background: #22c55e;
  border-color: #15803d;
}

.question-dot.is-improved {
  background: linear-gradient(90deg, #ef4444 0 50%, #22c55e 50% 100%);
  border-color: #64748b;
}

.worksheet-item--fill10 {
  align-items: center;
}

.worksheet-item--fill10 .worksheet-number {
  align-self: flex-start;
  padding-top: 0.45rem;
}

.fill-ten-inline-input {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-align: center;
  outline: none;
  padding: 0;
  margin: 0;
  appearance: textfield;
}

.fill-ten-inline-input::-webkit-outer-spin-button,
.fill-ten-inline-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.answer-key {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.answer-key-grid {
  display: block;
}

.worksheet-block,
.answer-key-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column;
  gap: 0.75rem 1.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 1.25rem;
}

.answer-key-item {
  border-bottom: 1px dashed var(--line);
}

.print-note {
  margin-top: 0.8rem;
}

@page {
  size: A4 portrait;
  margin: 14mm;
}

@media print {
  body {
    background: #fff;
    min-height: auto;
  }

  .top-nav {
    display: none !important;
  }

  .container {
    width: 100%;
    padding: 0;
  }

  .no-print {
    display: none !important;
  }

  .card {
    border: none;
    box-shadow: none;
    background: #fff;
    padding: 0;
  }

  .worksheet-sheet {
    box-sizing: border-box;
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 2mm 1mm 0;
    break-inside: auto;
    page-break-inside: auto;
  }

  .worksheet-sheet[data-layout="compact"] {
    padding: 0;
  }

  .worksheet-sheet h2 {
    margin: 0 0 2.5mm;
    font-size: 5.8mm;
    line-height: 1.15;
  }

  .worksheet-sheet .small {
    margin: 0 0 3.2mm;
    font-size: 3.3mm;
    line-height: 1.3;
  }

  .worksheet-sheet[data-layout="compact"] h2 {
    margin-bottom: 1.5mm;
    font-size: 4.8mm;
  }

  .worksheet-sheet[data-layout="compact"] .small {
    margin-bottom: 1.5mm;
    font-size: 2.9mm;
  }

  .dashboard-header-card,
  .student-tabs,
  #studentPanelProgress,
  #studentPanelSkills,
  #studentPanelResults,
  #studentLogoutBtn,
  a.btn.btn-primary {
    display: none !important;
  }

  #studentPanelTasks {
    display: block !important;
    padding: 0;
    border: none;
  }

  .student-task-print-header {
    margin: 0 0 2.2mm;
    border: 1px solid #94a3b8;
    border-radius: 0;
    padding: 2.2mm 2.8mm;
  }

  .student-task-print-header .small {
    font-size: 3.2mm;
    line-height: 1.2;
  }

  .student-task-list,
  .student-task-checklist {
    margin-top: 1.6mm;
    gap: 1.8mm;
  }

  .student-task-filter-wrap {
    display: none !important;
  }

  .student-weektask-group-toggle {
    background: #fff;
    border-bottom: 1px solid #94a3b8;
    border-radius: 0;
    padding: 2.1mm 2.8mm;
  }

  .student-weektask-group-toggle strong,
  .student-weektask-group-toggle .small {
    font-size: 3.2mm;
    line-height: 1.25;
  }

  .student-task-row {
    border-radius: 0;
    border-color: #94a3b8;
    padding: 2.2mm 2.8mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .student-task-row .small,
  .student-task-row strong {
    font-size: 3.1mm;
    line-height: 1.22;
  }

  .student-task-title-toggle {
    font-size: 3.2mm;
    line-height: 1.25;
    font-weight: 700;
    color: #0f172a;
    cursor: default;
  }

  .student-task-details {
    display: none !important;
  }

  .student-task-check input[type="checkbox"] {
    width: 4.6mm;
    height: 4.6mm;
  }

  .worksheet-meta {
    margin-bottom: 3.5mm;
    gap: 6mm;
  }

  .line-field {
    min-height: 7mm;
  }

  .worksheet-grid {
    display: block;
  }

  .answer-key-grid {
    display: block;
  }

  .worksheet-block,
  .answer-key-block {
    gap: 2.2mm 4mm;
    margin-bottom: 4mm;
    min-height: calc(297mm - 28mm);
    align-content: start;
  }

  .worksheet-sheet[data-layout="compact"] .worksheet-grid,
  .worksheet-sheet[data-layout="compact"] .answer-key-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.2mm 4mm;
  }

  .worksheet-sheet[data-layout="compact"] .worksheet-block,
  .worksheet-sheet[data-layout="compact"] .answer-key-block {
    display: contents;
    min-height: 0;
    margin-bottom: 0;
  }

  .worksheet-sheet[data-layout="compact"] .worksheet-item,
  .worksheet-sheet[data-layout="compact"] .answer-key-item {
    font-size: 3.2mm;
    padding: 0;
    margin: 0;
    border-bottom: none;
    line-height: 1.05;
  }

  .worksheet-sheet[data-layout="compact"] .worksheet-number {
    width: 5mm;
  }

  .worksheet-sheet[data-layout="compact"] .worksheet-sum {
    white-space: nowrap;
  }

  .worksheet-sheet[data-layout="compact"] .answer-key {
    page-break-before: auto;
    break-before: auto;
    margin-top: 0.8rem;
  }

  .worksheet-block {
    page-break-after: always;
    break-after: page;
  }

  .worksheet-block:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .answer-key-block {
    page-break-after: always;
    break-after: page;
  }

  .answer-key-block:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .worksheet-item {
    font-size: 4.4mm;
    padding: 0.2mm 0;
    break-inside: avoid;
  }

  .worksheet-number {
    width: 8mm;
  }

  .worksheet-sum {
    white-space: nowrap;
  }

  .answer-key {
    page-break-before: always;
    break-before: page;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 1.2rem;
  }

  .rekenen-layout {
    grid-template-columns: 1fr;
  }

  .rekenen-op-btn {
    grid-template-columns: 44px 1fr;
  }

  .rekenen-op-symbol {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .menu-item-row {
    grid-template-columns: 1fr;
  }

  .admin-tab {
    flex-basis: 100%;
  }

  .teacher-student-row {
    flex-direction: column;
    align-items: stretch;
  }

  .teacher-student-actions {
    justify-content: flex-start;
  }

  .teacher-visual-grid {
    grid-template-columns: 1fr;
  }

  .teacher-realtime-grid {
    grid-template-columns: 1fr;
  }

  .teacher-domain-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .teacher-domain-value {
    text-align: left;
  }

  .worksheet-meta,
  .worksheet-grid,
  .answer-key-grid {
    grid-template-columns: 1fr;
  }
}
