/**
 * CBE Support — Custom Stylesheet
 * 
 * Design tokens:
 *   Primary:    #cd3201
 *   Secondary:  #734321
 *   Background: #ffffff
 *   Font:       Outfit (Google Fonts)
 * 
 * Mobile-first approach with native app feel on small screens.
 */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --primary: #cd3201;
    --primary-light: #e8572a;
    --primary-dark: #a52900;
    --primary-bg: rgba(205, 50, 1, 0.08);
    --secondary: #734321;
    --secondary-light: #8f5a38;
    --secondary-bg: rgba(115, 67, 33, 0.08);
    --bg: #ffffff;
    --bg-muted: #f8f9fa;
    --bg-card: #ffffff;
    --border: #e9ecef;
    --border-light: #f0f0f0;
    --text: #1a1a2e;
    --text-muted: #6c757d;
    --text-light: #adb5bd;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #0dcaf0;
    --sidebar-width: 260px;
    --topbar-height: 56px;
    --bottom-nav-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

/* ============================================================
   GLOBAL RESET & TYPOGRAPHY
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-muted);
    color: var(--text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Native app feel: prevent text selection on interactive elements */
.sidebar, .mobile-bottom-nav, .top-bar, .btn {
    -webkit-user-select: none;
    user-select: none;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   SIDEBAR (Desktop)
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sidebar-logo img {
    height: 36px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 12px;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    padding: 16px 12px 6px;
    margin-top: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.sidebar-link:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.sidebar-link.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link .badge {
    font-size: 10px;
    padding: 3px 7px;
}

/* Sidebar user card */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-logout {
    color: var(--text-muted);
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
    transition: all var(--transition);
}

.sidebar-logout:hover {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.08);
}

/* ============================================================
   MOBILE TOP BAR
   ============================================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 1000;
}

.top-bar-logo {
    height: 28px;
    width: auto;
}

.top-bar-title {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}

/* ============================================================
   MOBILE BOTTOM NAVIGATION
   ============================================================ */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-muted);
}

/* Mobile: no sidebar margin, add top/bottom nav spacing */
@media (max-width: 767.98px) {
    .main-content {
        margin-left: 0;
        padding-top: var(--topbar-height);
        padding-bottom: calc(var(--bottom-nav-height) + 16px);
    }
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 0;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.page-header-actions {
    display: flex;
    gap: 8px;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.content-wrapper {
    padding: 16px;
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 24px 32px;
    }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
}

.card-body {
    padding: 20px;
}

/* Stat cards */
.stat-card {
    border: none;
    border-radius: var(--radius-md);
    padding: 20px;
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card .stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* ============================================================
   REVIEW CARDS (mobile-native feel)
   ============================================================ */
.review-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg);
    transition: all var(--transition);
}

.review-card:active {
    transform: scale(0.99);
    background: var(--bg-muted);
}

.review-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-card-breadcrumb {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.review-card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.review-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.review-card-time {
    font-size: 12px;
    font-weight: 600;
}

.review-card-time.urgent { color: var(--danger); }
.review-card-time.normal { color: var(--warning); }
.review-card-time.relaxed { color: var(--success); }

/* ============================================================
   BUTTONS (themed)
   ============================================================ */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    border-color: var(--secondary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    transition: all var(--transition);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Action button group (approve/reject/revise) */
.action-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn-group .btn {
    flex: 1;
    min-width: 100px;
}

@media (max-width: 575.98px) {
    .action-btn-group {
        flex-direction: column;
    }
    .action-btn-group .btn {
        width: 100%;
    }
}

/* ============================================================
   FORMS (clean inputs)
   ============================================================ */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 14px;
    padding: 10px 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: 'Outfit', sans-serif;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

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

.form-text {
    font-size: 12px;
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ============================================================
   TABLES (responsive and clean)
   ============================================================ */
.table {
    font-size: 14px;
}

.table thead th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:hover {
    background: var(--bg-muted);
}

/* Mobile-friendly table wrapper */
.table-responsive {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg);
}

/* ============================================================
   BADGES (override Bootstrap)
   ============================================================ */
.badge {
    font-weight: 600;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.bg-purple {
    background-color: #7c3aed !important;
}

/* ============================================================
   WIZARD STEPS (curriculum entry)
   ============================================================ */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    position: relative;
}

.wizard-step::after {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--border);
    margin-left: 8px;
}

.wizard-step:last-child::after {
    display: none;
}

.wizard-step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-step.active {
    color: var(--primary);
}

.wizard-step.active .step-num {
    background: var(--primary);
    color: #fff;
}

.wizard-step.completed {
    color: var(--success);
}

.wizard-step.completed .step-num {
    background: var(--success);
    color: #fff;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 14px;
    max-width: 320px;
    margin: 0 auto 16px;
}

/* ============================================================
   AUTH LAYOUT (login page)
   ============================================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-muted) 0%, #fff 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 48px;
}

.auth-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ============================================================
   PIPELINE PROGRESS BARS
   ============================================================ */
.pipeline-bar {
    height: 8px;
    background: var(--bg-muted);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
}

.pipeline-bar .segment {
    height: 100%;
    transition: width 0.5s ease;
}

.pipeline-bar .segment-pending { background: var(--text-light); }
.pipeline-bar .segment-queued { background: var(--info); }
.pipeline-bar .segment-generating { background: var(--warning); }
.pipeline-bar .segment-review { background: #7c3aed; }
.pipeline-bar .segment-approved { background: var(--success); }
.pipeline-bar .segment-published { background: var(--primary); }

/* ============================================================
   CHART CONTAINERS
   ============================================================ */
.chart-container {
    position: relative;
    width: 100%;
    max-height: 300px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
}

@media (max-width: 767.98px) {
    .toast-container {
        top: calc(var(--topbar-height) + 8px);
        left: 16px;
        right: 16px;
    }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.spinner-border {
    color: var(--primary) !important;
}

/* ============================================================
   MODAL OVERRIDES
   ============================================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
}

/* Mobile: full-screen modals */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
    }
    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
}

/* ============================================================
   ALERT OVERRIDES
   ============================================================ */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================================
   DROPDOWN OVERRIDES
   ============================================================ */
.dropdown-menu {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: 8px;
    font-size: 14px;
}

.dropdown-item {
    border-radius: 6px;
    padding: 8px 12px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--bg-muted);
}

/* ============================================================
   AUDIO PLAYER (custom)
   ============================================================ */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
}

.audio-player .play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.audio-player .progress-bar-wrapper {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
}

.audio-player .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-player .time-display {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 767.98px) {
    /* Make tables horizontally scrollable */
    .table-responsive-cards .table thead {
        display: none;
    }
    .table-responsive-cards .table tbody tr {
        display: block;
        padding: 12px;
        margin-bottom: 8px;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        background: var(--bg);
    }
    .table-responsive-cards .table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
    }
    .table-responsive-cards .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: var(--text-muted);
        text-transform: uppercase;
    }

    /* Stack page header actions */
    .page-header-actions {
        flex-wrap: wrap;
    }

    /* Reduce card padding on mobile */
    .card-body {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }
}

/* ============================================================
   SKELETON LOADING (for AJAX content)
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-md);
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-bar .form-select,
.filter-bar .form-control {
    width: auto;
    min-width: 140px;
    font-size: 13px;
    padding: 7px 12px;
}

@media (max-width: 575.98px) {
    .filter-bar {
        flex-direction: column;
    }
    .filter-bar .form-select,
    .filter-bar .form-control {
        width: 100%;
    }
}

/* ============================================================
   CONTENT PREVIEW PANELS
   ============================================================ */
.content-preview {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    max-height: 400px;
    overflow-y: auto;
}

.content-preview h1, .content-preview h2, .content-preview h3 {
    font-weight: 700;
    margin-top: 16px;
}

.content-preview h1 { font-size: 18px; }
.content-preview h2 { font-size: 16px; }
.content-preview h3 { font-size: 14px; }

/* Side-by-side review layout */
.review-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 991.98px) {
    .review-split {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   TAB PILLS (native app style)
   ============================================================ */
.nav-pills-custom {
    display: flex;
    background: var(--bg-muted);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-pills-custom .nav-link {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    color: var(--text-muted);
    white-space: nowrap;
    transition: all var(--transition);
}

.nav-pills-custom .nav-link.active {
    background: var(--bg);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   CURRICULUM TREE VIEW
   ============================================================ */
.tree-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    overflow: hidden;
}

.tree-item-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    gap: 10px;
    transition: background var(--transition);
}

.tree-item-header:hover {
    background: var(--bg-muted);
}

.tree-item-header .chevron {
    transition: transform var(--transition);
    color: var(--text-muted);
    font-size: 12px;
}

.tree-item-header.collapsed .chevron {
    transform: rotate(-90deg);
}

.tree-item-children {
    padding-left: 24px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   PIPELINE STATUS BARS
   ============================================================ */
.pipeline-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--border-light);
}

.pipeline-bar .segment {
    transition: width 0.4s ease;
}

.segment-pending    { background: #adb5bd; }
.segment-queued     { background: #0dcaf0; }
.segment-generating { background: #ffc107; }
.segment-review     { background: #7c3aed; }
.segment-approved   { background: #198754; }
.segment-published  { background: var(--primary); }

/* ============================================================
   NAV PILLS CUSTOM (tab-like filter)
   ============================================================ */
.nav-pills-custom {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.nav-pills-custom .nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-muted);
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition);
}

.nav-pills-custom .nav-link:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.nav-pills-custom .nav-link.active {
    background: var(--primary);
    color: #fff;
}

/* ============================================================
   REVIEW CARDS (review queue items)
   ============================================================ */
.review-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: all var(--transition);
}

.review-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(205, 50, 1, 0.08);
    transform: translateY(-1px);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-card-breadcrumb {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.review-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.review-card-time {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.review-card-time.urgent {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.review-card-time.normal {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.review-card-time.relaxed {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

/* ============================================================
   REVIEW SPLIT LAYOUT (side-by-side)
   ============================================================ */
.review-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 991.98px) {
    .review-split {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   CONTENT PREVIEW BOX
   ============================================================ */
.content-preview {
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================================
   AUDIO PLAYER (custom)
   ============================================================ */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-muted);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
}

.audio-player .play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
}

.audio-player .play-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.audio-player .progress-bar-wrapper {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.audio-player .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-player .time-display {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

/* ============================================================
   FILTER BAR (inline search + selects)
   ============================================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-select,
.filter-bar .form-control {
    max-width: 240px;
}

@media (max-width: 575.98px) {
    .filter-bar .form-select,
    .filter-bar .form-control {
        max-width: 100%;
    }
}

/* ============================================================
   STAT CHANGE LABELS
   ============================================================ */
.stat-change.positive {
    color: #198754;
}

.stat-change.negative {
    color: #dc3545;
}

/* Purple badge for custom content types */
.badge.bg-purple {
    background-color: #7c3aed !important;
    color: #fff;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .sidebar, .mobile-bottom-nav, .top-bar, .page-header-actions {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}
