:root {
  --black: #050505;
  --ink: #111111;
  --muted: #696969;
  --paper: #ffffff;
  --soft: #f3f3ef;
  --line: #deded8;
  --yellow: #ffd400;
  --yellow-soft: #fff1a8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.boot {
  padding: 28px;
  color: var(--muted);
}

.access-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  padding: 18px;
  background: var(--black);
}

.access-hero {
  min-height: calc(100vh - 36px);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.66)),
    var(--hero-image) center / cover no-repeat;
}

.access-hero h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 4.8rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.access-hero p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.15rem;
  line-height: 1.5;
}

.access-card {
  align-self: center;
  display: grid;
  gap: 12px;
  background: var(--paper);
  border-radius: 8px;
  padding: 22px;
}

.access-card label,
.question-form label,
.admin-login label,
.image-editor label {
  display: grid;
  gap: 6px;
  font-weight: 900;
}

.access-card input,
.question-form input,
.question-form textarea,
.question-form select,
.admin-login input,
.image-editor input,
.module-card textarea,
.question-card textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper);
  color: var(--ink);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--black);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.price-box {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 2px solid var(--yellow);
  border-radius: 8px;
  background: #fffdf0;
}

.price-box strong {
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 0.95;
}

.price-box span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 212, 0, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), transparent 360px),
    var(--paper);
  background-size: 44px 44px, auto, auto;
}

.hero {
  min-height: 54vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px clamp(16px, 4vw, 56px) 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.7) 46%, rgba(0, 0, 0, 0.92)),
    var(--hero-image) center / cover no-repeat,
    var(--black);
}

.app-header {
  min-height: auto;
  display: grid;
  gap: 14px;
  padding: 16px clamp(14px, 4vw, 42px);
}

.topbar,
.brand,
.user-bar,
.hero-strip,
.action-row,
.admin-head {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
}

.brand {
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 36px;
  background: var(--yellow);
  color: var(--black);
}

.admin-chip,
.app-nav button,
.btn {
  border: 1px solid var(--black);
  border-radius: 8px;
  min-height: 42px;
  cursor: pointer;
  font-weight: 900;
}

.admin-chip {
  padding: 0 14px;
  border-color: rgba(255, 212, 0, 0.7);
  color: var(--yellow);
  background: rgba(0, 0, 0, 0.42);
}

.user-bar {
  gap: 10px;
  min-width: 0;
}

.user-bar span {
  max-width: 220px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-copy {
  width: min(820px, 100%);
  padding: 70px 0 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero p:not(.eyebrow) {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.48;
}

.header-progress {
  display: grid;
  gap: 8px;
}

.hero-strip {
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.progress-bar {
  width: min(620px, 100%);
  height: 10px;
  border: 1px solid rgba(255, 212, 0, 0.54);
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--yellow);
}

.hero-strip span,
.station-ribbon span {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 212, 0, 0.74);
  color: var(--yellow);
  padding: 10px 12px;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.app-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.app-nav button {
  background: var(--paper);
  color: var(--ink);
  min-height: 50px;
  padding: 7px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.1;
  font-size: 0.78rem;
}

.app-nav button.active {
  background: var(--black);
  color: var(--yellow);
}

.page-wrap {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 22px clamp(14px, 3vw, 32px) 56px;
}

.content-grid,
.two-column,
.simulado-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.two-column.reverse {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
}

.two-column.reverse .page-image {
  order: 2;
}

.intro-panel,
.text-panel,
.admin-login,
.admin-panel,
.simulado-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.text-panel h2,
.suggestions h2,
.simulado-panel h2,
.admin-panel h2,
.admin-login h2 {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.intro-panel p,
.text-panel p,
.simulado-panel p,
.admin-note {
  color: var(--muted);
  line-height: 1.55;
}

.btn {
  display: inline-grid;
  place-items: center;
  min-width: 132px;
  padding: 0 16px;
  text-decoration: none;
}

.btn.primary {
  background: var(--yellow);
  color: var(--black);
}

.btn.secondary {
  background: var(--black);
  color: var(--yellow);
}

.btn.compact {
  min-height: 36px;
  min-width: 0;
  padding: 0 12px;
  font-size: 0.82rem;
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.action-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.photo-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-stack img,
.single-course-photo img,
.page-image,
.simulado-panel img,
.image-editor img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.photo-stack img:first-child {
  grid-column: 1 / -1;
  min-height: 260px;
}

.single-course-photo img {
  min-height: 100%;
  aspect-ratio: 4 / 3;
}

.module-list,
.format-grid,
.suggestion-grid,
.image-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.lesson-block,
.sample-plan {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow);
}

.lesson-block h2,
.sample-plan h2 {
  margin-bottom: 12px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.lesson-block p,
.sample-plan p {
  color: var(--muted);
  line-height: 1.6;
}

.module-card,
.format-grid article,
.suggestion-grid article,
.timeline article,
.image-editor article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.module-card span,
.timeline span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  margin-bottom: 12px;
  background: var(--black);
  color: var(--yellow);
  font-weight: 950;
}

.module-card h3,
.format-grid h3 {
  margin-bottom: 8px;
}

.module-card p,
.format-grid p,
.suggestion-grid span {
  color: var(--muted);
  line-height: 1.45;
}

.module-card strong {
  display: block;
  color: var(--black);
  line-height: 1.42;
}

.module-card.done {
  border-color: rgba(255, 212, 0, 0.9);
  background: #fffdf1;
}

.module-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-weight: 900;
}

.module-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--yellow);
}

.module-comments {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.suggestions {
  margin-top: 28px;
}

.suggestion-grid article {
  display: grid;
  gap: 8px;
  border-color: rgba(255, 212, 0, 0.65);
  background: linear-gradient(180deg, #fffdf0, #ffffff);
}

.station-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.station-ribbon span {
  border-color: var(--black);
  color: var(--black);
  background: var(--yellow);
}

.check-list,
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.check-list span {
  padding: 12px;
  border-left: 6px solid var(--yellow);
  background: var(--soft);
  font-weight: 800;
  line-height: 1.35;
}

.timeline article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

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

.sample-plan table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--paper);
}

.sample-plan th,
.sample-plan td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.sample-plan th {
  background: var(--black);
  color: var(--yellow);
  text-transform: uppercase;
  font-size: 0.78rem;
}

.simulado-panel {
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1fr);
}

.admin-login,
.certificate-panel {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.status {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.admin-head {
  justify-content: space-between;
  gap: 12px;
}

.role-pill {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 12px;
  background: var(--yellow);
  color: var(--black);
  border-radius: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(100px, 1fr);
  gap: 8px;
  overflow-x: auto;
  margin: 18px 0;
}

.admin-tabs button {
  min-height: 40px;
  border: 1px solid var(--black);
  border-radius: 8px;
  background: var(--paper);
  color: var(--black);
  font-weight: 900;
  text-transform: capitalize;
}

.admin-tabs button.active {
  background: var(--black);
  color: var(--yellow);
}

.image-editor img {
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: auto;
  margin-bottom: 10px;
}

.material-grid,
.question-list,
.student-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.material-card,
.question-card,
.student-card,
.certificate-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.material-card p,
.question-card p,
.student-card p,
.certificate-panel p,
.empty {
  color: var(--muted);
  line-height: 1.45;
}

.student-card {
  display: grid;
  gap: 10px;
}

.student-card select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.material-card small,
.question-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.question-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.certificate-preview {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 260px;
  border: 12px solid var(--yellow);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  background: #ffffff;
}

.certificate-preview strong {
  text-transform: uppercase;
}

.certificate-preview span {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 950;
  line-height: 1;
}

@media (max-width: 820px) {
  .access-shell {
    grid-template-columns: 1fr;
    padding: 0;
    background: var(--paper);
  }

  .access-hero {
    min-height: 54vh;
    border-radius: 0;
  }

  .access-card {
    align-self: auto;
    margin: -36px 14px 18px;
    box-shadow: var(--shadow);
  }

  .hero {
    min-height: auto;
  }

  .brand span:last-child {
    max-width: 178px;
    line-height: 1.15;
  }

  .content-grid,
  .two-column,
  .two-column.reverse,
  .simulado-panel,
  .module-list,
  .format-grid,
  .suggestion-grid,
  .image-editor,
  .material-grid,
  .question-list,
  .student-list {
    grid-template-columns: 1fr;
  }

  .two-column.reverse .page-image {
    order: 0;
  }

  .photo-stack img:first-child,
  .single-course-photo img,
  .page-image,
  .simulado-panel img {
    min-height: 230px;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 16px 14px 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .admin-chip {
    min-height: 36px;
    padding: 0 10px;
  }

  .hero-copy {
    padding: 34px 0 22px;
  }

  .app-nav {
    grid-auto-columns: minmax(112px, 1fr);
  }

  .photo-stack {
    grid-template-columns: 1fr;
  }

  .photo-stack img:first-child {
    grid-column: auto;
  }
}
