:root {
    --blue: #0054A0;
    --blue-dark: #003d75;
    --blue-light: #e8f1fb;
    --gold: #BC6D0A;
    --gold-light: #fdf3e7;
    --black: #0f0f0f;
    --gray: #5a5a5a;
    --gray-light: #f4f5f7;
    --border: #dde2ec;
    --white: #ffffff;
    --success: #1a7a4a;
    --success-light: #e8f7ef;
    --error: #c0392b;
    --error-light: #fdf0ee;
    --sidebar-w: 280px;
    --header-h: 64px;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'Poppins', sans-serif;
    background: var(--gray-light);
    color: var(--black);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  /* â”€â”€ HEADER â”€â”€ */
  header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
  }

  .header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .header-logo {
    background: var(--white);
    color: var(--blue);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 4px;
    line-height: 1;
    padding-top: 7px;
  }

  .header-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.85);
    padding-top: 4px;
  }

  .header-badge {
    background: var(--gold);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  /* â”€â”€ LAYOUT â”€â”€ */
  .layout {
    display: flex;
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
  }

  /* â”€â”€ SIDEBAR â”€â”€ */
  .sidebar {
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--border);
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    overflow-y: auto;
    padding: 20px 0;
    z-index: 50;
  }

  .sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gray);
    padding: 18px 20px 8px;
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background .15s;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
  }

  .nav-item:hover { background: var(--blue-light); color: var(--blue); }

  .nav-item.active {
    background: var(--blue-light);
    color: var(--blue);
    border-left-color: var(--blue);
    font-weight: 600;
  }

  .nav-item.completed { color: var(--success); }
  .nav-item.completed .nav-icon { background: var(--success); color: var(--white); }

  .nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    transition: background .15s, color .15s;
  }

  .nav-item.active .nav-icon { background: var(--blue); color: var(--white); }

  .nav-label { line-height: 1.3; }
  .nav-sublabel { font-size: 11px; font-weight: 400; opacity: .7; display: block; }

  .sidebar-divider {
    margin: 12px 20px;
    border: none;
    border-top: 1px solid var(--border);
  }

  /* â”€â”€ MAIN â”€â”€ */
  .main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 36px 40px 60px;
    max-width: 860px;
  }

  /* â”€â”€ WELCOME SCREEN â”€â”€ */
  .welcome-hero {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-radius: 16px;
    padding: 56px 48px;
    color: var(--white);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
  }

  .welcome-hero::before {
    content: 'K&B';
    font-family: 'Bebas Neue', sans-serif;
    font-size: 260px;
    position: absolute;
    right: -20px;
    top: -40px;
    opacity: .06;
    letter-spacing: -10px;
    line-height: 1;
    pointer-events: none;
  }

  .welcome-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
  }

  .welcome-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 52px;
    letter-spacing: 3px;
    line-height: 1.05;
    margin-bottom: 20px;
  }

  .welcome-body {
    font-size: 15px;
    line-height: 1.8;
    opacity: .88;
    max-width: 560px;
    margin-bottom: 32px;
  }

  .welcome-stats {
    display: flex;
    gap: 32px;
  }

  .welcome-stat {
    text-align: center;
  }

  .welcome-stat-n {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 38px;
    letter-spacing: 2px;
    color: var(--gold);
    line-height: 1;
  }

  .welcome-stat-l {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: .7;
    margin-top: 4px;
  }

  .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .5px;
    padding: 14px 28px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
  }

  .btn-primary:hover { background: #a05c06; transform: translateY(-1px); }
  .btn-primary:active { transform: translateY(0); }

  .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--blue);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 8px;
    border: 2px solid var(--blue);
    cursor: pointer;
    transition: all .15s;
  }

  .btn-secondary:hover { background: var(--blue-light); }

  /* â”€â”€ MODULE CARDS (welcome grid) â”€â”€ */
  .module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
  }

  .module-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
  }

  .module-card:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 20px rgba(0,84,160,.1);
  }

  .module-card.completed { border-color: var(--success); }

  .module-card-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--gray);
    margin-bottom: 6px;
  }

  .module-card-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: var(--black);
  }

  .module-card-sub {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.5;
  }

  .module-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--gray-light);
    color: var(--gray);
  }

  .module-card.completed .module-card-badge {
    background: var(--success-light);
    color: var(--success);
  }

  /* â”€â”€ MODULE VIEW â”€â”€ */
  .module-header {
    margin-bottom: 28px;
  }

  .module-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
  }

  .module-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 42px;
    letter-spacing: 2px;
    color: var(--blue);
    line-height: 1.05;
    margin-bottom: 6px;
  }

  .module-subtitle {
    font-size: 15px;
    color: var(--gray);
    font-weight: 400;
  }

  /* â”€â”€ CARD STYLES â”€â”€ */
  .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
  }

  .card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
  }

  .card-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--black);
  }

  .card-body { padding: 20px 24px; }

  .card-body p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 14px;
  }

  .card-body p:last-child { margin-bottom: 0; }

  /* â”€â”€ LEARNING OBJECTIVES â”€â”€ */
  .objectives-list {
    list-style: none;
  }

  .objectives-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray);
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-light);
  }

  .objectives-list li:last-child { border-bottom: none; }

  .obj-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    margin-top: 7px;
    flex-shrink: 0;
  }

  /* â”€â”€ KEY TERMS â”€â”€ */
  .terms-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .term-item {
    background: var(--gray-light);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 3px solid var(--blue);
  }

  .term-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--blue);
    margin-bottom: 4px;
  }

  .term-def {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.6;
  }

  /* â”€â”€ QUIZ â”€â”€ */
  .quiz-header {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-radius: 12px 12px 0 0;
    padding: 22px 24px;
    color: var(--white);
  }

  .quiz-header-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: 4px;
  }

  .quiz-header-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 26px;
    letter-spacing: 2px;
  }

  .quiz-body { padding: 24px; background: var(--white); border-radius: 0 0 12px 12px; border: 1px solid var(--border); border-top: none; }

  .question-block {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--gray-light);
  }

  .question-block:last-of-type { border-bottom: none; }

  .question-num {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
  }

  .question-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 14px;
    line-height: 1.5;
  }

  .option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 8px;
    border: 2px solid var(--border);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--gray);
  }

  .option:hover { border-color: var(--blue); background: var(--blue-light); color: var(--blue); }

  .option.selected { border-color: var(--blue); background: var(--blue-light); color: var(--blue); font-weight: 500; }
  .option.correct { border-color: var(--success) !important; background: var(--success-light) !important; color: var(--success) !important; font-weight: 600; }
  .option.incorrect { border-color: var(--error) !important; background: var(--error-light) !important; color: var(--error) !important; }
  .option.show-correct { border-color: var(--success); background: var(--success-light); color: var(--success); font-weight: 600; }

  .option-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 700;
  }

  .option.selected .option-dot,
  .option.correct .option-dot { background: currentColor; }
  .option.selected .option-dot::after,
  .option.correct .option-dot::after { content: 'âœ“'; color: var(--white); font-size: 9px; }

  .feedback {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.6;
  }

  .feedback.show { display: block; }
  .feedback.correct-fb { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
  .feedback.incorrect-fb { background: var(--error-light); color: var(--error); border-left: 3px solid var(--error); }

  .quiz-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
  }

  .quiz-score {
    display: none;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--gray-light);
  }

  .quiz-score.pass { background: var(--success-light); color: var(--success); }
  .quiz-score.fail { background: var(--error-light); color: var(--error); }

  /* â”€â”€ RESOURCES â”€â”€ */
  .resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .resource-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
  }

  .resource-card:hover { border-color: var(--blue); box-shadow: 0 4px 16px rgba(0,84,160,.1); }

  .resource-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
  }

  .resource-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--black);
    margin-bottom: 2px;
  }

  .resource-desc {
    font-size: 11px;
    color: var(--gray);
  }

  /* â”€â”€ MAP LEGEND â”€â”€ */
  .map-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--gray-light);
    font-size: 13px;
    line-height: 1.5;
  }

  .legend-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .legend-swatch.purple { background: #9b8fdd; }
  .legend-swatch.pink { background: #f4a7c3; }
  .legend-swatch.green { background: #5bbf8a; }

  /* â”€â”€ SUMMARY / EMAIL â”€â”€ */
  .summary-view { display: none; }

  .summary-progress-bar-wrap {
    background: var(--gray-light);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
  }

  .summary-progress-bar {
    background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
    height: 100%;
    border-radius: 20px;
    transition: width .5s ease;
  }

  .summary-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin: 0 auto 24px;
  }

  .summary-score-n {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
    line-height: 1;
  }

  .summary-score-l { font-size: 11px; opacity: .7; letter-spacing: 1px; }

  .email-box {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    line-height: 2;
    white-space: pre-wrap;
    color: var(--black);
    margin-bottom: 16px;
    max-height: 400px;
    overflow-y: auto;
  }

  /* â”€â”€ PROGRESS BAR TOP â”€â”€ */
  .module-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
  }

  .progress-track {
    flex: 1;
    height: 6px;
    background: var(--gray-light);
    border-radius: 20px;
    overflow: hidden;
  }

  .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%);
    border-radius: 20px;
    transition: width .4s ease;
  }

  .progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
  }

  /* â”€â”€ NAV BUTTONS â”€â”€ */
  .nav-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
  }

  /* â”€â”€ INFO CALLOUT â”€â”€ */
  .callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.7;
  }

  .callout.info { background: var(--blue-light); border-left: 3px solid var(--blue); color: #003d75; }
  .callout.warning { background: var(--gold-light); border-left: 3px solid var(--gold); color: #7a4500; }

  .callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }


  .ctab { padding:8px 16px; border:none; background:var(--gray-light); cursor:pointer; font-family:'Poppins',sans-serif; font-size:12px; font-weight:600; border-radius:6px; margin-right:6px; margin-bottom:14px; color:var(--gray); transition:all .15s; }
  .ctab.active { background:var(--blue); color:var(--white); }
  .ctab:hover:not(.active) { background:var(--blue-light); color:var(--blue); }
  .cl-item { display:flex; align-items:flex-start; gap:10px; padding:9px 0; border-bottom:1px solid var(--gray-light); font-size:13.5px; line-height:1.5; color:var(--gray); }
  .cl-item:last-child { border-bottom:none; }
  .cl-sub { padding-left:24px; }
  .cl-box { width:15px; height:15px; border:2px solid var(--blue); border-radius:3px; flex-shrink:0; margin-top:2px; }
  .cl-note { font-size:11.5px; color:var(--gold); font-weight:600; font-style:italic; margin-top:3px; }
  .atty-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; }
  .atty-card { background:var(--gray-light); border-radius:10px; padding:16px; border-left:4px solid var(--blue); }
  .atty-name { font-weight:700; font-size:14px; color:var(--blue); margin-bottom:4px; }
  .atty-role { font-size:11px; color:var(--gold); font-weight:700; letter-spacing:.5px; text-transform:uppercase; margin-bottom:8px; }
  .atty-list { font-size:12px; color:var(--gray); line-height:1.9; padding-left:14px; }



  /* â”€â”€ TABBED CHECKLISTS â”€â”€ */
  .cl-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
  }
  .cl-tab {
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid var(--border);
    background: var(--gray-light);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: all .15s;
  }
  .cl-tab:hover { border-color: var(--blue); color: var(--blue); }
  .cl-tab-active { background: var(--blue) !important; border-color: var(--blue) !important; color: var(--white) !important; }
  .cl-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 13.5px;
    color: var(--gray);
    line-height: 1.5;
    border-bottom: 1px solid var(--gray-light);
  }
  .cl-item:last-child { border-bottom: none; }
  .cl-sub { padding-left: 28px; font-size: 12.5px; }
  .cl-sub2 { padding-left: 52px; font-size: 12px; }
  .cl-item.checked-row > span { text-decoration: line-through; opacity: .5; }

  /* â”€â”€ CHECKLISTS (legacy) â”€â”€ */
  .checklist-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
  }
  .checklist-card-header {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .checklist-card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--white);
  }
  .checklist-card-sub {
    font-size: 11px;
    color: rgba(255,255,255,.7);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: auto;
  }
  .checklist-body { padding: 18px 22px; }
  .checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 13.5px;
    color: var(--gray);
    line-height: 1.5;
    border-bottom: 1px solid var(--gray-light);
  }
  .checklist-item:last-child { border-bottom: none; }
  .checklist-item.sub { padding-left: 28px; font-size: 12.5px; }
  .checklist-item.sub2 { padding-left: 52px; font-size: 12px; }
  .checklist-check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
  }
  .checklist-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
  }
  .checklist-item.checked-row > span { text-decoration: line-through; opacity: .5; }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

  /* Animations */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .fade-up { animation: fadeUp .35s ease forwards; }

  /* Responsive */
  @media (max-width: 700px) {
    .sidebar { display: none; }
    .main { margin-left: 0; padding: 20px; }
    .module-grid { grid-template-columns: 1fr; }
    .terms-grid { grid-template-columns: 1fr; }
    .resource-grid { grid-template-columns: 1fr; }
    .welcome-hero { padding: 36px 24px; }
    .welcome-title { font-size: 36px; }
    .welcome-stats { gap: 20px; }
  }

/* ═══════════════════════════════════════════════
   PORTAL ADDITIONS (auth, header user menu, admin)
   ═══════════════════════════════════════════════ */

.header-right { display:flex; align-items:center; gap:14px; }
.header-user { color:rgba(255,255,255,.85); font-size:13px; font-weight:500; }
.header-link {
  color:#fff; background:rgba(255,255,255,.14); border:none; cursor:pointer;
  font-family:'Poppins',sans-serif; font-size:12px; font-weight:600;
  padding:7px 14px; border-radius:6px; text-decoration:none; transition:background .15s;
}
.header-link:hover { background:rgba(255,255,255,.26); }

/* ── AUTH PAGES ── */
.auth-wrap {
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding:24px; position:relative; overflow:hidden;
}
.auth-wrap::before {
  content:'K&B'; font-family:'Bebas Neue',sans-serif; font-size:400px; position:absolute;
  right:-40px; bottom:-120px; opacity:.05; letter-spacing:-14px; line-height:1; color:#fff; pointer-events:none;
}
.auth-card {
  background:var(--white); border-radius:16px; padding:40px 36px; width:100%; max-width:420px;
  box-shadow:0 24px 64px rgba(0,0,0,.35); position:relative; z-index:1;
}
.auth-logo { display:flex; align-items:center; gap:12px; margin-bottom:26px; }
.auth-logo-badge {
  background:var(--blue); color:var(--white); font-family:'Bebas Neue',sans-serif;
  font-size:24px; letter-spacing:2px; padding:7px 14px 4px; border-radius:6px; line-height:1;
}
.auth-logo-text { font-family:'Bebas Neue',sans-serif; font-size:19px; letter-spacing:2.5px; color:var(--blue); padding-top:3px; }
.auth-title { font-size:20px; font-weight:700; margin-bottom:6px; color:var(--black); }
.auth-sub { font-size:13px; color:var(--gray); line-height:1.6; margin-bottom:24px; }
.auth-field { margin-bottom:16px; }
.auth-label { display:block; font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--gray); margin-bottom:6px; }
.auth-input {
  width:100%; padding:12px 14px; border:1.5px solid var(--border); border-radius:8px;
  font-family:'Poppins',sans-serif; font-size:14px; box-sizing:border-box; transition:border-color .15s;
}
.auth-input:focus { outline:none; border-color:var(--blue); }
.auth-btn { width:100%; justify-content:center; margin-top:6px; }
.auth-alt { text-align:center; margin-top:18px; font-size:13px; }
.auth-alt a, .auth-alt button {
  color:var(--blue); background:none; border:none; cursor:pointer; font-family:'Poppins',sans-serif;
  font-size:13px; font-weight:600; text-decoration:underline;
}
.auth-msg { display:none; padding:11px 14px; border-radius:8px; font-size:13px; line-height:1.6; margin-bottom:16px; }
.auth-msg.error { display:block; background:var(--error-light); color:var(--error); border-left:3px solid var(--error); }
.auth-msg.success { display:block; background:var(--success-light); color:var(--success); border-left:3px solid var(--success); }

/* ── TOAST ── */
#toast {
  position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(80px);
  background:var(--black); color:#fff; font-size:13px; font-weight:500; padding:12px 22px;
  border-radius:8px; z-index:1000; transition:transform .25s ease; box-shadow:0 8px 24px rgba(0,0,0,.3); max-width:90vw;
}
#toast.show { transform:translateX(-50%) translateY(0); }
#toast.success { background:var(--success); }
#toast.error { background:var(--error); }

/* ── ADMIN ── */
.admin-main { margin-left:0; max-width:1200px; margin:0 auto; padding:36px 40px 60px; width:100%; }
.admin-tabs { display:flex; gap:8px; margin-bottom:28px; flex-wrap:wrap; }
.admin-tab {
  padding:10px 22px; border-radius:8px; border:2px solid var(--border); background:var(--white);
  font-family:'Poppins',sans-serif; font-size:13px; font-weight:600; color:var(--gray); cursor:pointer; transition:all .15s;
}
.admin-tab:hover { border-color:var(--blue); color:var(--blue); }
.admin-tab.active { background:var(--blue); border-color:var(--blue); color:var(--white); }

.admin-table { width:100%; border-collapse:collapse; font-size:13px; }
.admin-table th {
  text-align:left; font-size:10px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase;
  color:var(--gray); padding:10px 12px; border-bottom:2px solid var(--border); white-space:nowrap;
}
.admin-table td { padding:12px; border-bottom:1px solid var(--gray-light); vertical-align:middle; }
.admin-table tr:hover td { background:#fafbfd; }
.table-scroll { overflow-x:auto; }

.badge { display:inline-block; font-size:10.5px; font-weight:700; letter-spacing:.5px; padding:3px 10px; border-radius:20px; text-transform:uppercase; }
.badge.active { background:var(--success-light); color:var(--success); }
.badge.invited { background:var(--gold-light); color:var(--gold); }
.badge.suspended { background:var(--error-light); color:var(--error); }
.badge.admin { background:var(--blue-light); color:var(--blue); }
.badge.trainee { background:var(--gray-light); color:var(--gray); }

.mini-progress { display:flex; align-items:center; gap:8px; min-width:140px; }
.mini-bar { flex:1; height:6px; background:var(--gray-light); border-radius:20px; overflow:hidden; }
.mini-fill { height:100%; background:linear-gradient(90deg, var(--blue) 0%, var(--gold) 100%); border-radius:20px; }
.score-cell { font-size:11.5px; white-space:nowrap; }
.score-pill { display:inline-block; min-width:34px; text-align:center; font-size:10.5px; font-weight:700; padding:2px 6px; border-radius:6px; margin:1px; }
.score-pill.pass { background:var(--success-light); color:var(--success); }
.score-pill.fail { background:var(--error-light); color:var(--error); }
.score-pill.none { background:var(--gray-light); color:#b5b5b5; }

.btn-sm {
  font-family:'Poppins',sans-serif; font-size:11.5px; font-weight:600; padding:6px 12px;
  border-radius:6px; border:1.5px solid var(--border); background:var(--white); color:var(--gray);
  cursor:pointer; transition:all .15s; white-space:nowrap;
}
.btn-sm:hover { border-color:var(--blue); color:var(--blue); }
.btn-sm.danger:hover { border-color:var(--error); color:var(--error); }
.btn-sm.primary { background:var(--blue); border-color:var(--blue); color:#fff; }
.btn-sm.primary:hover { background:var(--blue-dark); }
.row-actions { display:flex; gap:4px; flex-wrap:wrap; max-width:280px; }
.row-actions .btn-sm { font-size:10px; padding:3px 8px; border-radius:5px; }

.form-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:14px; align-items:end; }
.form-field label { display:block; font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--gray); margin-bottom:6px; }
.form-field input, .form-field select, .form-field textarea {
  width:100%; padding:10px 12px; border:1.5px solid var(--border); border-radius:8px;
  font-family:'Poppins',sans-serif; font-size:13.5px; box-sizing:border-box; background:#fff; transition:border-color .15s;
}
.form-field textarea { resize:vertical; line-height:1.6; }
.form-field textarea.code { font-family:'Courier New',monospace; font-size:12.5px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline:none; border-color:var(--blue); }
.form-stack .form-field { margin-bottom:16px; }

.editor-item { background:var(--gray-light); border:1px solid var(--border); border-radius:10px; padding:16px; margin-bottom:14px; }
.editor-item-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.editor-item-title { font-size:11px; font-weight:700; letter-spacing:1.5px; text-transform:uppercase; color:var(--gold); }
.editor-row { display:flex; gap:10px; margin-bottom:8px; align-items:center; }
.editor-row input, .editor-row select { flex:1; padding:9px 11px; border:1.5px solid var(--border); border-radius:7px; font-family:'Poppins',sans-serif; font-size:13px; background:#fff; }
.editor-row input:focus { outline:none; border-color:var(--blue); }
.opt-correct { display:flex; align-items:center; gap:5px; font-size:11px; font-weight:600; color:var(--gray); white-space:nowrap; cursor:pointer; }

.module-list-item {
  display:flex; align-items:center; gap:14px; background:var(--white); border:1px solid var(--border);
  border-radius:10px; padding:16px 20px; margin-bottom:10px; cursor:pointer; transition:border-color .15s, box-shadow .15s;
}
.module-list-item:hover { border-color:var(--blue); box-shadow:0 4px 16px rgba(0,84,160,.08); }

.save-bar {
  position:sticky; bottom:0; background:var(--white); border-top:1px solid var(--border);
  padding:14px 0; display:flex; gap:12px; align-items:center; z-index:20;
}

.stat-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:14px; margin-bottom:24px; }
.stat-card { background:var(--white); border:1px solid var(--border); border-radius:12px; padding:18px 20px; }
.stat-card-n { font-family:'Bebas Neue',sans-serif; font-size:34px; letter-spacing:1px; color:var(--blue); line-height:1; }
.stat-card-l { font-size:11px; font-weight:600; letter-spacing:1px; text-transform:uppercase; color:var(--gray); margin-top:6px; }

@media (max-width:700px) {
  .admin-main { padding:20px; }
  .atty-grid { grid-template-columns:1fr; }
  .atty-card[style*="span 2"] { grid-column:span 1 !important; }
}
