  :root {
    --navy: #061525;
    --navy-mid: #180F26;
    --navy-light: #873cf015;
    --teal: #883CF0;
    --teal-dim: #883cf0e0;
    --teal-faint: rgb(0 0 0 / 8%);
    --white: #f0f8ff;
    --muted: #d6d6d6;
    --danger: #ff6b6b;
    --success: #4dbe8a;
    --warning: #ffd166;
    --card-bg: #23133a;
    --border: #3a1c63;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  .sdm-training {
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
  }

  /* Animated background */
  .sdm-training::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 40% at 10% 20%, #14101B, transparent 60%),
      radial-gradient(ellipse 50% 50% at 90% 80%, #14101B, transparent 60%);
    pointer-events: none;
    z-index: 0;
  }

  /* ── LAYOUT ── */
  .shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    position: relative;
  }

  /* ── SIDEBAR ── */
  .sdm-training .sidebar {
    background: #180f26;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 28px 0 24px;
    backdrop-filter: blur(12px);
  }

  .sdm-training .sidebar::-webkit-scrollbar { width: 0.25rem; }
  .sdm-training .sidebar::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 4px; }

  .logo-area {
    padding: 0 24px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
  }

  .logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal-faint);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 12px;
  }

  .logo-badge .dot {
    width: 0.375rem; height: 0.375rem;
    border-radius: 50%;
    background: var(--teal);
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
  }

  .sidebar h1 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--white);
  }

  .sidebar h1 span { color: var(--teal); }

  .progress-track {
    padding: 0 24px;
    margin-bottom: 20px;
  }

  .progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 500;
  }

  .progress-bar {
    height: 0.1875rem;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-dim), var(--teal));
    border-radius: 2px;
    transition: width 0.6s ease;
  }

  .nav-section {
    padding: 0 16px;
    margin-bottom: 8px;
  }

  .nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0 8px;
    margin-bottom: 4px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border: 1px solid transparent;
    margin-bottom: 2px;
  }

  .nav-item:hover {
    background: #23133a9f;
    color: var(--white);
    border-color: var(--border);
  }

  .nav-item.active {
    background: #3a1c6350;
    color: var(--teal);
    border-color: var(--border);
  }

  .nav-item .nav-num {
    width: 1.375rem; height: 1.375rem;
    border-radius: 50%;
    background: #95909C1A;
    border: 1px solid #3a1c63;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
  }

  .nav-item.active .nav-num,
  .nav-item.completed .nav-num {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--navy);
  }

  .nav-item.completed { color: var(--white); }
  .nav-item.completed .nav-num::after { content: '✓'; }

  /* ── MAIN ── */
  .main {
    padding: 0;
    overflow-y: auto;
    height:100vh;
    background-color:#191127;
  }

  /* ── MOBILE SIDEBAR (OFF-CANVAS) ── */
  .sdm-training .mobile-topbar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    height: 56px;
    padding: 0 16px;
    background: #180f26;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    align-items: center;
    gap: 12px;
  }
  .mobile-title {
    min-width: 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid #3a1c63;
    color: var(--white);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    touch-action: manipulation;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
  }
  .menu-btn:hover { border-color: #FFFFFF80; background: var(--teal-faint); }
  .menu-btn:active { transform: translateY(1px); }
  .menu-btn svg { width: 18px; height: 18px; }

  .sidebar-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── TOP HERO ── */
  .hero {
    padding: 64px 64px 48px;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }

  .hero::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: clamp(220px, 40vw, 400px);
    height: clamp(220px, 40vw, 400px);
    border-radius: 50%;
    background: radial-gradient(circle, #14101B, transparent 70%);
    pointer-events: none;
  }

  .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 16px;
  }

  .hero h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 14px;
  }

  .hero h2 em {
    font-style: normal;
    color: var(--teal);
  }

  .hero p {
    font-size: 15px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.7;
    font-weight: 400;
  }

  .hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
  }

  .stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .stat-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--teal);
  }

  .stat-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
  }

  /* ── MODULE ── */
  .module {
    display: none;
    padding: 48px 64px;
    animation: fadeUp 0.4s ease both;
  }

  .module.active { display: block; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .module-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
  }

  .module-icon {
    width: clamp(44px, 6vw, 56px);
    height: clamp(44px, 6vw, 56px);
    border-radius: 14px;
    background: #23133a;
    border: 1px solid #3a1c63;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
  }

  .module-title h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
  }

  .module-title p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
  }

  /* Cards */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
  }

  .card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    backdrop-filter: blur(8px);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 0.125rem;
    background: linear-gradient(90deg, var(--teal-dim), var(--teal));
    opacity: 0;
    transition: opacity 0.2s;
  }

  .card:hover { border-color: #883CF0; transform: translateY(-2px); }
  .card:hover::before { opacity: 1; }

  .card-icon { font-size: 28px; margin-bottom: 14px; display: block; }

  .card h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
  }

  .card p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
  }

  .overview-body {
    padding: 48px 64px;
  }

  .card.highlight {
    border-color: #3a1c63;
    background-color: #23133a;
  }

  /* Comparison table */
  .compare-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    font-size: 13.5px;
  }

  .compare-table thead tr {
    border-bottom: 2px solid var(--border);
  }

  .compare-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--teal);
  }

  .compare-table td {
    padding: 13px 16px;
    color: var(--muted);
    border-bottom: 1px solid #883CF080;
    line-height: 1.5;
  }

  .compare-table td:first-child { font-weight: 600; color: var(--white); }
  .compare-table tr:hover td { background: var(--teal-faint); }

  /* Sections */
  .section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .section-label::after {
    content: '';
    flex: 1;
    height: 0.0625rem;
    background: var(--border);
  }

  .info-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
  }

  .info-block-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }

  .info-block-body h5 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--white);
  }

  .info-block-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.65;
  }

  .note-block {
    background: rgba(255,209,102,0.07);
    border: 1px solid rgba(255,209,102,0.25);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    color: #ffd166;
    margin-bottom: 20px;
    line-height: 1.6;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  /* Flow diagram */
  .flow {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 24px 0;
    flex-wrap: wrap;
    gap: 0;
  }

  .flow-step {
    background: #5e309d14;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    min-width: 130px;
    transition: all 0.2s;
    line-height: 1.4;
  }

  .flow-step.active-step {
    background: #3a1c6350;
    border-color: #3a1c63;
    color: var(--teal);
  }

  .flow-arrow {
    font-size: 18px;
    color: var(--teal-dim);
    padding: 0 10px;
    flex-shrink: 0;
  }

  /* Badge tags */
  .tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .tag-teal { background: rgba(77,232,200,0.12); color: var(--teal); border: 1px solid rgba(77,232,200,0.25); }
  .tag-warn { background: rgba(255,209,102,0.12); color: #ffd166; border: 1px solid rgba(255,209,102,0.25); }
  .tag-red { background: rgba(255,107,107,0.12); color: #ff6b6b; border: 1px solid rgba(255,107,107,0.25); }

  /* IdP grid */
  .idp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
  }

  .idp-pill {
    background: #5e309d14;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    transition: all 0.2s;
    cursor: default;
  }

  .idp-pill:hover {
    border-color: #3a1c63;
    color: var(--teal);
    background: #3a1c6350;
  }

  /* MFA diagram */
  .mfa-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
  }

  .mfa-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    transition: all 0.2s;
  }

  .mfa-row:hover { border-color: #883CF080; }

  .mfa-trigger {
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
  }

  .mfa-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
  }

  /* ── QUIZ ── */
  .quiz-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
  }

  .quiz-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
  }

  .quiz-header h4 {
    font-size: 18px;
    font-weight: 700;
  }

  .quiz-badge {
    background: var(--teal-faint);
    border: 1px solid var(--border);
    color: var(--teal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .question {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
  }

  .question.correct { border-color: rgba(77,232,160,0.5); }
  .question.wrong { border-color: rgba(255,107,107,0.5); }

  .question-text {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.5;
    color: var(--white);
  }

  .question-num {
    font-size: 11px;
    color: var(--teal);
    margin-bottom: 8px;
    font-weight: 600;
  }

  .options {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .option {
    padding: 11px 16px;
    border-radius: 8px;
    border: 1px solid #3a1c63;
    background: #1f1232;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s;
    color: var(--muted);
    user-select: none;
    line-height: 1.4;
  }

  .option:hover:not(.disabled) {
    border-color: #3a1c63;
    color: var(--white);
    background: #2a1647;
  }

  .option.selected { border-color: var(--teal); color: var(--white); background: var(--teal-faint); }
  .option.correct-answer { border-color: var(--success) !important; background: rgba(18, 229, 131, 0.1) !important; color: var(--success) !important; }
  .option.wrong-answer { border-color: var(--danger) !important; background: rgba(255,107,107,0.1) !important; color: var(--danger) !important; }
  .option.disabled { pointer-events: none; }

  .feedback {
    display: none;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
  }

  .feedback.correct { display: block; background: rgb(32 32 32 / 10%); color: var(--success); border: 1px solid rgba(77,232,160,0.25); }
  .feedback.wrong { display: block; background: rgba(255,107,107,0.1); color: var(--danger); border: 1px solid rgba(255,107,107,0.25); }

  /* Quiz result */
  .quiz-result {
    display: none;
    text-align: center;
    padding: 40px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-top: 20px;
  }

  .quiz-result .score {
    font-size: 56px;
    font-weight: 800;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 8px;
  }

  .quiz-result p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
  }

  /* Navigation buttons */
  .nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
  }

  .btn-primary {
    background: var(--teal);
    color: var(--navy);
  }

  .btn-primary:hover { background: #883cf0e0; transform: translateY(-1px); }

  .btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
  }

  .btn-secondary:hover { color: var(--white); border-color: rgba(255,255,255,0.2); }

  .btn-ghost {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--teal);
  }

  .btn-ghost:hover { background: var(--teal-faint); }

  /* Completion screen */
  .completion {
    display: none;
    padding: 64px;
    text-align: center;
  }

  .completion.active { display: block; }

  .completion-badge {
    width: clamp(72px, 18vw, 100px);
    height: clamp(72px, 18vw, 100px);
    border-radius: 50%;
    background: var(--teal-faint);
    border: 2px solid var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    margin: 0 auto 28px;
    animation: spin-in 0.6s ease;
  }

  @keyframes spin-in {
    from { transform: scale(0) rotate(-90deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
  }

  .completion h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
  }

  .completion p {
    color: var(--muted);
    font-size: 15px;
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.7;
  }

  .ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    text-align: left;
    margin: 32px 0;
  }

  .ref-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    font-size: 12px;
  }

  .ref-item strong { display: block; color: var(--white); margin-bottom: 4px; font-size: 13px; }
  .ref-item a { color: var(--teal); text-decoration: none; word-break: break-all; }
  .ref-item a:hover { text-decoration: underline; }

  /* Responsive */
  @media (max-width: 860px) {
    .sdm-training .mobile-topbar { display: flex; }
    .shell { grid-template-columns: 1fr; padding-top: 56px; }
    .sdm-training .sidebar {
      position: absolute;
      top: 56px;
      bottom: 0;
      left: 0;
      height: auto;
      width: min(320px, 86vw);
      transform: translateX(-110%);
      transition: transform 0.22s ease;
      z-index: 1;
      box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    }
    body.sidebar-open .sdm-training .sidebar { transform: translateX(0); }
    body.sidebar-open { overflow: hidden; }
    .module, .hero { padding: 32px 24px; }
    .overview-body { padding: 24px; }
    .hero-stats { gap: 20px; }
    .mfa-row { grid-template-columns: 1fr; gap: 8px; }
  }

	  /* Scrollbar */
	  .main::-webkit-scrollbar { width: 0.375rem; }
	  .main::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 3px; }

	  /* ── RESPONSIVE HELPERS ── */
	  img, video, canvas, svg { max-width: 100%; height: auto; }
	  table { max-width: 100%; }
	  @media (max-width: 720px) {
	    .note-block { flex-direction: column; gap: 6px; }
	    .hero-stats { flex-direction: column; gap: 12px; align-items: flex-start; }
	    .card-grid { grid-template-columns: 1fr; gap: 12px; }
	    .card { padding: 18px; }
	    .card h4 { font-size: 14px; }
	    .card p { font-size: 12.5px; }
	    .flow { flex-direction: column; align-items: stretch; gap: 8px; }
	    .flow-step { width: 100%; }
	    .flow-arrow { align-self: center; transform: rotate(90deg); padding: 4px 0; }
	    .nav-btns { flex-direction: column; align-items: stretch; gap: 10px; }
	    .nav-btns .btn { width: 100%; justify-content: center; }
	    table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	  }
	  pre { max-width: 100%; overflow-x: auto; }