/* ================= Tokens ================= */
:root {
  --navy: #0b1d3a;
  --navy-2: #13294f;
  --primary: #1f4fd1;
  --primary-2: #173fa8;
  --gold: #ffce00;
  --gold-2: #f2b800;
  --red: #dd0000;
  --wa: #25d366;
  --wa-2: #1ebe5b;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e5e8ef;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(11, 29, 58, .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.35; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; display: block; }
[lang="de"] { font-family: 'Segoe UI', system-ui, sans-serif; direction: ltr; unicode-bidi: isolate; }
.ic { flex-shrink: 0; vertical-align: middle; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: .82rem; }
.mt { margin-top: 2.5rem; }
.inline { display: inline; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.3em; border-radius: 12px; border: 1.5px solid transparent;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; line-height: 1.3;
  transition: transform .15s, background .15s, box-shadow .15s, color .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: .45em .9em; font-size: .87rem; border-radius: 10px; }
.btn-lg { padding: .9em 1.7em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; box-shadow: 0 6px 18px rgba(31, 79, 209, .3); }
.btn-accent { background: var(--gold); color: var(--navy); }
.btn-accent:hover { background: var(--gold-2); color: var(--navy); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-light { border-color: rgba(255, 255, 255, .4); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-2); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, .35); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #fecaca; }
.btn-danger-ghost:hover { background: #fef2f2; }

/* ================= Header ================= */
.flagbar { display: flex; height: 4px; }
.flagbar span { flex: 1; }
.flagbar span:nth-child(1) { background: #000; }
.flagbar span:nth-child(2) { background: var(--red); }
.flagbar span:nth-child(3) { background: var(--gold); }
.site-header { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-weight: 900; font-size: 1.35rem; font-family: Arial, sans-serif;
  box-shadow: inset 0 -5px 0 var(--red);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.1rem; font-weight: 800; }
.brand-text small { font-size: .75rem; color: var(--muted); direction: ltr; text-align: right; }
.brand-light, .brand-light:hover { color: #fff; }
.brand-light .brand-text small { color: rgba(255, 255, 255, .6); }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links > a { color: var(--text); font-weight: 600; padding: .5em .9em; border-radius: 10px; }
.nav-links > a:hover { background: var(--bg); color: var(--ink); }
.nav-links > a.active { color: var(--primary); background: #eef3ff; }
.nav-actions { display: flex; gap: .5rem; align-items: center; margin-inline-start: .8rem; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

/* ================= Alerts ================= */
.alert { padding: .9em 1.2em; border-radius: 12px; margin: 1rem 0; font-weight: 600; transition: opacity .4s; border: 1px solid; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* ================= Hero ================= */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(31, 79, 209, .55), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(255, 206, 0, .18), transparent 60%),
    var(--navy);
  color: #cbd5e1; padding: 80px 0 90px; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; font-size: .85rem; color: var(--primary); background: #eef3ff; padding: .3em .9em; border-radius: 99px; margin-bottom: .8rem; }
.hero .eyebrow { background: rgba(255, 206, 0, .12); color: var(--gold); }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 900; line-height: 1.3; }
.hl { color: var(--gold); font-family: 'Segoe UI', sans-serif; }
.lead { font-size: 1.15rem; color: inherit; opacity: .9; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.2rem; }
.hero-stats { display: flex; gap: 2.2rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { color: #fff; font-size: 1.8rem; font-weight: 900; line-height: 1.1; }
.hero-stats span { font-size: .9rem; color: #94a3b8; }
.hero-visual { position: relative; min-height: 380px; }
.hero-card {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  width: 290px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-card-flag { display: flex; height: 70px; flex-direction: column; }
.hero-card-flag span { flex: 1; }
.hero-card-flag span:nth-child(1) { background: #000; }
.hero-card-flag span:nth-child(2) { background: var(--red); }
.hero-card-flag span:nth-child(3) { background: var(--gold); }
.hero-card-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .4rem; color: var(--text); }
.hero-card-body strong { font-size: 1.7rem; color: var(--ink); direction: ltr; text-align: right; font-weight: 900; }
.hero-card-body small { color: var(--muted); direction: ltr; text-align: right; }
.bubble {
  position: absolute; background: #fff; color: var(--ink); padding: .6rem 1rem; border-radius: 16px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; font-weight: 700; z-index: 2;
  animation: float 6s ease-in-out infinite;
}
.bubble small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.b1 { top: 4%; right: 0; }
.b2 { bottom: 6%; left: -2%; animation-delay: -2s; background: var(--gold); }
.b2 small { color: #6b5500; }
.b3 { top: 40%; left: -6%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.levels-strip { margin-top: -38px; position: relative; z-index: 3; }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.level-chip {
  background: #fff; border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; color: var(--ink); border-bottom: 4px solid var(--lvl, var(--primary));
  transition: transform .2s;
}
.level-chip:hover { transform: translateY(-4px); color: var(--ink); }
.level-chip strong { font-size: 1.6rem; font-weight: 900; color: var(--lvl); font-family: 'Segoe UI', sans-serif; }
.level-chip span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.lvl-a1 { --lvl: #16a34a; } .lvl-a2 { --lvl: #0891b2; } .lvl-b1 { --lvl: #1f4fd1; }
.lvl-b2 { --lvl: #7c3aed; } .lvl-c1 { --lvl: #dd0000; } .lvl-all { --lvl: #0b1d3a; }

/* ================= Sections ================= */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0 72px; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 2rem; }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; }
.section-head p { margin: .4rem 0 0; }
.link-more { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; }
.page-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #cbd5e1; padding: 56px 0; position: relative; }
.page-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, #000 33%, var(--red) 33% 66%, var(--gold) 66%); }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .3rem; }
.page-hero p { margin: 0; }
.page-hero.small { padding: 40px 0; }

/* ================= Cards / grids ================= */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; color: var(--text); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); color: var(--text); }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-body h3 { font-size: 1.1rem; margin: .2rem 0 0; }
.card-body p { margin: 0; font-size: .92rem; }
.card-meta { display: flex; gap: 1rem; font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.card-meta span { display: inline-flex; align-items: center; gap: .3em; }
.price-row { display: flex; align-items: baseline; gap: .6rem; margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--line); }
.price { font-size: 1.25rem; color: var(--primary); font-weight: 900; }
del { color: var(--muted); font-size: .9rem; }

.cover { position: relative; aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden; }
.cover-book { aspect-ratio: 3 / 4; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  background:
    linear-gradient(135deg, transparent 60%, rgba(255, 255, 255, .06) 60%),
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--lvl) 70%, transparent), transparent 60%),
    linear-gradient(160deg, var(--navy-2), var(--navy));
  color: #fff;
}
.cover-ph::after { content: ''; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, #000 33%, var(--red) 33% 66%, var(--gold) 66%); }
.cover-lvl { font-size: 3rem; font-weight: 900; line-height: 1; font-family: 'Segoe UI', sans-serif; color: var(--gold); }
.cover-book .cover-lvl { font-size: 3.6rem; }
.cover-kind { font-size: .85rem; opacity: .85; font-weight: 600; }
.ribbon { position: absolute; top: 12px; left: 12px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 800; padding: .2em .7em; border-radius: 99px; }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15em .7em; border-radius: 99px; background: #eef2f7; color: var(--ink); width: fit-content; }
.badge-level { background: color-mix(in srgb, var(--lvl, var(--primary)) 12%, #fff); color: var(--lvl, var(--primary)); }
.card .badge-level { --lvl: var(--primary); }
.badge-level.light { background: rgba(255, 206, 0, .15); color: var(--gold); }
.badge-free { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }

/* steps & features */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: s; }
.step { position: relative; background: var(--bg); border-radius: var(--radius); padding: 1.6rem 1.3rem; border: 1px solid var(--line); }
.step .ic { color: var(--primary); margin-bottom: .6rem; }
.step h3 { font-size: 1.1rem; }
.step p { font-size: .92rem; margin: 0; }
.step-n { position: absolute; top: 1rem; left: 1rem; font-size: 2.2rem; font-weight: 900; color: #e2e8f0; line-height: 1; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { background: #fff; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); }
.feature .ic { color: var(--primary); background: #eef3ff; padding: 10px; border-radius: 12px; width: 48px; height: 48px; margin-bottom: .8rem; }
.feature h3 { font-size: 1.1rem; }
.feature p { margin: 0; font-size: .93rem; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; align-items: stretch; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2rem 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--primary); box-shadow: 0 20px 45px rgba(31, 79, 209, .18); transform: translateY(-6px); }
.plan-tag { position: absolute; top: -14px; right: 50%; transform: translateX(50%); background: var(--gold); color: var(--navy); font-weight: 800; font-size: .8rem; padding: .3em 1em; border-radius: 99px; white-space: nowrap; }
.plan h3 { font-size: 1.3rem; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; margin: .4rem 0 0; }
.plan-price strong { font-size: 2.1rem; font-weight: 900; color: var(--ink); white-space: nowrap; }
.plan-price span, .price, .price-big strong, del { white-space: nowrap; }
.hero-stats strong { text-align: right; }
.plan-price span { color: var(--muted); }
.plan-old { font-size: .9rem; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.checklist li { display: flex; align-items: flex-start; gap: .5rem; }
.checklist .ic { color: var(--ok); margin-top: 4px; }
.checklist.small { font-size: .9rem; margin: 1rem 0 0; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: .8rem; }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 0 1.2rem; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: 1rem; margin: 0; }

/* CTA */
.cta { background: linear-gradient(135deg, var(--primary), var(--navy)); color: #dbeafe; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: 1.9rem; margin: 0 0 .3rem; }
.cta p { margin: 0; }

/* ================= Filters ================= */
.filters { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.chips, .pay-methods { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { padding: .45em 1.1em; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .9rem; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.search input { min-width: 260px; }
.empty { text-align: center; padding: 3rem 1rem; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty .ic { color: #cbd5e1; margin-bottom: .6rem; }

/* ================= Detail pages ================= */
.detail-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #cbd5e1; padding: 44px 0 56px; }
.detail-info { max-width: 720px; }
.detail-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .6rem 0 .5rem; }
.crumbs { font-size: .88rem; margin-bottom: 1rem; color: #94a3b8; }
.crumbs a { color: #cbd5e1; }
.crumbs.dark { color: var(--muted); }
.crumbs.dark a { color: var(--primary); }
.detail-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .95rem; }
.detail-meta span { display: inline-flex; align-items: center; gap: .4em; }
.detail-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
.detail-side { margin-top: -140px; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 1rem; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.box h2 { font-size: 1.3rem; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.box-head h2 { margin: 0; }
.buy-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.buy-card .cover-book { aspect-ratio: 4 / 3; }
.buy-body { padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem; }
.price-big { display: flex; align-items: baseline; gap: .7rem; }
.price-big strong { font-size: 2rem; font-weight: 900; color: var(--ink); }
.owned { display: flex; align-items: center; gap: .5rem; background: #ecfdf5; color: #065f46; padding: .7em 1em; border-radius: 12px; font-weight: 700; }
.plan-hint { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.3rem; }
.plan-hint strong { color: var(--ink); }

.progress { height: 8px; background: #e8edf5; border-radius: 99px; overflow: hidden; margin: .4rem 0; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #4f7cf0); border-radius: 99px; }
.hero-card .progress i { background: linear-gradient(90deg, var(--red), var(--gold)); }

.lesson-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: .4rem; }
.lesson-list li > a, .lesson-list li > div {
  display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-radius: 12px; background: var(--bg);
  color: var(--ink); border: 1px solid transparent;
}
.lesson-list li > a:hover { border-color: var(--primary); background: #fff; }
.lesson-list li.locked > div { color: var(--muted); }
.lesson-n { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: .82rem; font-weight: 800; flex-shrink: 0; }
.lesson-list li.done .lesson-n { background: var(--ok); color: #fff; border-color: var(--ok); }
.lesson-list li.current > a { background: #eef3ff; border-color: var(--primary); }
.lesson-t { flex: 1; font-weight: 600; }
.lesson-d { font-size: .82rem; color: var(--muted); direction: ltr; }
.lesson-list .ic { color: var(--muted); }
.lesson-list.compact li > a, .lesson-list.compact li > div { padding: .55rem .7rem; font-size: .9rem; }

/* player */
.player-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.8rem; align-items: start; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; gap: .5rem; }
.watermark { position: absolute; top: 12%; left: 8%; color: rgba(255, 255, 255, .28); font-size: .85rem; font-weight: 700; pointer-events: none; direction: ltr; animation: wm 40s linear infinite; }
@keyframes wm { 0%, 100% { top: 12%; left: 8%; } 25% { top: 70%; left: 60%; } 50% { top: 30%; left: 75%; } 75% { top: 80%; left: 15%; } }
.lesson-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.3rem 0 1rem; flex-wrap: wrap; }
.lesson-head h1 { font-size: 1.5rem; margin: 0; }
.lesson-nav { display: flex; gap: .5rem; }
.player-side { position: sticky; top: 96px; }
.player-side .box { max-height: calc(100vh - 120px); overflow: auto; }
.player-side h3 { font-size: 1.05rem; }
.upsell { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: #fffbea; border-color: #fde68a; margin-top: 1.5rem; }
.upsell p { margin: 0; }

/* reader */
.reader-body { background: #525659; }
.reader-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fff; padding: .6rem 1rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.reader-title { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.reader-tools { display: flex; align-items: center; gap: .4rem; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 10px 60px; user-select: none; -webkit-user-select: none; }
.pdf-page { position: relative; max-width: 100%; aspect-ratio: 1 / 1.414; background: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); overflow: hidden; }
.pdf-page canvas { width: 100%; height: 100%; display: block; }
.pdf-wm { position: absolute; inset: 0; display: grid; place-items: center; transform: rotate(-30deg); color: rgba(220, 0, 0, .09); font-size: clamp(1rem, 4vw, 2.2rem); font-weight: 900; pointer-events: none; white-space: nowrap; }
.pdf-num { position: absolute; bottom: 6px; left: 10px; font-size: .75rem; color: #94a3b8; }
.reader-loading { color: #fff; padding: 4rem; }
@media print { body { display: none !important; } }

/* order */
.order-box { text-align: center; padding: 2.5rem 2rem; }
.order-icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: var(--wa-2); }
.order-icon .ic { width: 38px; height: 38px; }
.order-icon.ok { color: var(--ok); }
.order-box h1 { font-size: 1.6rem; }
.order-summary { text-align: right; background: var(--bg); border-radius: 14px; padding: .4rem 1.2rem; margin: 1.5rem 0; }
.order-summary div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.order-summary div:last-child { border: 0; }
.order-summary span { color: var(--muted); }
.pay-box { margin-top: 1.5rem; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.order-steps { text-align: right; margin: 1.5rem 0 0; padding-inline-start: 1.3rem; display: flex; flex-direction: column; gap: .4rem; }

.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15em .7em; border-radius: 99px; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #dcfce7; color: #166534; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* dashboard */
.sub-cards { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.sub-card { display: flex; gap: .9rem; align-items: center; background: linear-gradient(135deg, var(--navy), var(--primary)); color: #dbeafe; padding: 1rem 1.4rem; border-radius: var(--radius); min-width: 260px; }
.sub-card .ic { color: var(--gold); }
.sub-card div { display: flex; flex-direction: column; }
.sub-card strong { color: #fff; }
.dash-bottom { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }

/* ================= Forms ================= */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; color: var(--ink); font-size: .92rem; }
.form label small { font-weight: 500; }
input, select, textarea {
  font: inherit; font-size: .95rem; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(31, 79, 209, .12); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); padding: 0; }
input[type=file] { padding: .5em; background: var(--bg); }
.form .check, .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 600; cursor: pointer; }
.checks { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-actions { display: flex; gap: .6rem; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
legend { font-weight: 800; color: var(--ink); padding: 0 .4rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; transition: opacity .2s; }
.check-grid.disabled { opacity: .35; pointer-events: none; }
.input-group { display: flex; gap: .4rem; flex-direction: row !important; }
.auth { padding: 56px 20px 80px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 480px; background: #fff; border-radius: 22px; padding: 2.2rem; box-shadow: var(--shadow-lg); border-top: 5px solid var(--primary); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .2rem; }
.auth-card .form { margin: 1.4rem 0; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: right; font-weight: 700; color: var(--muted); font-size: .82rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-muted td { opacity: .55; }
.table .thumb { width: 90px; }
.table .thumb .cover { width: 80px; border-radius: 8px; aspect-ratio: 16 / 10; }
.table .thumb .cover-lvl { font-size: 1.2rem; }
.table .thumb .cover-kind, .table .thumb .ribbon { display: none; }
.actions { white-space: nowrap; }

/* error */
.error-box { padding: 3rem 2rem; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: .5rem; }

/* ================= Footer ================= */
.site-footer { background: var(--navy); color: #94a3b8; padding: 56px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.site-footer a { color: #cbd5e1; display: inline-flex; align-items: center; gap: .4em; }
.site-footer a:hover { color: var(--gold); }
.footer-about { margin-top: 1rem; font-size: .92rem; }
.socials { display: flex; gap: .8rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2.5rem; padding: 1.2rem 20px; text-align: center; font-size: .85rem; }
.wa-float {
  position: fixed; bottom: 22px; left: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float .ic { width: 30px; height: 30px; }
.wa-mini { color: var(--wa-2); display: inline-flex; vertical-align: middle; }
.wa-mini .ic { width: 18px; height: 18px; }

/* ================= Admin ================= */
.admin-body { background: #f1f4f9; }
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: var(--navy); color: #cbd5e1; padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.admin-side nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.admin-side nav a { color: #cbd5e1; padding: .65rem .9rem; border-radius: 10px; display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side nav a.active { background: var(--primary); color: #fff; }
.admin-side-foot { display: flex; flex-direction: column; gap: .3rem; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1rem; }
.admin-side-foot a, .admin-side-foot button { color: #94a3b8; background: none; border: 0; font: inherit; cursor: pointer; display: flex; gap: .5rem; align-items: center; padding: .4rem .9rem; text-align: right; }
.admin-side-foot a:hover, .admin-side-foot button:hover { color: #fff; }
.admin-main { padding: 1.4rem 2rem 3rem; min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.admin-top h1 { font-size: 1.5rem; margin: 0; flex: 1; }
.admin-content .box { box-shadow: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; color: var(--text); }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat strong { font-size: 1.8rem; color: var(--ink); font-weight: 900; }
.stat small { color: var(--muted); }
.stat-warn { border-color: #fde68a; background: #fffbeb; }
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.admin-grid-2.wide-first { grid-template-columns: 1.2fr 1fr; }
.narrow-form { max-width: 820px; }
.toolbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; }
.tabs a { padding: .5em 1.1em; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 700; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.approve-form { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .4rem; }
.approve-form label { display: flex; flex-direction: column; font-size: .75rem; color: var(--muted); font-weight: 600; }
.approve-form input { width: 95px; padding: .4em .6em; }
.simple-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.simple-list li { padding-bottom: .6rem; border-bottom: 1px dashed var(--line); }
.quick { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.2rem; }
.pager { display: flex; gap: .3rem; margin-top: 1rem; flex-wrap: wrap; }
.pager a { padding: .3em .8em; border-radius: 8px; border: 1px solid var(--line); color: var(--text); }
.pager a.active { background: var(--primary); color: #fff; }
.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-body { position: absolute; left: 0; top: calc(100% + 8px); width: 320px; z-index: 20; box-shadow: var(--shadow-lg) !important; }
.admin-lessons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.admin-lessons li { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; background: var(--bg); border-radius: 10px; border: 1px solid transparent; }
.admin-lessons li.editing { border-color: var(--primary); background: #eef3ff; }
.cover-preview { display: flex; align-items: center; gap: 1rem; }
.cover-preview img { width: 120px; border-radius: 10px; }
.file-chip { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--bg); padding: .7rem 1rem; border-radius: 10px; font-weight: 600; }

/* ================= Responsive ================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .detail-layout, .player-layout { grid-template-columns: 1fr; }
  .detail-side { margin-top: 0; position: static; order: -1; }
  .player-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-grid-2, .admin-grid-2.wide-first, .dash-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 76px; inset-inline: 0; background: #fff; flex-direction: column; align-items: stretch;
    padding: 1rem 20px 1.4rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-actions { margin: .6rem 0 0; flex-wrap: wrap; }
  .levels { grid-template-columns: repeat(5, minmax(90px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset: 0 0 0 auto; width: 260px; z-index: 100; transform: translateX(100%); transition: transform .25s; }
  .admin-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-main { padding: 1rem; }
  .admin-top .nav-toggle { display: block; }
}
@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 80px; }
  .hero-stats { gap: 1.4rem; }
  .steps, .features { grid-template-columns: 1fr; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head.center { align-items: center; }
  .search input { min-width: 0; }
  .search { width: 100%; }
  .auth-card { padding: 1.6rem; }
  .plan-featured { transform: none; }
  .brand-text small { display: none; }
}
