*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#1C3A2A; --card:#243F30; --gold:#C9A96E; --white:#fff; --cream:#F5ECD7;
  --muted:rgba(201,169,110,.55); --line:rgba(201,169,110,.14);
  --txt:rgba(255,255,255,.82); --txt-dim:rgba(255,255,255,.5);
  --radius:14px; --max:1080px;
}
html{scroll-behavior:smooth}
body{
  background:var(--bg); color:var(--white);
  font-family:'Inter',sans-serif; font-size:16px; line-height:1.7;
  -webkit-font-smoothing:antialiased; min-height:100vh;
  display:flex; flex-direction:column;
}
h1,h2,h3,h4{font-family:'Playfair Display',serif; line-height:1.25; color:var(--cream)}
a{color:var(--gold); text-decoration:none}
a:hover{opacity:.85}
.wrap{max-width:var(--max); margin:0 auto; width:100%; padding:0 24px}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(28,58,42,.92); backdrop-filter:blur(16px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:var(--max); margin:0 auto; padding:14px 24px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.brand{font-family:'Playfair Display',serif; font-size:18px; color:var(--gold); letter-spacing:.04em}
.nav{display:flex; align-items:center; gap:22px}
.nav-link{font-size:14px; color:rgba(255,255,255,.78)}
.nav-link:hover{color:var(--gold)}

/* ---------- Buttons ---------- */
.btn{
  display:inline-block; background:var(--gold); color:var(--bg);
  font-family:'Inter',sans-serif; font-weight:600; letter-spacing:.03em;
  padding:16px 36px; border-radius:8px; border:none; cursor:pointer;
  font-size:16px; text-align:center; transition:opacity .2s,transform .2s,box-shadow .2s;
}
.btn:hover{opacity:.92; transform:translateY(-2px); box-shadow:0 10px 30px rgba(201,169,110,.26)}
.btn-lg{padding:20px 48px; font-size:18px}
.btn-block{display:block; width:100%}
.btn-ghost{
  display:inline-block; background:transparent; color:var(--gold);
  border:1px solid rgba(201,169,110,.4); padding:14px 28px; border-radius:8px;
  font-size:15px; font-weight:500; cursor:pointer; transition:all .2s;
}
.btn-ghost:hover{background:rgba(201,169,110,.08); border-color:var(--gold)}
.btn-xs{
  background:var(--gold); color:var(--bg); font-size:13px; font-weight:600;
  padding:9px 20px; border-radius:6px; border:none; cursor:pointer; white-space:nowrap;
}
.btn-xs:hover{opacity:.9}
.btn-danger{background:#7d2b2b; color:#fff}
.btn-danger:hover{background:#8f3232}
.btn-sm{padding:8px 16px; font-size:13px; border-radius:6px}
.inline-form{display:inline}

/* ---------- Cards / glass ---------- */
.card{
  background:rgba(36,63,48,.7); border:1px solid var(--line);
  border-radius:var(--radius); padding:28px;
}
.lbl{
  font-size:11px; font-weight:600; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted); margin-bottom:12px;
}

/* ---------- Generic page ---------- */
main{flex:1; width:100%}
.page{padding:56px 0}
.page h1{font-size:clamp(28px,4vw,42px); margin-bottom:8px}
.page .sub{color:rgba(255,255,255,.6); margin-bottom:32px}

/* ---------- Forms ---------- */
.form-narrow{max-width:440px; margin:0 auto}
.form-group{margin-bottom:18px}
.form-group label{display:block; font-size:13px; color:var(--cream); margin-bottom:7px; letter-spacing:.02em}
.input, .form-group input, .form-group textarea, .form-group select{
  width:100%; background:rgba(20,40,30,.7); color:var(--white);
  border:1px solid var(--line); border-radius:8px; padding:13px 14px;
  font-family:'Inter',sans-serif; font-size:15px;
}
.form-group textarea{min-height:90px; resize:vertical}
.input:focus, .form-group input:focus, .form-group textarea:focus, .form-group select:focus{
  outline:none; border-color:var(--gold);
}
.form-row{display:flex; gap:14px; flex-wrap:wrap}
.form-row .form-group{flex:1; min-width:120px}
.alert{padding:12px 16px; border-radius:8px; font-size:14px; margin-bottom:18px}
.alert-error{background:rgba(125,43,43,.25); border:1px solid rgba(180,80,80,.4); color:#f3c9c9}
.alert-ok{background:rgba(201,169,110,.12); border:1px solid var(--line); color:var(--cream)}
.muted{color:rgba(255,255,255,.5)}
.tiny{font-size:13px}

/* ---------- Landing ---------- */
.hero{padding:80px 0 56px}
.hero-badge{
  display:inline-flex; align-items:center; gap:8px; border:1px solid rgba(201,169,110,.35);
  background:rgba(201,169,110,.06); color:var(--gold); font-size:11px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; padding:7px 16px; border-radius:40px; margin-bottom:22px;
}
.hero h1{font-size:clamp(30px,5vw,52px); font-weight:700; margin-bottom:18px}
.hero h1 em{color:var(--gold); font-style:italic}
.hero p.lead{font-size:18px; color:rgba(255,255,255,.72); max-width:560px; margin-bottom:30px; font-weight:300}
.hero .price{font-family:'Playfair Display',serif; font-size:34px; color:var(--gold); font-weight:700; margin-bottom:24px}

.section{padding:56px 0; border-top:1px solid var(--line)}
.section h2{font-size:clamp(24px,3.5vw,36px); margin-bottom:28px}

.curriculum-mod{margin-bottom:22px}
.curriculum-mod .mod-head{display:flex; align-items:baseline; gap:12px; margin-bottom:10px}
.curriculum-mod .mod-head h3{font-size:20px}
.curriculum-mod .mod-head .mod-sub{color:rgba(255,255,255,.5); font-size:14px}
.lesson-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 0; border-bottom:1px solid var(--line); font-size:15px;
}
.lesson-row:last-child{border-bottom:none}
.lesson-row .dur{color:var(--muted); font-size:13px}

.pricing-card{
  background:rgba(36,63,48,.85); border:1px solid rgba(201,169,110,.28);
  border-radius:20px; padding:48px 40px; max-width:520px; margin:0 auto; text-align:center;
}
.pricing-card .price-num{font-family:'Playfair Display',serif; font-size:clamp(44px,7vw,68px); color:var(--gold); font-weight:700; line-height:1}
.pricing-card .price-sub{color:rgba(255,255,255,.4); margin-bottom:30px}

/* ---------- Account / tables ---------- */
.table{width:100%; border-collapse:collapse; font-size:14px}
.table th,.table td{padding:12px 14px; text-align:left; border-bottom:1px solid var(--line)}
.table th{color:var(--muted); font-weight:600; font-size:12px; letter-spacing:.08em; text-transform:uppercase}
.table tr:hover td{background:rgba(201,169,110,.04)}
.badge{display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600}
.badge-ok{background:rgba(120,180,120,.18); color:#a9d6a9}
.badge-pending{background:rgba(201,169,110,.16); color:var(--gold)}
.badge-fail{background:rgba(180,80,80,.2); color:#e6b3b3}
.badge-muted{background:rgba(255,255,255,.08); color:rgba(255,255,255,.6)}

/* ---------- Course area (immersive) ---------- */
.course-topbar{
  position:sticky; top:0; z-index:50; display:flex; align-items:center; justify-content:space-between; gap:20px;
  padding:14px 28px; background:rgba(22,48,31,.86); backdrop-filter:blur(18px); border-bottom:1px solid var(--line);
}
.course-topbar .tb-left{display:flex; align-items:center; gap:18px; min-width:0}
.course-topbar .crumb{font-size:13px; color:var(--txt-dim,rgba(255,255,255,.5)); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.course-topbar .crumb b{color:var(--cream); font-weight:500}
.course-topbar .tb-right{display:flex; align-items:center; gap:18px}
.tb-progress{display:flex; align-items:center; gap:10px; font-size:13px; color:rgba(255,255,255,.5)}
.tb-bar{width:120px; height:6px; border-radius:6px; background:rgba(255,255,255,.08); overflow:hidden}
.tb-bar i{display:block; height:100%; background:linear-gradient(90deg,var(--gold),#e3c690); border-radius:6px}
.avatar{width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,var(--gold),#9c7d4a);
  display:flex; align-items:center; justify-content:center; color:var(--bg); font-weight:600; font-size:14px; text-decoration:none}

.course-grid{position:relative}

.course-sidebar{
  position:fixed; top:62px; left:0; width:340px; height:calc(100vh - 62px); overflow-y:auto; padding:24px 20px;
  border-right:1px solid var(--line); background:linear-gradient(180deg,rgba(36,63,48,.5),rgba(22,48,31,.3)); z-index:40;
}
.course-sidebar::-webkit-scrollbar{width:8px}
.course-sidebar::-webkit-scrollbar-thumb{background:rgba(201,169,110,.18); border-radius:8px}

.progress-card{display:flex; align-items:center; gap:16px; padding:16px; border:1px solid var(--line);
  border-radius:var(--radius); background:rgba(36,63,48,.6); margin-bottom:24px}
.ring{--p:0; width:58px; height:58px; border-radius:50%; flex-shrink:0; position:relative;
  background:conic-gradient(var(--gold) calc(var(--p)*1%), rgba(255,255,255,.08) 0)}
.ring::after{content:''; position:absolute; inset:6px; border-radius:50%; background:var(--card)}
.ring span{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:600; color:var(--gold); z-index:1}
.progress-meta .pm-title{font-size:14px; color:var(--cream); font-weight:500}
.progress-meta .pm-sub{font-size:12px; color:rgba(255,255,255,.5); margin-top:2px}

.mod{margin-bottom:20px}
.mod-head{padding:6px 4px; margin-bottom:6px}
.mod-eyebrow{font-size:10px; font-weight:600; letter-spacing:.16em; text-transform:uppercase; color:var(--muted)}
.mod-title{font-size:15px; color:var(--cream); font-weight:600; margin-top:2px; font-family:'Inter',sans-serif}
.lesson{display:flex; align-items:flex-start; gap:11px; padding:10px 12px; border-radius:10px; text-decoration:none; transition:background .18s}
.lesson:hover{background:rgba(201,169,110,.06)}
.lesson.active{background:rgba(201,169,110,.13); box-shadow:inset 2px 0 0 var(--gold)}
.l-ico{flex-shrink:0; width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:11px; margin-top:1px; border:1px solid var(--line)}
.l-ico.done{background:var(--gold); color:var(--bg); border-color:var(--gold)}
.l-ico.play{background:rgba(201,169,110,.18); color:var(--gold); border-color:var(--gold)}
.l-ico.todo{color:rgba(255,255,255,.5)}
.l-body{min-width:0; flex:1}
.l-title{font-size:13.5px; color:var(--txt); line-height:1.4}
.lesson.active .l-title{color:var(--cream); font-weight:500}
.l-dur{font-size:11px; color:var(--muted); margin-top:2px}

.course-main{margin-left:340px; padding:28px 44px 80px; max-width:980px}
.player{position:relative; width:100%; aspect-ratio:16/9; border-radius:var(--radius); overflow:hidden;
  border:1px solid var(--line); background:linear-gradient(135deg,#16301f,#0f2417); box-shadow:0 30px 80px rgba(0,0,0,.4)}
.player video{position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; display:block}
.player .poster{position:absolute; inset:0;
  background:radial-gradient(circle at 60% 40%,rgba(201,169,110,.16),transparent 55%),linear-gradient(135deg,#1d3a28,#0e2115)}
.player .pl-badge{position:absolute; top:16px; left:16px; font-size:11px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--cream); background:rgba(15,33,23,.7); backdrop-filter:blur(8px); padding:6px 12px; border-radius:20px; border:1px solid var(--line)}
.player .pl-empty{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,.5); font-size:14px}
@supports not (aspect-ratio:16/9){ .player{height:0; padding-top:56.25%} }

.lesson-meta{margin-top:26px}
.lm-eyebrow{font-size:11px; font-weight:600; letter-spacing:.18em; text-transform:uppercase; color:var(--gold); opacity:.8}
.lm-title{font-size:clamp(26px,3vw,34px); font-weight:700; margin:8px 0 10px}
.lm-row{display:flex; align-items:center; gap:14px; font-size:13px; color:rgba(255,255,255,.5); margin-bottom:22px}
.lm-row .dot{width:4px; height:4px; border-radius:50%; background:var(--muted)}
.lm-row .lm-done{color:#a9d6a9}
.lm-desc{color:var(--txt); font-size:16px; line-height:1.8; max-width:680px; white-space:pre-wrap}

.blocks{display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:32px 0}
.block{background:rgba(36,63,48,.55); border:1px solid var(--line); border-radius:var(--radius); padding:22px}
.block h4{font-size:13px; letter-spacing:.06em; color:var(--cream); margin-bottom:14px; font-family:'Inter'; font-weight:600; text-transform:uppercase}
.res{display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--line); font-size:14px; color:var(--txt)}
.res:last-child{border-bottom:none}
.res .ri{width:30px; height:30px; border-radius:8px; background:rgba(201,169,110,.14); display:flex; align-items:center; justify-content:center; font-size:14px}
.res a{margin-left:auto; color:var(--gold); font-size:12px; text-decoration:none}
.assign{background:rgba(201,169,110,.07); border:1px solid rgba(201,169,110,.22)}
.assign .a-tag{display:inline-block; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--gold); margin-bottom:8px}
.assign p{color:var(--txt); font-size:15px; line-height:1.7; white-space:pre-wrap}

.lnav{display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:36px; padding-top:24px; border-top:1px solid var(--line)}
.lnav-btn{display:flex; flex-direction:column; gap:3px; padding:12px 18px; border-radius:10px; border:1px solid var(--line);
  background:transparent; color:var(--txt); text-decoration:none; min-width:0; transition:border-color .2s}
.lnav-btn:hover{border-color:var(--gold)}
.lnav-btn .ln-lbl{font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em}
.lnav-btn .ln-t{font-size:14px; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px}
.lnav-btn.next{text-align:right; align-items:flex-end}
.btn-complete{background:linear-gradient(135deg,var(--gold),#dcbe85); color:var(--bg); font-weight:600; font-size:15px;
  padding:16px 30px; border:none; border-radius:10px; cursor:pointer; white-space:nowrap;
  box-shadow:0 10px 30px rgba(201,169,110,.28); transition:transform .15s,box-shadow .2s}
.btn-complete:hover{transform:translateY(-2px); box-shadow:0 14px 38px rgba(201,169,110,.4)}
.btn-complete.is-done{background:rgba(36,63,48,.8); color:#a9d6a9; border:1px solid rgba(120,180,120,.4); box-shadow:none}

.empty-state{text-align:center; padding:80px 20px; color:rgba(255,255,255,.5)}

/* ---------- Admin ---------- */
.admin-tabs{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:28px; border-bottom:1px solid var(--line); padding-bottom:0}
.admin-tab{
  padding:11px 18px; font-size:14px; color:rgba(255,255,255,.65);
  border-bottom:2px solid transparent; margin-bottom:-1px;
}
.admin-tab:hover{color:var(--gold)}
.admin-tab.active{color:var(--gold); border-bottom-color:var(--gold); font-weight:600}
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:16px; margin-bottom:32px}
.stat-box{background:rgba(36,63,48,.7); border:1px solid var(--line); border-radius:var(--radius); padding:22px}
.stat-box .n{font-family:'Playfair Display',serif; font-size:32px; color:var(--gold); font-weight:700}
.stat-box .l{font-size:13px; color:rgba(255,255,255,.55); margin-top:4px}
.admin-section{margin-bottom:40px}
.admin-section h2{font-size:22px; margin-bottom:16px}
.row-actions{display:flex; gap:8px; flex-wrap:wrap; align-items:center}
details.editor{margin-top:6px}
details.editor summary{cursor:pointer; color:var(--gold); font-size:13px}
details.editor .card{margin-top:10px}

/* ---------- Footer ---------- */
.site-footer{
  background:#111f17; padding:26px 24px; text-align:center;
  font-size:13px; color:rgba(255,255,255,.28); border-top:1px solid rgba(201,169,110,.07); margin-top:40px;
}
.site-footer span{color:rgba(201,169,110,.45)}

@media(max-width:900px){
  .course-sidebar{position:static; width:auto; height:auto; border-right:none; border-bottom:1px solid var(--line)}
  .course-main{margin-left:0; padding:24px 20px 60px}
  .blocks{grid-template-columns:1fr}
}
