:root {
  --bg: #f5fbfc;
  --bg-soft: #eef7f9;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-tint: rgba(98, 193, 204, 0.09);
  --surface-brand: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 250, 0.96));
  --text: #23314b;
  --text-soft: #3b4d66;
  --muted: #6f8198;
  --line: rgba(35, 49, 75, 0.1);
  --line-strong: rgba(98, 193, 204, 0.24);
  --brand: #62c1cc;
  --brand-strong: #44aebb;
  --brand-deep: #2b3852;
  --brand-deep-soft: #40516f;
  --danger: #be5d68;
  --warning: #d8a44f;
  --success: #4ca27f;
  --shadow-lg: 0 28px 60px rgba(36, 58, 86, 0.1);
  --shadow-md: 0 16px 34px rgba(36, 58, 86, 0.08);
  --shadow-sm: 0 8px 18px rgba(36, 58, 86, 0.05);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(98, 193, 204, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(35, 49, 75, 0.1), transparent 20%),
    linear-gradient(180deg, #fcfeff 0%, #f3fafb 52%, #eef6f8 100%);
}

body {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

a {
  color: var(--brand-deep);
}

[id$="-section"] {
  scroll-margin-top: 28px;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.layout {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.hero {
  max-width: 1260px;
  margin: 0 auto 24px;
  padding: 26px 30px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 250, 0.96)),
    linear-gradient(135deg, rgba(98, 193, 204, 0.06), rgba(35, 49, 75, 0.04));
  border: 1px solid rgba(98, 193, 204, 0.18);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 20px;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  gap: 22px;
  align-items: center;
  flex: 1 1 720px;
}

.brand-logo {
  width: 136px;
  max-width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  background: white;
}

.brand-copy {
  display: grid;
  gap: 6px;
}

.eyebrow {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--brand-deep-soft);
  margin-bottom: 4px;
}

.hero h1,
.screen-card h1,
.screen-card h2,
.section-card h2,
.assessment-card h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--brand-deep);
}

.hero-subtitle {
  font-size: 1.06rem;
  color: var(--brand-strong);
  font-weight: 700;
  margin: 0;
}

.hero p {
  max-width: 760px;
  margin: 0;
  line-height: 1.65;
  color: var(--text-soft);
}

.status-pill,
.tag,
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-pill {
  background: rgba(98, 193, 204, 0.12);
  color: var(--brand-deep);
  border: 1px solid rgba(98, 193, 204, 0.18);
}

.auth-grid,
.teacher-grid,
.assessment-library-grid {
  display: grid;
  gap: 24px;
}

.auth-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.teacher-grid {
  grid-template-columns: 1fr;
  align-items: start;
}

.assessment-library-grid {
  grid-template-columns: minmax(300px, 0.92fr) minmax(380px, 1.08fr);
  align-items: start;
}

.teacher-grid > .stack,
.assessment-library-grid > .stack,
.teacher-grid > div,
.assessment-library-grid > div {
  min-width: 0;
}

.screen-card,
.section-card,
.assessment-card,
.student-card,
.result-card,
.question-card {
  background: var(--surface-brand);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.screen-card,
.assessment-card,
.question-card {
  padding: 30px;
}

.section-card,
.student-card,
.result-card {
  padding: 24px;
}

.screen-card p,
.section-card p,
.student-card p,
.question-card p {
  color: var(--text-soft);
}

.stack {
  display: grid;
  gap: 16px;
}

.workspace-nav-card {
  padding: 18px;
}

.workspace-nav {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.workspace-nav-button {
  appearance: none;
  border: 1px solid rgba(98, 193, 204, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-sm);
  color: var(--brand-deep);
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.workspace-nav-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(38, 58, 86, 0.1);
  border-color: rgba(98, 193, 204, 0.36);
  background: rgba(247, 253, 254, 0.98);
}

.workspace-nav-button.active {
  border-color: rgba(98, 193, 204, 0.46);
  background: rgba(98, 193, 204, 0.14);
  box-shadow: var(--shadow-sm);
}

.teacher-dashboard-shell {
  gap: 18px;
}

.teacher-dashboard-intro {
  gap: 18px;
}

.teacher-dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-quick-card,
.dashboard-panel {
  overflow: hidden;
}

.dashboard-quick-card summary,
.dashboard-panel summary {
  list-style: none;
}

.dashboard-quick-card summary::-webkit-details-marker,
.dashboard-panel summary::-webkit-details-marker {
  display: none;
}

.dashboard-quick-card {
  border: 1px solid rgba(35, 49, 75, 0.06);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

.dashboard-quick-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  cursor: pointer;
}

.dashboard-quick-copy {
  display: grid;
  gap: 6px;
}

.dashboard-quick-copy strong,
.dashboard-panel-copy strong {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.dashboard-quick-value {
  display: inline-flex;
  min-width: 56px;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(98, 193, 204, 0.12);
  color: var(--brand-deep);
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.dashboard-quick-body {
  padding: 0 22px 20px;
  border-top: 1px solid rgba(35, 49, 75, 0.06);
}

.dashboard-quick-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  display: grid;
  gap: 6px;
}

.dashboard-panel {
  padding: 0;
}

.dashboard-panel-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
  cursor: pointer;
}

.dashboard-panel-copy {
  display: grid;
  gap: 6px;
}

.dashboard-panel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-panel-toggle {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--brand-deep-soft);
}

.dashboard-panel[open] .dashboard-panel-toggle::after {
  content: " less";
}

.dashboard-panel:not([open]) .dashboard-panel-toggle::after {
  content: " more";
}

.dashboard-panel-body {
  padding: 0 24px 24px;
  border-top: 1px solid rgba(35, 49, 75, 0.06);
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field,
.choice-button {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-deep);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(36, 58, 86, 0.03);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #91a1b5;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(98, 193, 204, 0.22);
  border-color: var(--brand);
}

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

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease, box-shadow 120ms ease, border-color 120ms ease, background 120ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: white;
  box-shadow: 0 12px 24px rgba(68, 174, 187, 0.24);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-deep);
  border-color: rgba(35, 49, 75, 0.12);
}

.button-accent {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-deep-soft));
  color: white;
  box-shadow: 0 12px 24px rgba(43, 56, 82, 0.2);
}

.mini {
  padding: 10px 14px;
  font-size: 0.9rem;
}

.info-row,
.student-meta,
.result-grid,
.domain-grid,
.dashboard-grid,
.metrics-grid {
  display: grid;
  gap: 12px;
}

.info-row {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.dashboard-grid,
.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(98, 193, 204, 0.12);
}

.metric strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 8px;
  color: var(--brand-deep);
}

.assessment-library-list {
  max-height: 780px;
  overflow: auto;
  padding-right: 4px;
}

.assessment-library-item {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.assessment-library-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(21, 39, 58, 0.08);
  border-color: rgba(98, 193, 204, 0.24);
}

.assessment-library-item.active,
.student-card.active {
  border-color: rgba(98, 193, 204, 0.38);
  box-shadow: 0 18px 40px rgba(98, 193, 204, 0.12);
  background: rgba(248, 254, 255, 0.96);
}

.compact-student-card {
  cursor: default;
}

.student-credentials-inline {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(35, 49, 75, 0.08);
  gap: 10px;
}

.student-credentials-inline-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.student-credentials-inline-grid span,
.student-credentials-inline-grid strong {
  display: block;
}

.student-credentials-inline-grid strong {
  margin-top: 4px;
  font-size: 1rem;
  color: var(--brand-deep);
  word-break: break-word;
}

.student-card,
.result-card {
  border: 1px solid rgba(35, 49, 75, 0.06);
}

.tag {
  background: rgba(98, 193, 204, 0.12);
  color: var(--brand-deep);
  border: 1px solid rgba(98, 193, 204, 0.16);
}

.tag.warn {
  background: rgba(216, 164, 79, 0.14);
  color: #8c6216;
}

.tag.danger {
  background: rgba(190, 93, 104, 0.14);
  color: #8f3f48;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.score-bar,
.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(35, 49, 75, 0.08);
  overflow: hidden;
}

.score-fill,
.progress-fill {
  height: 100%;
  border-radius: inherit;
}

.score-fill.green,
.score-badge.green {
  background: rgba(76, 162, 127, 0.18);
  color: #2f785c;
}

.score-fill.yellow,
.score-badge.yellow {
  background: rgba(216, 164, 79, 0.18);
  color: #8f6420;
}

.score-fill.red,
.score-badge.red {
  background: rgba(190, 93, 104, 0.18);
  color: #8f4450;
}

.score-fill.green {
  background: linear-gradient(135deg, #7fd3ac, #4ca27f);
}

.score-fill.yellow {
  background: linear-gradient(135deg, #f0d087, #d8a44f);
}

.score-fill.red {
  background: linear-gradient(135deg, #ef9da7, #be5d68);
}

.progress-fill {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.student-login-shell,
.assessment-shell {
  max-width: 820px;
  margin: 0 auto;
}

.question-shell {
  display: grid;
  gap: 22px;
}

.choice-grid {
  display: grid;
  gap: 14px;
}

.choice-button button {
  width: 100%;
  text-align: left;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid rgba(35, 49, 75, 0.08);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  color: var(--brand-deep);
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.choice-button button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.choice-button button.selected {
  border-color: var(--brand);
  background: rgba(98, 193, 204, 0.11);
}

.result-banner {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(98, 193, 204, 0.12), rgba(43, 56, 82, 0.08));
  border: 1px solid rgba(98, 193, 204, 0.18);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.88rem;
}

.empty-state {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(98, 193, 204, 0.24);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--brand-deep);
}

.checkbox-row input {
  margin-top: 0.25rem;
}

.simple-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.8rem;
}

.simple-list li {
  color: var(--brand-deep);
  line-height: 1.5;
}

code {
  background: rgba(35, 49, 75, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
}

@media (min-width: 1500px) {
  .teacher-grid {
    grid-template-columns: minmax(0, 0.98fr) minmax(0, 1.02fr);
  }
}

@media (max-width: 980px) {
  .assessment-library-grid {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 1200px) {
  .teacher-grid,
  .assessment-library-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .hero,
  .screen-card,
  .assessment-card,
  .question-card,
  .section-card,
  .student-card,
  .result-card {
    padding: 20px;
    border-radius: 24px;
  }

  .brand-logo {
    width: 108px;
  }

  .button,
  .workspace-nav-button {
    width: 100%;
    justify-content: center;
  }

  .dashboard-quick-summary,
  .dashboard-panel-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-panel-meta {
    justify-content: flex-start;
  }
}
