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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    min-height: 100vh;
    padding: 0;
    color: #1a1a1a;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

header {
    background: #000000;
    color: #ffffff;
    padding: 80px 60px 60px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: none;
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.7;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 8px;
}

.tabs {
    display: flex;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 60px;
    gap: 0;
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.tab-button {
    background: transparent;
    border: none;
    padding: 24px 32px;
    font-size: 0.85rem;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #000;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.02);
}

.tab-button:hover::before {
    width: 60%;
}

.tab-button.active {
    color: #000;
    background: transparent;
    font-weight: 500;
}

.tab-button.active::before {
    width: 100%;
    background: #000;
}

.tab-content {
    display: none;
    padding: 80px 60px;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content.active {
    display: block;
}

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

.tab-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #000;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.tab-description {
    color: #666;
    margin-bottom: 50px;
    font-size: 0.95rem;
    line-height: 1.8;
    font-weight: 300;
    max-width: 600px;
}

.mermaid {
    background: #fafafa;
    border-radius: 0;
    padding: 60px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.mermaid:hover {
    border-color: #d0d0d0;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    header {
        padding: 60px 40px 50px;
    }

    header h1 {
        font-size: 2.8rem;
    }

    .tabs {
        padding: 0 40px;
    }

    .tab-content {
        padding: 60px 40px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
    }

    header {
        padding: 50px 30px 40px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .tabs {
        padding: 0 20px;
    }

    .tab-button {
        padding: 20px 20px;
        font-size: 0.8rem;
    }

    .tab-content {
        padding: 40px 30px;
    }

    .tab-content h2 {
        font-size: 2rem;
    }

    .tab-description {
        font-size: 0.9rem;
        margin-bottom: 40px;
    }

    .mermaid {
        padding: 40px 20px;
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .tab-button {
        padding: 18px 15px;
        font-size: 0.75rem;
    }

    .tab-content {
        padding: 30px 20px;
    }

    .tab-content h2 {
        font-size: 1.6rem;
    }

    .mermaid {
        padding: 30px 15px;
    }
}

/* ============================================
   BLOCKS VIEW - Shadcn UI Style
   ============================================ */

:root {
    /* Couleurs shadcn UI alignées avec Mermaid */
    --color-beginner: hsl(142, 76%, 36%);
    --color-intermediate: hsl(221, 83%, 53%);
    --color-advanced: hsl(346, 77%, 50%);
    --color-year1-bg: hsl(214, 100%, 97%);
    --color-year2-bg: hsl(24, 100%, 97%);
    --color-beginner-bg: hsl(142, 76%, 95%);
    --color-intermediate-bg: hsl(221, 83%, 95%);
    --color-advanced-bg: hsl(346, 77%, 95%);
}

.blocks-view {
    padding: 0;
}

.year-section {
    margin-bottom: 60px;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    background: #ffffff;
}

.year-section.year-1 {
    background: var(--color-year1-bg);
    border-left: 4px solid hsl(221, 83%, 53%);
}

.year-section.year-2 {
    background: var(--color-year2-bg);
    border-left: 4px solid hsl(24, 100%, 50%);
}

.year-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.year-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 500;
    margin: 0;
    color: #000;
}

.year-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #000;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.block-container {
    margin-bottom: 40px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.block-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.block-header {
    margin-bottom: 24px;
}

.block-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0;
    color: #000;
}

.module-count {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.85rem;
    border-radius: 4px;
}

.subgroup-row {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.subgroup-label {
    min-width: 140px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    color: #666;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    height: fit-content;
}

.subgroup-beginner .subgroup-label {
    background: var(--color-beginner-bg);
    color: var(--color-beginner);
}

.subgroup-intermediate .subgroup-label {
    background: var(--color-intermediate-bg);
    color: var(--color-intermediate);
}

.subgroup-avancé .subgroup-label,
.subgroup-avance .subgroup-label {
    background: var(--color-advanced-bg);
    color: var(--color-advanced);
}

.modules-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    flex: 1;
}

.block-module-card {
    min-width: 200px;
    max-width: 280px;
    flex: 1;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.block-module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #000;
}

.module-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.module-id {
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
    font-family: 'Inter', monospace;
}

.module-level-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.module-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.module-meta {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* Responsive design for blocks view */
@media (max-width: 1024px) {
    .subgroup-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .subgroup-label {
        min-width: auto;
        width: fit-content;
    }
    
    .modules-row {
        width: 100%;
    }
    
    .block-module-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .year-section {
        padding: 24px;
    }
    
    .block-container {
        padding: 20px;
    }
    
    .modules-row {
        flex-direction: column;
    }
    
    .block-module-card {
        max-width: 100%;
        min-width: auto;
    }
}

/* Loading state */
.mermaid.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}

.mermaid.loading::before {
    content: "Loading...";
    color: #999;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Scrollbar styling */
.mermaid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.mermaid::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.mermaid::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 0;
}

.mermaid::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Make Mermaid nodes clickable */
.mermaid svg .node rect,
.mermaid svg .node circle,
.mermaid svg .node polygon {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mermaid svg .node:hover rect,
.mermaid svg .node:hover circle,
.mermaid svg .node:hover polygon {
    opacity: 0.85;
    transform: scale(1.02);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto;
    border-radius: 0;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 1px solid #e5e5e5;
    background: #000000;
    color: white;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.close-button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.modal-body {
    padding: 50px 40px;
    overflow-y: auto;
    flex: 1;
    background: #fafafa;
}

.loading-indicator {
    text-align: center;
    padding: 60px;
    color: #999;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.error-message {
    color: #000;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    margin: 20px 0;
    display: none;
    font-size: 0.9rem;
    line-height: 1.7;
}

.error-message.show {
    display: block;
}

.script-content {
    display: none;
    white-space: pre-wrap;
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    color: #1a1a1a;
    background: #ffffff;
    padding: 40px;
    border: 1px solid #e5e5e5;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.script-content.show {
    display: block;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 2.5% auto;
    }

    .modal-header {
        padding: 24px 30px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-body {
        padding: 30px 24px;
    }

    .script-content {
        font-size: 0.85rem;
        padding: 30px 24px;
    }
}

/* Elegant selection */
::selection {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

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

/* Schema Section Styles */
.schema-section {
    margin-bottom: 60px;
}

.schema-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 12px;
    margin-top: 0;
    letter-spacing: -0.01em;
}

.schema-section-subtitle {
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Table Styles for Schemas & Attachment */
.table-container {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 40px;
    overflow-x: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.schemas-attachment-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
}

.schemas-attachment-table thead {
    background: #000000;
    color: #ffffff;
}

.schemas-attachment-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.schemas-attachment-table th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.schemas-attachment-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s ease;
}

.schemas-attachment-table tbody tr:hover {
    background-color: #fafafa;
}

.schemas-attachment-table tbody tr:last-child {
    border-bottom: none;
}

.schemas-attachment-table td {
    padding: 20px 24px;
    color: #1a1a1a;
    vertical-align: top;
}

.schemas-attachment-table td:not(:last-child) {
    border-right: 1px solid #f0f0f0;
}

.schemas-attachment-table .domain-cell {
    background: #f5f5f5;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    border-right: 2px solid #000;
}

.schemas-attachment-table .domain-row {
    border-top: 2px solid #e5e5e5;
}

.schemas-attachment-table .domain-row:first-child {
    border-top: none;
}

.schemas-link-table td {
    font-size: 0.9rem;
}

.schemas-link-table td strong {
    color: #000;
    font-weight: 600;
}

/* Usage Guide Styles */
.usage-guide {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 30px 40px;
    margin-top: 20px;
    line-height: 1.8;
}

.usage-guide p {
    margin-bottom: 16px;
    color: #1a1a1a;
}

.usage-guide ul {
    margin: 20px 0;
    padding-left: 30px;
}

.usage-guide li {
    margin-bottom: 12px;
    color: #1a1a1a;
}

.usage-guide li strong {
    color: #000;
    font-weight: 600;
}

.visual-note {
    background: #fafafa;
    padding: 20px;
    border-left: 3px solid #000;
    margin-top: 20px;
    font-style: italic;
}

/* Responsive table */
@media (max-width: 1024px) {
    .table-container {
        padding: 30px 20px;
    }
    
    .schemas-attachment-table {
        font-size: 0.9rem;
    }
    
    .schemas-attachment-table th,
    .schemas-attachment-table td {
        padding: 16px 18px;
    }
}

@media (max-width: 768px) {
    .schema-section {
        margin-bottom: 40px;
    }
    
    .schema-section-title {
        font-size: 1.5rem;
    }
    
    .table-container {
        padding: 20px 15px;
    }
    
    .schemas-attachment-table {
        font-size: 0.85rem;
    }
    
    .schemas-attachment-table th,
    .schemas-attachment-table td {
        padding: 12px 15px;
    }
    
    .schemas-attachment-table .domain-cell {
        border-right: 1px solid #e5e5e5;
        border-bottom: 2px solid #000;
    }
    
    .usage-guide {
        padding: 20px 24px;
    }
    
    /* For very small screens, make tables scrollable instead of stacked */
    @media (max-width: 480px) {
        .schemas-attachment-table {
            display: block;
            overflow-x: auto;
            white-space: nowrap;
        }
        
        .schemas-attachment-table thead,
        .schemas-attachment-table tbody,
        .schemas-attachment-table tr,
        .schemas-attachment-table th,
        .schemas-attachment-table td {
            display: block;
        }
        
        .schemas-attachment-table thead {
            display: none;
        }
        
        .schemas-attachment-table tr {
            margin-bottom: 20px;
            border: 1px solid #e5e5e5;
            background: #ffffff;
        }
        
        .schemas-attachment-table td {
            padding: 12px 15px;
            border: none;
            border-bottom: 1px solid #f0f0f0;
            display: block;
            text-align: left;
            position: relative;
            padding-left: 40%;
        }
        
        .schemas-attachment-table td:before {
            content: attr(data-label);
            position: absolute;
            left: 15px;
            width: 35%;
            font-weight: 500;
            color: #666;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.05em;
        }
        
        .schemas-attachment-table td:last-child {
            border-bottom: none;
        }
    }
}

/* ============================================
   ADMIN VIEW STYLES
   ============================================ */

.view-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
}

.view-selector h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.view-btn {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.view-btn:hover {
    background: #f5f5f5;
    border-color: #000;
}

.view-btn.active {
    background: #000;
    color: white;
    border-color: #000;
}

.admin-view {
    padding: 0;
}

.admin-module-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.admin-module-card:hover {
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-module-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.admin-module-card p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ============================================
   CLIENT VIEW STYLES (Thinkific/Podia style)
   ============================================ */

.client-view {
    padding: 0;
}

.progress-header {
    margin-bottom: 40px;
}

.progress-header h2 {
    margin-bottom: 20px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: #fafafa;
    padding: 24px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 400;
    color: #000;
    margin-bottom: 8px;
    display: block;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.client-module-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.client-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #000;
    transform: scaleY(0);
    transition: transform 0.3s;
}

.client-module-card:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.client-module-card:hover::before {
    transform: scaleY(1);
}

.client-module-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

.client-module-card .module-meta {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 0.9rem;
}

.client-module-card .status-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.progress-bar-container {
    margin-top: 12px;
}

.progress-bar {
    background: #f0f0f0;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    background: #2196f3;
    height: 100%;
    transition: width 0.3s;
}

.progress-text {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

/* Status colors */
.status-completed {
    background: #4caf50;
    color: white;
}

.status-in-progress {
    background: #2196f3;
    color: white;
}

.status-not-started {
    background: #9e9e9e;
    color: white;
}

/* ============================================
   ROLE SELECTOR IN HEADER
   ============================================ */

#roleSelector {
    display: flex;
    gap: 10px;
    align-items: center;
}

#roleToggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

#roleToggle:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* ============================================
   RESPONSIVE DESIGN FOR NEW VIEWS
   ============================================ */

/* ============================================
   MODULE VIEWER MODAL STYLES
   ============================================ */

#moduleViewerModal .modal-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

#moduleViewerModal audio {
    width: 100%;
    margin-bottom: 10px;
}

#moduleViewerModal #slidesContent {
    min-height: 400px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#moduleViewerModal #slidesContent img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#moduleViewerModal #slidesNavigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#moduleViewerModal #slidesNavigation button {
    padding: 10px 20px;
    background: #000;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

#moduleViewerModal #slidesNavigation button:hover:not(:disabled) {
    background: #333;
}

#moduleViewerModal #slidesNavigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#moduleViewerModal #slideCounter {
    padding: 10px 20px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    font-size: 0.9rem;
}

/* ============================================
   ANIMATIONS AND TRANSITIONS
   ============================================ */

.client-module-card,
.admin-module-card,
.stat-card {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Stagger animation for module cards */
.modules-grid > *:nth-child(1) { animation-delay: 0.05s; }
.modules-grid > *:nth-child(2) { animation-delay: 0.1s; }
.modules-grid > *:nth-child(3) { animation-delay: 0.15s; }
.modules-grid > *:nth-child(4) { animation-delay: 0.2s; }
.modules-grid > *:nth-child(5) { animation-delay: 0.25s; }
.modules-grid > *:nth-child(6) { animation-delay: 0.3s; }

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload progress indicator */
.upload-progress {
    margin-top: 10px;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: #1976d2;
    transition: width 0.3s;
}

/* ============================================
   RESPONSIVE DESIGN FOR NEW VIEWS
   ============================================ */

@media (max-width: 1024px) {
    .modules-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-module-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .admin-module-card > div:last-child {
        width: 100%;
    }
    
    .admin-module-card button {
        width: 100%;
    }
    
    #moduleViewerModal .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    #moduleViewerModal #slidesNavigation {
        flex-direction: column;
    }
    
    #moduleViewerModal #slidesNavigation button {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    #roleToggle {
        padding: 8px 16px;
        font-size: 0.75rem;
    }
    
    .view-selector {
        padding: 15px;
    }
    
    .view-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}











