/**
 * TJ LearnDash Dashboard - Unified Sidebar Design
 */

/* ============================================
   VARIABLES
   ============================================ */
.tj-ld-dashboard {
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --accent: #4f86c6;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    
    --text-dark: #1f2937;
    --text: #374151;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
}

.tj-ld-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

.tj-ld-dashboard * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.tj-ld-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
    gap: 32px;
}

.tj-ld-main {
    flex: 1;
    min-width: 0;
}

.tj-ld-sidebar {
    width: 260px;
    flex-shrink: 0;
}

/* ============================================
   HEADER CARD
   ============================================ */
.tj-ld-header-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.tj-ld-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-light);
}

.tj-ld-user-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.tj-ld-user-meta {
    font-size: 13px;
    color: var(--text-light);
}

.tj-ld-header-stats {
    margin-left: auto;
    display: flex;
    gap: 28px;
}

.tj-ld-header-stat {
    text-align: center;
}

.tj-ld-header-stat__value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.tj-ld-header-stat__label {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   SIDEBAR NAV
   ============================================ */
.tj-ld-nav {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky;
    top: 32px;
}

.tj-ld-nav__group {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.tj-ld-nav__group:last-child {
    border-bottom: none;
}

.tj-ld-nav__title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 20px 8px;
}

.tj-ld-nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    cursor: pointer;
}

.tj-ld-nav__item:hover {
    background: var(--bg);
    color: var(--primary);
}

.tj-ld-nav__item.active {
    background: var(--bg);
    color: var(--primary);
    border-left-color: var(--primary);
}

.tj-ld-nav__item svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    flex-shrink: 0;
}

.tj-ld-nav__item.active svg {
    opacity: 1;
}

.tj-ld-nav__badge {
    margin-left: auto;
    background: var(--warning);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.tj-ld-nav__badge--info {
    background: var(--accent);
}

/* ============================================
   SECTIONS
   ============================================ */
.tj-ld-section {
    display: none;
}

.tj-ld-section.active {
    display: block;
}

.tj-ld-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tj-ld-section__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ============================================
   COURSE CARDS
   ============================================ */
.tj-ld-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.tj-ld-course-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tj-ld-course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.tj-ld-course-card__image {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.tj-ld-course-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-ld-course-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    border-radius: 6px;
    text-transform: uppercase;
}

.tj-ld-course-card__badge--success { background: var(--success); }
.tj-ld-course-card__badge--progress { background: var(--accent); }
.tj-ld-course-card__badge--default { background: rgba(0,0,0,0.5); }

.tj-ld-course-card__content {
    padding: 16px;
}

.tj-ld-course-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tj-ld-course-card__title a {
    color: inherit;
    text-decoration: none;
}

.tj-ld-course-card__title a:hover {
    color: var(--accent);
}

.tj-ld-progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tj-ld-progress-bar__fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.tj-ld-progress-bar__fill--success { background: var(--success); }

.tj-ld-course-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   RESUME LIST
   ============================================ */
.tj-ld-resume-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tj-ld-resume-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.tj-ld-resume-item__thumb {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border-light);
    flex-shrink: 0;
}

.tj-ld-resume-item__content {
    flex: 1;
    min-width: 0;
}

.tj-ld-resume-item__course {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--accent);
    margin-bottom: 4px;
}

.tj-ld-resume-item__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.tj-ld-resume-item__progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tj-ld-resume-item__progress .tj-ld-progress-bar {
    flex: 1;
    margin-bottom: 0;
}

.tj-ld-resume-item__percent {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    min-width: 40px;
}

.tj-ld-resume-item__action {
    flex-shrink: 0;
}

/* ============================================
   DATA TABLE / LIST
   ============================================ */
.tj-ld-data-table {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tj-ld-data-table__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tj-ld-data-table__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.tj-ld-data-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

.tj-ld-data-row:last-child {
    border-bottom: none;
}

.tj-ld-data-row:hover {
    background: var(--bg);
}

.tj-ld-data-row__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tj-ld-data-row__info {
    flex: 1;
    min-width: 0;
}

.tj-ld-data-row__title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.tj-ld-data-row__subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.tj-ld-data-row__meta {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

.tj-ld-data-row__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Status badges */
.tj-ld-status {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    flex-shrink: 0;
}

.tj-ld-status--pending { background: var(--warning-light); color: #b45309; }
.tj-ld-status--pass { background: var(--success-light); color: #15803d; }
.tj-ld-status--fail { background: var(--danger-light); color: #dc2626; }
.tj-ld-status--not-submitted { background: var(--border-light); color: var(--text-muted); }

/* ============================================
   ACCOUNT FORM
   ============================================ */
.tj-ld-form-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.tj-ld-form-group {
    margin-bottom: 20px;
}

.tj-ld-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tj-ld-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.tj-ld-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s;
    font-family: inherit;
}

.tj-ld-input:focus {
    outline: none;
    border-color: var(--primary);
}

.tj-ld-input:disabled {
    background: var(--bg);
    color: var(--text-muted);
}

.tj-ld-form-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   BUTTONS
   ============================================ */
.tj-ld-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
}

.tj-ld-btn--primary {
    background: var(--primary);
    color: white;
}

.tj-ld-btn--primary:hover {
    background: var(--primary-light);
    color: white;
}

.tj-ld-btn--success {
    background: var(--success);
    color: white;
}

.tj-ld-btn--outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--border);
}

.tj-ld-btn--outline:hover {
    border-color: var(--primary);
    background: var(--bg);
}

.tj-ld-btn--sm {
    padding: 6px 12px;
    font-size: 12px;
}

.tj-ld-btn--ghost {
    background: var(--border-light);
    color: var(--text);
}

.tj-ld-btn--ghost:hover {
    background: var(--border);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.tj-ld-empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tj-ld-empty__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.tj-ld-empty__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.tj-ld-empty__text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   QUICK STATS (Admin)
   ============================================ */
.tj-ld-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tj-ld-quick-stat {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.tj-ld-quick-stat__value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.tj-ld-quick-stat__label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .tj-ld-layout {
        flex-direction: column;
    }
    
    .tj-ld-sidebar {
        width: 100%;
        order: -1;
    }
    
    .tj-ld-nav {
        position: static;
    }
    
    .tj-ld-nav__group {
        display: flex;
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }
    
    .tj-ld-nav__title {
        width: 100%;
        padding: 0 8px 4px;
    }
    
    .tj-ld-nav__item {
        padding: 8px 14px;
        border-radius: 8px;
        border-left: none;
        background: var(--bg);
    }
    
    .tj-ld-nav__item.active {
        background: var(--primary);
        color: white;
        border-left: none;
    }
    
    .tj-ld-nav__item.active svg {
        opacity: 1;
    }
    
    .tj-ld-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tj-ld-layout {
        padding: 16px;
        gap: 20px;
    }
    
    .tj-ld-header-card {
        flex-wrap: wrap;
        padding: 20px;
    }
    
    .tj-ld-header-stats {
        width: 100%;
        margin: 16px 0 0 0;
        padding-top: 16px;
        border-top: 1px solid var(--border-light);
        justify-content: space-around;
    }
    
    .tj-ld-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .tj-ld-form-row {
        grid-template-columns: 1fr;
    }
    
    .tj-ld-resume-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tj-ld-resume-item__thumb {
        width: 100%;
        height: 120px;
    }
    
    .tj-ld-quick-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   QUIZ STATS
   ============================================ */
.tj-ld-quiz-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tj-ld-quiz-stat {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    min-width: 100px;
    flex: 1;
}

.tj-ld-quiz-stat__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.tj-ld-quiz-stat__label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.tj-ld-quiz-stat--success { border-color: var(--success); }
.tj-ld-quiz-stat--success .tj-ld-quiz-stat__value { color: var(--success); }

.tj-ld-quiz-stat--danger { border-color: var(--danger); }
.tj-ld-quiz-stat--danger .tj-ld-quiz-stat__value { color: var(--danger); }

.tj-ld-quiz-stat--warning { border-color: var(--warning); }
.tj-ld-quiz-stat--warning .tj-ld-quiz-stat__value { color: var(--warning); }

.tj-ld-quiz-stat--info { border-color: var(--accent); }
.tj-ld-quiz-stat--info .tj-ld-quiz-stat__value { color: var(--accent); }

/* ============================================
   COURSE VIEW - TIMELINE PAGE
   ============================================ */
.tj-ld-dashboard--course-view {
    padding: 0;
    background: var(--bg);
}

.tj-ld-course-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

.tj-ld-course-back {
    margin-bottom: 24px;
}

.tj-ld-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.tj-ld-back-link:hover {
    color: var(--primary);
}

/* Course Header */
.tj-ld-course-header {
    display: flex;
    gap: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    align-items: flex-start;
}

.tj-ld-course-header__image {
    width: 120px;
    height: 90px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.tj-ld-course-header__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-ld-course-header__info {
    flex: 1;
}

.tj-ld-course-header__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.tj-ld-course-header__desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.tj-ld-course-dates {
    display: flex;
    gap: 24px;
}

.tj-ld-course-date__label {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
}

.tj-ld-course-date__value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

/* Progress Circle */
.tj-ld-course-header__progress {
    flex-shrink: 0;
}

.tj-ld-progress-circle {
    width: 120px;
    height: 120px;
    position: relative;
}

.tj-ld-progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tj-ld-progress-circle__bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 8;
}

.tj-ld-progress-circle__fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.tj-ld-progress-circle__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.tj-ld-progress-circle__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.tj-ld-progress-circle__label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Timeline */
.tj-ld-course-timeline {
    position: relative;
    padding-left: 40px;
}

.tj-ld-course-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

/* Timeline Module */
.tj-ld-timeline-module {
    position: relative;
    margin-bottom: 24px;
}

.tj-ld-timeline-module__header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.tj-ld-timeline-module__marker {
    position: absolute;
    left: -40px;
    width: 32px;
    height: 32px;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    z-index: 1;
}

.tj-ld-timeline-module--complete .tj-ld-timeline-module__marker {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.tj-ld-timeline-module__info {
    flex: 1;
}

.tj-ld-timeline-module__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.tj-ld-timeline-module__meta {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}

/* Timeline Content (Topics) */
.tj-ld-timeline-module__content {
    margin-top: 8px;
    margin-left: -24px;
    padding-left: 24px;
    border-left: 2px solid var(--border-light);
}

.tj-ld-timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-white);
    border-radius: var(--radius);
    margin-bottom: 4px;
    border: 1px solid var(--border-light);
}

.tj-ld-timeline-item__icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tj-ld-timeline-item__icon svg {
    width: 100%;
    height: 100%;
}

.tj-ld-timeline-item--complete .tj-ld-timeline-item__icon {
    color: var(--success);
}

.tj-ld-timeline-item__title {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}

.tj-ld-timeline-item__badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--accent);
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    margin-left: 8px;
}

.tj-ld-timeline-item__action {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.tj-ld-timeline-item__action:hover {
    text-decoration: underline;
}

/* Certificate Section */
.tj-ld-timeline-certificate {
    position: relative;
    margin-top: 32px;
}

.tj-ld-timeline-module__marker--cert {
    background: var(--warning-light);
    border-color: var(--warning);
    color: var(--warning);
}

.tj-ld-certificate-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-white);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.tj-ld-certificate-card--available {
    border-style: solid;
    border-color: var(--success);
    background: var(--success-light);
}

.tj-ld-certificate-card__icon {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.tj-ld-certificate-card--available .tj-ld-certificate-card__icon {
    color: var(--success);
}

.tj-ld-certificate-card__info {
    flex: 1;
}

.tj-ld-certificate-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.tj-ld-certificate-card__course {
    font-size: 13px;
    color: var(--text-light);
    margin: 2px 0 0;
}

.tj-ld-certificate-card__status {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   FOCUS MODE
   ============================================ */
.tj-ld-dashboard--focus-mode {
    padding: 0;
    background: var(--bg-white);
}

.tj-ld-focus-mode {
    display: flex;
    min-height: 100vh;
}

/* Focus Sidebar */
.tj-ld-focus-sidebar {
    width: 320px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}

.tj-ld-focus-sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-white);
}

.tj-ld-focus-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.2s;
}

.tj-ld-focus-back:hover {
    background: var(--primary);
    color: white;
}

.tj-ld-focus-sidebar__course {
    flex: 1;
    min-width: 0;
}

.tj-ld-focus-sidebar__title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tj-ld-focus-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.tj-ld-focus-progress__bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.tj-ld-focus-progress__fill {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    transition: width 0.3s;
}

.tj-ld-focus-progress__text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
}

/* Focus Navigation */
.tj-ld-focus-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.tj-ld-focus-nav__lesson {
    margin-bottom: 4px;
}

.tj-ld-focus-nav__lesson-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
}

.tj-ld-focus-nav__lesson-link:hover {
    background: var(--bg-white);
}

.tj-ld-focus-nav__lesson-link.active {
    background: var(--primary);
    color: white;
}

.tj-ld-focus-nav__lesson-link.completed .tj-ld-focus-nav__status {
    color: var(--success);
}

.tj-ld-focus-nav__status {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tj-ld-focus-nav__dot {
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.tj-ld-focus-nav__dot--small {
    width: 6px;
    height: 6px;
}

.tj-ld-focus-nav__text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tj-ld-focus-nav__arrow {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.tj-ld-focus-nav__lesson.expanded .tj-ld-focus-nav__arrow {
    transform: rotate(180deg);
}

/* Topics */
.tj-ld-focus-nav__topics {
    display: none;
    padding-left: 28px;
    background: var(--bg-white);
}

.tj-ld-focus-nav__lesson.expanded .tj-ld-focus-nav__topics {
    display: block;
}

.tj-ld-focus-nav__topic {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.tj-ld-focus-nav__topic:hover {
    color: var(--text);
    background: var(--bg);
}

.tj-ld-focus-nav__topic.active {
    color: var(--primary);
    background: rgba(79, 134, 198, 0.1);
    font-weight: 500;
}

.tj-ld-focus-nav__topic.completed .tj-ld-focus-nav__status {
    color: var(--success);
}

/* Focus Content */
.tj-ld-focus-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tj-ld-focus-content__header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-light);
}

.tj-ld-focus-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}

.tj-ld-focus-breadcrumb span:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

/* Focus Article */
.tj-ld-focus-article {
    flex: 1;
    padding: 40px 48px;
    max-width: 800px;
    overflow-y: auto;
}

.tj-ld-focus-article__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 32px;
    line-height: 1.3;
}

.tj-ld-focus-article__content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}

.tj-ld-focus-article__content h2,
.tj-ld-focus-article__content h3,
.tj-ld-focus-article__content h4 {
    color: var(--text-dark);
    margin: 32px 0 16px;
}

.tj-ld-focus-article__content p {
    margin-bottom: 16px;
}

.tj-ld-focus-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 24px 0;
}

.tj-ld-focus-article__content ul,
.tj-ld-focus-article__content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.tj-ld-focus-article__content li {
    margin-bottom: 8px;
}

/* Focus Footer */
.tj-ld-focus-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

.tj-ld-focus-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.tj-ld-focus-btn-prev,
.tj-ld-focus-btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tj-ld-focus-btn-complete {
    min-width: 160px;
    justify-content: center;
}

/* Focus Mode Responsive */
@media (max-width: 1024px) {
    .tj-ld-focus-sidebar {
        width: 280px;
    }
    
    .tj-ld-focus-article {
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .tj-ld-focus-mode {
        flex-direction: column;
    }
    
    .tj-ld-focus-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        max-height: 50vh;
    }
    
    .tj-ld-focus-article {
        padding: 24px 16px;
    }
    
    .tj-ld-focus-article__title {
        font-size: 24px;
    }
    
    .tj-ld-focus-nav-buttons {
        flex-wrap: wrap;
    }
    
    .tj-ld-focus-btn-complete {
        order: -1;
        width: 100%;
        margin-bottom: 12px;
    }
}

/* Course View Responsive */
@media (max-width: 768px) {
    .tj-ld-course-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tj-ld-course-header__progress {
        margin: 0 auto;
    }
    
    .tj-ld-course-dates {
        justify-content: center;
    }
    
    .tj-ld-timeline-module__header {
        flex-wrap: wrap;
    }
}

/* Button success variant */
.tj-ld-btn--success {
    background: var(--success);
    color: white;
}

.tj-ld-btn--success:hover {
    background: #16a34a;
}

/* Course card link wrapper */
.tj-ld-course-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.tj-ld-course-card__link:hover {
    color: inherit;
}

.tj-ld-course-card__link:hover .tj-ld-course-card__title {
    color: var(--primary);
}

/* ============================================
   COURSE VIEW - HARLEY STYLE
   ============================================ */
.tj-cv {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    background: #f8fafc;
}

/* Breadcrumb */
.tj-cv-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 24px;
}

.tj-cv-breadcrumb a {
    color: #4f86c6;
    text-decoration: none;
}

.tj-cv-breadcrumb a:hover {
    text-decoration: underline;
}

.tj-cv-breadcrumb span:last-child {
    color: #374151;
}

/* Header */
.tj-cv-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.tj-cv-header__thumb {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

.tj-cv-header__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tj-cv-header__content {
    flex: 1;
    min-width: 0;
}

.tj-cv-header__title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.tj-cv-info-icon {
    color: #4f86c6;
    cursor: help;
}

.tj-cv-header__desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.tj-cv-header__meta {
    display: flex;
    gap: 24px;
}

.tj-cv-meta-item__label {
    font-size: 12px;
    color: #9ca3af;
    display: block;
}

.tj-cv-meta-item__value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Progress Ring */
.tj-cv-header__progress {
    position: relative;
    flex-shrink: 0;
}

.tj-cv-progress-ring {
    display: block;
}

.tj-cv-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.tj-cv-progress-text__value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.tj-cv-progress-text__label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Timeline */
.tj-cv-timeline {
    position: relative;
}

/* Section */
.tj-cv-section {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}

.tj-cv-section__marker {
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.tj-cv-marker {
    width: 12px;
    height: 12px;
    background: #d1d5db;
    border-radius: 50%;
    position: relative;
}

.tj-cv-marker::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    background: #e5e7eb;
}

.tj-cv-marker--muted {
    background: #e5e7eb;
}

.tj-cv-marker--check {
    width: 28px;
    height: 28px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.tj-cv-marker--check::after {
    display: none;
}

.tj-cv-section__card {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tj-cv-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.tj-cv-section__title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Lessons List */
.tj-cv-lessons {
    padding: 0;
}

.tj-cv-lesson {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.tj-cv-lesson:last-child {
    border-bottom: none;
}

.tj-cv-lesson__icon {
    flex-shrink: 0;
}

.tj-cv-lesson__info {
    flex: 1;
    min-width: 0;
}

.tj-cv-lesson__title {
    font-size: 14px;
    font-weight: 500;
    color: #1e3a5f;
}

.tj-cv-lesson__btn {
    display: inline-block;
    padding: 8px 16px;
    background: #1e3a5f;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.tj-cv-lesson__btn:hover {
    background: #2d5a8a;
    color: #fff;
}

.tj-cv-lesson--complete .tj-cv-lesson__btn {
    background: #f3f4f6;
    color: #374151;
}

.tj-cv-lesson--complete .tj-cv-lesson__btn:hover {
    background: #e5e7eb;
}

/* Divider */
.tj-cv-divider {
    display: flex;
    gap: 20px;
    margin: 8px 0;
}

.tj-cv-divider__marker {
    width: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tj-cv-divider__content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.tj-cv-divider__text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.tj-cv-divider__icon {
    color: #4f86c6;
}

/* Certificate */
.tj-cv-certificate {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
}

.tj-cv-certificate__icon {
    flex-shrink: 0;
}

.tj-cv-certificate__info {
    flex: 1;
    min-width: 0;
}

.tj-cv-certificate__title {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.tj-cv-certificate__status {
    font-size: 13px;
    color: #9ca3af;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 6px;
}

/* End Marker */
.tj-cv-end {
    display: flex;
    gap: 20px;
}

.tj-cv-end__marker {
    width: 40px;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .tj-cv-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .tj-cv-header__title {
        justify-content: center;
    }
    
    .tj-cv-header__meta {
        justify-content: center;
    }
    
    .tj-cv-section__marker,
    .tj-cv-divider__marker,
    .tj-cv-end__marker {
        display: none;
    }
    
    .tj-cv-section,
    .tj-cv-divider,
    .tj-cv-end {
        gap: 0;
    }
    
    .tj-cv-lesson {
        flex-wrap: wrap;
    }
    
    .tj-cv-lesson__btn {
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
}
