﻿/* =========================================================
   TRAINING UI SYSTEM — CLEAN DASH SYSTEM
   Purpose: One organized global CSS file for Training / Learning Center pages.
   Notes:
   - Uses CSS variables for light/dark mode.
   - Uses dash-* components as the current system.
   - Removes legacy component dependencies, duplicates, red test CSS,
     hard-coded list colors, and conflicting repeated overrides.
========================================================= */

/* =========================================================
   01. DESIGN TOKENS
========================================================= */
:root {
    --bg-page: #ffffff;
    --bg-card: #ffffff;
    --bg-soft: #f8fafc;
    --bg-soft-alt: #f1f5f9;
    --text-main: #212529;
    --text-muted: #6c757d;
    --text-soft: #64748b;
   /* --border: #dddddd;
    --border-soft: #ededed;*/
    --border: #b8c0cc;
    --border-soft: #c7d0db;
    --accent: #0d6efd;
    --accent-soft: #e7f1ff;
    --accent-border: #d9e6ff;
    --accent-contrast: #ffffff;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow-soft: rgba(15,23,42,.10);
    --callout-info-bg: #eff6ff;
    --callout-info-border: #bfdbfe;
    --callout-info-icon: #2563eb;
    --callout-warning-bg: #fff7ed;
    --callout-warning-border: #fdba74;
    --callout-warning-icon: #ea580c;
    --callout-success-bg: #ecfdf5;
    --callout-success-border: #86efac;
    --callout-success-icon: #16a34a;
    --callout-danger-bg: #fef2f2;
    --callout-danger-border: #fca5a5;
    --callout-danger-icon: #dc2626;
    --highlight-bg: #fff7ed;
    --highlight-border: #fdba74;
    --article-dark-bg: #111827;
    --article-dark-text: #f9fafb;
    --article-dark-muted: #d1d5db;
    --article-dark-border: #1e293b;
    --dre-icon-filter: none;
}

body.dark-mode {
    --bg-page: #121212;
    --bg-card: #1e1e1e;
    --bg-soft: #2a2a2a;
    --bg-soft-alt: #333333;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-soft: #cbd5e1;
    --border: #3a3a3a;
    --border-soft: #333333;
    --accent: #f9c866;
    --accent-soft: #3a2f12;
    --accent-border: #5a4520;
    --accent-contrast: #000000;
    --shadow-soft: rgba(0,0,0,.5);
    --callout-info-bg: #1e1e1e;
    --callout-info-border: #2a2a2a;
    --callout-info-icon: #8ab4f8;
    --callout-warning-bg: #2a2418;
    --callout-warning-border: #5a4520;
    --callout-warning-icon: #f9c866;
    --callout-success-bg: #18251d;
    --callout-success-border: #2f5738;
    --callout-success-icon: #22c55e;
    --callout-danger-bg: #2a1818;
    --callout-danger-border: #5a2a2a;
    --callout-danger-icon: #ef4444;
    --highlight-bg: #2a2418;
    --highlight-border: #5a4520;
    --article-dark-bg: #111827;
    --article-dark-text: #f9fafb;
    --article-dark-muted: #d1d5db;
    --article-dark-border: #1e293b;
    --dre-icon-filter: invert(1) brightness(1.2);
}

/* =========================================================
   02. BASE / PAGE LAYOUT
========================================================= */
html {
    overflow-y: scroll;
}

body {
    background: var(--bg-page);
    color: var(--text-main);
}

.header {
    background-color: #000;
    color: #fff;
    border-bottom: none;
}

.header-center {
    color: #fff;
}

.dash-shell,
.training-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0px 18px 40px 18px;
}
.header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.container-fluid {
    padding-bottom: 0 !important;
}

/* =========================================================
   03. TYPOGRAPHY
========================================================= */
.dash-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.dash-subtitle {
    color: var(--text-main);
}

.dash-help {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.dash-label,
.dash-user-email,
.dash-training-name {
    color: var(--text-main);
}

.dash-user-dealer,
.dash-dates {
    color: var(--text-muted);
}

a:not(.btn) {
    color: var(--accent);
}

    a:not(.btn):hover {
        color: var(--text-main);
    }

mark {
    background: var(--accent);
    color: var(--accent-contrast);
}

/* =========================================================
   04. DASH SECTION / CARD SYSTEM
========================================================= */
.dash-section {
    margin-bottom: 22px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
}

.section-header {
    margin-bottom: 14px;
    padding: 10px 12px;
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.empty-state {
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    padding: 18px;
}

/* =========================================================
   05. FORM SYSTEM
========================================================= */
.form-label {
    color: var(--text-main);
}

.form-control,
.form-select,
textarea {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
}

    .form-control:focus,
    .form-select:focus,
    textarea:focus {
        background-color: var(--bg-card);
        color: var(--text-main);
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-soft);
    }

    .form-control:disabled,
    .form-select:disabled {
        background-color: var(--bg-soft);
        color: var(--text-muted);
    }

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border);
}

/* =========================================================
   06. BUTTONS / BADGES / ALERTS
========================================================= */
.btn-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--accent-contrast) !important;
}

body:not(.dark-mode) .btn-primary:hover,
body:not(.dark-mode) .btn-primary:focus {
    filter: brightness(1.05);
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:focus {
    filter: brightness(.9);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-light:hover,
.btn-light:hover,
.btn-secondary:hover {
    background-color: var(--bg-soft-alt) !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

.badge {
    font-weight: 600;
}

    .badge.bg-success,
    .badge.bg-primary,
    .badge.bg-danger,
    .badge.bg-info,
    .badge.bg-secondary,
    .badge-complete,
    .badge-next,
    .badge-assigned,
    .badge.bg-assigned {
        color: #ffffff !important;
    
    }

    .badge.bg-secondary,
    .badge.bg-success {
        color: #ffffff !important;
    }

    .badge.bg-light,
    .badge-incomplete {
        color: var(--text-main) !important;
    }

    .badge-assigned,
    .badge.bg-assigned {
        background: var(--accent) !important;
    }

.alert {
    background: var(--bg-soft) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
}

.alert-success {
    background: rgba(34,197,94,.12) !important;
    border-color: rgba(34,197,94,.3) !important;
    color: var(--success) !important;
}

.alert-info {
    background: var(--accent-soft) !important;
    border-color: var(--accent-border) !important;
    color: var(--accent) !important;
}

/* =========================================================
   07. TABLE SYSTEM
========================================================= */
.dash-table {
    width: 100%;
    margin-bottom: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

    .dash-table thead th {
        background: var(--bg-soft);
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--text-muted);
        border-bottom: 1px solid var(--border);
        padding: 11px 12px;
    }

    .dash-table tbody td {
        font-size: 13px;
        padding: 14px 12px;
        border-top: 1px solid var(--border-soft);
        color: var(--text-main);
    }

.table {
    background: transparent;
}

    .table td,
    .table th {
        background: transparent;
    }

.table-striped > tbody > tr:nth-of-type(odd) {
    background: var(--bg-card);
}

.table-hover tbody tr:hover {
    background: var(--bg-soft);
}

.dash-section .table,
.dash-table {
    --bs-table-color: var(--text-main);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-soft);
    --bs-table-striped-color: var(--text-main);
    --bs-table-striped-bg: var(--bg-soft);
    --bs-table-hover-color: var(--text-main);
    --bs-table-hover-bg: var(--bg-soft);
    color: var(--text-main) !important;
}

    .dash-section .table th,
    .dash-section .table td,
    .dash-section .table thead th,
    .dash-table th,
    .dash-table td,
    .dash-table thead th {
        color: var(--text-main) !important;
        border-color: var(--border-soft) !important;
    }

    .dash-section .table thead th,
    .dash-table thead th {
        background: var(--bg-soft) !important;
        color: var(--text-main) !important;
    }

    .dash-section .table button:not(.btn),
    .dash-section .table span:not(.badge),
    .dash-section .table i,
    .dash-table button:not(.btn),
    .dash-table span:not(.badge),
    .dash-table i {
        color: var(--text-main) !important;
    }

.course-toggle {
    color: var(--text-muted) !important;
}

/* =========================================================
   08. DASH LIST SYSTEM
========================================================= */
.dash-list {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.dash-list-row {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    background: var(--bg-card);
}

    .dash-list-row:last-child {
        border-bottom: none;
    }

    .dash-list-row:hover,
    .dash-list-row:focus,
    .dash-list-row:active {
        text-decoration: none;
        color: var(--text-main);
        background: var(--bg-soft);
    }

    .dash-list-row.is-selected {
        background: var(--accent-soft) !important;
        border-left: 4px solid var(--accent);
    }

.dash-list-title {
    font-weight: 600;
    line-height: 1.2;
    min-height: 1.2em;
    color: var(--text-main);
}

.dash-list-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

/* =========================================================
   09. SUMMARY SYSTEM
========================================================= */
.dash-summary-card {
    min-width: 280px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
}

.dash-summary-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.dash-summary-table {
    width: 100%;
    font-size: 13px;
}

    .dash-summary-table th {
        text-align: center;
        color: var(--text-muted);
        font-weight: 600;
        padding: 4px;
    }

    .dash-summary-table td {
        text-align: center;
        padding: 6px;
        color: var(--text-main);
    }

.dash-summary-rowtitle {
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
}

body.dark-mode .dash-summary-rowtitle {
    color: var(--text-main) !important;
}
/* =========================================================
   10. COURSE / LEARNING GROUP SYSTEM
========================================================= */
.learning-group {
    margin-bottom: 36px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-card);
}

.learning-group-header {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.learning-group-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.course-group {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 16px;
    background: var(--bg-card);
}

.course-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

.course-group-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-group-right {
    min-width: 200px;
}

.course-toggle {
    border: none;
    background: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
}

.course-title {
    font-weight: 600;
    color: var(--text-main);
}

    .course-title:hover {
        color: var(--accent);
    }

.course-training-wrap {
    display: none;
    padding: 12px 16px 14px 16px;
    background: var(--bg-card);
    color: var(--text-main);
}

    .course-training-wrap.open {
        display: block;
    }

.course-training-detail {
    margin: -6px 0 18px 40px;
    padding: 14px;
    border-left: 3px solid var(--border);
    background: var(--bg-soft);
    border-radius: 0 10px 10px 0;
    color: var(--text-main);
}

.course-overdue {
    border-left: 4px solid var(--danger);
}

.training-row-active,
.quiz-history-row-active {
    background: var(--bg-soft);
}

.dash-row-overdue {
    border-left: 4px solid var(--danger);
}

.dash-row-duesoon {
    border-left: 4px solid var(--warning);
}

.quiz-history-wrap {
    padding: 10px;
    background: var(--bg-soft);
    color: var(--text-main);
}

    .quiz-history-wrap table,
    .quiz-history-wrap td,
    .quiz-history-wrap th {
        background: var(--bg-card) !important;
        color: var(--text-main) !important;
    }

/* =========================================================
   11. COURSE CARD GRID
========================================================= */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 300px));
    gap: 24px;
    justify-content: start;
}

.course-training-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .course-training-card:hover {
        transform: translateY(-4px);
        border-color: var(--border);
        box-shadow: 0 14px 30px var(--shadow-soft);
    }

    .course-training-card.course-next {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-soft);
    }

.course-hero {
    position: relative;
    height: 160px;
    background: var(--bg-soft);
    overflow: hidden;
}

.course-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.course-training-card:hover .course-hero-img {
    transform: scale(1.04);
}

.course-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    opacity: 0;
    transition: opacity .18s ease;
}

.course-training-card:hover .course-overlay {
    opacity: 1;
}

.course-overlay-content {
    transform: translateY(8px);
    transition: transform .18s ease;
}

.course-training-card:hover .course-overlay-content {
    transform: translateY(0);
}

.course-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px;
}

.course-card-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.course-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.badge-complete,
.badge-incomplete {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.badge-complete {
    background: var(--success);
    color: #ffffff;
}

.badge-incomplete {
    background: var(--bg-soft);
    color: var(--text-muted);
}

.badge-next {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--accent);
    color: var(--accent-contrast);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.course-link,
.course-link:hover,
.course-link:focus,
.course-link * {
    text-decoration: none !important;
}

/* =========================================================
   12. QUIZ SYSTEM
========================================================= */
.quiz-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.quiz-header-left {
    flex: 1;
    min-width: 0;
}

.quiz-header-right {
    flex-shrink: 0;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.quiz-meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.quiz-question-title {
    margin-bottom: 22px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

.quiz-question-image {
    margin: 18px 0 22px 0;
}

.quiz-question-img {
    max-width: 100%;
    max-height: 320px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 6px 18px var(--shadow-soft);
}

.quiz-answer-list {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 14px !important;
}

    .quiz-answer-list td {
        padding: 6px 0 !important;
    }

    .quiz-answer-list input[type="radio"] {
        transform: scale(1.35);
        margin-right: 4px !important;
        accent-color: var(--accent);
        vertical-align: middle;
    }

    .quiz-answer-list label {
        display: inline-block;
        margin-left: 10px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.8 !important;
        vertical-align: middle;
        color: var(--text-main) !important;
    }

.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.quiz-list-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quiz-list-question {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .quiz-list-question:hover {
        transform: translateY(-2px);
        border-color: var(--border);
        box-shadow: 0 8px 22px var(--shadow-soft);
    }

.quiz-result-box {
    padding: 28px;
    background: rgba(34,197,94,.12);
    border: 1px solid rgba(34,197,94,.3);
    border-radius: 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
}

.quiz-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.quiz-result-pass {
    background: #dcfce7;
    color: #166534;
}

.quiz-result-fail {
    background: #fee2e2;
    color: #991b1b;
}

.quiz-result-incomplete {
    background: #e5e7eb;
    color: #475569;
}

/* =========================================================
   13. QUIZ HISTORY MODAL
========================================================= */
.quizhist-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
}

.quizhist-modal-inner {
    background: var(--bg-card);
    width: 800px;
    max-width: 90%;
    margin: 60px auto;
    padding: 20px;
    border-radius: 10px;
    max-height: 80vh;
    overflow: auto;
}

.quizhist-modal-actions {
    margin-top: 16px;
    text-align: right;
}

/* =========================================================
   14. STEP / TRAINING VIEW SYSTEM
========================================================= */
.training-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.training-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 14px 0;
}

.training-description {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-top: 10px;
}

.training-view-toggle {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.training-hero-wrapper {
    width: 100%;
    margin-top: 16px;
}

.training-hero-image {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.training-preview-banner {
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    border-radius: 10px;
    color: var(--accent);
}

.training-preview-banner-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
}

.training-preview-banner-text {
    font-size: 13px;
    line-height: 1.4;
}

.step-card {
    margin-bottom: 24px;
}

.step-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.step-kicker {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.step-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.step-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 24px;
    align-items: start;
}

    .step-layout.no-image-layout {
        grid-template-columns: 1fr;
    }

.step-hero-wrap {
    aspect-ratio: 1 / 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-card);
}

.step-no-image {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.step-content-box {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 20px;
    color: var(--text-main);
    line-height: 1.75;
    font-size: 15px;
}

    .step-content-box,
    .step-content-box * {
        color: var(--text-main) !important;
    }

        .step-content-box span[style*="background"],
        .step-content-box span[style*="background"] *,
        .step-content-box mark,
        .step-content-box mark * {
            color: #000 !important;
        }

.step-section {
    margin-top: 18px;
}

.step-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 22px;
    flex-wrap: wrap;
}

.step-progress {
    font-weight: 700;
    color: var(--text-main);
}

/* =========================================================
   15. BUILDER ASSETS / DOCUMENTS
========================================================= */
.doc-link {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
}

    .doc-link:hover {
        border-color: var(--accent);
        box-shadow: 0 6px 14px var(--shadow-soft);
        color: var(--accent);
    }

.doc-delete {
    color: var(--danger);
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

    .doc-delete:hover {
        color: var(--danger);
        text-decoration: underline;
    }

.builder-scroll-list {
    max-height: 500px;
    overflow-y: auto;
}

.builder-doc-list {
    max-height: 140px;
    overflow-y: auto;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.thumb-btn {
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    overflow: hidden;
    transition: all .15s ease;
}

    .thumb-btn.active-thumb {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--accent-soft);
    }

    .thumb-btn img {
        width: 100%;
        object-fit: cover;
    }

.thumb-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}
.doc-link {
    width: 170px;
    overflow: hidden;
}
.thumb-name {
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    color: var(--text-main);
}

.hero-preview {
    max-height: 220px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* =========================================================
   16. ARTICLE RENDERING SYSTEM
========================================================= */
.article-render {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 80px 24px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.8;
}

.article-header {
    margin-bottom: 50px;
}

.article-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    margin-bottom: 20px;
}

.article-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.article-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.article-hero {
    margin-top: 40px;
    margin-bottom: 60px;
}

    .article-hero img {
        width: 100%;
        border-radius: 10px;
        display: block;
    }

.article-block {
    margin-bottom: 70px;
}

    .article-block:last-child {
        margin-bottom: 0;
    }

.article-block-text h2,
.article-two-column h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 24px;
}

.article-block-text p {
    margin-bottom: 24px;
}

.article-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

    .article-two-column h2 {
        grid-column: 1 / -1;
        margin-bottom: 10px;
    }

.article-image-block {
    text-align: center;
}

    .article-image-block img,
    .article-image-text img {
        max-width: 100%;
        border-radius: 10px;
        display: block;
    }

.article-image-caption {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.article-image-text {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 50px;
    align-items: center;
    font-size: 14px;
}

.article-image-text-right {
    grid-template-columns: 1fr 400px;
}

.article-quote {
    padding-left: 30px;
}

.article-quote-text {
    font-size: 14px;
    line-height: 1.7;
    font-style: italic;
    font-weight: 500;
    color: var(--text-main);
}

.article-quote-source {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.article-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 80px 0;
}

/* Article style variants */
.article-style-accent {
    background: var(--bg-soft);
    padding: 40px;
    border-radius: 10px;
}

.article-style-dark {
    background: var(--article-dark-bg);
    color: var(--article-dark-text);
    padding: 40px;
    border-radius: 10px;
}

    .article-style-dark h2,
    .article-style-dark .article-quote-text {
        color: var(--article-dark-text);
    }

    .article-style-dark .article-image-caption,
    .article-style-dark .article-meta,
    .article-style-dark .article-quote-source {
        color: var(--article-dark-muted);
    }

.article-style-highlight {
    border-left: 8px solid var(--accent);
    padding-left: 40px;
}

/* Callouts */
.article-callout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px;
    border-radius: 10px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.article-callout-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    margin-top: 2px;
}

.article-callout-body {
    flex: 1;
}

.article-callout-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

.article-callout-content {
    font-size: 15px;
    line-height: 1.7;
}

    .article-callout-content p:last-child {
        margin-bottom: 0;
    }

.article-callout.article-style-info {
    background: var(--callout-info-bg);
    border-color: var(--callout-info-border);
}

    .article-callout.article-style-info .article-callout-icon {
        color: var(--callout-info-icon);
    }

.article-callout.article-style-warning {
    background: var(--callout-warning-bg);
    border-color: var(--callout-warning-border);
}

    .article-callout.article-style-warning .article-callout-icon {
        color: var(--callout-warning-icon);
    }

.article-callout.article-style-success {
    background: var(--callout-success-bg);
    border-color: var(--callout-success-border);
}

    .article-callout.article-style-success .article-callout-icon {
        color: var(--callout-success-icon);
    }

.article-callout.article-style-danger {
    background: var(--callout-danger-bg);
    border-color: var(--callout-danger-border);
}

    .article-callout.article-style-danger .article-callout-icon {
        color: var(--callout-danger-icon);
    }

.article-callout.article-style-neutral {
    background: var(--bg-soft);
    border-color: var(--border);
}

    .article-callout.article-style-neutral .article-callout-icon {
        color: var(--text-muted);
    }

/* Checklist */
.article-checklist {
    padding: 24px;
    border-radius: 10px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

.article-checklist-title {
    margin: 0 0 18px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.article-checklist-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .article-checklist-list li {
        display: flex;
        align-items: flex-start;
        gap: 18px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }

        .article-checklist-list li:last-child {
            border-bottom: none;
        }

        .article-checklist-list li i {
            color: var(--success);
            font-size: 18px;
            margin-top: 2px;
            flex-shrink: 0;
        }

        .article-checklist-list li span {
            flex: 1;
            line-height: 1.7;
        }

/* Video */
.article-video {
    margin: 32px 0;
}

.article-video-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.article-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

    .article-video-wrapper iframe,
    .article-video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

.article-video-caption {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.article-video.article-style-accent {
    padding: 24px;
    background: var(--bg-soft);
    border-radius: 10px;
}

.article-video.article-style-dark {
    padding: 24px;
    background: var(--article-dark-bg);
    border-radius: 10px;
}

.article-video.article-style-highlight {
    padding: 24px;
    background: var(--highlight-bg);
    border-radius: 10px;
    border: 1px solid var(--highlight-border);
}

/* Resources */
.article-resource {
    margin: 32px 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
}

.article-resource-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

    .article-resource-header i {
        font-size: 24px;
        color: var(--accent);
        flex-shrink: 0;
        margin-top: 2px;
    }

.article-resource-content {
    flex: 1;
}

.article-resource-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.article-resource-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

.article-resource-action {
    margin-top: 20px;
}

.article-resource-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--accent-contrast);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background .2s ease;
}

    .article-resource-button:hover,
    .article-resource-button:visited {
        color: var(--accent-contrast);
        text-decoration: none;
    }

.article-resource.article-style-dark {
    background: var(--article-dark-bg);
    border-color: var(--article-dark-border);
}

    .article-resource.article-style-dark .article-resource-title {
        color: var(--article-dark-text);
    }

    .article-resource.article-style-dark .article-resource-description {
        color: var(--article-dark-muted);
    }

.article-resource.article-style-accent {
    background: var(--bg-soft);
}

.article-resource.article-style-highlight {
    background: var(--highlight-bg);
    border-color: var(--highlight-border);
}

/* =========================================================
   17. RICH TEXT EDITOR / RTE CONTENT
========================================================= */
.dre-wrapper .dre-editor {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.dre-wrapper .dre-toolbar {
    background: var(--bg-soft) !important;
    border-color: var(--border) !important;
}

    .dre-wrapper .dre-toolbar button {
        background: var(--bg-card) !important;
        border-color: var(--border) !important;
        color: var(--text-main) !important;
    }

        .dre-wrapper .dre-toolbar button:hover {
            background: var(--bg-soft-alt) !important;
        }

.dre-wrapper .dre-counter {
    background: var(--bg-soft) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.dre-toolbar button img {
    filter: none;
}

body.dark-mode .dre-toolbar button img {
    filter: var(--dre-icon-filter);
}

.rte-content {
    max-width: 100%;
    overflow-wrap: break-word;
}

    .rte-content img {
        max-width: 100%;
        height: auto;
    }

    .rte-content table {
        width: 100%;
        max-width: 100%;
    }

    .rte-content * {
        position: static !important;
        max-width: 100% !important;
    }

/* =========================================================
   18. MEDIA MODALS / GALLERY
========================================================= */
.video-modal-body,
.video-frame-wrap {
    background: #000;
}

.video-modal-body {
    padding: 0;
}

.video-frame-wrap {
    position: relative;
    padding-bottom: 56.25%;
}

    .video-frame-wrap iframe {
        position: absolute;
        width: 100%;
        height: 100%;
    }

.image-modal-content,
#trainingImageModal .modal-header {
    background: #000;
}

#trainingImageModal .modal-title {
    color: #fff;
}

#trainingImageModal .btn-close,
.image-modal-close {
    filter: invert(1);
}

.image-modal-close {
    z-index: 20;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    color: #fff;
    background: rgba(0,0,0,.4);
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 10px;
}

    .gallery-nav:hover {
        background: rgba(0,0,0,.7);
    }

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.clickable-image {
    cursor: pointer;
}

.progress-sm {
    height: 8px;
}

.hidden-panel {
    display: none;
}

#trainingImageModal .modal-dialog {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    margin: 0;
}

#trainingImageModal .modal-content {
    width: 100%;
    height: 100vh;
    border: 0;
    border-radius: 0;
    background: rgba(0,0,0,.96);
}

#trainingImageModal .modal-body {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-modal-img {
    max-width: 94vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-nav {
    z-index: 9999;
}


/* =========================================================
   19. RESPONSIVE
========================================================= */
@media (max-width: 1199px) {
    .asset-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .step-layout {
        grid-template-columns: 1fr;
    }

    .training-header-top {
        flex-direction: column;
    }

    .step-title {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .article-title {
        font-size: 38px;
    }

    .article-subtitle {
        font-size: 22px;
    }

    .article-two-column,
    .article-image-text,
    .article-image-text-right {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-training-card {
        width: 100%;
    }

    .asset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .quiz-header-layout {
        flex-direction: column;
    }

    .quiz-header-right {
        width: 100%;
    }

    .quiz-question-title {
        font-size: 20px;
    }

    .quiz-answer-list label {
        width: calc(100% - 40px);
    }

    .quiz-nav {
        flex-direction: column;
        align-items: stretch;
    }

        .quiz-nav .btn {
            width: 100%;
        }
}

@media (max-width: 600px) {
    .article-render {
        padding: 24px 18px 60px 18px;
        font-size: 17px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-block-text h2,
    .article-two-column h2 {
        font-size: 28px;
    }
}
.user-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px 16px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Tablet */
@media (max-width: 992px) {
    .user-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 576px) {
    .user-grid {
        grid-template-columns: 1fr;
    }
}
..gv-row-editing {
    background-color: #e7f1ff !important;
}

.gv-row-editing td {
    background-color: #e7f1ff !important;
}

.session-header {
    cursor: pointer;
    padding-top: 14px;
    padding-bottom: 14px;
    transition: background-color .15s ease;
}

    .session-header:hover {
        background-color: var(--bg-soft);
    }

.session-chevron {
    width: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
    color: var(--text-muted);
    font-size: 14px;
}

.session-header.open .session-chevron {
    transform: rotate(90deg);
}

.session-users {
    padding-left: 34px;
    padding-top: 8px;
    padding-bottom: 12px;
}

    .session-users .dash-list-row {
        border-left: 2px solid var(--border);
        margin-left: 4px;
    }
.session-overview-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    padding: 14px 18px;
}

.session-overview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.session-overview-label {
    color: var(--text-muted);
    font-weight: 600;
}

.session-overview-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.user-setting-switch input[type=checkbox] {
    width: 2.8em;
    height: 1.45em;
    margin-top: .15em;
    cursor: pointer;
}
.collapsed-learning-group .dash-section {
    display: none;
}

.collapsed-learning-group .section-header:first-child {
    display: block !important;
    cursor: pointer;
}
.dash-image-link img {
    transition: all .22s ease;
    border: 1px solid var(--border);
}

.dash-image-link:hover img {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,.14);
    border-color: var(--accent);
}
.top-status-bar {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-soft);
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 0 !important;
}
.content-area {
    margin-top: -10px;
}
.correct-answer-list label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-right: 28px;
}

.correct-answer-list input[type=radio] {
    transform: scale(1.15);
    margin-right: 6px;
}
.fw-semibold {
    color: inherit;
}
.lms-error-panel {
    background: #fff4f4;
    border: 1px solid #dc3545;
    border-left: 6px solid #dc3545;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 16px 0;
    color: #842029;
    box-shadow: 0 4px 12px rgba(220,53,69,.12);
}

.lms-error-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}

.lms-error-list {
    margin: 0;
    padding-left: 20px;
}

    .lms-error-list li {
        margin-bottom: 4px;
    }