/* Extracted from course_detail.html inline <style> block for browser caching. */
/* Academic Modern Redesign - Course Detail Page - Modules & Content */
    /* Force course title to never hyphenate (overrides browser/Safari when lang="en") */
    .course-header h1.course-title {
        hyphens: none !important;
        -webkit-hyphens: none !important;
        -ms-hyphens: none !important;
    }
    :root {
        --zambia-green: #00A651;
        --zambia-red: #C62828;
        --zambia-copper: #F57C00;
        --zambia-blue: #0288D1;
        --zambia-accent: #FFCA28;
        --zambia-dark: #1C2526;
        /* Academic Color Palette */
        --academic-navy: #1a2332;
        --academic-burgundy: #8b2635;
        --academic-sage: #87a96b;
        --academic-cream: #f5f1e8;
        --academic-gold: #d4af37;
        --academic-gray: #6b7280;
    }

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

    .course-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 2rem 1rem;
        overflow-x: hidden;
        hyphens: none;
        -webkit-hyphens: none;
        -ms-hyphens: none;
    }

    .course-container * {
        hyphens: none;
        -webkit-hyphens: none;
        -ms-hyphens: none;
    }

    .course-header, .module-section, .sidebar-section {
        background: #FFFFFF;
        border-radius: 16px;
        box-shadow: 0 8px 32px rgba(26, 35, 50, 0.08);
        animation: fadeIn 0.6s ease-out;
        margin-bottom: 2rem;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .module-section {
        background: white;
        border-left: 4px solid var(--academic-burgundy);
        padding: 2.5rem;
    }

    @media (max-width: 768px) {
        .module-section {
            padding: 1.5rem;
            border-radius: 12px;
        }

        /* Mobile: center course title and share section */
        .course-header {
            text-align: center;
        }
        .course-header .d-flex.flex-column.flex-md-row {
            flex-direction: column !important;
            align-items: center !important;
            text-align: center;
        }
        .course-header .d-flex.flex-column.flex-md-row > div {
            width: 100%;
            flex: 0 0 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .share-top-bar {
            width: 100%;
        }
        .course-header .d-flex.align-items-center {
            flex-wrap: wrap;
            gap: 0.5rem;
            justify-content: center;
            text-align: center;
        }
        .course-header .course-title {
            text-align: center;
        }
        .share-section {
            width: 100%;
            margin-top: 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }
        .share-header {
            justify-content: center;
        }
        .social-share-buttons {
            justify-content: center;
        }
        .d-flex.flex-wrap.gap-2 {
            flex-wrap: wrap !important;
            justify-content: center;
        }
    }

    @media (max-width: 480px) {
        .course-header .d-flex.flex-column.flex-md-row {
            flex-direction: column !important;
            align-items: center !important;
        }
        .share-section {
            margin-top: 1rem;
        }
        .course-container {
            padding: 1rem 0.75rem;
        }
        .course-title {
            font-size: 1.4rem;
        }
    }

    .course-title {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--zambia-dark);
        position: relative;
        padding-bottom: 8px;
        margin-bottom: 1rem;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        hyphens: none !important;
        -webkit-hyphens: none !important;
        -ms-hyphens: none !important;
        max-width: 100%;
    }

    .progress-container {
        margin: 1.5rem 0;
    }

    .progress {
        height: 8px;
        border-radius: 4px;
        background-color: #e9ecef;
        margin-bottom: 0.5rem;
    }

    .progress-bar {
        background-color: var(--zambia-green);
        transition: width 0.6s ease;
    }

    .progress-text {
        font-size: 0.9rem;
        color: #6c757d;
    }

    .content-item {
        padding: 1.5rem;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
        background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--academic-sage);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .content-item:hover {
        background: white;
        border-color: var(--academic-burgundy);
        box-shadow: 0 6px 20px rgba(139, 38, 53, 0.15);
        transform: translateX(4px);
    }

    .content-item:hover::before {
        opacity: 1;
    }

    .content-item.completed {
        border-left: 4px solid var(--zambia-green);
        background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    }

    .content-item.completed::before {
        background: var(--zambia-green);
        opacity: 1;
    }

    .content-icon {
        margin-right: 1rem;
        color: var(--academic-burgundy);
        font-size: 1.5rem;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, rgba(139, 38, 53, 0.1) 0%, rgba(139, 38, 53, 0.05) 100%);
        border-radius: 12px;
        flex-shrink: 0;
    }

    .content-title {
        font-weight: 600;
        color: var(--academic-navy);
        margin-bottom: 0.5rem;
        font-size: 1.05rem;
        line-height: 1.4;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-meta {
        font-size: 0.875rem;
        color: var(--academic-gray);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-meta i {
        color: var(--academic-sage);
    }

    .content-actions {
        margin-top: 0.5rem;
    }

    /* Content list row: allow wrapping so actions get width on narrow screens */
    .content-item .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.75rem;
        min-width: 0;
        align-items: flex-start;
    }
    .content-item .d-flex.align-items-center > div {
        min-width: 0;
    }

    /* No text wrapping in module/course content buttons - mobile-friendly */
    .content-actions .btn,
    .content-actions .btn-sm,
    .content-actions a.btn,
    .content-actions .d-flex .btn,
    .content-actions .d-flex .btn-sm {
        white-space: nowrap;
        word-break: normal;
        overflow-wrap: normal;
        writing-mode: horizontal-tb;
        flex: 0 0 auto;
        min-width: 120px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .content-actions .offline-badge,
    .offline-badge {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .content-actions {
        width: 100%;
        flex: 1 1 100%;
    }
    .content-actions .d-flex {
        flex-wrap: nowrap !important; /* overrides Bootstrap .flex-wrap class */
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .content-actions .d-flex > * {
        flex: 0 0 auto !important;
    }

    @media (min-width: 992px) {
        .content-item .d-flex.justify-content-between {
            flex-wrap: nowrap;
            gap: 0;
            align-items: center;
        }
        .content-actions {
            width: auto;
            flex: 0 0 auto;
        }
        .content-actions .d-flex {
            flex-wrap: wrap;
            overflow-x: visible;
        }
    }

    .btn-view {
        font-size: 0.85rem;
        padding: 0.25rem 0.75rem;
    }

    .module-header {
        background-color: #f8f9fa;
        padding: 0.75rem 1.25rem;
        border-radius: 6px 6px 0 0;
        border-bottom: 1px solid #e9ecef;
    }

    .module-title {
        font-weight: 600;
        margin: 0;
        color: var(--zambia-dark);
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .module-body {
        padding: 1.25rem;
    }

    .empty-state {
        text-align: center;
        padding: 2rem;
        color: #6c757d;
    }

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: #dee2e6;
    }

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .course-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 60px;
        height: 4px;
        background-color: var(--zambia-copper);
        border-radius: 2px;
    }

    .badge {
        padding: 0.25rem 0.75rem;
        border-radius: 16px;
        font-size: 0.75rem;
        font-weight: 500;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .badge-success {
        background-color: var(--zambia-green);
        color: #FFFFFF;
    }

    .badge-warning {
        background-color: var(--zambia-copper);
        color: #FFFFFF;
    }

    .badge-info {
        background-color: var(--zambia-blue);
        color: #FFFFFF;
    }

    .btn {
        padding: 0.5rem 1rem;
        border-radius: 6px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
    }

    .btn-primary {
        background: linear-gradient(135deg, var(--zambia-green), var(--zambia-blue));
        color: #FFFFFF;
        border: none;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .btn-outline {
        border: 1px solid var(--zambia-copper);
        color: var(--zambia-copper);
        background: transparent;
    }

    .btn-outline:hover {
        background-color: var(--zambia-copper);
        color: #FFFFFF;
    }

    .btn-outline-danger {
        border: 1px solid var(--zambia-red);
        color: var(--zambia-red);
    }

    .btn-outline-danger:hover {
        background-color: var(--zambia-red);
        color: #FFFFFF;
    }

    .accordion-button {
        background: linear-gradient(135deg, var(--academic-cream) 0%, #ffffff 100%);
        color: var(--academic-navy);
        font-weight: 600;
        padding: 1.5rem;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        width: 100%;
        text-align: left;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: all 0.3s ease;
        font-family: 'Georgia', 'Times New Roman', serif;
        font-size: 1.1rem;
        box-shadow: 0 2px 8px rgba(26, 35, 50, 0.08);
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .accordion-button:not(.collapsed) {
        background: linear-gradient(135deg, var(--academic-cream) 0%, #ffffff 100%);
        color: var(--academic-burgundy);
        border-color: var(--academic-burgundy);
        box-shadow: 0 4px 16px rgba(139, 38, 53, 0.15);
    }

    .accordion-button:focus {
        outline: none;
        border-color: var(--academic-burgundy);
        box-shadow: 0 0 0 4px rgba(139, 38, 53, 0.1);
    }

    .accordion-button:hover {
        background: white;
        border-color: var(--academic-sage);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(26, 35, 50, 0.12);
    }

    .accordion-button::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23232'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        background-size: 16px;
        transition: transform 0.3s ease;
    }

    .accordion-button:not(.collapsed)::after {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23F57C00'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
        transform: rotate(180deg);
    }

    /* Accordion content visibility */
    .accordion-collapse {
        transition: all 0.3s ease;
    }

    .accordion-collapse.show {
        display: block !important;
    }

    .accordion-collapse.collapse {
        display: none;
    }

    .accordion-collapse.collapsing {
        height: 0;
        overflow: hidden;
        transition: height 0.35s ease;
    }

    .accordion-body {
        padding: 2rem;
        background-color: #ffffff;
        border: 2px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 12px 12px;
    }

    .accordion-item {
        border: none;
        border-radius: 12px;
        margin-bottom: 1.5rem;
        overflow: hidden;
        background: white;
        box-shadow: 0 4px 16px rgba(26, 35, 50, 0.08);
        transition: all 0.3s ease;
    }

    .accordion-item:hover {
        box-shadow: 0 8px 24px rgba(26, 35, 50, 0.12);
    }

    .accordion-header {
        margin: 0;
    }

    .accordion-button {
        border-radius: 6px 6px 0 0;
        border-bottom: 1px solid #e9ecef;
    }

    .accordion-button.collapsed {
        border-radius: 6px;
        border-bottom: none;
    }

    /* Debug styles - ensure content is visible */
    .accordion-collapse.show {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .accordion-collapse.collapse:not(.show) {
        display: none !important;
    }

    .accordion-body {
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 50px;
    }

    /* Ensure content items are visible */
    .content-list {
        visibility: visible !important;
        opacity: 1 !important;
    }

    .content-item {
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important;
    }

    .content-item {
        padding: 0.75rem;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }

    .content-item:hover {
        background-color: rgba(245,124,0,0.1);
    }

    .content-icon {
        color: var(--zambia-green);
    }

    /* Profile Picture Styling - Like Newsfeed */
    .profile-pic {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--zambia-green);
        cursor: pointer;
        transition: opacity 0.2s ease;
        flex-shrink: 0;
        display: block;
    }

    .profile-pic:hover {
        opacity: 0.8;
    }

    .teacher-avatar {
        border: 2px solid var(--zambia-green);
    }

    .teacher-avatar.profile-pic {
        margin-right: 0.75rem;
    }

    .teacher-avatar.bg-primary-placeholder {
        background-color: var(--zambia-green);
        color: #FFFFFF;
    }

    /* Teacher Profile Link - Mobile Clickable */
    .teacher-profile-link,
    .teacher-name-link {
        display: block !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0, 166, 81, 0.3) !important;
        cursor: pointer !important;
        min-height: 44px !important; /* Minimum touch target size */
    }

    .teacher-profile-container {
        pointer-events: auto !important;
        touch-action: manipulation !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }

    /* Teacher card - desktop: clear, simple, clickable */
    .teacher-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }
    .teacher-card:hover {
        border-color: var(--zambia-green);
        box-shadow: 0 4px 12px rgba(0, 166, 81, 0.12);
    }
    .teacher-card .teacher-card-avatar {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--zambia-green);
        flex-shrink: 0;
    }
    .teacher-card .teacher-card-body {
        flex: 1;
        min-width: 0;
    }
    .teacher-card .teacher-card-name {
        font-weight: 600;
        color: var(--zambia-dark);
        font-size: 1.05rem;
        margin-bottom: 0.25rem;
    }
    .teacher-card .teacher-card-label {
        font-size: 0.8rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
    }
    .teacher-card .teacher-card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }
    .teacher-card .teacher-card-actions .btn {
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        font-size: 0.875rem;
        padding: 0.4rem 0.85rem;
        border-radius: 8px;
        text-decoration: none;
        transition: opacity 0.2s, background 0.2s;
    }
    .teacher-card .btn-profile {
        background: var(--zambia-green);
        color: #fff;
        border: none;
    }
    .teacher-card .btn-profile:hover {
        background: #059669;
        color: #fff;
        opacity: 0.95;
    }
    .teacher-card .btn-message {
        background: #f0f9ff;
        color: var(--zambia-blue);
        border: 1px solid #bae6fd;
    }
    .teacher-card .btn-message:hover {
        background: #e0f2fe;
        color: var(--zambia-blue);
        border-color: #7dd3fc;
    }

    @media (max-width: 768px) {
        /* Smaller profile pictures on mobile - like newsfeed */
        .profile-pic,
        .teacher-avatar.profile-pic {
            width: 36px !important;
            height: 36px !important;
            min-width: 36px !important;
            min-height: 36px !important;
            flex-shrink: 0 !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        .teacher-profile-link,
        .teacher-name-link {
            min-height: 48px !important; /* Larger touch target on mobile */
            padding: 0.5rem 0 !important;
            margin: -0.25rem 0 !important; /* Compensate for padding */
            display: flex !important;
            align-items: center !important;
        }

        .teacher-profile-container {
            min-height: 48px !important;
            padding: 0.5rem 0 !important;
            display: flex !important;
            align-items: center !important;
        }

        .teacher-avatar {
            pointer-events: none !important;
            display: block !important;
            visibility: visible !important;
        }

        /* Ensure profile pictures are visible in teacher name link */
        .teacher-name-link .profile-pic {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            width: 36px !important;
            height: 36px !important;
        }
    }

    @media (max-width: 480px) {
        .profile-pic,
        .teacher-avatar.profile-pic {
            width: 32px !important;
            height: 32px !important;
            min-width: 32px !important;
            min-height: 32px !important;
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }

        .teacher-name-link .profile-pic {
            width: 32px !important;
            height: 32px !important;
        }
        /* Teacher card on mobile: compact, still clickable */
        .teacher-card {
            padding: 0.875rem 1rem;
        }
        .teacher-card .teacher-card-avatar {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
        }
        .teacher-card .teacher-card-actions .btn {
            font-size: 0.8125rem;
            padding: 0.35rem 0.7rem;
        }
    }

    .empty-state {
        text-align: center;
        padding: 2rem;
        color: #78909C;
    }

    .empty-state i {
        font-size: 2rem;
        color: #B0BEC5;
        margin-bottom: 0.75rem;
    }

    .empty-state h5 {
        font-size: 1rem;
        color: var(--zambia-dark);
        margin-bottom: 0.5rem;
    }

    /* Responsive Design */
    @media (min-width: 768px) {
        .course-title {
            font-size: 2rem;
        }
    }

    @media (max-width: 576px) {
        .course-container {
            padding: 1.5rem 1rem;
        }

        .course-title {
            font-size: 1.75rem;
        }

        .btn {
            padding: 0.6rem 0.875rem;
            font-size: 0.875rem;
        }

        .course-header {
            padding: 1.5rem !important;
        }
    }

    /* ========== Mobile & small screens: no text cutting, proper wrapping (iPhone SE ≤375px) ========== */
    @media (max-width: 768px) {
        html, body {
            overflow-x: hidden;
        }
        .course-container .row {
            margin-left: 0;
            margin-right: 0;
        }
        .course-container [class*="col-"] {
            min-width: 0;
            max-width: 100%;
        }
        .course-container {
            padding: 1.25rem 0.75rem;
            max-width: 100%;
        }
        .course-header {
            padding: 1.25rem !important;
        }
        .course-title {
            font-size: 1.5rem;
            white-space: normal;
            overflow-x: visible;
            overflow-wrap: break-word;
            word-wrap: break-word;
            hyphens: none !important;
            -webkit-hyphens: none !important;
            -ms-hyphens: none !important;
            word-break: normal;
            min-width: 0;
            max-width: 100%;
        }
        .course-header .course-title,
        .course-header h1.course-title {
            hyphens: none !important;
            -webkit-hyphens: none !important;
        }
        .course-header {
            min-width: 0;
            overflow-x: visible;
            hyphens: none !important;
            -webkit-hyphens: none !important;
        }
        .course-header .d-flex.align-items-center {
            min-width: 0;
            max-width: 100%;
            flex-wrap: wrap;
        }
        .course-header .d-flex.align-items-center .course-title {
            flex: 1 1 100%;
            min-width: 0;
            max-width: 100%;
        }
        .d-flex.flex-wrap.gap-2 .badge {
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: none;
            -webkit-hyphens: none;
        }
        .teacher-name-link,
        .teacher-name-link span {
            word-wrap: break-word;
            overflow-wrap: break-word;
            min-width: 0;
            max-width: 100%;
        }
        .partner-name {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            min-width: 0;
        }
        .accordion-button {
            padding: 1rem;
            font-size: 1rem;
            flex-wrap: wrap;
            gap: 0.5rem;
            white-space: normal;
            overflow-x: visible;
        }
        .accordion-button .module-title,
        .accordion-button span,
        .accordion-button > *:first-child {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
            text-align: left;
            min-width: 0;
            hyphens: none;
        }
        .content-title {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
            min-width: 0;
        }
        .content-meta {
            flex-wrap: wrap;
            white-space: normal;
            overflow-x: visible;
        }
        .share-section {
            min-width: 0;
        }
        .share-header {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
        .social-btn {
            min-width: 0;
        }
        .course-header .row,
        .course-header [class*="col-"] {
            min-width: 0;
            max-width: 100%;
        }
        .rating-item p,
        .rating-item strong {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
        .module-section .row,
        .module-section [class*="col-"] {
            min-width: 0;
            max-width: 100%;
        }
        /* Module content: no wrapping on Review, View, Available Offline */
        .content-actions .btn,
        .content-actions .btn-sm,
        .content-actions a.btn,
        .content-actions .offline-badge {
            white-space: nowrap !important;
            flex-shrink: 0 !important;
        }
        /* Stack content row on mobile so actions get full width - prevents "Review" wrapping vertically */
        .content-item .d-flex.justify-content-between {
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        .content-item .content-actions {
            width: 100%;
            flex: 1 1 100%;
            min-width: 100%;
            margin-top: 0.25rem;
        }
        .content-actions .d-flex {
            flex-wrap: nowrap !important; /* overrides Bootstrap .flex-wrap class */
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .content-actions .btn,
        .content-actions a.btn {
            display: inline-flex;
            align-items: center;
            min-width: max-content;
            white-space: nowrap !important;
            word-break: normal !important;
            overflow-wrap: normal !important;
            writing-mode: horizontal-tb !important;
        }
    }

    @media (max-width: 375px) {
        .course-container {
            padding: 1rem 0.75rem;
        }
        .course-header {
            padding: 1rem !important;
        }
        .course-title {
            font-size: 1.35rem;
            line-height: 1.35;
            hyphens: none !important;
            -webkit-hyphens: none !important;
            max-width: 100%;
        }
        .badge {
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
        }
        .accordion-button {
            padding: 0.875rem 0.75rem;
            font-size: 0.95rem;
        }
        .accordion-body {
            padding: 1rem;
        }
        .content-item {
            padding: 1rem;
        }
        .btn {
            min-height: 44px;
            padding: 0.625rem 0.75rem;
            font-size: 0.875rem;
        }
        .social-btn {
            min-height: 44px;
            padding: 0.625rem 0.5rem;
            font-size: 0.8rem;
        }
        .course-description,
        .course-description p {
            font-size: 0.9375rem;
        }
        .rating-section h5,
        .rating-section .h4 {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
        /* Recent Reviews: scrollable list without expanding */
        .recent-reviews-scroll {
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 #f1f5f9;
        }
        .recent-reviews-scroll::-webkit-scrollbar {
            width: 6px;
        }
        .recent-reviews-scroll::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 3px;
        }
        .recent-reviews-scroll::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 3px;
        }
        .recent-reviews-scroll::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }
        .teacher-name-link span {
            font-size: 0.9rem;
        }
        /* Module content: no wrapping on small screens */
        .content-actions .btn,
        .content-actions .btn-sm,
        .content-actions a.btn,
        .content-actions .offline-badge {
            white-space: nowrap !important;
            flex-shrink: 0 !important;
        }
        /* Module description - wrap text, no cutting */
        .accordion-body p.text-muted,
        .accordion-body .mb-3 {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
    }

    /* iPhone SE and small phones (320px) - tighter layout, text wraps */
    @media (max-width: 320px) {
        .course-container {
            padding: 0.75rem 0.5rem;
        }
        .course-header {
            padding: 0.75rem !important;
        }
        .course-title {
            font-size: 1.2rem;
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
            hyphens: none !important;
            -webkit-hyphens: none !important;
            max-width: 100%;
        }
        .course-description,
        .course-description p,
        .course-description .ql-editor {
            font-size: 0.875rem;
            text-align: justify;
            text-align-last: left;
            white-space: normal;
            overflow-x: visible;
            overflow-wrap: break-word;
            word-wrap: break-word;
            hyphens: none;
        }
        .accordion-button {
            padding: 0.75rem 0.5rem;
            font-size: 0.9rem;
        }
        .accordion-button .module-title,
        .accordion-button .d-flex {
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
        .content-title {
            font-size: 0.95rem;
            white-space: normal;
            overflow-wrap: break-word;
            word-wrap: break-word;
            overflow-x: visible;
        }
        .content-item {
            padding: 0.75rem;
        }
        .badge {
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            white-space: normal;
            overflow-wrap: break-word;
        }
    }

    /* Safe area for notched devices (e.g. iPhone X+) */
    @supports (padding: max(0px)) {
        @media (max-width: 480px) {
            .course-container {
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
            }
        }
        @media (max-width: 390px) {
            .course-container {
                padding-left: max(0.5rem, env(safe-area-inset-left));
                padding-right: max(0.5rem, env(safe-area-inset-right));
            }
        }
    }

    /* Social Sharing Buttons - Rectangular Style */
    .share-section {
        background: linear-gradient(to bottom, #e0f2fe 0%, #f0fdfa 100%);
        width: min(100%, 430px);
        padding: 1rem 1.1rem;
        border-radius: 12px;
        margin-top: 0.5rem;
        display: grid;
        gap: 0.85rem;
        align-self: flex-start;
    }

    .share-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
    }

    .share-header {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-bottom: 0;
        font-size: 1rem;
        min-width: 0;
    }

    .social-share-buttons {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
        flex-shrink: 0;
    }

    .share-link-wrapper {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.6rem;
        align-items: center;
        width: 100%;
    }

    .share-link-input {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        padding: 0.72rem 0.9rem;
        border: 1px solid #bae6fd;
        border-radius: 10px;
        background: #ffffff;
        color: var(--zambia-dark);
        font-size: 0.9rem;
        line-height: 1.3;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .share-link-input:focus {
        outline: none;
        border-color: var(--zambia-blue);
        box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.18);
    }

    .copy-link-btn {
        border: none;
        border-radius: 10px;
        padding: 0.72rem 0.95rem;
        min-height: 42px;
        white-space: nowrap;
        font-weight: 600;
        color: #ffffff;
        background: linear-gradient(135deg, var(--zambia-green), var(--zambia-blue));
        box-shadow: 0 8px 18px rgba(2, 136, 209, 0.16);
    }

    .copy-link-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 22px rgba(2, 136, 209, 0.2);
    }

    .share-help {
        margin: 0;
        color: var(--academic-gray);
        font-size: 0.8rem;
        line-height: 1.35;
    }

    /* Social share: icon-only logos to save space (Bootstrap Icons) */
    .social-btn {
        padding: 0.55rem;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        transition: all 0.3s ease;
        text-decoration: none;
        color: white;
        font-size: 1.15rem;
        font-weight: 600;
        cursor: pointer;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        text-align: center;
    }
    .social-btn i {
        font-size: 1.15rem;
        line-height: 1;
    }

    .social-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        color: white;
        text-decoration: none;
    }

    .twitter-btn {
        background: #1DA1F2;
    }

    .twitter-btn:hover {
        background: #0d8bd9;
    }

    .facebook-btn {
        background: #1877F2;
    }

    .facebook-btn:hover {
        background: #1565C0;
    }

    .whatsapp-btn {
        background: #25D366;
    }

    .whatsapp-btn:hover {
        background: #128C7E;
    }

    @media (max-width: 768px) {
        .share-section {
            width: 100%;
            padding: 1rem;
            margin-top: 1rem;
        }

        .share-top-bar {
            flex-direction: column;
            align-items: center;
        }

        .share-link-wrapper {
            grid-template-columns: 1fr;
        }

        .share-link-input {
            font-size: 1rem;
        }

        .copy-link-btn {
            width: 100%;
            justify-content: center;
        }

        .social-share-buttons {
            width: 100%;
            justify-content: center;
            gap: 0.5rem;
        }

        .social-btn {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            padding: 0.5rem;
            font-size: 1.25rem;
        }
        .social-btn i {
            font-size: 1.25rem;
        }
    }

    @media (max-width: 480px) {
        .social-btn {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            padding: 0.5rem;
            font-size: 1.2rem;
        }
        .social-btn i {
            font-size: 1.2rem;
        }
    }

    /* Accessibility */
    .btn:focus, a:focus, .accordion-button:focus {
        outline: 2px solid var(--zambia-blue);
        outline-offset: 2px;
    }

    /* Course Description - justified, readable on mobile; no hyphenation; text wraps */
    .course-description,
    .course-description p,
    .course-description .ql-editor {
        white-space: normal;
        text-align: justify;
        text-align-last: left;
        overflow-x: visible;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: normal;
        hyphens: none;
        -webkit-hyphens: none;
        -ms-hyphens: none;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .course-description p {
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    .course-description p:last-child {
        margin-bottom: 0;
    }

    .course-description br {
        line-height: 1.6;
    }

    /* AI Buttons Styling */
    .ai-quiz-btn, .ai-flashcard-btn {
        position: relative;
        overflow: hidden;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .ai-quiz-btn::before, .ai-flashcard-btn::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .ai-quiz-btn:hover::before, .ai-flashcard-btn:hover::before {
        width: 300px;
        height: 300px;
    }

    .ai-quiz-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }

    .ai-flashcard-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(13, 110, 253, 0.3);
    }

    .view-flashcards-btn {
        background: linear-gradient(135deg, var(--zambia-green), #0288D1);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 12px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .view-flashcards-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 166, 81, 0.4);
    }

    /* Flashcard Animation */
    .flashcard-inner {
        animation: cardAppear 0.6s ease-out;
    }

    @keyframes cardAppear {
        from {
            opacity: 0;
            transform: scale(0.9);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    /* Mobile UX pass (course modules/content): remove horizontal scrolling and prioritize tap flow */
    @media (max-width: 768px) {
        .course-container {
            padding: 1rem 0.75rem 1.5rem;
        }

        .course-header,
        .module-section,
        .sidebar-section {
            border-radius: 12px;
            margin-bottom: 1rem;
        }

        .course-header {
            padding: 1rem !important;
        }

        .course-title,
        .module-title,
        .accordion-button,
        .content-title,
        .content-meta {
            white-space: normal !important;
            overflow: visible !important;
            text-overflow: clip !important;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .course-title {
            font-size: 1.35rem !important;
            line-height: 1.3;
            margin-right: 0 !important;
        }

        .course-title::after {
            width: 42px;
            height: 3px;
        }

        .accordion-button {
            padding: 1rem 0.9rem !important;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .accordion-button > div {
            min-width: 0;
        }

        .accordion-button > .d-flex:first-child {
            flex: 1 1 auto;
        }

        .accordion-button > .d-flex:last-child {
            flex: 0 0 auto;
            flex-direction: column;
            align-items: flex-end !important;
            gap: 0.35rem;
        }

        .accordion-body {
            padding: 1rem 0.9rem !important;
        }

        .accordion-header > .ms-3.d-flex {
            margin: 0.65rem 0 0 !important;
            display: grid !important;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.45rem !important;
        }

        .accordion-header > .ms-3.d-flex .btn {
            width: 100%;
            min-height: 40px;
            justify-content: center;
        }

        .content-item {
            padding: 1rem !important;
        }

        .content-item:hover {
            transform: none;
        }

        .content-item .d-flex.justify-content-between {
            display: block;
        }

        .content-item .d-flex.align-items-center {
            align-items: flex-start !important;
            gap: 0.7rem;
        }

        .content-icon {
            width: 40px;
            height: 40px;
            font-size: 1.15rem;
            margin-right: 0;
        }

        .content-actions {
            width: 100% !important;
            margin-top: 0.8rem;
        }

        .content-actions .badge,
        .content-actions .text-muted {
            display: block;
            margin: 0 0 0.45rem 0 !important;
            width: fit-content;
            max-width: 100%;
        }

        .content-actions .d-flex {
            display: grid !important;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
            overflow: visible !important;
        }

        .content-actions .btn,
        .content-actions a.btn,
        .content-actions .btn-sm {
            width: 100%;
            min-width: 0 !important;
            min-height: 42px;
            justify-content: center;
            white-space: normal !important;
        }

        /* Offline badge: mobile icon-only */
        .content-actions .offline-badge,
        .offline-badge {
            padding: 0.25rem 0.35rem !important;
            gap: 0 !important;
            min-width: auto !important;
            white-space: nowrap !important;
        }
        .content-actions .offline-badge span,
        .offline-badge span {
            display: none !important;
        }
        .content-actions .offline-badge svg,
        .content-actions .offline-badge i,
        .offline-badge svg,
        .offline-badge i {
            margin: 0 !important;
        }

        .progress-container .d-flex.justify-content-between {
            flex-direction: column;
            align-items: flex-start !important;
            gap: 0.35rem;
        }
    }

    @media (max-width: 480px) {
        .course-container {
            padding: 0.75rem 0.55rem 1rem;
        }

        .accordion-header > .ms-3.d-flex {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .content-actions .d-flex {
            grid-template-columns: 1fr;
        }
    }

    /* Refined layout pass */
    :root {
        --course-surface: #ffffff;
        --course-surface-soft: #f8fbfa;
        --course-border: rgba(148, 163, 184, 0.22);
        --course-shadow-lg: 0 26px 60px rgba(15, 23, 42, 0.08);
        --course-shadow-md: 0 14px 34px rgba(15, 23, 42, 0.06);
        --course-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.05);
        --course-radius-xl: 28px;
        --course-radius-lg: 22px;
        --course-radius-md: 18px;
    }

    .course-container {
        max-width: 1480px;
        padding: 2.25rem 1.25rem 3rem;
    }

    .course-header {
        position: relative;
        overflow: hidden;
        padding: clamp(1.5rem, 2.4vw, 2.5rem) !important;
        border-radius: var(--course-radius-xl);
        border: 1px solid rgba(2, 136, 209, 0.1);
        background: linear-gradient(140deg, #ffffff 0%, rgba(240, 253, 250, 0.96) 48%, rgba(239, 246, 255, 0.96) 100%);
        box-shadow: var(--course-shadow-lg);
    }

    .course-header::before,
    .course-header::after {
        content: "";
        position: absolute;
        pointer-events: none;
    }

    .course-header::before {
        left: -4rem;
        top: -4rem;
        width: clamp(220px, 34vw, 420px);
        height: clamp(220px, 34vw, 420px);
        background: radial-gradient(circle, rgba(0, 166, 81, 0.12) 0%, rgba(0, 166, 81, 0) 72%);
    }

    .course-header::after {
        right: -4rem;
        top: -5rem;
        width: clamp(240px, 36vw, 460px);
        height: clamp(240px, 36vw, 460px);
        background: radial-gradient(circle, rgba(2, 136, 209, 0.12) 0%, rgba(2, 136, 209, 0) 74%);
    }

    .course-header > * {
        position: relative;
        z-index: 1;
    }

    .course-header-top {
        gap: 1.25rem;
        align-items: flex-start !important;
        margin-bottom: 0.85rem !important;
    }

    .course-title-block {
        min-width: 0;
        flex: 1 1 auto;
        display: flex;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .course-title {
        flex: 1 1 320px;
        min-width: 0;
        max-width: 100%;
        font-size: clamp(1.65rem, 2.75vw, 2.85rem);
        font-weight: 800;
        line-height: 1.12;
        letter-spacing: -0.03em;
        margin-bottom: 0;
        margin-right: 0 !important;
        padding-bottom: 0.65rem;
        color: var(--academic-navy);
        white-space: normal !important;
        overflow: visible !important;
        overflow-x: visible !important;
        text-overflow: clip !important;
        -webkit-overflow-scrolling: auto;
    }

    .course-title-text {
        display: -webkit-box;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
        word-break: normal;
        hyphens: none !important;
        -webkit-hyphens: none !important;
        -ms-hyphens: none !important;
        text-wrap: pretty;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .course-title-block .badge {
        flex: 0 0 auto;
        margin-top: 0.3rem;
        align-self: flex-start;
    }

    .course-title::after {
        width: 74px;
        height: 5px;
        border-radius: 999px;
        background: linear-gradient(135deg, var(--zambia-copper), var(--academic-gold));
    }

    .course-header-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .course-primary-panel {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 1.15rem;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.86);
        border: 1px solid rgba(2, 136, 209, 0.12);
        box-shadow: var(--course-shadow-md);
        backdrop-filter: blur(12px);
    }

    .course-primary-panel > form,
    .course-primary-panel > a,
    .course-primary-panel > div,
    .course-primary-panel > .course-owner-actions,
    .course-primary-panel > .admin-outreach-card {
        margin: 0;
    }

    .course-primary-panel .btn {
        min-height: 50px;
        border-radius: 14px;
        justify-content: center;
        font-weight: 600;
        box-shadow: none;
    }

    .hero-status-card {
        padding: 1rem 1.1rem !important;
        border-radius: 18px;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    }

    .hero-status-card--success {
        background: linear-gradient(135deg, var(--zambia-green), #0288D1) !important;
        color: #FFFFFF !important;
    }

    .hero-status-card--warning {
        background: linear-gradient(135deg, #f59e0b, #d97706) !important;
        color: #FFFFFF !important;
    }

    .hero-certificate-card {
        border-radius: 20px !important;
        box-shadow: 0 18px 34px rgba(0, 166, 81, 0.18);
    }

    .hero-note {
        margin: -0.25rem 0 0;
        text-align: center;
        font-size: 0.82rem;
        color: var(--academic-gray) !important;
    }

    .course-owner-actions {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .course-owner-actions .btn,
    .course-owner-actions form .btn {
        width: 100%;
    }

    .admin-outreach-card {
        background: linear-gradient(180deg, #f8fafc, #ffffff) !important;
        border: 1px solid var(--course-border) !important;
        border-radius: 20px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    }

    .share-section {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1rem 1.1rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(2, 136, 209, 0.12);
        box-shadow: var(--course-shadow-sm);
        backdrop-filter: blur(12px);
    }

    .share-header {
        gap: 0.65rem;
    }

    .share-header-icon {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(2, 136, 209, 0.12);
        color: var(--zambia-blue);
        flex-shrink: 0;
    }

    .share-link-input {
        border-color: rgba(2, 136, 209, 0.18);
        border-radius: 12px;
    }

    .copy-link-btn {
        min-width: 132px;
        border-radius: 12px;
    }

    .course-description {
        padding: 1.35rem 1.4rem;
        margin-bottom: 1.2rem !important;
        border-radius: 22px;
        border: 1px solid var(--course-border);
        background: linear-gradient(180deg, #ffffff, #fbfdfd);
        box-shadow: var(--course-shadow-sm);
    }

    .course-meta-strip {
        gap: 0.7rem !important;
    }

    .course-meta-strip .badge {
        padding: 0.55rem 1rem;
        border-radius: 999px;
        font-size: 0.8rem;
        letter-spacing: 0.01em;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.15);
    }

    .partner-strip-card,
    .rating-section,
    .recent-ratings {
        border-radius: 22px;
        border: 1px solid var(--course-border) !important;
        background: linear-gradient(180deg, #ffffff, #fbfcfd) !important;
        box-shadow: var(--course-shadow-sm);
    }

    .partner-strip-card {
        padding: 1.15rem !important;
    }

    .partner-pill {
        border-radius: 14px;
        padding: 0.65rem 0.9rem !important;
        border: 1px solid rgba(2, 136, 209, 0.08);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }

    .partner-pill img {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: #f8fafc;
        padding: 0.25rem;
    }

    .rating-section {
        padding: 1.25rem !important;
    }

    .rating-section .d-flex.align-items-center.justify-content-between {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .rating-form-section {
        margin-top: 1rem !important;
        padding-top: 1rem !important;
    }

    .recent-ratings {
        padding: 1.15rem;
    }

    .review-item {
        border-radius: 16px !important;
        border: 1px solid rgba(148, 163, 184, 0.2) !important;
        background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }

    .recent-reviews-scroll {
        max-height: 340px !important;
        padding-right: 0.25rem !important;
    }

    .course-detail-layout {
        margin-top: 1.75rem;
    }

    .course-content-panel,
    .sidebar-section {
        border-left: none;
        padding: 1.5rem !important;
        border-radius: 24px;
        border: 1px solid var(--course-border);
        background: linear-gradient(180deg, #ffffff, #fbfdfd);
        box-shadow: var(--course-shadow-md);
    }

    .course-sidebar-stack {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar-card-title,
    .course-section-header h3 {
        color: var(--academic-navy);
        letter-spacing: 0.01em;
    }

    .sidebar-card-title .content-icon,
    .course-section-header .content-icon {
        margin-right: 0.75rem;
    }

    .course-section-header {
        gap: 1rem;
    }

    .course-progress-card {
        padding: 1rem 1.1rem;
        border-radius: 18px;
        background: linear-gradient(135deg, rgba(0, 166, 81, 0.08), rgba(2, 136, 209, 0.08));
        border: 1px solid rgba(2, 136, 209, 0.1);
    }

    .course-progress-card .progress {
        margin-bottom: 0;
        height: 10px;
        background: rgba(148, 163, 184, 0.18);
    }

    .course-progress-card .progress-bar {
        border-radius: 999px;
    }

    .content-lock-alert {
        border-radius: 18px;
        border: 1px solid rgba(245, 158, 11, 0.18);
        background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), #ffffff);
    }

    .course-content-panel .accordion {
        display: grid;
        gap: 1rem;
    }

    .course-content-panel .accordion-item {
        margin-bottom: 0 !important;
        border: 1px solid rgba(148, 163, 184, 0.2);
        border-radius: 22px;
        overflow: hidden;
        background: linear-gradient(180deg, #ffffff, #fbfcfd);
        box-shadow: var(--course-shadow-sm);
    }

    .course-content-panel .accordion-button {
        padding: 1.25rem 1.35rem;
        border: none !important;
        border-radius: 0;
        background: linear-gradient(180deg, #ffffff, #f8fafc);
        box-shadow: none;
        font-family: "Trebuchet MS", "Segoe UI", sans-serif;
        font-size: 1rem;
        gap: 1rem;
    }

    .course-content-panel .accordion-button:not(.collapsed) {
        background: linear-gradient(180deg, rgba(245, 241, 232, 0.85), #ffffff);
    }

    .course-content-panel .accordion-button > div {
        min-width: 0;
    }

    .course-content-panel .accordion-button > .d-flex:first-child {
        flex: 1 1 auto;
        gap: 0.75rem;
        font-weight: 700;
        color: var(--academic-navy);
    }

    .course-content-panel .accordion-button > .d-flex:last-child {
        flex: 0 0 auto;
        gap: 0.75rem;
        align-items: center;
    }

    .module-heading-meta .badge {
        border-radius: 999px;
        padding: 0.42rem 0.8rem;
    }

    .module-admin-actions {
        margin: 0.95rem 0 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .module-admin-actions .btn {
        min-height: 38px;
        border-radius: 12px;
        box-shadow: none;
    }

    .module-description {
        margin-bottom: 1rem !important;
        padding: 0.9rem 1rem;
        border-radius: 14px;
        background: #f8fafc;
        border: 1px solid rgba(148, 163, 184, 0.18);
        color: var(--academic-gray) !important;
    }

    .course-content-panel .accordion-body {
        padding: 1.4rem;
        border: none;
        background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    }

    .content-item {
        padding: 1rem 1.1rem !important;
        border: 1px solid rgba(148, 163, 184, 0.18) !important;
        border-radius: 18px !important;
        background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%) !important;
        box-shadow: var(--course-shadow-sm);
    }

    .content-item:hover {
        border-color: rgba(139, 38, 53, 0.28) !important;
        transform: translateY(-2px);
        background: #ffffff !important;
    }

    .content-item.completed {
        border-left: none;
        border-color: rgba(0, 166, 81, 0.24) !important;
        background: linear-gradient(135deg, rgba(240, 253, 244, 0.95), #ffffff 55%) !important;
    }

    .content-line {
        gap: 1rem;
        align-items: center !important;
    }

    .content-main {
        flex: 1 1 auto;
        min-width: 0;
        gap: 1rem;
    }

    .content-title {
        white-space: normal;
        overflow: visible;
        font-size: 1.02rem;
    }

    .content-meta {
        gap: 0.45rem;
        flex-wrap: wrap;
    }

    .content-meta-separator {
        color: rgba(107, 114, 128, 0.7);
    }

    .content-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.55rem;
        width: auto;
        flex: 0 0 auto;
    }

    .content-status-line {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-end;
    }

    .content-actions .text-muted {
        margin: 0 !important;
    }

    .content-actions .d-flex {
        gap: 0.5rem;
        justify-content: flex-end;
    }

    .content-actions .btn {
        min-height: 40px;
        border-radius: 12px;
    }

    .module-utility-row {
        margin-top: 1.25rem !important;
        padding-top: 1.1rem !important;
        border-top: 1px solid rgba(148, 163, 184, 0.16) !important;
    }

    .course-reorder-toolbar {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        flex-wrap: wrap;
    }

    .course-reorder-status {
        min-height: 1.25rem;
        font-size: 0.86rem;
        color: #64748b;
    }

    .module-drag-handle,
    .content-drag-handle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border: 1px solid rgba(148, 163, 184, 0.35);
        border-radius: 8px;
        background: #fff;
        color: #475569;
        cursor: grab;
        flex: 0 0 auto;
        touch-action: none;
        user-select: none;
    }

    .module-drag-handle:active,
    .content-drag-handle:active {
        cursor: grabbing;
    }

    .accordion-item.reorder-dragging,
    .content-item.reorder-dragging {
        opacity: 0.45;
    }

    .accordion-item.reorder-over,
    .content-item.reorder-over,
    .content-list.reorder-over {
        outline: 2px dashed var(--zambia-blue);
        outline-offset: 4px;
    }

    .content-list:empty {
        min-height: 3.25rem;
        border: 1px dashed rgba(148, 163, 184, 0.35);
        border-radius: 12px;
    }

    .teacher-card {
        border-radius: 18px;
        padding: 1.1rem 1.2rem;
        border: 1px solid rgba(0, 166, 81, 0.12);
        box-shadow: var(--course-shadow-sm);
        background: linear-gradient(180deg, #ffffff, #f8fbfa);
    }

    .teacher-card .teacher-card-avatar {
        box-shadow: 0 8px 18px rgba(0, 166, 81, 0.12);
    }

    .course-price-banner {
        position: relative;
        overflow: hidden;
        margin-bottom: 1.15rem !important;
        padding: 1.25rem 1rem;
        border-radius: 20px;
        text-align: center;
        background: linear-gradient(135deg, var(--zambia-green), #0288D1);
        box-shadow: 0 18px 36px rgba(2, 136, 209, 0.18);
    }

    .course-price-banner::before {
        content: "";
        position: absolute;
        inset: auto -40px -60px auto;
        width: 180px;
        height: 180px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 70%);
        pointer-events: none;
    }

    .course-price-banner-free {
        background: linear-gradient(135deg, #10b981, #059669);
    }

    .course-price-label {
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 0.35rem;
    }

    .course-price-value {
        color: #FFFFFF;
        font-size: clamp(1.7rem, 3vw, 2.25rem);
        font-weight: 700;
        text-shadow: 0 2px 10px rgba(15, 23, 42, 0.16);
    }

    .teacher-earnings-copy {
        color: rgba(255, 255, 255, 0.88);
        font-size: 0.8rem;
        margin-top: 0.35rem;
    }

    .edit-price-btn {
        position: absolute !important;
        top: 0.75rem !important;
        right: 0.75rem !important;
        border-radius: 12px !important;
        min-height: 36px !important;
        min-width: 36px !important;
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    }

    .course-detail-list {
        display: grid;
        gap: 0.85rem;
        font-size: 0.92rem !important;
        color: var(--academic-navy) !important;
    }

    .course-detail-line {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 0.85rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    .course-detail-line:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .course-detail-label {
        display: inline-flex;
        align-items: center;
        color: var(--academic-gray);
        white-space: nowrap;
    }

    .course-detail-value {
        font-weight: 700;
        color: var(--academic-navy);
        text-align: right;
        word-break: break-word;
    }

    .live-class-list {
        display: grid;
        gap: 0.75rem;
        max-height: 340px;
        overflow-y: auto;
        padding-right: 0.1rem;
    }

    .live-class-card {
        padding: 0.9rem;
        border-radius: 16px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        background: linear-gradient(180deg, #ffffff, #f8fafc);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }

    .live-class-card--live {
        background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), #ffffff);
        border-color: rgba(239, 68, 68, 0.3) !important;
    }

    .pulse-indicator {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
    }

    .live-class-empty {
        background: #f8fafc;
        border-radius: 16px;
        padding: 1.5rem !important;
    }

    .inline-arrow-link i {
        transition: transform 0.2s ease;
    }

    .inline-arrow-link:hover i {
        transform: translateX(3px);
    }

    .course-completion-banner {
        border-left: none;
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #00A651 0%, #0288D1 100%) !important;
        box-shadow: 0 24px 48px rgba(0, 166, 81, 0.22);
    }

    .course-completion-banner::before {
        content: "";
        position: absolute;
        inset: auto -40px -60px auto;
        width: 200px;
        height: 200px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 72%);
    }

    .course-completion-banner > * {
        position: relative;
        z-index: 1;
    }

    .completion-icon {
        width: 88px;
        height: 88px;
        margin: 0 auto 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.16);
        font-size: 2.4rem;
    }

    .completion-icon i {
        font-size: 1em;
        color: #FFFFFF;
    }

    @media (min-width: 992px) {
        .course-sidebar-stack {
            position: sticky;
            top: 1.25rem;
        }

        .course-content-panel {
            min-height: 100%;
        }
    }

    @media (max-width: 991px) {
        .course-container {
            padding: 1.5rem 0.95rem 2rem;
        }

        .course-header-top {
            align-items: stretch !important;
        }

        .course-primary-panel {
            padding: 1rem;
        }

        .course-detail-layout {
            margin-top: 1.25rem;
        }

        .course-owner-actions {
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        }
    }

    @media (max-width: 767px) {
        .course-header {
            padding: 1.15rem !important;
        }

        .course-title-block {
            gap: 0.55rem;
        }

        .course-title {
            font-size: clamp(1.45rem, 6vw, 1.95rem) !important;
            line-height: 1.16;
        }

        .course-title-text {
            line-height: inherit;
        }

        .share-header {
            justify-content: flex-start;
        }

        .course-description,
        .partner-strip-card,
        .rating-section,
        .recent-ratings,
        .course-primary-panel,
        .course-content-panel,
        .sidebar-section {
            border-radius: 18px;
        }

        .course-header-main {
            min-width: 0;
        }

        .course-description {
            padding: 1rem 0.95rem;
        }

        .course-description,
        .course-description p,
        .course-description li,
        .course-description div,
        .course-description span,
        .course-description .ql-editor {
            text-align: left !important;
            text-align-last: auto !important;
            line-height: 1.75;
            letter-spacing: normal;
            word-spacing: normal;
            white-space: normal;
            word-break: normal !important;
            overflow-wrap: break-word !important;
            hyphens: none !important;
            -webkit-hyphens: none !important;
            -ms-hyphens: none !important;
        }

        .course-detail-line {
            flex-direction: column;
            gap: 0.25rem;
        }

        .course-detail-value {
            text-align: left;
        }

        .course-content-panel .accordion-button {
            padding: 1rem 1.05rem !important;
        }

        .course-content-panel .accordion-body {
            padding: 1.05rem !important;
        }

        .content-line {
            align-items: flex-start !important;
        }

        .content-main {
            align-items: flex-start !important;
        }

        .content-actions {
            width: 100%;
            align-items: stretch;
        }

        .content-status-line,
        .content-actions .d-flex {
            justify-content: flex-start;
        }

        .module-admin-actions {
            margin-top: 0.75rem;
        }

        .live-class-list {
            max-height: none;
        }

        .completion-icon {
            width: 72px;
            height: 72px;
            font-size: 2rem;
        }
    }

    @media (max-width: 480px) {
        .course-description {
            padding: 0.95rem 0.9rem;
        }

        .course-description,
        .course-description p,
        .course-description li,
        .course-description div,
        .course-description span,
        .course-description .ql-editor {
            font-size: 0.98rem;
            line-height: 1.7;
        }
    }

    /* Final mobile density pass: edge-to-edge spacing and tighter content rhythm */
    @media (max-width: 767px) {
        .course-container {
            max-width: 100%;
            padding: 0.55rem clamp(0.45rem, 2.4vw, 0.8rem) 1.25rem;
        }

        .course-overview-grid,
        .course-detail-layout {
            --bs-gutter-x: 0.75rem;
            --bs-gutter-y: 0.75rem;
        }

        .course-detail-layout {
            margin-top: 0.85rem !important;
        }

        .course-header {
            margin-bottom: 0.9rem !important;
            padding: 0.95rem !important;
            border-radius: 14px;
        }

        .course-title {
            font-size: clamp(1.3rem, 5.8vw, 1.7rem) !important;
            line-height: 1.2;
        }

        .course-header .course-title-block {
            width: 100%;
            justify-content: center !important;
            align-items: center !important;
            text-align: center !important;
            flex-direction: column;
            gap: 0.45rem;
        }

        .course-header .course-title-block .course-title {
            width: 100%;
            text-align: center !important;
            margin-left: auto;
            margin-right: auto;
        }

        .course-header .course-title-block .course-title::after {
            left: 50%;
            transform: translateX(-50%);
        }

        .course-header .course-title-block .badge {
            margin: 0 !important;
            align-self: center !important;
        }

        .course-meta-strip {
            gap: 0.45rem !important;
            margin-bottom: 0.85rem !important;
        }

        .course-meta-strip .badge {
            padding: 0.4rem 0.75rem;
        }

        .course-description,
        .course-primary-panel,
        .course-content-panel,
        .sidebar-section,
        .partner-strip-card,
        .rating-section,
        .recent-ratings {
            padding: 0.95rem !important;
            margin-bottom: 0.85rem !important;
            border-radius: 14px !important;
        }

        .course-section-header {
            padding-bottom: 0.85rem !important;
            margin-bottom: 0.85rem !important;
        }

        .course-content-panel .accordion {
            gap: 0.7rem;
        }

        .course-content-panel .accordion-item {
            border-radius: 14px;
        }

        .course-content-panel .accordion-button {
            padding: 0.9rem !important;
        }

        .course-content-panel .accordion-body {
            padding: 0.9rem !important;
        }

        .content-item {
            padding: 0.85rem !important;
            margin-bottom: 0.6rem;
            border-radius: 12px !important;
        }

        .course-price-banner {
            margin-bottom: 0.8rem !important;
            padding: 0.95rem 0.85rem;
            border-radius: 14px;
        }

        .course-owner-actions {
            gap: 0.55rem;
        }

        .course-content-panel .accordion-item {
            overflow: visible;
        }

        .accordion-header .module-admin-actions {
            margin: 0.38rem 0 0 !important;
            margin-left: 0 !important;
            padding: 0.28rem;
            border-radius: 10px;
            border: 1px solid rgba(148, 163, 184, 0.22);
            background: rgba(255, 255, 255, 0.94);
            display: flex !important;
            align-items: center;
            flex-wrap: nowrap !important;
            gap: 0.3rem !important;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            z-index: 15;
        }

        .accordion-header .module-admin-actions::-webkit-scrollbar {
            display: none;
        }

        .accordion-header .module-admin-actions .btn {
            flex: 0 0 auto;
            min-width: 70px;
            white-space: nowrap;
        }

        .accordion-header .module-admin-actions.is-sticky-active {
            position: sticky;
            top: calc(env(safe-area-inset-top) + 56px);
            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
            backdrop-filter: blur(10px);
        }
    }

    @media (max-width: 480px) {
        .course-container {
            padding: 0.4rem 0.35rem 1rem;
            padding-left: max(0.35rem, env(safe-area-inset-left));
            padding-right: max(0.35rem, env(safe-area-inset-right));
        }

        .course-overview-grid,
        .course-detail-layout {
            --bs-gutter-x: 0.5rem;
            --bs-gutter-y: 0.65rem;
        }

        .course-header {
            padding: 0.85rem !important;
            border-radius: 12px;
        }

        .course-description,
        .course-primary-panel,
        .course-content-panel,
        .sidebar-section,
        .partner-strip-card,
        .rating-section,
        .recent-ratings {
            padding: 0.85rem !important;
            margin-bottom: 0.75rem !important;
            border-radius: 12px !important;
        }

        .course-content-panel .accordion-button,
        .course-content-panel .accordion-body,
        .content-item {
            padding: 0.8rem !important;
        }

        .course-header {
            text-align: left !important;
        }

        .course-header .d-flex.flex-column.flex-md-row,
        .course-header .d-flex.flex-column.flex-md-row > div {
            align-items: flex-start !important;
            text-align: left !important;
        }

        .course-header .d-flex.align-items-center,
        .course-header .d-flex.flex-wrap.gap-2,
        .share-header,
        .social-share-buttons {
            justify-content: flex-start !important;
            text-align: left !important;
        }

        .course-header .course-title-block {
            justify-content: center !important;
            align-items: center !important;
            text-align: center !important;
        }

        .course-header .course-title-block .course-title {
            text-align: center !important;
        }

        .course-header .course-title-block .badge {
            margin: 0 !important;
            align-self: center !important;
        }

        .course-overview-grid {
            margin-top: 0 !important;
        }

        .course-header-top {
            margin-bottom: 0.4rem !important;
        }

        .course-description-card {
            margin-bottom: 0.55rem !important;
        }

        .course-primary-panel {
            gap: 0.55rem;
        }

        .course-owner-actions {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .course-owner-actions .btn,
        .course-owner-actions form .btn,
        .module-admin-actions .btn {
            min-height: 34px;
            padding: 0.36rem 0.45rem;
            font-size: 0.78rem;
        }

        .module-admin-actions {
            gap: 0.35rem;
        }

        .accordion-header .module-admin-actions {
            padding: 0.24rem;
        }

        .accordion-header .module-admin-actions .btn {
            min-width: 64px;
        }

        .accordion-header .module-admin-actions.is-sticky-active {
            top: calc(env(safe-area-inset-top) + 52px);
        }

        .course-detail-line {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.35rem;
        }

        .course-detail-label {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            min-width: 0;
            white-space: nowrap;
            overflow-wrap: normal;
            word-break: normal;
            font-size: 0.9rem;
        }

        .course-detail-label i {
            margin-right: 0 !important;
            flex: 0 0 auto;
        }

        .course-detail-value {
            text-align: right;
            max-width: 62%;
            white-space: normal;
            overflow-wrap: break-word;
            word-break: normal;
            font-size: 0.95rem;
        }

        .share-section {
            padding: 0.76rem !important;
            border-radius: 10px !important;
            display: grid;
            gap: 0.58rem;
        }

        .share-top-bar {
            display: grid;
            grid-template-columns: 1fr;
            justify-items: center;
            text-align: center;
            gap: 0.45rem;
        }

        .share-header {
            width: 100%;
            justify-content: center !important;
            text-align: center !important;
        }

        .share-section .social-share-buttons {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            justify-content: center !important;
            gap: 0.42rem;
        }

        .share-section .social-btn {
            width: 100%;
            min-width: 0;
            min-height: 42px;
            border-radius: 10px;
        }

        .share-link-wrapper {
            grid-template-columns: 1fr;
            gap: 0.45rem;
        }

        .share-link-input {
            text-align: center;
            font-size: 0.95rem;
            padding: 0.6rem 0.7rem;
        }

        .copy-link-btn {
            width: 100%;
            min-height: 40px;
            justify-content: center;
            border-radius: 10px;
        }

        .share-help {
            text-align: center;
            font-size: 0.84rem;
            line-height: 1.32;
            margin: 0.1rem 0 0;
        }

        .course-primary-panel {
            gap: 0.45rem;
        }

        .course-owner-actions {
            grid-template-columns: 1fr;
            gap: 0.4rem;
        }

        .badge {
            border-radius: 8px;
        }

        .course-title::after {
            width: 52px;
            height: 4px;
        }
    }

    @media (max-width: 390px) {
        .course-container {
            padding: 0.16rem 0.12rem 0.72rem;
            padding-left: max(0.12rem, env(safe-area-inset-left));
            padding-right: max(0.12rem, env(safe-area-inset-right));
        }

        .course-overview-grid,
        .course-detail-layout {
            --bs-gutter-x: 0.22rem;
            --bs-gutter-y: 0.4rem;
        }

        .course-detail-layout {
            margin-top: 0.5rem !important;
        }

        .course-header {
            margin-bottom: 0.5rem !important;
            padding: 0.58rem !important;
            border-radius: 8px;
        }

        .course-header-top {
            margin-bottom: 0.28rem !important;
        }

        .course-title {
            font-size: clamp(1.1rem, 5.7vw, 1.32rem) !important;
            line-height: 1.15;
            padding-bottom: 0.32rem;
        }

        .course-title::after {
            width: 38px;
            height: 3px;
        }

        .course-meta-strip {
            gap: 0.28rem !important;
            margin-bottom: 0.45rem !important;
        }

        .course-meta-strip .badge {
            padding: 0.24rem 0.44rem;
            font-size: 0.68rem;
            border-radius: 7px;
        }

        .course-description,
        .course-primary-panel,
        .course-content-panel,
        .sidebar-section,
        .partner-strip-card,
        .rating-section,
        .recent-ratings {
            padding: 0.6rem !important;
            margin-bottom: 0.5rem !important;
            border-radius: 8px !important;
        }

        .course-description,
        .course-description p,
        .course-description li,
        .course-description div,
        .course-description span,
        .course-description .ql-editor {
            line-height: 1.52 !important;
        }

        .course-section-header {
            gap: 0.4rem;
            padding-bottom: 0.46rem !important;
            margin-bottom: 0.46rem !important;
        }

        .course-content-panel .accordion {
            gap: 0.4rem;
        }

        .course-content-panel .accordion-button,
        .course-content-panel .accordion-body,
        .content-item {
            padding: 0.56rem !important;
        }

        .content-item {
            margin-bottom: 0.35rem;
            border-radius: 8px !important;
        }

        .content-icon {
            width: 30px;
            height: 30px;
            font-size: 0.92rem;
        }

        .course-price-banner {
            margin-bottom: 0.45rem !important;
            padding: 0.64rem 0.56rem;
            border-radius: 8px;
        }

        .course-detail-list {
            gap: 0.4rem;
        }

        .course-detail-line {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.3rem;
            padding-bottom: 0.42rem;
        }

        .course-detail-label {
            gap: 0.25rem;
            font-size: 0.86rem;
            white-space: nowrap;
        }

        .course-detail-value {
            max-width: 64%;
            font-size: 0.9rem;
            line-height: 1.25;
        }

        .share-section {
            padding: 0.62rem !important;
            border-radius: 8px !important;
            gap: 0.46rem;
        }

        .share-top-bar {
            gap: 0.35rem;
        }

        .share-header {
            font-size: 0.94rem;
        }

        .share-header-icon {
            width: 30px;
            height: 30px;
            border-radius: 8px;
        }

        .share-section .social-share-buttons {
            gap: 0.32rem;
        }

        .share-section .social-btn {
            min-height: 38px;
            border-radius: 8px;
            font-size: 1rem;
        }

        .share-link-input {
            font-size: 0.9rem;
            padding: 0.52rem 0.56rem;
        }

        .copy-link-btn {
            min-height: 36px;
            font-size: 0.84rem;
            padding: 0.45rem 0.5rem;
            border-radius: 8px;
        }

        .share-help {
            font-size: 0.78rem;
        }

        .course-owner-actions {
            grid-template-columns: 1fr;
            gap: 0.35rem;
        }

        .course-owner-actions .btn,
        .course-owner-actions form .btn,
        .module-admin-actions .btn {
            min-height: 32px;
            padding: 0.3rem 0.35rem;
            font-size: 0.74rem;
        }

        .module-admin-actions {
            gap: 0.28rem;
        }

        .accordion-header .module-admin-actions {
            margin-top: 0.3rem !important;
            padding: 0.2rem;
            border-radius: 8px;
        }

        .accordion-header .module-admin-actions .btn {
            min-width: 58px;
        }

        .accordion-header .module-admin-actions.is-sticky-active {
            top: calc(env(safe-area-inset-top) + 48px);
        }

        .live-class-card {
            padding: 0.55rem;
        }
    }
    /* Teacher empowerment workflow: one clear next step, calm secondary actions */
    .teacher-start-guide {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.95fr) auto;
        align-items: center;
        gap: 1rem;
        margin: 0 0 1.25rem;
        padding: 1rem;
        border: 1px solid #DCEFE4;
        border-radius: 14px;
        background: linear-gradient(135deg, #F5FBF7 0%, #FFFFFF 100%);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    }

    .teacher-start-eyebrow {
        display: inline-flex;
        margin-bottom: 0.25rem;
        color: #047857;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .teacher-start-copy h4 {
        margin: 0 0 0.25rem;
        color: #10231B;
        font-size: 1.05rem;
        font-weight: 800;
    }

    .teacher-start-copy p {
        margin: 0;
        color: #53635C;
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .teacher-start-steps {
        display: grid;
        gap: 0.45rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .teacher-start-steps li {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        color: #64748B;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .teacher-start-steps span {
        width: 24px;
        height: 24px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #EEF2F7;
        color: #64748B;
        font-size: 0.76rem;
    }

    .teacher-start-steps .is-current span,
    .teacher-start-steps .is-done span {
        background: #00A651;
        color: #FFFFFF;
    }

    .teacher-start-steps .is-current {
        color: #10231B;
    }

    .teacher-start-action .btn {
        min-width: 148px;
        border-radius: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .course-owner-actions--teacher .btn,
    .course-reorder-toolbar .btn,
    .module-admin-actions .btn,
    .lesson-action-group .btn,
    .module-utility-row .btn {
        border-radius: 10px;
        font-weight: 700;
        box-shadow: none !important;
    }

    .course-owner-actions--teacher .btn-success,
    .teacher-start-action .btn-success,
    .module-admin-actions .btn-success,
    .lesson-action-group .btn-success,
    .module-utility-row .btn-success {
        background: #00A651 !important;
        border-color: #00A651 !important;
        color: #FFFFFF !important;
    }

    .course-owner-actions--teacher .btn-primary,
    .module-admin-actions .btn-primary,
    .lesson-action-group .btn-primary {
        background: #0288D1 !important;
        border-color: #0288D1 !important;
        color: #FFFFFF !important;
    }

    .course-owner-actions--teacher .btn-outline-secondary,
    .course-reorder-toolbar .btn-outline-secondary,
    .module-admin-actions .btn-outline-secondary,
    .lesson-action-group .btn-outline-secondary,
    .module-utility-row .btn-outline-secondary,
    .view-flashcards-btn {
        background: #FFFFFF !important;
        border: 1px solid #CBD5E1 !important;
        color: #334155 !important;
        text-decoration: none !important;
    }

    .module-admin-actions .btn-outline-danger,
    .lesson-action-group .btn-outline-danger,
    .module-utility-row .btn-outline-danger,
    .course-danger-zone .btn-outline-danger {
        background: #FFFFFF !important;
        border: 1px solid #FCA5A5 !important;
        color: #B91C1C !important;
    }

    .module-admin-actions {
        margin: 0.85rem 0 0.35rem 1rem;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .module-admin-actions .module-drag-handle,
    .content-drag-handle {
        width: 34px;
        height: 34px;
        border: 1px solid #CBD5E1;
        border-radius: 10px;
        background: #FFFFFF;
        color: #64748B;
    }

    .lesson-action-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.4rem;
    }

    .course-danger-zone {
        margin-top: 0.4rem;
        padding-top: 0.75rem;
        border-top: 1px solid #F1F5F9;
    }

    @media (max-width: 991.98px) {
        .teacher-start-guide {
            grid-template-columns: 1fr;
            align-items: stretch;
        }

        .teacher-start-action .btn {
            width: 100%;
        }
    }

    @media (max-width: 768px) {
        .teacher-start-guide {
            padding: 0.85rem;
            border-radius: 12px;
            gap: 0.8rem;
        }

        .teacher-start-steps {
            grid-template-columns: 1fr;
        }

        .module-admin-actions {
            margin: 0.65rem 0 0.25rem;
            padding: 0.55rem;
            border: 1px solid #E2E8F0;
            border-radius: 12px;
            background: #F8FAFC;
        }

        .module-admin-actions .btn {
            min-height: 38px;
            flex: 1 1 auto;
        }

        .lesson-action-group {
            justify-content: flex-start;
        }
    }
