:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #17212b;
  --muted: #697586;
  --line: #dce3eb;
  --blue: #1e73d8;
  --blue-dark: #1256a4;
  --orange: #ee5d2a;
  --green: #138a4d;
  --red: #c0392b;
  --focus: #7aa7ff;
  --shadow: 0 16px 40px rgba(23, 33, 43, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #111820;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #f3c94c;
  color: #111820;
  border-radius: 8px;
  font-weight: 800;
}

.brand span,
.teacher-note p {
  display: block;
  color: #b8c2cc;
  font-size: 13px;
  margin-top: 3px;
}

.platform-switch {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.platform-button,
.ghost-button {
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
}

.platform-button {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-button.active {
  background: #fff;
  color: #111820;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-blue {
  background: var(--blue);
}

.dot-orange {
  background: var(--orange);
}

.steps {
  display: grid;
  gap: 7px;
}

.step-link {
  border: 0;
  background: transparent;
  color: #c8d1dc;
  text-align: left;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}

.step-link span:first-child {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  font-size: 12px;
}

.step-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .09);
}

.step-link.done span:first-child {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.teacher-note {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: 18px;
}

.ghost-button {
  width: 100%;
  margin-top: 12px;
  text-align: center;
}

.main {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  min-width: 0;
}

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: 26px;
}

.status-pill {
  min-width: 124px;
  text-align: center;
  background: #e9f2ff;
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 13px;
}

.notice {
  margin: 24px 32px 0;
  border-left: 5px solid #f3c94c;
  background: #fff9df;
  padding: 14px 16px;
  border-radius: 8px;
  color: #463d16;
}

.workspace {
  padding: 24px 32px 32px;
}

.screen {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.screen-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.screen-header h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.screen-header p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.45;
}

.screen-body {
  padding: 24px;
}

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

.field {
  display: grid;
  gap: 7px;
}

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

label {
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

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

.choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  background: #fff;
}

.choice input {
  width: auto;
  min-height: auto;
  margin-right: 8px;
}

.choice strong {
  display: block;
  margin-bottom: 7px;
}

.choice p {
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.4;
}

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

.upload-box {
  border: 1px dashed #9aa8b5;
  border-radius: 8px;
  padding: 18px;
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: #fbfcfd;
}

.upload-box strong {
  font-size: 14px;
}

.fake-file {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #edf7f1;
  color: var(--green);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.fake-file.local {
  background: #e9f2ff;
  color: var(--blue-dark);
}

.file-button {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  min-height: 38px;
  align-items: center;
  border-radius: 8px;
  background: #22303c;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
}

.camera-guide-button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  min-height: 40px;
  padding: 0 12px;
  width: fit-content;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
}

.shopescola .camera-guide-button {
  background: var(--orange);
}

.upload-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.preview-slot {
  min-height: 96px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.pending-file,
.upload-error {
  display: grid;
  place-items: center;
  min-height: 76px;
  border-radius: 8px;
  background: #eef2f6;
  color: var(--muted);
  text-align: center;
  padding: 10px;
  font-size: 13px;
}

.upload-error {
  background: #fff1ef;
  color: var(--red);
  font-weight: 700;
}

.preview-image {
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef2f6;
}

.preview-document {
  width: 100%;
  height: 96px;
  border-radius: 8px;
  background: #fff1ef;
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: 800;
  border: 1px solid #ffd0c9;
}

.file-meta {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.file-meta strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.selfie-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(6, 10, 14, .74);
  display: grid;
  place-items: center;
  padding: 18px;
}

.selfie-panel {
  width: min(440px, 100%);
  background: #101820;
  color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.selfie-top,
.selfie-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
}

.selfie-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.selfie-stage {
  position: relative;
  min-height: 560px;
  background: #05070a;
  overflow: hidden;
}

.selfie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.selfie-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 36% 43% at 50% 43%, transparent 0 62%, rgba(0, 0, 0, .66) 63% 100%);
}

.selfie-oval {
  position: absolute;
  left: 50%;
  top: 43%;
  width: min(245px, 62vw);
  height: min(330px, 68vh);
  transform: translate(-50%, -50%);
  border: 4px solid rgba(255, 255, 255, .94);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .18), 0 0 30px rgba(255, 255, 255, .18);
}

.selfie-instruction {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  background: rgba(16, 24, 32, .78);
  color: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
  font-size: 13px;
}

.selfie-character-result {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: #f6f8fa;
  color: var(--ink);
  text-align: center;
  padding: 28px;
}

.selfie-character-result[hidden] {
  display: none;
}

.selfie-character-result img {
  width: min(260px, 72vw);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 16px 44px rgba(16, 24, 32, .18);
}

.selfie-character-result strong {
  font-size: 22px;
}

.selfie-character-result span {
  color: var(--muted);
  max-width: 280px;
  line-height: 1.35;
}

.selfie-actions {
  background: #101820;
}

.selfie-actions .secondary-button {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.selfie-error {
  color: #ffd1cc;
  padding: 0 14px 14px;
  margin: 0;
  font-size: 13px;
}

.checklist {
  display: grid;
  gap: 12px;
}

.checkline {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.checkline input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.actions {
  padding: 18px 32px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--blue);
  color: #fff;
}

.shopescola .primary-button,
.shopescola .status-pill {
  background: #fff0e8;
  color: #a83b12;
}

.shopescola .primary-button {
  background: var(--orange);
  color: #fff;
}

.secondary-button {
  background: #eef2f6;
  color: #22303c;
}

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

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.summary-card span {
  color: var(--muted);
  font-size: 12px;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  background: #f6f8fa;
  border-radius: 8px;
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-bottom: 3px;
}

.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

.error.show {
  display: block;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

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

  .topbar,
  .screen-header {
    flex-direction: column;
    align-items: stretch;
  }

  .grid,
  .choice-grid,
  .upload-row,
  .summary-grid,
  .dashboard,
  .metric-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .sidebar,
  .topbar,
  .workspace,
  .actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notice {
    margin-left: 16px;
    margin-right: 16px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 22px;
  }

  .selfie-stage {
    min-height: 68vh;
  }

  .selfie-panel {
    max-height: calc(100vh - 20px);
  }
}
