:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --text:#1f2a37;
  --muted:#667085;
  --line:#dde3ec;
  --brand:#f27a3d;
  --brand-dark:#d96428;
  --soft:#fff3ec;
  --ok:#137a46;
  --warn:#c78212;
  --bad:#c63b3b;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Montserrat,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

body.menu-open{
  overflow:hidden;
}

a{color:inherit}

.app-shell{
  display:grid;
  grid-template-columns:280px 1fr;
  min-height:100vh;
}

/* MOBILE NAV BASE */
.mobile-topbar,
.mobile-menu-toggle,
.mobile-overlay{
  display:none;
}

/* AUTH */
.auth-screen{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:32px 20px;
  background:linear-gradient(135deg,#eef4fb 0%, #f7f9fc 45%, #edf7f1 100%);
}

.auth-wrapper{
  width:min(1180px,100%);
  display:grid;
  grid-template-columns:1fr 520px;
  gap:32px;
  align-items:stretch;
}

.auth-brand-panel{
  background:linear-gradient(135deg,#0f4f97 0%, #1d6ac1 55%, #63be27 100%);
  border-radius:28px;
  padding:42px 36px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:22px;
  box-shadow:0 18px 45px rgba(15,79,151,.18);
}

.auth-ccmpc-logo{
  width:180px;
  max-width:100%;
  height:auto;
  object-fit:contain;
  background:#fff;
  padding:14px 18px;
  border-radius:18px;
}

.auth-brand-copy{
  display:grid;
  gap:14px;
}

.auth-kicker{
  display:inline-block;
  width:max-content;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.4px;
  text-transform:uppercase;
}

.auth-brand-panel h1{
  margin:0;
  font-size:2.4rem;
  line-height:1.1;
  color:#fff;
}

.auth-brand-panel p{
  margin:0;
  font-size:1.06rem;
  line-height:1.7;
  color:rgba(255,255,255,.92);
  max-width:560px;
}

.auth-card.auth-card-pro{
  border-radius:28px;
  padding:40px 38px;
  background:#fff;
  border:1px solid #dbe5ef;
  box-shadow:0 18px 45px rgba(20,24,40,.08);
  display:grid;
  align-content:center;
  min-height:100%;
}

.auth-card-head{
  display:grid;
  gap:8px;
  margin-bottom:18px;
}

.auth-card-head h2{
  margin:0;
  font-size:2rem;
  color:#172033;
}

.auth-card-head p{
  margin:0;
  color:#667085;
  line-height:1.6;
}

.auth-form-pro{
  gap:16px;
}

.auth-form-pro label{
  display:grid;
  gap:8px;
}

.auth-form-pro label span{
  font-weight:700;
  color:#172033;
}

.auth-form-pro input{
  width:100%;
  padding:16px 18px;
  border:1px solid #d7dee7;
  border-radius:14px;
  background:#f8fafc;
  font-size:1rem;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-submit{
  width:100%;
  margin-top:6px;
  padding:14px 18px;
  border-radius:14px;
  background:#0f4f97;
}

.auth-submit:hover{
  background:#0b427f;
}

.auth-foot-note{
  margin-top:18px;
  text-align:center;
}

.auth-foot-note a{
  color:#0f4f97;
  font-weight:700;
  text-decoration:none;
}

.auth-foot-note a:hover{
  text-decoration:underline;
}

/* SIDEBAR */
.sidebar{
  background:#172033;
  color:#fff;
  padding:24px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.brand{
  font-size:1.2rem;
  font-weight:700;
}

.user-card{
  background:rgba(255,255,255,.08);
  padding:14px;
  border-radius:16px;
  display:grid;
  gap:4px;
}

.user-card span{
  font-size:.9rem;
  color:#d3d8e2;
}

.sidebar nav{
  display:grid;
  gap:8px;
}

.sidebar nav a,
.sidebar nav .nav-link{
  display:block;
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
  color:#fff;
  text-decoration:none;
  line-height:1.2;
}

.sidebar nav a:hover{
  background:rgba(255,255,255,.08);
}

.sidebar nav .nav-link.completed{
  background:rgba(255,255,255,.04);
  color:#fff;
}

.sidebar nav .nav-link.in-progress{
  background:rgba(242,122,61,.18);
  border:1px solid rgba(242,122,61,.35);
  color:#fff;
}

.sidebar nav .nav-link.unlocked{
  background:rgba(255,255,255,.04);
  color:#fff;
}

.sidebar nav .nav-link.disabled{
  background:rgba(255,255,255,.02);
  color:rgba(255,255,255,.72);
  cursor:not-allowed;
}

.sidebar nav a:last-child{
  margin-top:8px;
}

/* MAIN */
.main-content{
  padding:28px;
  display:grid;
  gap:22px;
}

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  box-shadow:0 10px 30px rgba(20,24,40,.05);
}

.hero,
.module-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}

.stat-box{
  background:var(--soft);
  padding:18px 20px;
  border-radius:18px;
  display:grid;
  text-align:center;
  min-width:140px;
}

.stat-box strong{
  font-size:2rem;
  color:var(--brand-dark);
}

.grid{
  display:grid;
  gap:18px;
}

.grid.two{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.modules-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.module-card{
  display:grid;
  gap:14px;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:#eef2ff;
  color:#344054;
  border-radius:999px;
  padding:8px 12px;
  font-size:.85rem;
  width:max-content;
}

.module-card.completed .pill{
  background:#eaf8ef;
  color:var(--ok);
}

.module-card.in_progress .pill,
.module-card.unlocked .pill{
  background:#fff5e9;
  color:var(--warn);
}

.module-card.locked .pill{
  background:#f2f4f7;
  color:#667085;
}

/* MODULES */
.module-hero.premium{
  display:grid;
  grid-template-columns:1.6fr .8fr;
  gap:24px;
  align-items:stretch;
}

.module-hero-main{
  display:grid;
  gap:14px;
}

.module-hero-main h1{
  margin:0;
  font-size:2rem;
  line-height:1.15;
  color:var(--text);
}

.module-hero-main p{
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

.module-hero-main strong{
  color:var(--text);
  font-size:1rem;
}

.module-hero-side{
  display:grid;
  gap:14px;
  align-content:start;
  padding:18px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid var(--line);
}

.mini-stat{
  display:grid;
  gap:4px;
}

.mini-stat span{
  font-size:.82rem;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.6px;
}

.mini-stat strong{
  font-size:1rem;
  color:var(--text);
}

.module-flow{
  display:grid;
  gap:16px;
}

.module-flow h2{
  margin:0;
}

.flow-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}

.flow-step{
  display:grid;
  gap:10px;
  padding:16px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid var(--line);
}

.flow-step span{
  width:32px;
  height:32px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:var(--soft);
  color:var(--brand-dark);
  font-weight:800;
}

.flow-step strong{
  color:var(--text);
  line-height:1.3;
}

.flow-step small{
  color:var(--muted);
  line-height:1.45;
}

.resource-grid{
  display:grid;
  gap:14px;
}

.videos-grid{
  grid-template-columns:1fr;
}

.resource-card{
  display:grid;
  gap:10px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  align-content:start;
}

.resource-card strong{
  color:var(--text);
  line-height:1.4;
}

.resource-card p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

.resource-type{
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
  color:var(--brand-dark);
}

.btn-sm{
  padding:10px 14px;
  border-radius:12px;
  width:max-content;
}

.module-resources-split{
  align-items:start;
}

.module-closing{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  background:#fff7f2;
  border:1px solid #ffd9c7;
}

.module-closing h2{
  margin:0 0 8px;
}

.module-closing p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}

.module-done-note{
  display:grid;
  gap:6px;
  padding:14px 16px;
  border-radius:14px;
  background:#eaf8ef;
  border:1px solid rgba(19,122,70,.18);
}

.module-done-note strong{
  color:var(--ok);
  font-size:.98rem;
}

.module-done-note span{
  color:var(--muted);
  line-height:1.45;
  font-size:.92rem;
}

/* GLOBAL UI */
.progress{
  width:100%;
  height:12px;
  background:#edf1f7;
  border-radius:999px;
  overflow:hidden;
}

.progress span{
  display:block;
  height:100%;
  background:var(--brand);
  border-radius:999px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  background:var(--brand);
  color:#fff;
  text-decoration:none;
  border-radius:14px;
  padding:12px 16px;
  font-weight:700;
  cursor:pointer;
}

.btn:hover{
  background:var(--brand-dark);
}

.btn-disabled{
  background:#c8ced8;
  cursor:not-allowed;
}

.form-grid{
  display:grid;
  gap:16px;
}

.form-grid label{
  display:grid;
  gap:8px;
  font-weight:600;
}

.form-grid input,
.form-grid select{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.auth-wrap{
  display:grid;
  place-items:center;
  min-height:100vh;
  padding:24px;
}

.auth-card{
  width:min(100%,520px);
}

.muted{
  color:var(--muted);
}

.flash{
  padding:14px 16px;
  border-radius:14px;
  font-weight:600;
}

.flash-success{background:#eaf8ef;color:var(--ok)}
.flash-error{background:#fdecec;color:var(--bad)}
.flash-info{background:#eef4ff;color:#1d4ed8}

.resource-item{
  padding:14px 0;
  border-bottom:1px solid var(--line);
  display:grid;
  gap:8px;
}

.resource-item:last-child{
  border-bottom:none;
}

.question-group{
  display:grid;
  gap:14px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fcfcfd;
}

.spaced{
  gap:22px;
}

/* CERTIFICATES */
.certificate-box{
  padding:22px;
  border:2px dashed var(--brand);
  border-radius:18px;
  background:var(--soft);
}

.certificate-box.pending{
  border-color:#c8ced8;
  background:#f8fafc;
}

.certificate-premium{
  background:#fff;
  border:1px solid #d7dee7;
  border-radius:20px;
  padding:40px;
  box-shadow:0 12px 30px rgba(20,24,40,.06);
  position:relative;
  overflow:hidden;
}

.certificate-premium::before{
  content:"";
  position:absolute;
  inset:12px;
  border:1px solid rgba(23,32,51,.10);
  border-radius:14px;
  pointer-events:none;
}

.certificate-topline{
  width:100%;
  height:6px;
  border-radius:999px;
  background:var(--brand);
  margin-bottom:24px;
}

.certificate-brand{
  text-align:center;
  margin-bottom:14px;
}

.certificate-box img.certificate-logo{
  display:inline-block;
  width:190px !important;
  max-width:190px !important;
  min-width:190px !important;
  height:auto !important;
  max-height:100px !important;
  object-fit:contain !important;
}

.certificate-kicker{
  text-align:center;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1.8px;
  color:var(--muted);
  margin-bottom:10px;
}

.certificate-title{
  text-align:center;
  font-size:34px;
  line-height:1.15;
  margin:0 0 10px;
  color:#172033;
}

.certificate-lead{
  text-align:center;
  color:var(--muted);
  margin:0 0 12px;
}

.certificate-recipient{
  text-align:center;
  font-size:34px;
  font-weight:800;
  color:#172033;
  margin:10px 0 18px;
}

.certificate-badge{
  display:block;
  width:max-content;
  margin:0 auto 22px;
  padding:12px 18px;
  border-radius:999px;
  background:rgba(242,122,61,.12);
  color:#172033;
  font-weight:700;
}

.certificate-header{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:24px;
}

.certificate-header small{
  display:block;
  color:var(--muted);
  margin-bottom:4px;
}

.certificate-header h2{
  margin:0;
}

.certificate-body p{
  margin:0 0 14px;
  line-height:1.6;
}

.certificate-text.center{
  text-align:center;
}

.certificate-data{
  margin-top:18px;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.7);
  border:1px solid #e7edf3;
}

.certificate-data p{
  margin:0 0 8px;
}

.certificate-note{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid rgba(23,32,51,.12);
}

.certificate-footer-meta{
  display:flex;
  justify-content:space-between;
  gap:18px;
  margin-top:24px;
  padding-top:16px;
  border-top:1px solid rgba(23,32,51,.12);
}

.certificate-footer-meta span{
  display:block;
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:4px;
}

.certificate-footer-meta strong{
  font-size:15px;
  color:#172033;
}

/* VIDEO EMBED */
.video-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}

.video-card-content{
  display:grid;
  gap:8px;
}

.video-card .btn-sm{
  flex:0 0 auto;
  white-space:nowrap;
}

.video-embed-wrap{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  border-radius:16px;
  overflow:hidden;
  background:#000;
  border:1px solid var(--line);
}

.video-embed-wrap iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}

.video-card-embed{
  gap:14px;
}

/* LEARNING PATH */
.learning-path-grid{
  display:grid;
  gap:18px;
}

.learning-step-card{
  padding:18px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  display:grid;
  gap:16px;
}

.learning-step-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.learning-step-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  background:var(--soft);
  color:var(--brand-dark);
  font-weight:800;
  font-size:.86rem;
}

.learning-step-columns{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.learning-step-block{
  display:grid;
  gap:10px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fafc;
}

.learning-step-block strong{
  line-height:1.4;
  color:var(--text);
}

.learning-step-block p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

/* RESPONSIVE */
@media (max-width: 920px){
  .auth-wrapper{
    grid-template-columns:1fr;
  }

  .auth-brand-panel{
    padding:28px 24px;
  }

  .auth-brand-panel h1{
    font-size:2rem;
  }

  .auth-ccmpc-logo{
    width:150px;
  }

  .auth-card.auth-card-pro{
    padding:28px 24px;
  }

  .app-shell{
    grid-template-columns:1fr;
  }

  .sidebar{
    padding:18px;
  }

  .brand{
    font-size:1.05rem;
    line-height:1.2;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  .user-card{
    padding:12px 14px;
    border-radius:14px;
  }

  .sidebar nav a,
  .sidebar nav .nav-link{
    padding:12px 14px;
    border-radius:14px;
    font-size:.98rem;
  }

  .main-content{
    padding:18px;
    gap:18px;
  }

  .grid.two,
  .modules-grid,
  .module-resources-split,
  .learning-step-columns,
  .flow-steps,
  .result-summary,
  .participant-grid,
  .scale-grid{
    grid-template-columns:1fr !important;
  }

  .hero,
  .module-hero,
  .module-hero.premium,
  .module-closing,
  .certificate-footer-meta{
    display:flex;
    flex-direction:column;
    align-items:stretch;
  }

  .module-hero-main h1{
    font-size:1.85rem;
    line-height:1.12;
    word-break:break-word;
  }

  .module-hero-main p{
    font-size:1rem;
    line-height:1.55;
  }

  .module-hero-side{
    padding:16px;
  }

  .flow-step,
  .resource-card,
  .learning-step-card,
  .learning-step-block,
  .question-card,
  .card{
    border-radius:16px;
  }

  .certificate-premium{
    padding:24px;
  }

  .certificate-title{
    font-size:26px;
  }

  .certificate-recipient{
    font-size:26px;
  }

  .certificate-box img.certificate-logo{
    width:120px !important;
    max-width:120px !important;
    min-width:120px !important;
    max-height:68px !important;
  }

  .video-card{
    flex-direction:column;
    align-items:flex-start;
  }

  .btn,
  .btn-sm{
    width:100%;
  }

  .mobile-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px 14px 64px;
    background:#172033;
    color:#fff;
    position:sticky;
    top:0;
    z-index:1100;
    border-bottom:1px solid rgba(255,255,255,.08);
  }

  .mobile-topbar-brand{
    font-weight:700;
    font-size:1rem;
    line-height:1.2;
  }

  .mobile-topbar-user{
    font-size:.88rem;
    color:#dbe4f0;
  }

  .mobile-menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:fixed;
    top:12px;
    left:12px;
    z-index:1200;
    width:42px;
    height:42px;
    border:none;
    border-radius:12px;
    background:#fff;
    color:#172033;
    box-shadow:0 8px 24px rgba(0,0,0,.12);
    font-size:1.2rem;
    cursor:pointer;
  }

  .sidebar{
    position:fixed;
    top:0;
    left:0;
    width:min(84vw,320px);
    height:100vh;
    z-index:1250;
    transform:translateX(-100%);
    transition:transform .25s ease;
    overflow-y:auto;
    padding:72px 18px 24px;
  }

  .sidebar.is-open{
    transform:translateX(0);
  }

  .mobile-overlay{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.45);
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
    z-index:1200;
  }

  .mobile-overlay.is-open{
    opacity:1;
    pointer-events:auto;
  }
}

@media (max-width: 640px){
  .sidebar{
    padding:16px;
  }

  .main-content{
    padding:16px;
  }

  .brand{
    font-size:1rem;
  }

  .module-hero-main h1{
    font-size:1.55rem;
  }

  .module-hero-main strong{
    font-size:.98rem;
    line-height:1.4;
  }

  .card,
  .resource-card,
  .learning-step-card,
  .learning-step-block,
  .question-card{
    padding:14px;
  }

  .certificate-premium{
    padding:18px;
  }

  .certificate-title{
    font-size:22px;
  }

  .certificate-recipient{
    font-size:22px;
  }

  .certificate-box img.certificate-logo{
    width:105px !important;
    max-width:105px !important;
    min-width:105px !important;
    max-height:60px !important;
  }

  .question-head{
    grid-template-columns:1fr;
  }

  .result-card{
    display:grid;
  }

  .result-meta{
    text-align:left;
  }
}