:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #22303a;
  --muted: #66737d;
  --line: #dedbd2;
  --primary: #0f766e;
  --primary-dark: #0b534e;
  --gold: #b7791f;
  --berry: #9f1239;
  --wine: #8b1f45;
  --wine-dark: #6c1231;
  --blue: #2563eb;
  --green: #4d7c0f;
  --shadow: 0 16px 36px rgba(34, 48, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  padding: 18px clamp(16px, 3vw, 36px);
  backdrop-filter: blur(12px);
}

.school-header {
  background: #fff;
  border-bottom: 1px solid #e6e0d7;
}

.school-banner,
.login-banner img {
  display: block;
  width: 100%;
  height: clamp(82px, 8vw, 132px);
  object-fit: cover;
  object-position: center;
}

.school-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 40px;
  padding: 0 clamp(14px, 2vw, 26px);
  color: #6b7280;
  font-size: 13px;
  background: #fff;
  border-top: 1px solid #eee8df;
}

.school-nav span {
  color: #111827;
}

.school-nav a {
  color: #6b7280;
  font-weight: 700;
  text-decoration: none;
}

.school-nav a:hover {
  color: var(--wine);
}

.workspace-hero {
  width: min(1440px, calc(100% - 56px));
  margin: 28px auto 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(105deg, var(--wine), #78314b);
  color: #fff;
  padding: 22px clamp(22px, 3vw, 38px);
}

.workspace-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: 0;
}

.workspace-hero p {
  max-width: 1120px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.compact-hero {
  border-radius: 20px;
  margin-bottom: 0;
}

.tools-shell {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto 32px;
  border-radius: 0 0 18px 18px;
  background: #fff;
  padding: 22px 24px 30px;
  box-shadow: 0 14px 34px rgba(34, 48, 58, 0.07);
}

.tools-intro {
  max-width: 900px;
  margin: 0 auto 16px;
  text-align: center;
}

.tools-intro h2 {
  margin: 0 0 8px;
  color: var(--wine-dark);
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: 0;
}

.tools-intro p {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.5;
}

.tools-module-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px 18px;
  justify-content: start;
  margin: 0;
}

.service-module {
  overflow: hidden;
  border: 1px solid #efe0e6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(34, 48, 58, 0.05);
}

.service-module-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 92px;
  border-bottom: 1px solid #efe0e6;
  background: linear-gradient(100deg, #fff8fb, #fbf7f1);
  padding: 20px 28px;
}

.service-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #f3e3ea;
  color: var(--wine-dark);
  font-weight: 900;
}

.service-module-head h2 {
  margin: 0 0 5px;
  color: var(--wine-dark);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.service-module-head p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.service-module-body {
  padding: 22px 26px 26px;
}

.service-note {
  margin: 0 0 16px;
  border: 1px solid #f0dfe6;
  border-radius: 14px;
  color: #667085;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.service-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border: 1px solid #f0dfe6;
  border-radius: 14px;
  background: #fff;
  padding: 14px 16px;
}

.service-detail-head h2 {
  margin: 2px 0 0;
  color: var(--wine-dark);
  font-size: 22px;
  line-height: 1.15;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--wine-dark);
  background: #fffaf7;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover {
  border-color: var(--wine);
}

.module-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.module-nav a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: #fff;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.module-nav a.active,
.module-nav a:hover {
  border-color: var(--ni-guinda, #8f0f46);
  background: var(--ni-guinda, #8f0f46);
  color: #fff;
}

.module-nav.tools-module-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px 18px;
  justify-content: start;
  margin: 0;
}

.tools-module-nav a {
  display: grid;
  grid-template-rows: 52px minmax(148px, auto) 74px;
  overflow: hidden;
  min-height: 274px;
  border-radius: 16px;
  background: #fff;
  padding: 0;
  text-align: center;
  box-shadow: 0 12px 28px rgba(34, 48, 58, 0.05);
}

.tools-module-nav a small {
  display: grid;
  place-items: center;
  margin: 0;
  border-bottom: 1px solid #eadfce;
  background: #fbf7f1;
  color: var(--wine-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.service-card-body {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px 28px;
}

.service-card-body strong {
  color: var(--wine-dark);
  font-size: 18px;
  line-height: 1.2;
}

.service-card-body span {
  max-width: 300px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.service-card-footer {
  display: grid;
  place-items: center;
  border-top: 1px solid #f0eee9;
}

.service-card-footer b {
  display: inline-grid;
  min-width: 116px;
  min-height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.tools-module-nav a.active,
.tools-module-nav a:hover {
  border-color: #e5cbd5;
  background: #fffaf7;
  color: var(--text);
}

.tools-module-nav a.active {
  box-shadow: inset 0 0 0 2px var(--wine), 0 12px 28px rgba(34, 48, 58, 0.05);
}

.tools-module-nav a.active small,
.tools-module-nav a.active .service-card-body strong,
.tools-module-nav a:hover small,
.tools-module-nav a:hover .service-card-body strong {
  color: var(--wine);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.brand p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.brand h1,
.panel h2,
.error-state h1 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: clamp(22px, 3vw, 30px);
}

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

.filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

.segmented,
.outline {
  min-height: 34px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}

.segmented.active,
.outline:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 0 0;
}

.single-layout {
  display: grid;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 36px) 44px;
}

body[data-module="estadisticos"] .layout,
body[data-module="comparativo"] .layout,
body[data-module="reportes"] .layout,
body[data-module="motivos"] .layout,
body[data-module="top"] .layout {
  grid-template-columns: 1fr;
}

.module-panel {
  display: none;
}

body[data-module="estudio"] .module-estudio,
body[data-module="estadisticos"] .module-estadisticos,
body[data-module="seguimiento"] .module-seguimiento,
body[data-module="comparativo"] .module-comparativo,
body[data-module="reportes"] .module-reportes,
body[data-module="motivos"] .module-motivos,
body[data-module="respuestas"] .module-respuestas,
body[data-module="top"] .module-top {
  display: block;
}

body[data-module="estudio"] .metrics.module-estudio,
body[data-module="estadisticos"] .metrics.module-estadisticos,
body[data-module="seguimiento"] .metrics.module-seguimiento,
body[data-module="comparativo"] .metrics.module-comparativo,
body[data-module="reportes"] .metrics.module-reportes,
body[data-module="estadisticos"] .panel-grid.module-estadisticos,
body[data-module="seguimiento"] .side-column.module-seguimiento,
body[data-module="estudio"] .side-column.module-estudio,
body[data-module="respuestas"] .side-column.module-respuestas {
  display: grid;
}

body[data-module="estadisticos"] .stats-controls.module-estadisticos {
  display: flex;
}

body[data-module="estudio"] .side-column.module-estudio,
body[data-module="seguimiento"] .side-column.module-seguimiento,
body[data-module="respuestas"] .side-column.module-respuestas {
  display: flex;
}

.full-column {
  min-width: 0;
}

.main-column,
.side-column {
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.main-column {
  display: flex;
}

body[data-module="respuestas"] .main-column .module-seguimiento.module-respuestas {
  order: 1;
}

body[data-module="respuestas"] .main-column .module-respuestas:not(.module-seguimiento) {
  order: 2;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric {
  padding: 14px 16px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(22px, 2.4vw, 28px);
}

.stats-controls {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stats-controls h2 {
  margin: 2px 0 0;
  color: var(--wine-dark);
  font-size: 18px;
}

.stats-controls .outline.active {
  border-color: var(--wine);
  background: var(--wine);
  color: #fff;
}

.compact-select {
  display: grid;
  min-width: 210px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-select select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 11px;
  text-transform: none;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel h2 {
  font-size: 20px;
  line-height: 1.2;
}

.panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.chart-panel.is-hidden {
  display: none;
}

.stats-charts.is-single-chart {
  grid-template-columns: 1fr;
}

.tracking-grid,
.comparison-grid,
.report-grid {
  display: grid;
  gap: 14px;
}

.tracking-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.tracking-grid article,
.comparison-grid article,
.report-card,
.tracking-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tracking-grid article,
.comparison-grid article {
  padding: 14px;
}

.tracking-grid span,
.comparison-grid span,
.report-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tracking-grid strong,
.comparison-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 26px;
}

.tracking-list {
  display: grid;
  gap: 10px;
}

.tracking-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) minmax(280px, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.tracking-item strong,
.tracking-item b {
  display: block;
  color: var(--text);
}

.tracking-item span,
.tracking-item p,
.comparison-grid p,
.report-card p,
.empty-state {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.tracking-item p {
  margin: 0;
}

.comparison-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.comparison-chart {
  height: 360px;
}

.report-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-height: 230px;
  padding: 18px;
}

.report-card h3 {
  margin: 0;
  color: var(--wine-dark);
  font-size: 20px;
}

.report-print {
  width: auto;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
}

.report-preview {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.report-preview-head h3,
.report-preview h4 {
  margin: 4px 0 12px;
  color: var(--wine-dark);
}

.report-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-preview-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.report-preview-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-preview-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.report-lines {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.report-lines p {
  margin: 0;
  border-bottom: 1px solid #efede6;
  color: var(--muted);
  padding-bottom: 8px;
  line-height: 1.45;
}

.chart-box {
  width: 100%;
  height: 280px;
  overflow: hidden;
}

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

.ni-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.ni-hero {
  background: linear-gradient(120deg, var(--berry), #c40b63);
  color: #fff;
  padding: 18px 22px;
}

.ni-hero h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.4vw, 28px);
}

.ni-hero p {
  max-width: 940px;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.study-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.study-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.study-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 17px;
}

.study-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-head,
.table-head,
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head span,
.table-head p {
  color: var(--muted);
  font-size: 13px;
}

.table-head {
  align-items: flex-start;
  margin-bottom: 12px;
}

.table-head p {
  margin: 6px 0 0;
}

.search {
  display: grid;
  width: min(100%, 360px);
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  text-transform: none;
}

.table-wrap {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  background: #efede6;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.active {
  background: #f0faf8;
}

.student-card h2 {
  margin-top: 4px;
}

.student-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.student-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.student-meta dd {
  min-width: 0;
  margin: 4px 0 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e2d8;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

.motivation {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.section-list,
.critical-list {
  display: grid;
  gap: 13px;
  margin-top: 14px;
}

.critical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin-top: 14px;
}

.section-item {
  display: grid;
  gap: 7px;
}

.section-item div,
.critical-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.critical-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.critical-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.critical-item p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.motivation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

.mini-metric,
.motivation-item,
.answer-section,
.top-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-metric {
  padding: 14px;
}

.mini-metric span,
.answer-question small,
.top-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.motivation-list {
  display: grid;
  gap: 12px;
}

.motivation-item {
  padding: 14px;
}

.motivation-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.motivation-item p,
.answer-question p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.selected-pill,
.status-pill {
  border-radius: 999px;
  background: #f0faf8;
  color: var(--primary-dark);
  padding: 8px 12px;
  font-size: 13px;
}

.answers-list {
  display: grid;
  gap: 16px;
}

.answer-section {
  overflow: hidden;
}

.answer-section h3,
.top-card h3 {
  margin: 0;
  background: #efede6;
  padding: 12px 14px;
}

.answer-question {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 14px;
}

.answer-result {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.status-pill.bad {
  background: #fee2e2;
  color: #991b1b;
}

.top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.top-card {
  overflow: hidden;
}

.top-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-card li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 11px 14px;
}

.top-card b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: none;
  max-width: 360px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.toast.visible {
  display: block;
}

.login-page {
  min-height: 100vh;
  background: #f5f5f5;
}

.login-frame-top,
.login-frame-bottom {
  position: fixed;
  left: 0;
  z-index: 2;
  width: 100%;
  height: 8px;
  background: var(--wine);
}

.login-frame-top {
  top: 0;
}

.login-frame-bottom {
  bottom: 0;
}

.login-banner {
  padding-top: 8px;
  background: #fff;
}

.login-shell {
  display: grid;
  min-height: calc(100vh - clamp(86px, 9vw, 154px) - 8px);
  place-items: center;
  padding: clamp(28px, 4vw, 54px) 20px 48px;
}

.login-card {
  width: min(360px, 100%);
  border: 0;
  border-radius: 14px;
  background: #fff;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 16px 34px rgba(34, 48, 58, 0.1);
}

.login-card h1 {
  margin: 0 0 12px;
  color: #8c1111;
  font-size: 22px;
  line-height: 1.18;
}

.login-card p {
  color: var(--muted);
  line-height: 1.55;
}

.login-card .school-name {
  margin: 0 0 22px;
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #3d3d3d;
  padding: 0 16px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.login-button:hover {
  border-color: #cfc8bd;
  background: #fbfaf8;
}

.google-button {
  gap: 12px;
}

.google-mark {
  font-size: 18px;
  font-weight: 900;
  color: #4285f4;
}

.login-note {
  margin: 22px 0 0;
  color: #7a7a7a;
  font-size: 12px;
  font-weight: 700;
}

.login-alert {
  margin-top: 18px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 12px;
}

.user-form,
.user-row-form,
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.user-row-form {
  grid-template-columns: 1.1fr 1.2fr 150px 110px auto;
  align-items: center;
}

.user-form label,
.quiz-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-form input,
.user-form select,
.user-row-form input,
.user-row-form select,
.quiz-grid input,
.quiz-grid select,
.quiz-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  text-transform: none;
}

.check-row {
  align-content: end;
  grid-template-columns: auto 1fr;
}

.check-row input {
  width: auto;
}

.wide-field {
  grid-column: 1 / -1;
}

.quiz-section h2 {
  margin-bottom: 14px;
}

.quiz-step {
  display: none;
}

.quiz-step.is-active {
  display: block;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quiz-dot {
  display: grid;
  width: 34px;
  height: 34px;
  cursor: pointer;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.quiz-dot.active {
  border-color: var(--berry);
  background: var(--berry);
  color: #fff;
}

.quiz-dot.complete {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.quiz-section-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
  margin-bottom: 14px;
}

.quiz-section-hero img {
  width: 116px;
  max-width: 32%;
  height: auto;
  flex: 0 0 auto;
}

.quiz-section-hero h2 {
  margin: 2px 0 0;
}

.quiz-question {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.quiz-question h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.45;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-options label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.option-image {
  display: block;
  width: min(180px, 100%);
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.submit-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: rgba(246, 244, 239, 0.94);
  padding: 14px 0;
  backdrop-filter: blur(12px);
}

.error-state {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.error-state .panel {
  max-width: 640px;
}

@media (max-width: 1100px) {
  .layout,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .tools-module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracking-item {
    grid-template-columns: 1fr;
  }

  .report-grid,
  .report-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-column .panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .topbar,
  .school-nav,
  .filters,
  .table-head,
  .quiz-progress,
  .submit-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics,
  .side-column,
  .user-form,
  .user-row-form,
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .panel-grid,
  .critical-grid,
  .study-grid,
  .motivation-summary,
  .top-grid,
  .tracking-grid,
  .comparison-grid,
  .report-grid,
  .report-preview-grid {
    grid-template-columns: 1fr;
  }

  .tracking-item {
    grid-template-columns: 1fr;
  }

  .chart-box {
    height: 280px;
  }

  .school-banner,
  .login-banner img {
    height: 74px;
  }

  .workspace-hero,
  .tools-shell {
    width: 100%;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .tools-module-nav {
    grid-template-columns: 1fr;
  }

  .service-module-head,
  .service-module-body {
    padding: 18px;
  }

  .login-shell {
    min-height: calc(100vh - 82px);
    padding-top: 36px;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-button {
    min-height: 48px;
    font-size: 14px;
  }
}

@media print {
  .school-nav,
  .workspace-hero,
  .tools-intro,
  .service-module-head,
  .service-detail-head,
  .filters,
  .stats-controls,
  .report-grid,
  .toast {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
  }

  .school-banner {
    height: 82px;
  }

  .tools-shell,
  .service-module {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .service-module-body,
  .layout {
    padding: 0;
  }

  .panel,
  .metric,
  .ni-panel,
  .tracking-item,
  .report-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
