:root{
  --cream:#F5EFE6;--cream-light:#FAF7F2;--cream-dark:#EBE2D3;
  --navy:#14213D;--navy-soft:#1e2d4f;
  --gold:#C9A961;--gold-dark:#A68940;--gold-light:#E4CD8D;
  --text:#1a1a1a;--text-soft:#4a4a4a;--text-muted:#888;
  --border:rgba(20,33,61,.12);
  --shadow:0 1px 3px rgba(20,33,61,.08);
  --shadow-md:0 8px 24px -8px rgba(20,33,61,.18);
  --shadow-lg:0 20px 60px -20px rgba(20,33,61,.25);
  --radius:14px;
  --success:#2c6b3c;--danger:#b02a2a;--warning:#A68940;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Assistant',sans-serif;background:var(--cream-light);color:var(--text);line-height:1.6;font-weight:400;min-height:100vh;overflow-x:hidden}
h1,h2,h3,h4{font-family:'Frank Ruhl Libre',serif;font-weight:500;line-height:1.25;letter-spacing:-.01em}
button,input,textarea,select{font-family:inherit;font-size:inherit}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(ellipse at top right,rgba(201,169,97,.08),transparent 55%),radial-gradient(ellipse at bottom left,rgba(20,33,61,.05),transparent 55%)}

/* —————— Header —————— */
.site-header{position:sticky;top:0;z-index:50;background:rgba(250,247,242,.92);backdrop-filter:saturate(180%) blur(14px);-webkit-backdrop-filter:saturate(180%) blur(14px);border-bottom:1px solid var(--border)}
.nav{max-width:1200px;margin:0 auto;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none}
.brand-mark{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,var(--navy),var(--navy-soft));display:grid;place-items:center;color:var(--gold);font-family:'Frank Ruhl Libre',serif;font-size:22px;font-weight:700;box-shadow:0 4px 14px rgba(20,33,61,.22);flex-shrink:0}
.brand-name{font-family:'Frank Ruhl Libre',serif;font-size:22px;font-weight:700;letter-spacing:.02em}
.brand-name small{display:block;font-family:'Assistant',sans-serif;font-size:11px;font-weight:400;color:var(--gold-dark);letter-spacing:.15em;margin-top:-2px}
.nav-links{display:none;gap:26px;align-items:center}
.nav-links a{font-size:15px;color:var(--text-soft);transition:color .2s}
.nav-links a:hover{color:var(--gold-dark)}
.icon-btn{width:40px;height:40px;border-radius:50%;border:1px solid var(--border);background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--navy);transition:all .2s;flex-shrink:0}
.icon-btn:hover{background:var(--cream-dark);border-color:var(--gold)}
@media(min-width:760px){.nav-links{display:flex}}
@media(max-width:540px){.brand-name{display:none}}

/* —————— Hero —————— */
.hero{position:relative;padding:80px 20px 70px;overflow:hidden}
.hero-inner{max-width:1100px;margin:0 auto;position:relative;z-index:2}
.hero-eyebrow{display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border-radius:100px;background:rgba(201,169,97,.15);color:var(--gold-dark);font-size:12px;font-weight:600;letter-spacing:.12em;margin-bottom:28px}
.hero-eyebrow::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--gold-dark)}
.hero h1{font-size:clamp(42px,8vw,88px);font-weight:700;line-height:1.02;color:var(--navy);margin-bottom:26px}
.hero h1 em{font-style:italic;font-weight:400;color:var(--gold-dark);display:inline-block}
.hero-lead{font-size:clamp(17px,2.4vw,21px);color:var(--text-soft);max-width:640px;line-height:1.65;margin-bottom:38px}
.hero-actions{display:flex;flex-wrap:wrap;gap:14px}
.hero-ornament{position:absolute;left:-80px;top:50%;transform:translateY(-50%);width:380px;height:380px;opacity:.5;pointer-events:none;z-index:1}
@media(max-width:760px){.hero-ornament{display:none}}

/* —————— Buttons —————— */
.btn{display:inline-flex;align-items:center;gap:10px;padding:14px 28px;border-radius:100px;font-weight:600;font-size:15px;cursor:pointer;transition:all .25s;border:none;letter-spacing:.01em;justify-content:center;text-align:center}
.btn-primary{background:var(--navy);color:var(--cream-light)}
.btn-primary:hover{background:var(--navy-soft);transform:translateY(-1px);box-shadow:0 10px 28px -10px var(--navy)}
.btn-outline{background:transparent;color:var(--navy);border:1.5px solid var(--navy)}
.btn-outline:hover{background:var(--navy);color:var(--cream-light)}
.btn-gold{background:var(--gold);color:var(--navy)}
.btn-gold:hover{background:var(--gold-dark);color:var(--cream-light)}
.btn-ghost{background:transparent;color:var(--text-soft)}
.btn-ghost:hover{color:var(--navy)}
.btn-danger{background:rgba(220,60,60,.1);color:var(--danger);border:1px solid rgba(220,60,60,.2)}
.btn-danger:hover{background:var(--danger);color:white}
.btn-sm{padding:9px 18px;font-size:13px}
.btn-block{width:100%}
.btn:disabled{opacity:.6;cursor:not-allowed}

/* —————— Sections —————— */
section{position:relative;z-index:1}
.section{padding:70px 20px}
.section-courses{padding-top:50px}
.section-inner{max-width:1100px;margin:0 auto}
.section-head{margin-bottom:44px;max-width:700px}
.section-kicker{font-size:12px;font-weight:700;letter-spacing:.2em;color:var(--gold-dark);margin-bottom:14px;display:flex;align-items:center;gap:10px}
.section-kicker::before{content:"";width:28px;height:1px;background:var(--gold)}
.section h2{font-size:clamp(30px,5vw,46px);color:var(--navy);margin-bottom:16px}
.section-lead{font-size:17px;color:var(--text-soft);line-height:1.7}

/* —————— About —————— */
.about{background:var(--cream)}
.about-grid{display:grid;grid-template-columns:1fr;gap:36px}
@media(min-width:860px){.about-grid{grid-template-columns:1.15fr .85fr;gap:60px;align-items:start}}
.about-text p{margin-bottom:16px;font-size:16.5px;color:var(--text-soft);line-height:1.8}
.about-text p:first-child::first-letter{font-family:'Frank Ruhl Libre',serif;font-size:56px;font-weight:700;color:var(--gold-dark);float:right;line-height:.9;margin:6px 0 0 8px}
.about-card{background:var(--cream-light);border:1px solid var(--border);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.about-card h4{font-size:18px;margin-bottom:8px;color:var(--navy)}
.about-card-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--border);transition:background-color .2s,padding .2s;border-radius:10px}
a.about-card-row:hover{background:var(--cream);padding-right:10px;padding-left:10px}
.about-card-row:last-child{border:none;padding-bottom:0}
.about-card-row .ico{width:38px;height:38px;border-radius:10px;background:var(--cream-dark);display:grid;place-items:center;color:var(--navy);flex-shrink:0}
.about-card-row strong{display:block;font-size:13px;color:var(--text-muted);font-weight:500}
.about-card-row span{font-weight:600;color:var(--navy)}

/* —————— Course Marketplace (homepage) —————— */
.courses-marketplace{display:grid;grid-template-columns:1fr;gap:24px}
@media(min-width:640px){.courses-marketplace{grid-template-columns:repeat(2,1fr)}}
@media(min-width:980px){.courses-marketplace{grid-template-columns:repeat(3,1fr)}}
.course-card{
  background:var(--cream-light);border:1px solid var(--border);
  border-radius:18px;overflow:hidden;
  transition:all .35s cubic-bezier(.2,.7,.3,1);
  display:flex;flex-direction:column;cursor:pointer;
  position:relative;
}
.course-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-lg);border-color:var(--gold)}
.course-cover{
  height:180px;background:linear-gradient(135deg,var(--navy),var(--navy-soft));
  position:relative;display:grid;place-items:center;color:var(--gold);
  overflow:hidden;
}
.course-cover img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0}
.course-cover::after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(20,33,61,.5),transparent 60%);pointer-events:none}
.course-cover-icon{font-family:'Frank Ruhl Libre',serif;font-size:80px;font-weight:700;opacity:.7;z-index:1;line-height:1}
.course-badge{
  position:absolute;top:14px;right:14px;z-index:2;
  padding:6px 12px;border-radius:100px;
  background:var(--gold);color:var(--navy);
  font-size:11px;font-weight:700;letter-spacing:.1em;
}
.course-badge.free{background:#4CAF50;color:white}
.course-body{padding:24px;display:flex;flex-direction:column;flex:1}
.course-tag{font-size:11px;font-weight:700;letter-spacing:.18em;color:var(--gold-dark);margin-bottom:10px;text-transform:uppercase}
.course-card h3{font-size:22px;color:var(--navy);margin-bottom:10px;line-height:1.3}
.course-card .desc{font-size:14.5px;color:var(--text-soft);line-height:1.65;flex:1;margin-bottom:18px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.course-meta{display:flex;align-items:center;gap:14px;margin-bottom:16px;font-size:13px;color:var(--text-muted)}
.course-meta-item{display:flex;align-items:center;gap:5px}
.course-foot{display:flex;align-items:center;justify-content:space-between;padding-top:18px;border-top:1px solid var(--border);gap:12px}
.course-price{font-family:'Frank Ruhl Libre',serif;font-size:26px;font-weight:700;color:var(--navy)}
.course-price.free{color:#4CAF50}
.course-price small{font-size:14px;font-weight:400;color:var(--text-muted);font-family:'Assistant',sans-serif}

.loading-state{padding:80px 20px;text-align:center;grid-column:1/-1}
.spinner-lg{width:36px;height:36px;border:3px solid var(--cream-dark);border-top-color:var(--gold);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto}
.spinner{width:16px;height:16px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:spin .6s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* Empty state in marketplace */
.empty-marketplace{
  grid-column:1/-1;text-align:center;padding:60px 30px;
  border:2px dashed var(--border);border-radius:18px;color:var(--text-muted);
}
.empty-marketplace h3{color:var(--navy);margin-bottom:8px}

/* —————— Offerings (dark) —————— */
.offerings{background:var(--navy);color:var(--cream-light)}
.offerings h2{color:var(--cream-light)}
.offerings .section-kicker{color:var(--gold-light)}
.offerings .section-kicker::before{background:var(--gold-light)}
.offerings-grid{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:720px){.offerings-grid{grid-template-columns:repeat(3,1fr)}}
.offering{padding:26px;border:1px solid rgba(201,169,97,.25);border-radius:var(--radius);background:rgba(255,255,255,.03);transition:all .3s}
.offering:hover{background:rgba(201,169,97,.08);border-color:var(--gold)}
.offering-ico{width:46px;height:46px;border-radius:12px;background:rgba(201,169,97,.15);color:var(--gold-light);display:grid;place-items:center;margin-bottom:16px}
.offering h4{font-size:20px;color:var(--cream-light);margin-bottom:6px}
.offering p{font-size:14px;color:rgba(245,239,230,.7);line-height:1.6}

/* —————— Articles —————— */
.articles-head{display:flex;flex-wrap:wrap;gap:20px;align-items:flex-end;justify-content:space-between;margin-bottom:36px}
.search-box{display:flex;align-items:center;gap:10px;background:var(--cream-light);border:1px solid var(--border);border-radius:100px;padding:10px 18px;min-width:240px;transition:border-color .2s}
.search-box:focus-within{border-color:var(--gold)}
.search-box input{border:none;background:transparent;outline:none;flex:1;font-size:15px}
.articles-grid{display:grid;grid-template-columns:1fr;gap:22px}
@media(min-width:720px){.articles-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.articles-grid{grid-template-columns:repeat(3,1fr)}}
.article-card{background:var(--cream-light);border:1px solid var(--border);border-radius:var(--radius);padding:26px;transition:all .3s;cursor:pointer}
.article-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:var(--gold-light)}
.article-meta{display:flex;align-items:center;gap:10px;margin-bottom:14px;font-size:12px}
.article-tag{padding:3px 10px;border-radius:100px;background:var(--cream-dark);color:var(--navy);font-weight:600;letter-spacing:.05em}
.article-tag.opinion{background:rgba(201,169,97,.25);color:var(--gold-dark)}
.article-date{color:var(--text-muted)}
.article-card h4{font-size:20px;color:var(--navy);margin-bottom:10px;line-height:1.35}
.article-card p{font-size:14.5px;color:var(--text-soft);line-height:1.65;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

.empty-state{text-align:center;padding:60px 20px;color:var(--text-muted);border:1.5px dashed var(--border);border-radius:var(--radius);grid-column:1/-1}
.empty-state .ico{font-size:36px;margin-bottom:10px;opacity:.6}

/* —————— Footer —————— */
footer{background:var(--navy);color:rgba(245,239,230,.8);padding:50px 20px 30px;margin-top:40px}
.footer-inner{max-width:1100px;margin:0 auto;display:grid;gap:30px;grid-template-columns:1fr}
@media(min-width:720px){.footer-inner{grid-template-columns:1.2fr 1fr 1fr}}
.footer-brand h4{font-family:'Frank Ruhl Libre',serif;color:var(--gold-light);font-size:24px;margin-bottom:10px}
.footer-brand p{font-size:14.5px;line-height:1.7;max-width:320px}
footer h5{color:var(--cream-light);font-size:14px;letter-spacing:.15em;margin-bottom:14px;font-weight:700}
footer ul{list-style:none}
footer li{margin-bottom:10px;font-size:14.5px}
footer a:hover{color:var(--gold-light)}
.footer-bottom{max-width:1100px;margin:40px auto 0;padding-top:24px;border-top:1px solid rgba(201,169,97,.2);font-size:13px;color:rgba(245,239,230,.55);text-align:center}

/* —————— Modals —————— */
.modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(20,33,61,.55);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:20px;animation:fadeIn .25s}
.modal-backdrop.open{display:flex}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.modal{background:var(--cream-light);border-radius:18px;width:100%;max-width:520px;max-height:90vh;overflow-y:auto;box-shadow:var(--shadow-lg);animation:slideUp .3s}
.modal.wide{max-width:760px}
.modal.full{max-width:920px}
@keyframes slideUp{from{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}
.modal-head{padding:24px 26px 0;display:flex;align-items:center;justify-content:space-between;gap:14px}
.modal-head h3{font-size:22px;color:var(--navy);line-height:1.3}
.modal-body{padding:22px 26px 26px}
.modal-close{background:none;border:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:var(--text-soft);flex-shrink:0;font-size:20px}
.modal-close:hover{background:var(--cream-dark)}

/* Course-detail modal */
.course-detail-cover{height:200px;border-radius:14px;background:linear-gradient(135deg,var(--navy),var(--navy-soft));display:grid;place-items:center;color:var(--gold);position:relative;overflow:hidden;margin-bottom:22px}
.course-detail-cover-icon{font-family:'Frank Ruhl Libre',serif;font-size:96px;font-weight:700;opacity:.7}
.course-detail-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.course-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:18px 0}
.course-feature{display:flex;align-items:center;gap:8px;padding:10px 14px;background:var(--cream);border-radius:10px;font-size:13.5px;color:var(--text-soft)}
.course-feature svg{color:var(--gold-dark);flex-shrink:0}
.course-detail-price{display:flex;align-items:baseline;justify-content:space-between;gap:14px;padding:18px 22px;background:linear-gradient(135deg,var(--cream),var(--cream-dark));border-radius:14px;margin:18px 0}
.course-detail-price .price{font-family:'Frank Ruhl Libre',serif;font-size:36px;font-weight:700;color:var(--navy)}
.course-detail-price .price.free{color:#4CAF50}

/* —————— Forms —————— */
.field{margin-bottom:16px}
.field label{display:block;font-size:13px;font-weight:600;color:var(--navy);margin-bottom:6px;letter-spacing:.02em}
.field input,.field select,.field textarea{width:100%;padding:12px 14px;border:1.5px solid var(--border);border-radius:10px;background:var(--cream-light);outline:none;transition:border-color .2s;font-size:15px;color:var(--text);font-family:inherit}
.field textarea{min-height:90px;resize:vertical;line-height:1.6}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--gold)}
.field .hint{font-size:12px;color:var(--text-muted);margin-top:5px}
.field-group{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:480px){.field-group{grid-template-columns:1fr}}

.form-error{background:rgba(220,60,60,.08);color:var(--danger);padding:10px 14px;border-radius:8px;font-size:13.5px;margin-bottom:14px;border:1px solid rgba(220,60,60,.2)}
.form-success{background:rgba(76,157,95,.1);color:var(--success);padding:10px 14px;border-radius:8px;font-size:13.5px;margin-bottom:14px;border:1px solid rgba(76,157,95,.25)}
.form-info{background:rgba(201,169,97,.1);color:var(--gold-dark);padding:10px 14px;border-radius:8px;font-size:13.5px;margin-bottom:14px;border:1px solid rgba(201,169,97,.25)}

/* —————— Auth Pages (login/register) —————— */
.auth-page{min-height:100vh;display:grid;place-items:center;padding:30px 20px;background:linear-gradient(135deg,var(--cream),var(--cream-light))}
.auth-card{background:white;border-radius:20px;padding:40px 32px;width:100%;max-width:440px;box-shadow:var(--shadow-lg);border:1px solid var(--border)}
.auth-brand{text-align:center;margin-bottom:30px}
.auth-brand .brand-mark{margin:0 auto 14px;width:54px;height:54px;font-size:28px}
.auth-brand h1{font-size:26px;color:var(--navy);margin-bottom:4px}
.auth-brand p{color:var(--text-muted);font-size:14px;letter-spacing:.1em}
.auth-tabs{display:flex;background:var(--cream);border-radius:100px;padding:4px;margin-bottom:24px}
.auth-tab{flex:1;padding:10px;border:none;background:transparent;cursor:pointer;font-size:14px;font-weight:600;color:var(--text-soft);border-radius:100px;transition:all .2s}
.auth-tab.active{background:white;color:var(--navy);box-shadow:var(--shadow)}
.auth-foot{text-align:center;margin-top:18px;font-size:14px;color:var(--text-muted)}
.auth-foot a{color:var(--gold-dark);font-weight:600}

/* —————— Reveal animations —————— */
.reveal{opacity:0;transform:translateY(16px);animation:reveal .7s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes reveal{to{opacity:1;transform:translateY(0)}}
.reveal-1{animation-delay:.05s}
.reveal-2{animation-delay:.15s}
.reveal-3{animation-delay:.25s}
.reveal-4{animation-delay:.35s}

/* —————— Utilities —————— */
.config-banner{position:fixed;top:0;right:0;left:0;z-index:200;background:#b02a2a;color:white;text-align:center;padding:10px;font-size:13px;font-weight:600;display:none}
.config-banner.show{display:block}
.config-banner code{background:rgba(0,0,0,.2);padding:2px 8px;border-radius:4px;font-family:monospace}
.flex-gap{display:flex;gap:10px;flex-wrap:wrap}
.mt-16{margin-top:16px}
.mt-24{margin-top:24px}
.text-muted{color:var(--text-muted);font-size:13px}
.text-center{text-align:center}
.badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:100px;font-size:11px;font-weight:600;letter-spacing:.05em}
.badge-gold{background:rgba(201,169,97,.2);color:var(--gold-dark)}
.badge-navy{background:var(--navy);color:var(--cream-light)}
.badge-green{background:rgba(76,157,95,.15);color:var(--success)}
.badge-red{background:rgba(220,60,60,.1);color:var(--danger)}

/* —————— Dashboard layout —————— */
.dash-shell{min-height:100vh;background:var(--cream-light)}
.dash-header{background:white;border-bottom:1px solid var(--border);padding:14px 20px;position:sticky;top:0;z-index:40}
.dash-header-inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px}
.dash-user{display:flex;align-items:center;gap:10px}
.dash-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--gold),var(--gold-dark));color:var(--navy);display:grid;place-items:center;font-weight:700;font-size:15px;flex-shrink:0}
.dash-user-info{font-size:13px;line-height:1.3}
.dash-user-info strong{display:block;color:var(--navy);font-size:14px}
.dash-user-info small{color:var(--text-muted)}
.dash-content{max-width:1200px;margin:0 auto;padding:30px 20px}

.dash-tabs{display:flex;gap:4px;background:var(--cream);padding:4px;border-radius:100px;margin-bottom:26px;overflow-x:auto;border:1px solid var(--border)}
.dash-tab{flex:1;min-width:max-content;padding:10px 18px;border-radius:100px;border:none;background:transparent;cursor:pointer;font-size:14px;font-weight:600;color:var(--text-soft);transition:all .2s;white-space:nowrap;position:relative}
.dash-tab.active{background:var(--navy);color:var(--cream-light)}
.dash-tab .tab-badge{position:absolute;top:6px;right:6px;background:var(--danger);color:white;border-radius:100px;font-size:10px;padding:1px 6px;font-weight:700}

.dash-h1{font-size:30px;color:var(--navy);margin-bottom:6px}
.dash-sub{color:var(--text-soft);margin-bottom:24px;font-size:15px}

/* —————— Dashboard course list (student) —————— */
.my-courses{display:grid;grid-template-columns:1fr;gap:20px}
@media(min-width:760px){.my-courses{grid-template-columns:repeat(2,1fr)}}
.my-course{background:white;border:1px solid var(--border);border-radius:14px;overflow:hidden;transition:all .25s;cursor:pointer}
.my-course:hover{box-shadow:var(--shadow-md);border-color:var(--gold)}
.my-course-cover{height:140px;background:linear-gradient(135deg,var(--navy),var(--navy-soft));display:grid;place-items:center;color:var(--gold);font-family:'Frank Ruhl Libre',serif;font-size:60px;font-weight:700;opacity:.85;position:relative}
.my-course-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.my-course-body{padding:18px 20px}
.my-course h3{font-size:19px;color:var(--navy);margin-bottom:8px}
.progress-row{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:var(--text-muted);margin-bottom:8px}
.progress-bar{height:6px;background:var(--cream-dark);border-radius:100px;overflow:hidden;margin-bottom:14px}
.progress-fill{height:100%;background:linear-gradient(90deg,var(--gold),var(--gold-dark));border-radius:100px;transition:width .4s}
.my-course-actions{display:flex;gap:8px}

/* —————— Course player (student) —————— */
.player-shell{display:grid;grid-template-columns:1fr;gap:20px}
@media(min-width:980px){.player-shell{grid-template-columns:1fr 320px}}
.player-main{background:white;border-radius:14px;padding:18px;border:1px solid var(--border)}
.video-player{position:relative;padding-bottom:56.25%;height:0;background:#000;border-radius:10px;overflow:hidden;margin-bottom:16px}
.video-player iframe,.video-player video{position:absolute;inset:0;width:100%;height:100%;border:none}
.player-meta{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:14px}
.player-meta h2{font-size:22px;color:var(--navy)}
.player-side{background:white;border-radius:14px;padding:14px;border:1px solid var(--border);max-height:560px;overflow-y:auto}
.player-side h4{font-size:15px;color:var(--navy);margin-bottom:12px;padding:0 8px}
.lesson-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;cursor:pointer;transition:all .2s;font-size:14px}
.lesson-item:hover{background:var(--cream)}
.lesson-item.active{background:var(--cream);font-weight:600;color:var(--navy)}
.lesson-item.completed{color:var(--text-muted)}
.lesson-num{width:26px;height:26px;border-radius:50%;background:var(--cream-dark);color:var(--navy);display:grid;place-items:center;font-size:12px;font-weight:700;flex-shrink:0}
.lesson-item.active .lesson-num{background:var(--navy);color:var(--cream-light)}
.lesson-item.completed .lesson-num{background:rgba(76,157,95,.2);color:var(--success)}
.lesson-title{flex:1;min-width:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}

/* —————— Chat —————— */
.chat-shell{background:white;border:1px solid var(--border);border-radius:14px;display:flex;flex-direction:column;height:60vh;min-height:400px}
.chat-messages{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}
.chat-msg{max-width:75%;padding:10px 14px;border-radius:14px;font-size:14.5px;line-height:1.55;word-wrap:break-word;white-space:pre-wrap}
.chat-msg.from-student{background:var(--cream);align-self:flex-start;border-bottom-left-radius:4px}
.chat-msg.from-admin{background:var(--navy);color:var(--cream-light);align-self:flex-end;border-bottom-right-radius:4px}
.chat-msg time{display:block;font-size:11px;opacity:.6;margin-top:4px}
.chat-empty{margin:auto;text-align:center;color:var(--text-muted);padding:30px}
.chat-input{display:flex;gap:8px;padding:14px;border-top:1px solid var(--border)}
.chat-input input{flex:1;padding:12px 16px;border:1px solid var(--border);border-radius:100px;outline:none;font-size:15px;font-family:inherit}
.chat-input input:focus{border-color:var(--gold)}
.chat-input button{padding:0 20px;border-radius:100px;border:none;background:var(--navy);color:var(--cream-light);cursor:pointer;font-weight:600}

/* —————— Stat cards —————— */
.stat-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:24px}
.stat-card{background:white;border:1px solid var(--border);border-radius:14px;padding:18px}
.stat-card .label{font-size:12px;color:var(--text-muted);font-weight:600;letter-spacing:.05em;margin-bottom:6px}
.stat-card .value{font-family:'Frank Ruhl Libre',serif;font-size:30px;font-weight:700;color:var(--navy);line-height:1}
.stat-card .sub{font-size:12px;color:var(--gold-dark);margin-top:4px}

/* —————— Admin tables/lists —————— */
.list-row{display:flex;align-items:center;gap:14px;padding:14px;background:white;border:1px solid var(--border);border-radius:10px;margin-bottom:10px}
.list-row-icon{width:40px;height:40px;border-radius:10px;background:var(--cream);display:grid;place-items:center;color:var(--navy);flex-shrink:0;font-weight:600}
.list-row-info{flex:1;min-width:0}
.list-row-info strong{display:block;font-size:15px;color:var(--navy)}
.list-row-info small{font-size:12.5px;color:var(--text-muted)}
.list-row-actions{display:flex;gap:6px}
.btn-icon-danger{width:34px;height:34px;border-radius:8px;border:1px solid var(--border);background:transparent;cursor:pointer;color:var(--danger);display:grid;place-items:center;transition:all .2s}
.btn-icon-danger:hover{background:rgba(220,60,60,.1);border-color:var(--danger)}
.btn-icon{width:34px;height:34px;border-radius:8px;border:1px solid var(--border);background:transparent;cursor:pointer;color:var(--navy);display:grid;place-items:center;transition:all .2s}
.btn-icon:hover{background:var(--cream-dark);border-color:var(--gold)}

.section-card{background:white;border:1px solid var(--border);border-radius:14px;padding:22px;margin-bottom:16px}
.section-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:10px;flex-wrap:wrap}
.section-card-head h4{font-size:17px;color:var(--navy)}

.course-pill-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-bottom:18px}
.course-pill{padding:11px 14px;border-radius:10px;border:1.5px solid var(--border);background:var(--cream-light);cursor:pointer;text-align:right;transition:all .2s;font-size:13.5px;font-weight:600;color:var(--navy)}
.course-pill:hover{border-color:var(--gold)}
.course-pill.active{background:var(--navy);color:var(--cream-light);border-color:var(--navy)}
.course-pill .count{display:inline-block;margin-right:5px;padding:1px 7px;border-radius:100px;background:var(--gold);color:var(--navy);font-size:10.5px;font-weight:700}
.course-pill.active .count{background:var(--gold-light)}

/* —————— Checkbox cards (course access) —————— */
.checkbox-card{display:flex;align-items:center;gap:12px;padding:11px 14px;border:1.5px solid var(--border);border-radius:10px;cursor:pointer;margin-bottom:8px;transition:all .15s;background:white}
.checkbox-card:hover{border-color:var(--gold-light)}
.checkbox-card input[type="checkbox"]{width:18px;height:18px;cursor:pointer;accent-color:var(--navy)}
.checkbox-card.checked{background:var(--cream);border-color:var(--gold)}
.checkbox-card label{flex:1;cursor:pointer;font-size:14px;color:var(--navy)}

/* Toggle switch */
.toggle{position:relative;display:inline-block;width:44px;height:24px}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;cursor:pointer;inset:0;background:var(--cream-dark);border-radius:34px;transition:.2s}
.toggle-slider:before{position:absolute;content:"";height:18px;width:18px;right:3px;top:3px;background:white;border-radius:50%;transition:.2s}
.toggle input:checked+.toggle-slider{background:var(--success)}
.toggle input:checked+.toggle-slider:before{transform:translateX(-20px)}

/* Chat list items (admin) */
.chat-list-item{display:flex;align-items:center;gap:14px;padding:14px;background:white;border:1px solid var(--border);border-radius:10px;margin-bottom:8px;cursor:pointer;transition:all .2s}
.chat-list-item:hover{border-color:var(--gold);box-shadow:var(--shadow)}
.chat-list-item.unread{background:#FFF9EB;border-color:var(--gold)}
.chat-list-icon{width:40px;height:40px;border-radius:50%;background:var(--cream);color:var(--navy);display:grid;place-items:center;font-weight:700;flex-shrink:0}
.chat-list-info{flex:1;min-width:0}
.chat-list-info strong{font-size:14.5px;color:var(--navy)}
.chat-list-info p{font-size:13px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}
.chat-list-time{font-size:12px;color:var(--text-muted);flex-shrink:0}
.chat-list-unread{background:var(--danger);color:white;border-radius:100px;font-size:11px;padding:2px 8px;font-weight:700}

/* Certificate */
.certificate{
  background:linear-gradient(135deg,#fff8e8 0%,#fdfbf3 50%,#fff8e8 100%);
  border:3px double var(--gold-dark);border-radius:14px;
  padding:50px 40px;text-align:center;color:var(--navy);
  position:relative;overflow:hidden;
}
.certificate::before,.certificate::after{
  content:"❦";position:absolute;font-size:32px;color:var(--gold);opacity:.4;
}
.certificate::before{top:14px;right:14px}
.certificate::after{bottom:14px;left:14px}
.cert-eyebrow{font-family:'Frank Ruhl Libre',serif;font-size:14px;color:var(--gold-dark);letter-spacing:.3em;margin-bottom:10px}
.cert-title{font-family:'Frank Ruhl Libre',serif;font-size:34px;font-weight:700;margin-bottom:30px}
.cert-body{font-size:16px;line-height:1.8;margin-bottom:24px}
.cert-name{font-family:'Frank Ruhl Libre',serif;font-size:30px;font-weight:700;color:var(--gold-dark);margin:14px 0;border-bottom:1px solid var(--gold);display:inline-block;padding:0 30px 6px}
.cert-course{font-size:20px;font-weight:600;color:var(--navy);margin:14px 0}
.cert-foot{margin-top:30px;font-size:13px;color:var(--text-muted);font-style:italic}

/* —————— PWA install bottom sheet —————— */
.pwa-sheet{
  position:fixed;inset:0;z-index:300;
  background:rgba(20,33,61,.4);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  display:flex;align-items:flex-end;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .3s;
}
.pwa-sheet.open{opacity:1;pointer-events:auto}
.pwa-sheet-card{
  background:var(--cream-light);
  border-radius:24px 24px 0 0;
  width:100%;max-width:520px;
  padding:30px 26px 32px;
  position:relative;
  transform:translateY(100%);
  transition:transform .35s cubic-bezier(.2,.7,.3,1);
  box-shadow:0 -10px 40px rgba(20,33,61,.25);
}
.pwa-sheet.open .pwa-sheet-card{transform:translateY(0)}
.pwa-sheet-card::before{
  content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);
  width:38px;height:4px;border-radius:100px;background:var(--cream-dark);
}
.pwa-sheet-close{
  position:absolute;top:14px;right:14px;
  width:36px;height:36px;border-radius:50%;
  background:transparent;border:none;cursor:pointer;
  font-size:24px;color:var(--text-soft);line-height:1;
  display:grid;place-items:center;
}
.pwa-sheet-close:hover{background:var(--cream-dark)}
.pwa-sheet-icon{
  width:64px;height:64px;border-radius:18px;overflow:hidden;
  margin:6px 0 18px;
  box-shadow:0 8px 20px -6px rgba(20,33,61,.25);
}
.pwa-sheet-icon img{width:100%;height:100%;display:block}
.pwa-sheet-card h3{
  font-family:'Frank Ruhl Libre',serif;font-size:22px;
  color:var(--navy);margin-bottom:8px;line-height:1.3;
}
.pwa-sheet-card > p{
  font-size:15px;color:var(--text-soft);line-height:1.65;
  margin-bottom:22px;
}
.pwa-sheet-actions{display:flex;flex-direction:column;gap:8px}
.pwa-sheet-actions .btn-ghost{padding:10px;font-size:14px}

/* iOS step-by-step instructions */
.pwa-ios-steps{
  display:flex;flex-direction:column;gap:14px;
  background:var(--cream);border-radius:14px;
  padding:18px 16px;margin-top:8px;
}
.pwa-step{
  display:flex;align-items:center;gap:12px;
  font-size:14.5px;color:var(--text);line-height:1.5;
}
.pwa-step-num{
  width:28px;height:28px;border-radius:50%;
  background:var(--navy);color:var(--gold-light);
  display:grid;place-items:center;
  font-weight:700;font-size:13px;flex-shrink:0;
  font-family:'Frank Ruhl Libre',serif;
}
.pwa-step strong{color:var(--navy)}

@media(min-width:540px){
  .pwa-sheet-card{
    border-radius:18px;
    margin-bottom:20px;
  }
}
