:root{
  --bg:#f4f7fb;--card:#fff;--text:#172033;--muted:#6f7a8d;--line:#e5eaf2;--primary:#2563eb;--primary-2:#4f46e5;--sidebar:#111827;--sidebar2:#16213a;--success:#16a34a;
}
*{box-sizing:border-box}html,body{min-height:100%}body{font-family:'Noto Sans Thai',Tahoma,Arial,sans-serif;color:var(--text);background:var(--bg)}a{text-decoration:none}.btn,.form-control,.form-select{border-radius:10px}.form-control,.form-select{border-color:#d8dfeb;padding:.72rem .9rem}.form-control:focus,.form-select:focus{border-color:#94b4ff;box-shadow:0 0 0 .2rem rgba(37,99,235,.09)}
.brand-mark{width:44px;height:44px;border-radius:13px;display:inline-grid;place-items:center;background:linear-gradient(135deg,#3b82f6,#4f46e5);color:#fff;font-weight:800;letter-spacing:-1px;box-shadow:0 8px 24px rgba(37,99,235,.3)}.brand-mark.sm{width:36px;height:36px;border-radius:10px;font-size:.9rem}
.public-body{background:#fff}.navbar-brand{color:#18233a}.hero-section{position:relative;overflow:hidden;background:radial-gradient(circle at 85% 15%,rgba(99,102,241,.13),transparent 28%),linear-gradient(180deg,#f8fbff,#fff)}.hero-section:after{content:"";position:absolute;width:440px;height:440px;border-radius:50%;background:rgba(37,99,235,.06);right:-220px;bottom:-180px}.min-vh-75{min-height:75vh}.eyebrow{display:inline-flex;align-items:center;gap:.5rem;padding:.4rem .8rem;border:1px solid #dbe7ff;border-radius:999px;background:#f4f8ff;color:#255ccc;font-size:.76rem;font-weight:800;letter-spacing:.08em}.eyebrow.light{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.2);color:#fff}.hero-section h1{font-size:clamp(2.4rem,5vw,4.8rem);line-height:1.06;font-weight:800;letter-spacing:-.04em;margin:1.2rem 0;max-width:900px}.hero-section .lead{font-size:1.15rem;color:#64748b;max-width:760px}.trust-row{display:flex;gap:1.25rem;flex-wrap:wrap;color:#6b7280;font-size:.9rem;margin-top:2rem}.trust-row i{color:#2563eb}.hero-dashboard-card{background:linear-gradient(145deg,#111827,#202b46);color:#fff;border-radius:28px;padding:2rem;box-shadow:0 30px 70px rgba(15,23,42,.25);transform:perspective(900px) rotateY(-3deg) rotateX(1deg)}.hero-dashboard-card small{color:#9facbf}.hero-dashboard-card h3{font-size:1.4rem;margin:.2rem 0}.pulse-dot{width:12px;height:12px;background:#34d399;border-radius:50%;box-shadow:0 0 0 6px rgba(52,211,153,.15)}.mini-metrics{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1.5rem 0}.mini-metrics div{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);padding:1rem;border-radius:16px}.mini-metrics span{display:block;color:#a8b2c5;font-size:.8rem}.mini-metrics strong{font-size:1.8rem}.fake-chart{height:140px;display:flex;align-items:end;gap:10px;padding:1rem 0}.fake-chart span{flex:1;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#60a5fa,#4f46e5)}.ad-ribbon{display:flex;gap:.6rem;align-items:center;background:rgba(37,99,235,.22);border:1px solid rgba(96,165,250,.25);padding:.85rem 1rem;border-radius:14px;font-size:.9rem}.stats-strip{background:#0f172a;color:#fff;padding:1rem 0}.stat-public{padding:1.1rem}.stat-public strong{display:block;font-size:1.8rem}.stat-public span{color:#aeb9c9;font-size:.9rem}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin-bottom:2rem}.section-heading span{font-size:.75rem;color:#2563eb;font-weight:800;letter-spacing:.1em}.section-heading h2{font-weight:800;margin:.35rem 0 0}.section-heading p{max-width:520px;color:#667085;margin:0}.course-card{border:1px solid #e6eaf1;border-radius:20px;overflow:hidden;background:#fff;transition:.25s}.course-card:hover{transform:translateY(-5px);box-shadow:0 18px 45px rgba(16,24,40,.1)}.course-cover{height:180px;background:linear-gradient(135deg,#dbeafe,#eef2ff);position:relative;display:grid;place-items:center;color:#3359bb}.course-cover>i{font-size:4rem;opacity:.8}.course-code{position:absolute;left:1rem;top:1rem;background:#fff;padding:.35rem .65rem;border-radius:8px;font-size:.75rem;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.08)}.course-meta{display:flex;gap:1rem;flex-wrap:wrap;border-top:1px solid #edf0f4;padding-top:1rem;color:#7a8495;font-size:.82rem}.news-card{background:#fff;border:1px solid #e6eaf1;padding:1.5rem;border-radius:18px;height:100%}.news-date{font-size:.75rem;color:#2563eb;font-weight:700;margin-bottom:.6rem}.news-card h3{font-weight:700;font-size:1.15rem}.news-card p{color:#6b7280;margin:0}.feature-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.feature-grid div{border:1px solid #e4e9f1;border-radius:18px;padding:1.25rem}.feature-grid i{font-size:1.4rem;color:#2563eb;display:block;margin-bottom:.7rem}.feature-grid b,.feature-grid span{display:block}.feature-grid span{font-size:.82rem;color:#7b8494}.public-footer{background:#0f172a;color:#fff;padding:2rem 0}
.auth-page{min-height:100vh;display:grid;place-items:center;padding:2rem;background:radial-gradient(circle at 10% 10%,#dbeafe,transparent 32%),#f5f7fb}.auth-card{width:min(1180px,100%);min-height:700px;background:#fff;border-radius:28px;box-shadow:0 30px 80px rgba(20,36,75,.16);display:grid;grid-template-columns:1.05fr .95fr;overflow:hidden}.auth-visual{padding:4rem;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(circle at 70% 20%,rgba(96,165,250,.35),transparent 26%),linear-gradient(145deg,#0f172a,#1e3a8a);color:#fff;position:relative}.auth-visual h1{font-size:clamp(2.4rem,4vw,4rem);line-height:1.08;font-weight:800;letter-spacing:-.04em;margin:1.4rem 0}.auth-visual p{max-width:540px;color:#c8d3e4}.visual-badges{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:2rem}.visual-badges span{padding:.55rem .8rem;border-radius:10px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12)}.auth-form-panel{padding:3rem 4rem;display:flex;flex-direction:column;justify-content:center}.auth-logo{display:inline-flex;align-items:center;gap:.7rem;color:#172033}.auth-heading{margin:2rem 0 1.3rem}.auth-heading h2{font-weight:800}.auth-heading p{color:#7b8494}.input-icon{position:relative}.input-icon>i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#7c8798;z-index:2}.input-icon .form-control{padding-left:2.6rem}.pass-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#7c8798}.auth-divider{display:flex;align-items:center;gap:1rem;color:#9099a8;font-size:.84rem;margin:1.4rem 0}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:#e4e8ef;flex:1}.demo-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.55rem}.demo-account{border:1px solid #e4e9f1;background:#fff;border-radius:11px;padding:.7rem .8rem;display:flex;align-items:center;gap:.65rem;text-align:left;font-size:.82rem;transition:.15s}.demo-account:hover{background:#f5f8ff;border-color:#b8cdfd;color:#225fd4}.demo-account i{color:#2563eb}
.register-page{min-height:100vh;background:#f5f7fb}.register-card{display:grid;grid-template-columns:.78fr 1.22fr;max-width:1180px;margin:auto;background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 26px 70px rgba(20,36,75,.13)}.register-side{padding:3.5rem;background:linear-gradient(145deg,#111827,#1d4ed8);color:#fff}.register-side h1{font-size:2.5rem;font-weight:800;line-height:1.15;margin:1.4rem 0}.register-side p{color:#d6deec}.register-points{display:flex;flex-direction:column;gap:1rem;margin-top:2rem}.register-points i{color:#86efac;margin-right:.6rem}.register-form{padding:3rem}.form-section-title{margin-top:.6rem;padding:.7rem 1rem;border-left:4px solid #2563eb;background:#f4f7ff;color:#183878;font-weight:700}.simple-auth{min-height:100vh;display:grid;place-items:center;background:#f4f7fb;padding:2rem}.simple-auth-card{width:min(520px,100%);background:#fff;border-radius:22px;padding:2.2rem;box-shadow:0 24px 60px rgba(16,24,40,.12)}
.app-body{background:#f3f6fb}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:270px;background:linear-gradient(180deg,var(--sidebar),var(--sidebar2));color:#fff;z-index:1040;overflow:auto;transition:.25s}.brand{height:80px;display:flex;align-items:center;gap:.75rem;padding:0 1.25rem;border-bottom:1px solid rgba(255,255,255,.08)}.brand strong,.brand small{display:block}.brand small{color:#8ea0bb;font-size:.72rem}.side-nav{padding:1rem .8rem 3rem}.nav-section{font-size:.68rem;letter-spacing:.13em;color:#74849d;padding:1.2rem .85rem .55rem;font-weight:700}.nav-item{display:flex;align-items:center;gap:.8rem;padding:.72rem .85rem;color:#c9d2df;border-radius:10px;margin:.15rem 0;font-size:.9rem}.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}.nav-item i{width:20px;color:#8faeff}.main-panel{margin-left:270px;min-width:0;width:calc(100% - 270px);display:flex;flex-direction:column;min-height:100vh}.topbar{height:80px;background:rgba(255,255,255,.95);backdrop-filter:blur(12px);border-bottom:1px solid #e7ebf2;padding:0 1.5rem;display:flex;align-items:center;justify-content:space-between;gap:1rem;position:sticky;top:0;z-index:1020}.page-kicker{font-size:.68rem;letter-spacing:.12em;color:#778399;font-weight:700}.page-title{font-size:1.25rem;margin:0;font-weight:800}.top-actions{display:flex;align-items:center;gap:.75rem}.user-chip{border:0;background:transparent;display:flex;align-items:center;gap:.65rem;padding:.35rem}.user-chip .avatar{width:40px;height:40px;border-radius:12px;background:#e0e8ff;color:#2555ba;display:grid;place-items:center;font-weight:800}.user-chip strong,.user-chip small{display:block}.user-chip strong{font-size:.84rem}.user-chip small{font-size:.7rem;color:#7c8797}.content-wrap{padding:1.5rem;flex:1}.app-footer{padding:1rem 1.5rem;color:#8a94a4;font-size:.78rem}.dashboard-hero{background:linear-gradient(135deg,#172554,#1d4ed8);color:#fff;border-radius:20px;padding:1.7rem 2rem;display:flex;align-items:center;justify-content:space-between;box-shadow:0 16px 35px rgba(29,78,216,.15)}.dashboard-hero h2{font-size:1.5rem;font-weight:800;margin:.6rem 0 .2rem}.dashboard-hero p{margin:0;color:#c7d6f5}.badge-soft{display:inline-flex;align-items:center;padding:.35rem .65rem;border-radius:999px;background:#eef4ff;color:#2858bb;font-size:.68rem;font-weight:800;letter-spacing:.08em}.dashboard-hero .badge-soft{background:rgba(255,255,255,.12);color:#dbe7ff}.hero-period{padding:.7rem 1rem;border-radius:12px;background:rgba(255,255,255,.1)}.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-top:1rem}.kpi-card{background:#fff;border:1px solid #e7ebf2;border-radius:16px;padding:1rem;display:flex;gap:.9rem;align-items:center;box-shadow:0 6px 18px rgba(17,24,39,.03)}.kpi-icon{width:44px;height:44px;border-radius:12px;background:#eef4ff;color:#2b5bc8;display:grid;place-items:center;font-size:1.1rem}.kpi-card span{display:block;font-size:.75rem;color:#7b8494}.kpi-card strong{display:block;font-size:1.35rem;margin-top:.15rem}.kpi-card strong small{font-size:.65rem;color:#8c96a6;font-weight:500}.panel-card{background:#fff;border:1px solid #e4e9f1;border-radius:17px;box-shadow:0 7px 22px rgba(16,24,40,.035);overflow:hidden}.panel-head{padding:1.15rem 1.25rem;border-bottom:1px solid #edf0f4;display:flex;justify-content:space-between;align-items:center;gap:1rem}.panel-head span{font-size:.66rem;color:#3d66c4;font-weight:800;letter-spacing:.1em}.panel-head h3{font-size:1rem;font-weight:800;margin:.2rem 0 0}.chart-wrap{height:310px;padding:1.1rem}.chart-wrap canvas{max-height:100%!important}.code-pill{display:inline-block;padding:.28rem .5rem;border-radius:7px;background:#eef4ff;color:#2a57b8;font-size:.72rem;font-weight:700}.progress.slim{height:5px;margin-bottom:.25rem}.module-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}.search-box{display:flex;align-items:center;background:#fff;border:1px solid #dde4ee;border-radius:12px;padding-left:.75rem;min-width:min(520px,100%)}.search-box i{color:#7b8594}.search-box input{border:0;outline:0;padding:.7rem;width:100%;background:transparent}.search-box .btn{border-radius:9px;margin:.22rem}.enterprise-table{font-size:.84rem;margin:0}.enterprise-table thead th{background:#f8fafc;color:#667085;font-size:.72rem;text-transform:none;border-bottom:1px solid #e7ebf1;padding:.8rem .9rem;white-space:nowrap}.enterprise-table td{padding:.8rem .9rem;border-color:#eef1f5;vertical-align:middle}.enterprise-table tbody tr:hover{background:#fbfcfe}.modal-content{border:0;border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.2)}.modal-header,.modal-footer{border-color:#edf0f4}
.report-controls{background:#fff;border:1px solid #e4e9f1;border-radius:16px;padding:1.2rem;margin-bottom:1rem}.a4-sheet{background:#fff;width:min(210mm,100%);min-height:297mm;margin:0 auto;padding:16mm 14mm;box-shadow:0 14px 40px rgba(15,23,42,.12);color:#111}.report-letterhead{display:flex;gap:1rem;border-bottom:2px solid #1d4ed8;padding-bottom:1rem}.report-brand{width:58px;height:58px;border-radius:14px;background:#1d4ed8;color:#fff;display:grid;place-items:center;font-weight:800}.report-letterhead h2{font-size:1rem;font-weight:800;margin:0}.report-letterhead h1{font-size:1.5rem;font-weight:800;margin:1rem 0 .2rem}.report-letterhead div,.report-letterhead p{font-size:.75rem;color:#586274}.report-summary{display:flex;gap:1rem;flex-wrap:wrap;margin:1rem 0}.report-summary>div{border:1px solid #dfe4ec;border-radius:10px;padding:.7rem 1rem;min-width:150px}.report-summary span{display:block;font-size:.68rem;color:#6e7785}.report-summary strong{font-size:1rem}.report-table{font-size:.68rem}.report-table th{background:#eff4ff}.report-footer{display:flex;justify-content:space-between;border-top:1px solid #dfe4ec;margin-top:1rem;padding-top:.7rem;font-size:.65rem;color:#7b8491}.preview-mode .content-wrap{background:#6b7280}.preview-mode .a4-sheet{margin-top:1rem;margin-bottom:1rem}
.settings-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}.settings-title{display:flex;gap:.9rem;margin-bottom:1.3rem}.settings-title>i{width:44px;height:44px;border-radius:12px;background:#eef4ff;color:#2f5fc7;display:grid;place-items:center;font-size:1.2rem}.settings-title h3{font-size:1rem;font-weight:800;margin:0}.settings-title p{font-size:.77rem;color:#7c8797;margin:.15rem 0 0}.sticky-save{position:sticky;bottom:1rem;display:flex;justify-content:flex-end;margin-top:1rem}.sticky-save .btn{box-shadow:0 10px 28px rgba(37,99,235,.25)}.permission-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem}.permission-item{display:flex;align-items:flex-start;gap:.7rem;border:1px solid #e3e8ef;padding:.9rem;border-radius:12px;cursor:pointer}.permission-item:hover{background:#f8faff}.permission-item strong,.permission-item small{display:block}.permission-item strong{font-size:.82rem}.permission-item small{color:#8993a2;font-size:.68rem}.profile-header{display:flex;align-items:center;gap:1rem;padding-bottom:1.2rem;border-bottom:1px solid #edf0f4}.profile-avatar{width:64px;height:64px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,#dbeafe,#e0e7ff);color:#2853af;font-size:1.5rem;font-weight:800}.profile-header h3{font-size:1.15rem;font-weight:800;margin:0}.profile-header p{font-size:.8rem;color:#778293;margin:0}.profile-list>div{display:flex;justify-content:space-between;gap:1rem;padding:.85rem 0;border-bottom:1px solid #f0f2f5}.profile-list span{color:#7a8493;font-size:.78rem}.profile-list strong{font-size:.82rem;text-align:right}.pdf-toolbar{position:sticky;top:0;z-index:10;background:#fff;border-bottom:1px solid #e2e8f0;padding:.7rem 1rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.pdf-stage{min-height:100vh;background:#5f6875;padding:1.5rem;display:flex;justify-content:center}.pdf-stage canvas{background:#fff;box-shadow:0 12px 35px rgba(0,0,0,.28);max-width:100%;height:auto!important}
@media(max-width:1199px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.settings-grid{grid-template-columns:1fr}.hero-dashboard-card{transform:none}.auth-form-panel{padding:2.5rem}}
@media(max-width:991px){.sidebar{transform:translateX(-100%);box-shadow:0 0 30px rgba(0,0,0,.2)}.sidebar.open{transform:translateX(0)}.main-panel{margin-left:0;width:100%}.auth-card{grid-template-columns:1fr;max-width:720px}.auth-visual{min-height:300px;padding:2.2rem}.auth-visual h1{font-size:2.4rem}.register-card{grid-template-columns:1fr}.register-side{padding:2.4rem}.section-heading{align-items:start;flex-direction:column;gap:.6rem}}
@media(max-width:767px){.content-wrap{padding:1rem}.topbar{padding:0 1rem}.topbar .page-title{font-size:1rem}.kpi-grid{grid-template-columns:1fr 1fr}.dashboard-hero{align-items:flex-start;flex-direction:column}.module-toolbar{align-items:stretch;flex-direction:column}.search-box{min-width:100%}.permission-grid{grid-template-columns:1fr}.auth-page{padding:0}.auth-card{min-height:100vh;border-radius:0}.auth-visual{display:none}.auth-form-panel{padding:2rem 1.25rem}.demo-grid{grid-template-columns:1fr}.register-page .container{padding-left:0;padding-right:0}.register-card{border-radius:0}.register-form{padding:2rem 1.15rem}.register-side{padding:2rem 1.2rem}.feature-grid{grid-template-columns:1fr}.hero-section h1{font-size:2.6rem}.hero-dashboard-card{padding:1.3rem}.a4-sheet{padding:10mm 6mm;min-height:auto}.report-letterhead{flex-direction:column}.report-summary>div{min-width:120px;flex:1}.report-table{font-size:.6rem}.chart-wrap{height:260px}}
@media(max-width:480px){.kpi-grid{grid-template-columns:1fr}.top-actions>.btn{display:none}.user-chip .avatar{width:36px;height:36px}.stats-strip .stat-public{padding:.7rem}.section-heading h2{font-size:1.6rem}.hero-section .lead{font-size:1rem}}
@media print{body{background:#fff!important}.sidebar,.topbar,.app-footer,.no-print,.alert{display:none!important}.main-panel{margin:0!important;width:100%!important}.content-wrap{padding:0!important}.a4-sheet{width:210mm;min-height:297mm;padding:12mm;box-shadow:none!important;margin:0!important}.report-table{font-size:8pt}.report-letterhead h1{font-size:16pt}@page{size:A4 portrait;margin:0}}
/* Learner Course Player */
.course-player-head,.assessment-head{background:#fff;border:1px solid #e4e9f1;border-radius:18px;padding:1.25rem 1.4rem;margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;gap:1.5rem}.course-player-head h2,.assessment-head h2{font-size:1.35rem;font-weight:800;margin:.55rem 0 .15rem}.course-player-head p,.assessment-head p{margin:0;color:#7b8494;font-size:.85rem}.course-progress-box{width:220px}.course-progress-box span{display:block;color:#7a8494;font-size:.72rem}.course-progress-box strong{display:block;font-size:1.35rem;margin:.1rem 0 .5rem}.course-player-grid{display:grid;grid-template-columns:340px minmax(0,1fr);gap:1rem}.curriculum-panel{background:#fff;border:1px solid #e4e9f1;border-radius:17px;padding:.7rem;height:max-content;max-height:calc(100vh - 120px);overflow:auto;position:sticky;top:96px}.curriculum-title{font-size:.7rem;color:#61708a;font-weight:800;letter-spacing:.1em;padding:.65rem .7rem}.lesson-link{display:flex;align-items:center;gap:.7rem;color:#253047;padding:.8rem .7rem;border-radius:11px;margin:.15rem 0}.lesson-link:hover,.lesson-link.active{background:#eef4ff;color:#1f55c4}.lesson-number{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#f1f4f8;color:#536178;font-size:.73rem;font-weight:800;flex:0 0 auto}.lesson-link.active .lesson-number{background:#dce8ff;color:#2055c1}.lesson-link strong,.lesson-link small{display:block}.lesson-link strong{font-size:.82rem;line-height:1.35}.lesson-link small{color:#8792a3;font-size:.68rem;margin-top:.18rem}.lesson-view{min-width:0}.lesson-content{font-size:.95rem;line-height:1.9;color:#3e495b;border-top:1px solid #edf0f4;padding-top:1.2rem}.assessment-meta{display:flex;gap:.8rem}.assessment-meta>div{min-width:110px;border:1px solid #e2e7ef;border-radius:12px;padding:.65rem .9rem}.assessment-meta span,.assessment-meta strong{display:block}.assessment-meta span{font-size:.67rem;color:#7f8998}.assessment-meta strong{font-size:1.05rem}.question-card{padding:1.25rem;margin-bottom:1rem}.question-no{font-size:.72rem;color:#3563c5;font-weight:700;margin-bottom:.55rem}.question-card h3{font-size:1rem;font-weight:700;line-height:1.55;margin-bottom:1rem}.choice-item{display:block;margin:.55rem 0;cursor:pointer}.choice-item input{position:absolute;opacity:0;pointer-events:none}.choice-item span{display:flex;align-items:center;gap:.75rem;border:1px solid #dfe5ed;border-radius:12px;padding:.75rem .9rem;transition:.15s}.choice-item span b{width:30px;height:30px;border-radius:8px;background:#f0f3f8;display:grid;place-items:center;color:#56647a}.choice-item input:checked+span{border-color:#779df8;background:#f3f7ff;box-shadow:0 0 0 2px rgba(37,99,235,.06)}.choice-item input:checked+span b{background:#2563eb;color:#fff}
.certificate-toolbar{position:sticky;top:0;z-index:20;background:#fff;border-bottom:1px solid #e2e8f0;padding:.8rem 1.2rem;display:flex;justify-content:space-between}.certificate-page{min-height:100vh;background:#5c6572;padding:2rem;display:grid;place-items:center}.certificate-inner{width:min(297mm,100%);min-height:190mm;background:#fff;padding:18mm 20mm;border:12px solid #eef3ff;outline:2px solid #234ea3;outline-offset:-18px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 24px 60px rgba(0,0,0,.25);position:relative}.cert-top{position:absolute;left:25mm;right:25mm;top:20mm;display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:#536078}.cert-logo{width:46px;height:46px;border-radius:50%;background:#1d4ed8;color:#fff;display:grid;place-items:center;font-weight:800}.cert-kicker{color:#1d4ed8;font-size:.78rem;font-weight:800;letter-spacing:.18em}.certificate-inner h1{font-size:2rem;font-weight:800;margin:.55rem 0 1.3rem}.certificate-inner>p{color:#6b7280;margin:.4rem 0}.certificate-inner h2{font-size:2rem;font-weight:800;color:#173b83;margin:.55rem 0;border-bottom:1px solid #9fb7ea;padding:0 2rem .35rem}.cert-en-name{font-size:.9rem;color:#667085}.certificate-inner h3{font-size:1.35rem;font-weight:700;margin:.5rem 0 1.2rem}.cert-meta{display:flex;gap:2rem;flex-wrap:wrap;justify-content:center;font-size:.78rem;color:#5f6978}.cert-meta strong{color:#1f2937}.cert-verify{margin-top:1rem;font-size:.62rem;color:#8490a0;max-width:90%;word-break:break-all}
@media(max-width:991px){.course-player-grid{grid-template-columns:1fr}.curriculum-panel{position:static;max-height:none}.course-player-head,.assessment-head{align-items:flex-start;flex-direction:column}.course-progress-box{width:100%}}
@media(max-width:767px){.assessment-meta{width:100%}.assessment-meta>div{flex:1}.certificate-page{padding:.5rem}.certificate-inner{min-height:150mm;padding:16mm 10mm}.certificate-inner h1,.certificate-inner h2{font-size:1.45rem}.cert-top{left:15mm;right:15mm;top:14mm}}
@media print{.certificate-toolbar{display:none!important}.certificate-page{background:#fff!important;padding:0!important;min-height:0}.certificate-inner{width:297mm;height:210mm;min-height:210mm;box-shadow:none!important;margin:0!important;page-break-after:avoid}}
.cert-list-item{display:flex;align-items:center;gap:.7rem;padding:.7rem;border:1px solid #e7ebf2;border-radius:11px;margin:.45rem 0;color:#273249}.cert-list-item:hover{background:#f5f8ff;border-color:#cad9fb}.cert-list-item>i:first-child{color:#d99b11;font-size:1.15rem}.cert-list-item strong,.cert-list-item small{display:block}.cert-list-item strong{font-size:.78rem;line-height:1.35}.cert-list-item small{font-size:.65rem;color:#8892a1;margin-top:.15rem}

/* Protected learning / video compliance */
.learning-rule-banner{display:flex;align-items:flex-start;gap:14px;padding:16px 18px;margin:0 0 20px;border:1px solid #cbd5e1;border-radius:16px;background:#f8fafc}.learning-rule-banner>i{font-size:1.3rem;color:#2563eb;margin-top:1px}.learning-rule-banner div{display:flex;flex-direction:column;gap:2px}.learning-rule-banner strong{font-weight:700}.learning-rule-banner span{font-size:.9rem;color:#64748b;line-height:1.55}.lesson-link.locked{opacity:.58;cursor:not-allowed;background:#f8fafc}.lesson-link.locked:hover{transform:none;box-shadow:none}.video-policy-box{display:flex;gap:12px;align-items:center;padding:14px 16px;border:1px solid #fde68a;background:#fffbeb;border-radius:14px}.video-policy-box>i{font-size:1.25rem;color:#d97706}.video-policy-box>div:nth-child(2){display:flex;flex:1;flex-direction:column}.video-policy-box strong{font-weight:700}.video-policy-box span{font-size:.86rem;color:#78716c}.video-watch-stat{min-width:72px;text-align:center;padding-left:10px;border-left:1px solid #fde68a}.video-watch-stat b{display:block;font-size:1.15rem}.video-watch-stat small{display:block;color:#78716c}.video-watch-progress{height:8px;margin-top:8px}.protected-player-wrap{background:#020617;box-shadow:0 12px 30px rgba(15,23,42,.12)}.lock-hero-icon{width:64px;height:64px;border-radius:20px;margin:0 auto 18px;display:grid;place-items:center;background:#eff6ff;color:#2563eb;font-size:1.8rem}
@media(max-width:767.98px){.learning-rule-banner{padding:14px}.video-policy-box{align-items:flex-start;flex-wrap:wrap}.video-watch-stat{width:100%;border-left:0;border-top:1px solid #fde68a;padding:8px 0 0;text-align:left;display:flex;gap:8px;align-items:baseline}.video-watch-stat b,.video-watch-stat small{display:inline}.course-player-grid{grid-template-columns:1fr}.curriculum-panel{max-height:none}}

/* Organization branding / logo upload */
.brand-logo-img{width:44px;height:44px;object-fit:contain;display:block;border-radius:12px;background:#fff;padding:3px;border:1px solid #e5e7eb;box-shadow:0 6px 18px rgba(15,23,42,.08)}
.brand-logo-img.sm{width:36px;height:36px;border-radius:10px;padding:2px}
.logo-upload-box{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:16px;padding:1rem}
.logo-preview-wrap{display:flex;align-items:center;gap:1rem}
.logo-preview{width:112px;height:112px;flex:0 0 112px;border-radius:18px;border:1px solid #e2e8f0;background:#fff;display:grid;place-items:center;overflow:hidden}
.logo-preview img{width:100%;height:100%;object-fit:contain;padding:8px}
.logo-preview span{display:flex;flex-direction:column;align-items:center;gap:.35rem;color:#94a3b8;text-align:center}
.logo-preview span i{font-size:1.6rem}.logo-preview span small{font-size:.72rem}
.report-logo-img{width:58px;height:58px;object-fit:contain;border-radius:14px;border:1px solid #dbe2ea;background:#fff;padding:4px}
.cert-logo-img{width:58px;height:58px;object-fit:contain;display:block}
@media(max-width:575.98px){.logo-preview-wrap{align-items:flex-start;flex-direction:column}.logo-preview{width:96px;height:96px;flex-basis:96px}}
@media print{.report-logo-img,.cert-logo-img{box-shadow:none}}
