:root {
  --blue: #063a96;
  --blue-2: #0a5bd3;
  --sky: #51acef;
  --yellow: #ffd22e;
  --orange: #ff7a1a;
  --green: #63b640;
  --red: #ef2525;
  --ink: #172139;
  --muted: #60708e;
  --line: #dbe3ef;
  --paper: #ffffff;
  --soft: #f5f8fc;
  --soft-yellow: #fff6cf;
  --shadow: 0 18px 45px rgba(20, 43, 85, 0.12);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 22px 16px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--blue);
  font-weight: 900;
  border: 3px solid var(--blue);
}

.brand-title {
  margin: 0;
  color: var(--blue);
  font-size: 1rem;
  line-height: 1.1;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-group-title {
  margin: 18px 8px 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.nav-button:hover {
  background: #f0f5ff;
}

.nav-button.active {
  background: var(--blue);
  color: white;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(6, 58, 150, 0.1);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.nav-button.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.main {
  min-width: 0;
  padding: 22px;
}

.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

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

.mobile-nav {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 800;
}

.page {
  max-width: 1220px;
  margin: 0 auto;
}

.section {
  margin-bottom: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
  padding: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf0 0%, #eef7ff 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 64ch;
  color: #314363;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-art {
  min-height: 330px;
  overflow: hidden;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  position: relative;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% 44%;
  display: block;
}

.asset-note {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  border: 1px solid var(--line);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar h1,
.toolbar h2 {
  margin: 0;
  color: var(--blue);
}

.toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.button,
.ghost-button,
.danger-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}

.button {
  background: var(--blue);
  color: white;
  box-shadow: 0 10px 22px rgba(6, 58, 150, 0.18);
}

.button:hover {
  background: #052f7d;
}

.button.yellow {
  background: var(--yellow);
  color: var(--blue);
  border-color: #e9bf21;
}

.ghost-button {
  background: white;
  color: var(--blue);
  border-color: var(--line);
}

.danger-button {
  background: #fff1f1;
  color: #a31717;
  border-color: #ffc9c9;
}

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

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

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

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

.panel,
.card,
.metric,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 8px 28px rgba(25, 47, 88, 0.06);
}

.panel,
.form-panel {
  padding: 18px;
}

.card {
  padding: 16px;
}

.card h3,
.panel h3 {
  margin: 0 0 8px;
  color: var(--blue);
}

.card p,
.panel p {
  color: var(--muted);
  line-height: 1.5;
}

.metric {
  padding: 16px;
}

.metric-value {
  color: var(--blue);
  font-size: 1.9rem;
  font-weight: 900;
}

.metric-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-card {
  min-height: 170px;
  display: grid;
  gap: 12px;
  align-content: space-between;
}

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

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--soft-yellow);
  color: var(--blue);
  border: 2px solid var(--yellow);
  font-weight: 900;
  font-size: 1.15rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}

.tag,
.status,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag {
  background: #eef5ff;
  color: var(--blue);
}

.status {
  background: #eef9ea;
  color: #27681a;
}

.status.draft {
  background: #fff4d9;
  color: #8a5a00;
}

.status.blocked {
  background: #fff1f1;
  color: #9c1a1a;
}

.pill {
  background: var(--blue);
  color: white;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--orange));
}

.module-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 260px;
}

.module-visual {
  height: 96px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 2rem;
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(6, 58, 150, 0.9), rgba(81, 172, 239, 0.88)),
    var(--blue);
}

.module-visual.orange {
  background: linear-gradient(135deg, #ff7a1a, #ffd22e);
  color: var(--blue);
}

.module-visual.green {
  background: linear-gradient(135deg, #2d8d24, #63b640);
}

.module-visual.red {
  background: linear-gradient(135deg, #ef2525, #ff9e8a);
}

.learning-map {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(5, minmax(86px, 1fr));
  gap: 12px;
  align-items: center;
}

.map-step {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.map-step.done {
  background: #eef9ea;
  border-color: var(--green);
}

.map-step.active {
  background: var(--soft-yellow);
  border-color: var(--yellow);
  box-shadow: 0 12px 24px rgba(255, 210, 46, 0.2);
}

.video-frame {
  min-height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f1b32;
  color: white;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.video-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 210, 46, 0.35), transparent 30%),
    linear-gradient(135deg, #10295f, #0b1630);
}

.play-circle {
  width: 116px;
  height: 116px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 6px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 2.8rem;
  padding-left: 7px;
}

.video-side {
  padding: 22px;
  background: white;
  color: var(--ink);
}

.video-side p {
  color: var(--muted);
}

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

.choice {
  min-height: 96px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.choice:hover,
.choice.selected {
  border-color: var(--yellow);
  background: var(--soft-yellow);
}

.answer-box {
  min-height: 58px;
  padding: 14px;
  border-radius: 8px;
  background: #f0f8ed;
  color: #28641f;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

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

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

th {
  background: #f6f9fe;
  color: var(--blue);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

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

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

.field label {
  color: var(--blue);
  font-weight: 800;
  font-size: 0.88rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
}

.asset-board {
  min-height: 260px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

.asset-board img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 19% 42%;
  display: block;
}

.empty-asset {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    #f6f9ff,
    #f6f9ff 10px,
    #eef4fb 10px,
    #eef4fb 20px
  );
}

.notice {
  padding: 13px 14px;
  border-radius: 8px;
  border: 1px solid #ffe59b;
  background: #fff7d9;
  color: #6f4b00;
  line-height: 1.5;
}

.footer-note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 1020px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    display: block;
  }

  .main {
    padding: 16px;
  }

  .hero,
  .split,
  .video-frame {
    grid-template-columns: 1fr;
  }

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

  .learning-map {
    grid-template-columns: repeat(3, minmax(86px, 1fr));
  }
}

@media (max-width: 680px) {
  .main {
    padding: 12px;
  }

  .hero {
    padding: 16px;
  }

  .hero-art {
    min-height: 260px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .form-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

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

  .learning-map {
    grid-template-columns: repeat(2, minmax(86px, 1fr));
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .toolbar .button,
  .toolbar .ghost-button {
    flex: 1 1 150px;
  }
}
