:root {
  --bg: #f8fafc;
  --bg-strong: #eefdf4;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --panel-soft: #f7fbf9;
  --ink: #101828;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.10);
  --line-strong: rgba(22, 163, 74, 0.28);
  --brand: #16a34a;
  --brand-dark: #047857;
  --brand-soft: #dcfce7;
  --brand-glow: rgba(22, 163, 74, 0.24);
  --accent: #0ea5e9;
  --accent-soft: #e0f2fe;
  --warn: #fef3c7;
  --danger: #dc2626;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.07);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(22, 163, 74, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.12), transparent 30rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 34rem);
  font-family: "Inter", "Plus Jakarta Sans", "Manrope", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 64%);
}

::selection {
  color: #ffffff;
  background: var(--brand);
}

.hidden {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.25;
}

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max));
  min-height: 260px;
  margin: 16px auto 0;
  padding: 24px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at 82% 18%, rgba(187, 247, 208, 0.36), transparent 22rem),
    linear-gradient(135deg, #062e22 0%, #047857 48%, #16a34a 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(4, 120, 87, 0.20);
  isolation: isolate;
}

.topbar::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(110deg, transparent 0 32%, rgba(255, 255, 255, 0.12) 42%, transparent 54%),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 58px 58px, 58px 58px;
  animation: heroSheen 8s ease-in-out infinite;
}

.app-header {
  backdrop-filter: blur(18px);
}

.hero-orb {
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.5;
  animation: floatGlow 7s ease-in-out infinite;
}

.hero-orb-one {
  right: 22%;
  top: -90px;
  background: rgba(187, 247, 208, 0.62);
}

.hero-orb-two {
  right: -70px;
  bottom: -110px;
  background: rgba(14, 165, 233, 0.28);
  animation-delay: -2s;
}

.brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  max-width: 600px;
}

.brand-mark {
  display: grid;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #064e3b;
  background: linear-gradient(180deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
  font-size: 17px;
  font-weight: 900;
}

.topbar h1,
.topbar .muted,
.topbar .eyebrow {
  color: #ffffff;
}

.topbar .muted {
  max-width: 540px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.header-actions {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  justify-content: flex-end;
  gap: 14px;
  min-width: min(100%, 320px);
}

.wallet-pill,
.status-pill,
.hero-preview,
.auth-card,
.panel,
.sidebar,
.curriculum-panel,
.lesson-pack article,
.lesson-content-output article,
.record-card,
.reminder-card,
.template-box,
.gradebook-summary article,
.bank-group,
.notification-list {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.wallet-pill {
  display: grid;
  gap: 4px;
  min-width: 118px;
  padding: 10px 12px;
  color: var(--ink);
  border-radius: 18px;
}

.wallet-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wallet-pill strong {
  color: #064e3b;
  font-size: 22px;
  line-height: 1;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.status-pill,
.button-link,
.primary,
.secondary,
.danger-button,
.inline-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.primary,
.button-link {
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a 48%, #047857);
  box-shadow: 0 16px 34px rgba(22, 163, 74, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.secondary,
.inline-link {
  color: #065f46;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(22, 163, 74, 0.24);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.primary::after,
.button-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.36), transparent 30%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.primary:hover,
.button-link:hover,
.secondary:hover,
.inline-link:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.primary:hover::after,
.button-link:hover::after {
  opacity: 1;
}

.primary:active,
.button-link:active,
.secondary:active,
.inline-link:active {
  transform: translateY(0) scale(0.99);
}

.secondary:disabled,
.primary:disabled {
  color: var(--muted);
  background: #eef2f7;
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

.topbar .secondary,
.topbar .status-pill {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.topbar .status-pill {
  min-height: 38px;
  white-space: nowrap;
}

.hero-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 12px;
  border-radius: 20px;
  transform: rotate(-1deg);
}

.preview-top {
  display: flex;
  gap: 8px;
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.42);
}

.preview-chart {
  display: flex;
  align-items: end;
  gap: 7px;
  height: 52px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.8), rgba(255, 255, 255, 0.62));
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 20px;
}

.preview-chart i {
  flex: 1;
  min-width: 16px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #86efac, #16a34a);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.20);
}

.preview-list {
  display: grid;
  gap: 7px;
}

.preview-list span {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(22, 163, 74, 0.22), rgba(14, 165, 233, 0.10));
}

.preview-list span:nth-child(2) {
  width: 74%;
}

.preview-list span:nth-child(3) {
  width: 52%;
}

.app-shell,
.admin-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.admin-auth,
.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 10%, rgba(22, 163, 74, 0.20), transparent 28rem),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.14), transparent 28rem),
    var(--bg);
}

.admin-login,
.auth-card {
  display: grid;
  gap: 18px;
  width: min(460px, 100%);
}

.auth-card,
.admin-login {
  padding: 28px;
  border-color: rgba(22, 163, 74, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  color: var(--ink);
  font-size: 42px;
}

.sidebar,
.panel,
.curriculum-panel {
  min-width: 0;
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-xl);
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
  padding: 14px;
  overflow: auto;
}

.workspace,
.stack,
.assignment-list,
.reminder-list,
.timeline-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel {
  padding: 20px;
}

.panel:hover,
.curriculum-panel:hover,
.record-card:hover,
.reminder-card:hover,
.dashboard-cards article:hover,
.plan-grid article:hover,
.assignment-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.panel,
.curriculum-panel,
.record-card,
.reminder-card,
.dashboard-cards article,
.plan-grid article,
.assignment-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 253, 245, 0.74)),
    radial-gradient(circle at 90% 10%, rgba(22, 163, 74, 0.16), transparent 18rem);
}

.overview h2 {
  font-size: 25px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-row div,
.dashboard-cards article,
.plan-grid article,
.curriculum-card,
.curriculum-record,
.progress-topic,
.exam-record-choice,
.assessment-builder-section,
.template-total,
.checkout-summary,
.card-checkout,
.paypal-wallet-checkout {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.84));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
}

.metric-row strong,
.dashboard-cards strong,
.gradebook-summary strong {
  display: block;
  color: #064e3b;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: 0;
}

.metric-row span,
.dashboard-cards span,
.timeline-item span,
.plan-grid small,
.curriculum-card span,
.curriculum-record span,
.curriculum-record small,
.progress-topic span,
.record-card span,
.reminder-card span,
.reminder-card time,
.field-hint,
.gradebook-summary span,
.bank-group-head span,
.bank-group-head small,
.notification-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title.compact {
  margin-bottom: 12px;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.assignment-card {
  display: grid;
  width: 100%;
  gap: 6px;
  padding: 13px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  cursor: pointer;
}

.assignment-card.active,
.assignment-card:hover,
.curriculum-card.active,
.curriculum-card:hover,
.assessment-sheet-chip.active {
  color: #064e3b;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 255, 255, 0.92));
  border-color: var(--line-strong);
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.tab.active {
  color: #064e3b;
  background: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.tab:not(.active):hover {
  color: var(--ink);
  background: rgba(236, 253, 245, 0.74);
}

.tab-panel {
  display: none;
  animation: fadeUp 260ms ease both;
}

.tab-panel.active {
  display: block;
  min-width: 0;
}

.dashboard-grid,
.curriculum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.82fr);
  gap: 16px;
}

.curriculum-primary-layout {
  grid-template-columns: minmax(230px, 0.85fr) minmax(260px, 1fr) minmax(320px, 1.15fr);
}

.curriculum-layout.lower {
  margin-top: 18px;
}

.curriculum-source-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}

.lesson-generator-panel,
.curriculum-workspace {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.10), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
}

.lesson-generator-intro,
.curriculum-intro {
  max-width: 780px;
  margin: -3px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.api-status {
  padding: 7px 10px;
  color: #166534 !important;
  background: #dcfce7;
  border: 1px solid rgba(22, 101, 52, 0.12);
  border-radius: 999px;
}

.api-status.fallback {
  color: #92400e !important;
  background: #fffbeb;
  border-color: rgba(180, 83, 9, 0.18);
}

.lesson-brief-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
}

.lesson-brief-card .section-title { margin-bottom: 0; }

.resource-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.resource-option-grid label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #123d3a;
  background: #ffffff;
  border: 1px solid rgba(20, 108, 99, 0.14);
  border-radius: 8px;
  font-weight: 800;
}

.resource-option-grid input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.lesson-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 14px;
  align-items: end;
}

.quality-checklist {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
  color: #14532d;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid rgba(22, 163, 74, 0.15);
  border-radius: 14px;
  font-size: 13px;
}

.quality-checklist span::before {
  content: '✓';
  margin-right: 7px;
  color: #16a34a;
  font-weight: 900;
}

.curriculum-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.curriculum-workflow span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #14532d;
  background: #f0fdf4;
  border: 1px solid rgba(22, 163, 74, 0.14);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.curriculum-workflow b {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  color: white;
  background: #16a34a;
  border-radius: 50%;
  font-size: 11px;
}

.dashboard-cards,
.quick-actions,
.plan-grid,
.records-grid,
.gradebook-controls,
.gradebook-summary,
.question-bank-filters,
.assessment-sheet-list,
.exam-record-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}

.dashboard-cards small,
.timeline-item small,
.plan-grid small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.quick-actions {
  margin-top: 14px;
}

.academic-settings-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(20, 108, 99, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.74);
}

.academic-settings-form .action-row {
  align-items: center;
  justify-content: space-between;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 14px 20px;
  border-left: 1px solid rgba(22, 163, 74, 0.22);
}

.timeline-item::before {
  position: absolute;
  left: -6px;
  top: 3px;
  width: 11px;
  height: 11px;
  content: "";
  background: var(--brand);
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.pricing-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.76)),
    radial-gradient(circle at 100% 0, rgba(22, 163, 74, 0.18), transparent 20rem);
}

.plan-grid article {
  display: grid;
  gap: 8px;
}

.plan-grid span {
  color: #064e3b;
  font-size: 25px;
  font-weight: 900;
}

.plan-buy-button {
  justify-self: start;
  margin-top: 8px;
}

.paypal-checkout {
  margin-top: 16px;
}

.checkout-grid,
.assessment-actions,
.assessment-designer,
.assessment-designer-body,
.reminder-form,
.grid-2,
.grid-3,
.grid-4,
.exam-builder,
.question-count-grid,
.plan-settings-grid {
  display: grid;
  gap: 12px;
}

.grid-2,
.checkout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4,
.reminder-form,
.assessment-actions,
.question-bank-filters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assessment-actions {
  grid-template-columns: repeat(3, minmax(180px, 240px));
  align-items: start;
  justify-content: start;
}

.assessment-actions > label {
  max-width: 240px;
}

.assessment-actions > .action-row,
.assessment-actions > .share-assessment-style {
  grid-column: 1 / -1;
  max-width: none;
}

#assessmentCycle,
#termName,
#gradebookSourceColumn {
  max-width: 240px;
}

.exam-builder {
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
}

.curriculum-panel,
.exam-builder > section,
.assessment-designer,
.assessment-designer-body,
.share-assessment-style,
.grade-scale-box,
.lesson-stage-shell,
.stage-outline,
.exam-preview {
  padding: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
}

.curriculum-library,
.curriculum-records,
.curriculum-progress,
.active-curriculum-summary,
.curriculum-source-links,
.assessment-column-builder {
  display: grid;
  gap: 12px;
}

.curriculum-card,
.curriculum-record,
.progress-topic,
.curriculum-source-card {
  display: grid;
  gap: 6px;
  text-align: left;
}

.active-curriculum-status {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  background: #ffffff;
}

.active-curriculum-status.ready {
  border-color: rgba(20, 108, 99, 0.22);
  background: #f3faf8;
}

.active-curriculum-status.preview {
  border-color: rgba(217, 119, 6, 0.24);
  background: #fff8ec;
}

.active-curriculum-summary dl,
.teaching-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.active-curriculum-summary dt {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.active-curriculum-summary dd {
  margin: 0 0 8px;
  color: #172033;
  line-height: 1.45;
}

.curriculum-source-card {
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
}

.curriculum-source-card span {
  width: max-content;
  padding: 4px 8px;
  color: #075985;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.curriculum-source-card p {
  margin: 0;
  color: var(--muted);
}

.coursebook-results,
.coursebook-legal-links {
  display: grid;
  gap: 10px;
}

.coursebook-notice {
  padding: 10px 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  font-size: 13px;
}

.coursebook-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
}

.coursebook-card img,
.coursebook-cover-placeholder {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
}

.coursebook-cover-placeholder {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.coursebook-card h4 {
  margin: 4px 0;
  color: #0f172a;
}

.coursebook-card p,
.coursebook-card small {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
}

.coursebook-card span {
  width: max-content;
  padding: 4px 8px;
  color: #5b21b6;
  background: #ede9fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

button.curriculum-card,
.exam-record-choice {
  cursor: pointer;
}

.school-scope-toggle,
.bank-select,
.assessment-sheet-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-scope-toggle input,
.bank-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.progress-meter {
  display: grid;
  gap: 8px;
}

.progress-meter div {
  height: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
}

.progress-meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #86efac);
  border-radius: inherit;
}

.progress-topic.done {
  border-color: rgba(22, 163, 74, 0.32);
}

.stage-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stage-step {
  display: grid;
  gap: 8px;
  padding: 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stage-step span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #94a3b8;
  border-radius: 999px;
  font-weight: 900;
}

.stage-step.active,
.stage-step.done {
  color: #064e3b;
  border-color: var(--line-strong);
  background: #f0fdf4;
}

.stage-step.active span,
.stage-step.done span {
  background: var(--brand);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  outline: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #047857 50%),
    linear-gradient(135deg, #047857 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  border-color: rgba(22, 163, 74, 0.54);
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

input[readonly] {
  color: #475569;
  background: #f8fafc;
}

.field-hint {
  line-height: 1.45;
}

.generated {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.lesson-pack,
.lesson-content-output,
.chalkie-resource-output,
.picture-grid,
.record-actions,
.bank-edit-form,
.exam-edit-form,
.exam-edit-row,
.assessment-column-row,
.score-column-row,
.calc-column-row,
.calc-terms,
.calc-term-row,
.grade-scale-grid,
.grade-scale-row,
.exam-blueprint {
  display: grid;
  gap: 12px;
}

.lesson-pack article,
.lesson-content-output article,
.chalkie-resource-output article,
.record-card,
.reminder-card,
.template-box,
.bank-group {
  padding: 18px;
  border-color: rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
}

.chalkie-resource-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #083f3b;
  background: linear-gradient(135deg, #ecfdf5, #eefcf8);
}

.chalkie-resource-header h3 {
  margin: 0;
}

.chalkie-resource-header span {
  padding: 7px 10px;
  color: #0f5132;
  background: #ffffff;
  border: 1px solid rgba(20, 108, 99, 0.12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.slide-outline-grid,
.differentiation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.slide-outline-card,
.differentiation-grid section {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 8px;
}

.slide-outline-card span {
  color: #047857;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.slide-outline-card h4,
.differentiation-grid strong {
  margin: 0;
  color: #0f172a;
}

.slide-outline-card p,
.differentiation-grid p {
  margin: 0;
  line-height: 1.5;
}

.slide-outline-card small {
  color: var(--muted);
  line-height: 1.45;
}

.lesson-pack ul,
.lesson-pack ol,
.exam-preview ol {
  margin-top: 8px;
  padding-left: 22px;
}

.lesson-pack li,
.lesson-content-output li {
  margin-bottom: 6px;
}

.generated-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.secondary-link {
  color: #146c63;
  background: #ffffff;
  border: 1px solid rgba(20, 108, 99, 0.18);
}

.picture-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.teaching-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.teaching-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.teaching-card span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f5132;
  background: #e7f6ee;
  font-size: 11px;
  font-weight: 800;
}

.teaching-card h5 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.teaching-card > strong {
  display: block;
  padding: 10px;
  border-left: 4px solid #146c63;
  color: #123d3a;
  background: #f3faf8;
  font-size: 14px;
  line-height: 1.45;
}

.teaching-card dl {
  display: grid;
  gap: 6px;
  margin: 0;
}

.teaching-card dt {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.teaching-card dd {
  margin: 0 0 6px;
  color: #172033;
  line-height: 1.5;
}

.picture-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.picture-placeholder {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: var(--muted);
  background: #f1f5f9;
}

.picture-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.picture-card p,
.picture-card small {
  display: block;
  margin: 10px 12px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-line span,
.lesson-pack span {
  display: inline-flex;
  padding: 5px 10px;
  color: #047857;
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: #0f172a;
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: #fbfdfc;
}

tbody tr:hover {
  background: #f0fdf4;
}

td input {
  min-width: 80px;
}

#assessmentSheetList {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  justify-content: start;
  margin-top: 14px;
}

.assessment-sheet-chip {
  min-height: 0;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
}

.assessment-sheet-chip.active {
  position: relative;
  border-color: rgba(22, 163, 74, 0.42);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.12);
}

.assessment-sheet-chip.active::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  content: "";
  background: linear-gradient(180deg, #22c55e, #047857);
  border-radius: 999px;
}

.assessment-sheet-chip .record-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.assessment-sheet-chip .secondary,
.assessment-sheet-chip .danger-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.opened-sheet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  color: #065f46;
  background: #dcfce7;
  border: 1px solid rgba(22, 163, 74, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

#assessmentTable {
  width: 100%;
  min-width: 640px;
  max-width: none;
  table-layout: fixed;
}

#assessmentTable th,
#assessmentTable td {
  padding: 9px 10px;
  white-space: nowrap;
}

#assessmentTable th:first-child,
#assessmentTable td:first-child {
  width: 190px;
  min-width: 190px;
  white-space: normal;
}

#assessmentTable th:nth-child(2),
#assessmentTable td:nth-child(2) {
  width: 120px;
  min-width: 120px;
}

#assessmentTable th:not(:first-child):not(:nth-child(2)),
#assessmentTable td:not(:first-child):not(:nth-child(2)) {
  width: 88px;
  min-width: 88px;
  max-width: 108px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

#assessmentTable th:last-child,
#assessmentTable td:last-child {
  width: 150px;
  min-width: 150px;
  max-width: 180px;
}

#assessmentTable td input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 10px;
}

#assessmentTable .score-input {
  max-width: 68px;
  margin: 0 auto;
  text-align: center;
}

#assessmentTable .formula-cell {
  font-size: 13px;
}

.formula-cell {
  color: #047857;
  font-weight: 850;
}

.records-grid {
  margin-top: 12px;
}

.record-card,
.reminder-card {
  display: grid;
  gap: 10px;
}

.record-card h3 {
  margin-bottom: 0;
}

.copy-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.record-actions a {
  color: #047857;
  font-weight: 850;
  text-decoration: none;
}

.record-actions a:hover {
  text-decoration: underline;
}

.danger-button {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.assessment-designer summary,
.exam-preview summary,
.bank-edit summary,
.exam-edit summary {
  cursor: pointer;
  font-weight: 900;
}

.assessment-designer summary small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.assessment-column-row,
.calc-column-row,
.grade-scale-row,
.exam-blueprint-row,
.exam-blueprint-head {
  display: grid;
  gap: 10px;
  align-items: center;
}

.assessment-column-row {
  grid-template-columns: minmax(170px, 1fr) 96px auto;
}

.score-column-row {
  grid-template-columns: minmax(180px, 1fr) 96px auto;
}

.calc-column-row {
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 190px) 96px auto;
}

.grade-scale-row {
  grid-template-columns: 92px 120px;
  justify-content: start;
}

.exam-blueprint-row,
.exam-blueprint-head {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.score-column-row input,
.grade-scale-row input,
.calc-column-row input,
.calc-column-row select,
.calc-term-row input,
.calc-term-row select {
  min-height: 38px;
}

.calc-terms {
  grid-column: 1 / -1;
  padding: 10px;
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 14px;
}

.calc-term-row {
  grid-template-columns: 64px minmax(160px, 240px);
  justify-content: start;
}

.calc-term-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.share-assessment-style {
  margin: 16px 0;
}

.template-total strong {
  display: block;
  font-size: 28px;
}

.exam-blueprint-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.bank-select {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.assessment-sheet-chip {
  justify-content: space-between;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.assessment-sheet-chip span {
  color: inherit;
  font-size: 12px;
  opacity: 0.84;
}

.assessment-sheet-chip.active .secondary,
.assessment-sheet-chip.active .danger-button {
  background: #ffffff;
}

.notification-list {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
}

.error {
  color: var(--danger);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSheen {
  0%,
  100% {
    background-position: -40% 0, 0 0, 0 0;
  }
  50% {
    background-position: 140% 0, 16px 16px, 16px 16px;
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, 18px, 0) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (min-width: 721px) {
  .assessment-actions {
    grid-template-columns: repeat(3, minmax(180px, 240px));
    justify-content: start;
  }

  .assessment-actions > .action-row,
  .assessment-actions > .share-assessment-style {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .topbar,
  .app-shell,
  .admin-shell,
  .overview,
  .dashboard-grid,
  .curriculum-layout,
  .exam-builder {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    min-height: auto;
  }

  .header-actions {
    grid-template-columns: 1fr auto;
    min-width: 0;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  .metric-row,
  .grid-4,
  .reminder-form,
  .question-bank-filters,
  .stage-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lesson-source-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .app-shell,
  .admin-shell {
    width: min(calc(100% - 20px), var(--max));
  }

  .topbar {
    min-height: auto;
    margin-top: 10px;
    padding: 18px;
    border-radius: 24px;
  }

  .brand-lockup {
    display: grid;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .topbar .muted {
    font-size: 14px;
  }

  .header-actions,
  .metric-row,
  .grid-2,
  .grid-3,
  .grid-4,
  .reminder-form,
  .assessment-actions,
  .question-bank-filters,
  .gradebook-controls,
  .gradebook-summary,
  .plan-grid,
  .dashboard-cards,
  .quick-actions,
  .stage-progress,
  .assessment-column-row,
  .score-column-row,
  .calc-column-row,
  .calc-term-row,
  .grade-scale-row,
  .exam-blueprint-row,
  .exam-blueprint-head {
    grid-template-columns: 1fr;
  }

  .copy-lesson,
  .assessment-sheet-chip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .assessment-sheet-chip .record-actions {
    width: 100%;
  }

  .assessment-sheet-chip .record-actions button {
    flex: 1 1 96px;
  }

  #assessmentSheetList {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-preview {
    min-height: 108px;
  }

  .preview-chart {
    height: 48px;
  }

  .tabs {
    border-radius: 22px;
  }

  .tab {
    min-height: 38px;
  }

  .panel,
  .auth-card,
  .admin-login {
    padding: 16px;
    border-radius: 20px;
  }

  .overview h2 {
    font-size: 22px;
  }

  #assessmentTable {
    min-width: 620px;
  }
}


.admin-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-action-grid .panel {
    margin: 0;
}

.curriculum-lite-workspace .curriculum-intro {
  max-width: 720px;
}

.curriculum-main-layout {
  grid-template-columns: minmax(210px, 0.75fr) minmax(330px, 1.2fr) minmax(260px, 0.9fr);
  align-items: start;
}

.compact-library {
  gap: 8px;
}

.compact-library .curriculum-card {
  padding: 11px 12px;
}

.compact-library .curriculum-card span {
  font-size: 12px;
  line-height: 1.35;
}

.curriculum-topic-panel textarea {
  min-height: 82px;
}

.curriculum-optional-fields details,
.curriculum-advanced-tools {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.curriculum-optional-fields details {
  padding: 10px 12px;
}

.curriculum-optional-fields summary,
.curriculum-advanced-tools > summary {
  cursor: pointer;
  color: #0f766e;
  font-weight: 800;
}

.curriculum-optional-fields details[open] {
  display: grid;
  gap: 12px;
}

.curriculum-optional-fields details[open] summary {
  margin-bottom: 2px;
}

.curriculum-advanced-tools {
  margin-top: 18px;
  padding: 14px;
}

.curriculum-advanced-tools > summary {
  list-style-position: inside;
}

.curriculum-advanced-tools > .muted {
  margin: 10px 0 0;
}

.curriculum-saved-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

@media (max-width: 1180px) {
  .curriculum-main-layout,
  .curriculum-saved-layout {
    grid-template-columns: 1fr;
  }
}

.lesson-attachments {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px dashed rgba(20, 108, 99, 0.28);
  border-radius: 12px;
  background: rgba(240, 253, 250, 0.52);
}

.lesson-attachments > strong {
  color: #0f172a;
  font-size: 13px;
}

.lesson-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #fff;
}

.lesson-attachment-chip a {
  max-width: 220px;
  overflow: hidden;
  color: #146c63;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-attachment-chip button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #991b1b;
  background: #fee2e2;
  cursor: pointer;
  font-weight: 900;
}

.lesson-attachment-upload {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(20, 108, 99, 0.18);
  border-radius: 999px;
  color: #146c63;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lesson-attachment-upload input {
  display: none;
}

.attachment-empty {
  margin: 0;
  font-size: 12px;
}
