:root {
  --accent: #FF6B00;
  --accent-dark: #E05A00;
  --ink: #1C2420;
  --muted: #68756E;
  --bg: #FFFBF5;
  --card: #FFFFFF;
  --line: #F0E4D8;
  --ok: #1E9E62;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(120, 60, 0, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
p { margin: 0 0 12px; }
a { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: rgba(255, 251, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-accent { color: var(--accent); }
.top-links { display: flex; gap: 18px; margin-left: 12px; }
.top-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.top-links a:hover { color: var(--accent-dark); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lang-toggle {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; cursor: pointer; font-weight: 700;
}
.ghost-button {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block;
}
.ghost-button:hover { border-color: var(--accent); color: var(--accent-dark); }

.primary {
  background: var(--accent); color: #fff; border: none; border-radius: 999px;
  padding: 13px 26px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.primary:hover { background: var(--accent-dark); }
.primary:active { transform: scale(0.98); }
.primary.small { padding: 8px 16px; }
.primary:disabled { opacity: 0.55; cursor: wait; }
.secondary {
  background: #fff; color: var(--accent-dark); border: 2px solid var(--accent);
  border-radius: 999px; padding: 11px 24px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
}

.app-main { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .eyebrow { color: var(--accent-dark); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.82rem; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 900; max-width: 820px; margin: 0 auto 16px; }
.hero h1 .hl { color: var(--accent); }
.hero .sub { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 22px; min-width: 140px; box-shadow: var(--shadow);
}
.stat .num { font-size: 1.5rem; font-weight: 900; color: var(--accent-dark); }
.stat .lbl { font-size: 0.85rem; color: var(--muted); }

section.block { padding: 44px 0 8px; }
section.block > h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 850; text-align: center; }
section.block > .lead { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }

/* ---------- skills grid ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.skill-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.skill-card .ico { font-size: 1.5rem; }
.skill-card h3 { font-size: 1.02rem; margin: 8px 0 6px; }
.skill-card p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* ---------- program accordion ---------- */
.module-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow);
}
.module-head {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: none; padding: 16px 18px; cursor: pointer;
}
.module-head .m-title { font-weight: 800; font-size: 1.02rem; flex: 1; }
.module-head .m-meta { color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.module-head .chev { color: var(--accent); font-weight: 900; }
.module-progress { height: 6px; background: #F6EADB; }
.module-progress > div { height: 100%; background: var(--accent); }
.lesson-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 18px;
  border-top: 1px solid #F7EFE4; text-decoration: none; color: var(--ink);
}
.lesson-row:hover { background: #FFF6EC; }
.lesson-row.locked { opacity: 0.62; }
.lesson-row .l-ico { width: 26px; text-align: center; flex-shrink: 0; }
.lesson-row .l-title { flex: 1; font-weight: 600; font-size: 0.97rem; }
.lesson-row .l-dur { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.badge {
  font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: #FFF1E2; color: var(--accent-dark); border: 1px solid #FFD9B3;
}
.badge.done { background: #E5F7EE; color: var(--ok); border-color: #BDE8D2; }
.badge.lock { background: #F3F0EC; color: var(--muted); border-color: var(--line); }

/* ---------- steps / instructor ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.step-card .n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.instructor {
  display: flex; gap: 22px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: 24px; box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.avatar {
  width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #FF8A3C, #FF6B00);
  color: #fff; font-size: 2rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
}
.instructor .who { flex: 1; min-width: 240px; }

/* ---------- pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; align-items: stretch; }
.price-card {
  background: var(--card); border: 2px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.price-card.featured { border-color: var(--accent); }
.price-card .p-name { font-weight: 800; font-size: 1.05rem; }
.price-card .p-price { font-size: 2.3rem; font-weight: 900; margin: 8px 0 2px; }
.price-card .p-price .per { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.price-card ul { padding-left: 18px; margin: 14px 0 20px; color: var(--muted); }
.price-card ul li { margin-bottom: 6px; }
.price-card .primary, .price-card .secondary { margin-top: auto; width: 100%; }
.guarantee {
  margin-top: 18px; background: #FFF4E8; border: 1px solid #FFD9B3; border-radius: var(--radius);
  padding: 18px 22px; display: flex; gap: 14px; align-items: flex-start;
}
.guarantee .g-ico { font-size: 1.6rem; }

/* ---------- faq ---------- */
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-q { width: 100%; background: none; border: none; text-align: left; padding: 15px 18px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.faq-a { padding: 0 18px 16px; color: var(--muted); }

footer.site { border-top: 1px solid var(--line); margin-top: 60px; padding: 26px 0 10px; color: var(--muted); font-size: 0.9rem; text-align: center; }

/* ---------- auth / forms ---------- */
.auth-card {
  max-width: 440px; margin: 48px auto; background: var(--card); border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px); padding: 28px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.5rem; }
.segmented { display: flex; background: #F8EFE3; border-radius: 999px; padding: 4px; margin: 16px 0; }
.segmented button { flex: 1; border: none; background: none; padding: 9px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.segmented button.active { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
form.stack { display: flex; flex-direction: column; gap: 13px; }
form.stack label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.form-error { color: #C22E2E; font-size: 0.9rem; min-height: 1.2em; }
.form-ok { color: var(--ok); font-size: 0.9rem; }

/* ---------- cabinet ---------- */
.cabinet-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin: 34px 0 18px; }
.ring-wrap { position: relative; width: 104px; height: 104px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-label {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.25rem;
}
.ring-wrap .ring-label span { font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.access-note { background: #E5F7EE; border: 1px solid #BDE8D2; color: #14663F; border-radius: 12px; padding: 10px 14px; font-weight: 600; display: inline-block; }
.access-note.expired { background: #FDECEC; border-color: #F5C2C2; color: #8C2323; }

/* ---------- lesson / player ---------- */
.lesson-head { margin: 30px 0 14px; }
.lesson-head .crumb { color: var(--muted); font-size: 0.9rem; }
.player-wrap { background: #14100C; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow); }
.player-wrap video { width: 100%; display: block; max-height: 68vh; background: #000; }
.player-wrap iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.player-placeholder {
  aspect-ratio: 16/9; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  color: #FFE3C7; text-align: center; padding: 20px; font-size: 1.05rem;
}
.player-controls {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #1E1813; padding: 10px 12px;
}
.player-controls button, .player-controls select {
  background: #2C241C; color: #FFE9D2; border: 1px solid #463729; border-radius: 10px; padding: 7px 12px; cursor: pointer; font-weight: 600;
}
.player-controls .grow { flex: 1; }
.watched-bar { height: 8px; background: #F6EADB; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.watched-bar > div { height: 100%; background: var(--accent); transition: width 0.4s ease; }
.lesson-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; flex-wrap: wrap; }
.complete-banner { background: #E5F7EE; border: 1px solid #BDE8D2; border-radius: var(--radius); padding: 14px 18px; margin-top: 16px; font-weight: 600; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 18px; }
.admin-tabs button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; }
.admin-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
table.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.grid th, table.grid td { padding: 10px 12px; border-bottom: 1px solid #F7EFE4; text-align: left; font-size: 0.93rem; vertical-align: top; }
table.grid th { background: #FFF6EC; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid-two { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.mini-btn { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 5px 11px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.mini-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.mini-btn.danger:hover { border-color: #C22E2E; color: #C22E2E; }

/* ---------- toast / modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #1C2420; color: #fff; padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25); z-index: 200; font-weight: 600; max-width: 92vw; text-align: center;
}
.modal-back {
  position: fixed; inset: 0; background: rgba(28, 20, 12, 0.5); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: calc(var(--radius) + 6px); max-width: 460px; width: 100%;
  padding: 26px; max-height: 90vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
}
.modal h2 { font-size: 1.3rem; }
.modal .close-x { float: right; border: none; background: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }

@media (max-width: 720px) {
  .top-links { display: none; }
  .hero { padding: 40px 0 26px; }
  .app-main { padding: 0 14px 60px; }
}
