/* ============================================
   VARIABLES ET RESET
   ============================================ */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================
   MESSAGES FLASH
   ============================================ */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    min-width: 300px;
}

.alert {
    padding: 15px 40px 15px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: opacity 0.3s;
}

.alert-success {
    background: var(--success);
    color: white;
}

.alert-error {
    background: var(--error);
    color: white;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

/* ============================================
   AUTHENTIFICATION (LOGIN/SIGNUP)
   ============================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.auth-box h1 {
    color: var(--primary);
    font-size: 32px;
    margin-bottom: 5px;
    text-align: center;
}

.auth-box h2 {
    color: var(--text-gray);
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 30px;
    text-align: center;
}

.auth-form {
    margin-bottom: 20px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-gray);
    font-size: 13px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    background: var(--text-gray);
    cursor: not-allowed;
}

/* Bouton "Étape suivante" bien visible */
.btn-next-step {
    display: block;
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.35);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-next-step:hover {
    background: linear-gradient(135deg, #1565c0, #0a3d91);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-next-step:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background: var(--text-gray);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.auth-link {
    text-align: center;
    color: var(--text-gray);
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    min-height: 100vh;
}

.dashboard-header {
    background: var(--bg-white);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-left h1 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 2px;
}

.subtitle {
    color: var(--text-gray);
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.welcome-card h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

/* ============================================
   WORKFLOW
   ============================================ */
.workflow {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.workflow h3 {
    color: var(--text-dark);
    margin-bottom: 30px;
    font-size: 22px;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.step.active {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.step.disabled {
    opacity: 0.6;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 15px;
}

.step.active .step-number {
    background: var(--success);
}

.step.disabled .step-number {
    background: var(--text-gray);
}

.step-content h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 18px;
}

.step-content p {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 15px;
}

.status {
    color: var(--success);
    font-weight: 500;
    font-size: 14px;
}

.status.warning {
    color: var(--warning);
}

/* ============================================
   STATISTIQUES
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card p {
    color: var(--text-gray);
    font-size: 16px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    color: var(--text-dark);
    font-size: 28px;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-gray);
    font-size: 16px;
}

/* ============================================
   ZONE DRAG & DROP
   ============================================ */
.upload-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.drop-zone {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-light);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.drop-zone-active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    transform: scale(1.01);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-icon {
    font-size: 64px;
}

.drop-text {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-dark);
}

.drop-subtext {
    color: var(--text-gray);
    font-size: 14px;
}

.file-info {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
}

/* Formats supportés */
.supported-formats {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.supported-formats h4 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 16px;
}

.format-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.format-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.format-badge.csv {
    background: #dbeafe;
    color: #1e40af;
}

.format-badge.excel {
    background: #dcfce7;
    color: #166534;
}

.format-badge.pdf {
    background: #fee2e2;
    color: #991b1b;
}

.format-badge.word {
    background: #e0e7ff;
    color: #3730a3;
}

/* Instructions d'import */
.import-instructions {
    margin-top: 30px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.import-instructions h4 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.import-instructions p {
    color: var(--text-gray);
    margin-bottom: 10px;
}

.import-instructions ul {
    list-style: none;
    padding: 0;
}

.import-instructions li {
    padding: 8px 0;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

.import-instructions li:last-child {
    border-bottom: none;
}

/* Bouton large */
.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    margin-top: 30px;
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* ============================================
   TABLEAUX DE DONNEES
   ============================================ */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.data-table tr:hover {
    background: var(--bg-light);
}

.data-table td:first-child,
.data-table th:first-child {
    width: 50px;
    text-align: center;
    color: var(--text-gray);
}

/* ============================================
   CARTES ET SECTIONS
   ============================================ */
.preview-card,
.students-list-card,
.help-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.preview-header,
.students-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.preview-header h3,
.students-list-header h3 {
    color: var(--text-dark);
    font-size: 20px;
}

.preview-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.help-card {
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.help-card h4 {
    color: #92400e;
    margin-bottom: 10px;
}

.help-card p {
    color: #78350f;
    margin-bottom: 10px;
}

.help-card ul {
    list-style: none;
    padding: 0;
}

.help-card li {
    padding: 5px 0;
    color: #78350f;
    font-size: 14px;
}

/* ============================================
   BOUTONS ICON ET ACTIONS
   ============================================ */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.2s;
}

.btn-delete:hover {
    background: #fee2e2;
}

/* ============================================
   ETAT VIDE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-gray);
}

/* ============================================
   FORMULAIRE AJOUT MANUEL
   ============================================ */
.manual-add-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.manual-add-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 18px;
}

.section-divider {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider span {
    padding: 0 20px;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 14px;
}

.manual-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.manual-form .form-group {
    margin-bottom: 0;
}

.manual-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.manual-form .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.manual-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.manual-form .form-submit {
    display: flex;
    align-items: flex-end;
}

.manual-form .form-submit .btn {
    width: 100%;
    padding: 10px 20px;
}

/* ============================================
   SECTION ETAPE SUIVANTE
   ============================================ */
.next-step-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.next-step-section p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

/* ============================================
   MESSAGES FLASH - Info
   ============================================ */
.alert-info {
    background: var(--primary);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        padding: 40px 20px;
    }

    .format-list {
        justify-content: center;
    }

    .preview-actions {
        flex-direction: column;
    }

    .students-list-header {
        flex-direction: column;
        gap: 15px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* ============================================
   MODAL DE MODIFICATION
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text-dark);
    font-size: 20px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.modal-body .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.modal-body .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    border-radius: 0 0 12px 12px;
}

.modal-footer .btn {
    width: auto;
    min-width: 100px;
}

/* ============================================
   BOUTONS D'ACTION (EDIT + DELETE)
   ============================================ */
.actions-cell {
    white-space: nowrap;
}

.btn-edit {
    margin-right: 5px;
}

.btn-edit:hover {
    background: #dbeafe;
}

/* ============================================
   AI ENGINE - GENERATION DES GROUPES
   ============================================ */

/* Carte d'avertissement */
.warning-card {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.warning-card .warning-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.warning-card h3 {
    color: #92400e;
    margin-bottom: 15px;
}

.warning-card p {
    color: #78350f;
    margin-bottom: 10px;
}

/* Carte d'info */
.info-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.info-card ol {
    padding-left: 20px;
}

.info-card li {
    color: var(--text-gray);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Résumé des statistiques */
.stats-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 150px;
}

.stat-item .stat-value {
    display: block;
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
}

.stat-item .stat-label {
    color: var(--text-gray);
    font-size: 14px;
}

.stat-item.warning .stat-value {
    color: var(--warning);
}

/* Bannière d'avertissement */
.warning-banner {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.warning-banner span {
    font-size: 24px;
}

.warning-banner p {
    color: #92400e;
    margin: 0;
}

/* Section de génération */
.generate-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.generate-form {
    margin-top: 20px;
}

/* Options toggle radio */
.toggle-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.toggle-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-option:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.toggle-option input[type="radio"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.toggle-option input[type="radio"]:checked + .toggle-label {
    color: var(--primary);
}

.toggle-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.toggle-label {
    display: flex;
    flex-direction: column;
}

.toggle-label strong {
    color: var(--text-dark);
    margin-bottom: 4px;
}

.toggle-label small {
    color: var(--text-gray);
    font-size: 13px;
}

/* ============================================
   GRILLE DES EQUIPES
   ============================================ */
.teams-generated {
    margin-top: 20px;
}

.success-banner {
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.success-banner .success-icon {
    font-size: 32px;
}

.success-banner strong {
    color: #166534;
    display: block;
}

.success-banner p {
    color: #15803d;
    margin: 5px 0 0 0;
    font-size: 14px;
}

.teams-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-group-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

/* Carte d'équipe */
.team-card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.team-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-header h3 {
    margin: 0;
    font-size: 15px;
}

.team-average {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.team-members {
    padding: 8px 12px;
}

.member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.member-row:last-child {
    border-bottom: none;
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-name {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 13px;
}

.member-grade {
    color: var(--text-gray);
    font-size: 12px;
}

/* Badges de rôles */
.member-role {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-buyer {
    background: #dbeafe;
    color: #1e40af;
}

.role-seller {
    background: #fce7f3;
    color: #9d174d;
}

.role-bank {
    background: #dcfce7;
    color: #166534;
}

.role-fund {
    background: #fef3c7;
    color: #92400e;
}

.role-facilitator {
    background: #e0e7ff;
    color: #3730a3;
}

/* ============================================
   REVIEW DES GROUPES
   ============================================ */
.review-section {
    margin-top: 20px;
}

.info-banner {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.info-banner .info-icon {
    font-size: 28px;
}

.info-banner strong {
    color: #1e40af;
    display: block;
}

.info-banner p {
    color: #1d4ed8;
    margin: 5px 0 0 0;
    font-size: 14px;
}

.review-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 15px;
}

.review-actions .actions-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Uniformiser la taille des boutons dans les sections d'actions */
.review-actions .btn,
.simulations-actions .btn {
    width: auto;
    padding: 12px 24px;
    font-size: 15px;
}

/* Simulations */
.simulations-section h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
}

.simulations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.simulation-card {
    background: var(--bg-white);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.simulation-info h4 {
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.simulation-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.section-info {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 14px;
}

.simulation-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.simulations-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.simulations-actions .actions-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   DRAG & DROP - REVIEW DES GROUPES
   ============================================ */

/* Zone de drop */
.dropzone {
    min-height: 100px;
    transition: all 0.2s ease;
}

.dropzone.drag-over {
    background: rgba(37, 99, 235, 0.1);
    border: 2px dashed var(--primary);
    border-radius: 8px;
}

/* Section facilitateurs draggable */
.facilitators-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #607D8B;
}

.facilitator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.facilitator-header h3 {
    color: #607D8B;
    font-size: 16px;
    margin: 0;
}

.facilitator-count {
    color: #607D8B;
    font-size: 13px;
    font-weight: 500;
}

.facilitator-dropzone {
    min-height: 60px;
    background: white;
    border-radius: 6px;
    padding: 5px;
}

.facilitator-dropzone.is-empty::after {
    content: "Glisser un étudiant ici pour en faire un facilitateur";
    display: block;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 13px;
    padding: 15px;
}

.facilitator-dropzone.drag-over {
    background: rgba(96, 125, 139, 0.1);
    border: 2px dashed #607D8B;
}

/* Élément en cours de drag */
.draggable {
    cursor: grab;
    transition: all 0.2s ease;
}

.draggable:hover {
    background: var(--bg-light);
}

.draggable.dragging {
    opacity: 0.5;
    cursor: grabbing;
    background: #dbeafe;
}

/* Handle de drag */
.drag-handle {
    color: var(--text-gray);
    font-size: 16px;
    margin-right: 10px;
    cursor: grab;
    user-select: none;
}

.draggable:hover .drag-handle {
    color: var(--primary);
}

/* Info membre avec handle */
.member-info {
    display: flex;
    align-items: center;
}

.member-details {
    display: flex;
    flex-direction: column;
}

/* Select de rôle */
.role-select {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.role-select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.role-select.role-buyer {
    background-color: #dbeafe;
    color: #1e40af;
}

.role-select.role-seller {
    background-color: #fce7f3;
    color: #9d174d;
}

.role-select.role-bank {
    background-color: #dcfce7;
    color: #166534;
}

.role-select.role-fund {
    background-color: #fef3c7;
    color: #92400e;
}

.role-select.role-facilitator {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Footer de carte d'équipe */
.team-footer {
    padding: 10px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-gray);
}

/* Boutons d'action groupés */
.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Responsive pour les équipes */
@media (max-width: 768px) {
    .teams-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        flex-direction: column;
    }

    .teams-actions {
        flex-direction: column;
    }

    .review-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* ============================================
   ESPACE ÉTUDIANT - Couleurs distinctes (vert)
   ============================================ */

/* Login étudiant - box avec accent vert */
.student-auth-box h1 {
    color: #059669;
}

.student-auth-box h2 {
    color: var(--text-gray);
}

.btn-student {
    background: #059669;
    color: white;
    width: 100%;
}

.btn-student:hover {
    background: #047857;
}

/* Header étudiant */
.student-header {
    border-bottom: 3px solid #059669;
}

/* Carte de bienvenue étudiant (vert) */
.student-welcome {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Dashboard étudiant : grille 2 colonnes */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

/* Cartes info dans l'espace étudiant */
.student-info-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.student-info-card h3 {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #059669;
}

/* Liste d'infos profil */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-gray);
    font-size: 14px;
}

.info-value {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

/* Liste des membres d'équipe (workspace étudiant) */
.team-member-list {
    display: flex;
    flex-direction: column;
}

.team-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.team-member-item:last-child {
    border-bottom: none;
}

.team-member-item.current-member {
    background: #f0fdf4;
    margin: 0 -25px;
    padding: 12px 25px;
    border-radius: 6px;
}

/* Badge "Toi" */
.you-badge {
    display: inline-block;
    background: #059669;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
    font-weight: 600;
}

/* ============================================
   SUIVI ACCÈS ÉTUDIANTS (vue admin)
   ============================================ */

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active-badge {
    background: #dcfce7;
    color: #166534;
}

.status-inactive-badge {
    background: #f3f4f6;
    color: #6b7280;
}

.status-sent-badge {
    background: #dbeafe;
    color: #1e40af;
}

.status-pending-badge {
    background: #fef3c7;
    color: #92400e;
}

/* Section bouton activation */
.activate-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    text-align: center;
}

/* Responsive étudiant */
@media (max-width: 768px) {
    .student-grid {
        grid-template-columns: 1fr;
    }

    .team-member-item.current-member {
        margin: 0 -15px;
        padding: 12px 15px;
    }
}


/* ============================================
   WORKSPACE ÉTUDIANT — SIDEBAR + MAIN
   ============================================ */

.workspace-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-light);
}

/* ---------- Sidebar ---------- */

.workspace-sidebar {
    width: 280px;
    background: #1e293b;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-right: 3px solid var(--primary);
}

/* Couleurs de bordure par rôle */
.sidebar-buyer { border-right-color: #3b82f6; }
.sidebar-seller { border-right-color: #ec4899; }
.sidebar-bank { border-right-color: #10b981; }
.sidebar-fund { border-right-color: #f59e0b; }
.sidebar-facilitator { border-right-color: #8b5cf6; }

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
    text-align: center;
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1px;
}

.sidebar-role {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #334155;
}

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

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-team-name {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation sidebar */
.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 12px 20px 6px;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #334155;
    color: #f1f5f9;
}

.sidebar-link.active {
    background: #334155;
    color: #ffffff;
    font-weight: 600;
}

.sidebar-buyer .sidebar-link.active { border-left-color: #3b82f6; }
.sidebar-seller .sidebar-link.active { border-left-color: #ec4899; }
.sidebar-bank .sidebar-link.active { border-left-color: #10b981; }
.sidebar-fund .sidebar-link.active { border-left-color: #f59e0b; }
.sidebar-facilitator .sidebar-link.active { border-left-color: #8b5cf6; }

.sidebar-link-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Coéquipiers */
.sidebar-team {
    padding: 5px 0 10px;
    border-top: 1px solid #334155;
}

.sidebar-teammate {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 20px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.sidebar-teammate.is-me {
    color: #e2e8f0;
    font-weight: 600;
}

.teammate-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #475569;
    flex-shrink: 0;
}

.sidebar-teammate.is-me .teammate-dot {
    background: #10b981;
}

.you-tag {
    font-size: 0.65rem;
    background: #334155;
    padding: 1px 6px;
    border-radius: 8px;
    color: #94a3b8;
    margin-left: 4px;
}

/* Footer sidebar */
.sidebar-footer {
    border-top: 1px solid #334155;
    padding: 5px 0;
}

.sidebar-logout {
    color: #94a3b8 !important;
}

.sidebar-logout:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ---------- Zone principale ---------- */

.workspace-main {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

.workspace-page {
    max-width: 900px;
    margin: 0 auto;
}

.workspace-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.workspace-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.workspace-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-buyer { background: #dbeafe; color: #1e40af; }
.badge-seller { background: #fce7f3; color: #9d174d; }
.badge-bank { background: #d1fae5; color: #065f46; }
.badge-fund { background: #fef3c7; color: #92400e; }
.badge-facilitator { background: #ede9fe; color: #5b21b6; }


/* ============================================
   DATA ROOM — CONTENU PLACEHOLDER
   ============================================ */

.dataroom-content {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.dataroom-placeholder {
    text-align: center;
    padding: 30px 20px;
}

.dataroom-placeholder .placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.dataroom-placeholder h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.dataroom-placeholder p {
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto 15px;
    line-height: 1.6;
}

.dataroom-exclusive {
    display: inline-block;
    background: #fef2f2;
    color: #dc2626;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px !important;
}

.placeholder-hint {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 0.85rem;
    color: var(--text-gray);
    max-width: 500px;
    margin: 20px auto 0;
    border-left: 3px solid var(--primary);
}

/* ---------- Data Room — Contenu riche ---------- */

.dataroom-section h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.dataroom-intro {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.dataroom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dataroom-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border);
}

.dataroom-card h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.dataroom-card ul {
    padding-left: 1.2rem;
    line-height: 1.8;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.dataroom-card li {
    margin-bottom: 4px;
}

.dataroom-card p {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.dataroom-card.card-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dataroom-card.card-gold {
    background: #fffbeb;
    border-color: #fde68a;
}

.dataroom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dataroom-table thead th {
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.dataroom-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-gray);
}

.dataroom-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.dataroom-table .row-total td {
    border-top: 2px solid var(--text-dark);
    font-weight: 700;
    color: var(--text-dark);
}

.text-highlight {
    font-weight: 700;
    color: #b8941f;
}

.text-success {
    font-weight: 600;
    color: #059669;
}

.text-danger {
    color: #dc2626;
}

.dataroom-highlight {
    background: #fffbeb;
    border-left: 3px solid #d4af37;
    padding: 10px 15px;
    margin-top: 12px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.dataroom-strategy {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f59e0b;
    border-radius: 0 10px 10px 0;
    padding: 20px;
    margin-top: 20px;
}

.dataroom-strategy h4 {
    color: #92400e;
    margin-bottom: 10px;
    font-size: 1rem;
}

.dataroom-strategy ul {
    padding-left: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #92400e;
}

.dataroom-strategy p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #92400e;
}

.dataroom-source {
    margin-top: 20px;
    padding: 10px 15px;
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 8px 8px 0;
    font-size: 0.8rem;
    color: #1e40af;
}

@media (max-width: 768px) {
    .dataroom-grid {
        grid-template-columns: 1fr;
    }
    .dataroom-content {
        padding: 20px;
    }
}


/* ============================================
   CHAT IA
   ============================================ */

.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    max-width: 100% !important;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 85%;
    animation: fadeInUp 0.2s ease;
}

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

.message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-ai {
    align-self: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--bg-light);
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-user .message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-ai .message-bubble {
    background: #f1f5f9;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
}

/* Indicateur de chargement */
.chat-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.loading-dots {
    display: flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.loading-text {
    font-style: italic;
}

/* Zone de saisie */
.chat-input-area {
    padding: 15px 20px;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    border-radius: 0 0 12px 12px;
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background: var(--primary-dark);
}

.chat-send-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.chat-hint {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 6px;
    text-align: center;
}

/* Header actions chat */
.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bouton supprimer un échange */
.chat-exchange {
    position: relative;
    transition: opacity 0.2s;
}

.chat-delete-btn {
    position: absolute;
    top: 4px;
    right: -8px;
    width: 22px;
    height: 22px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-exchange:hover .chat-delete-btn {
    opacity: 1;
}

.chat-delete-btn:hover {
    background: #dc2626;
    color: white;
}


/* ============================================
   DRIVE — UPLOAD ET FICHIERS
   ============================================ */

.drive-upload-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.drive-upload-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.drive-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 15px;
}

.drive-drop-zone:hover,
.drive-drop-zone.drop-zone-active {
    border-color: var(--primary);
    background: #f0f5ff;
}

.drive-description {
    margin-bottom: 15px;
}

.drive-description-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.drive-description-input:focus {
    border-color: var(--primary);
}

.drive-formats {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 10px;
}

.drive-files-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.drive-files-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.drive-table .file-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-top: 2px;
}

.btn-download {
    color: var(--primary);
    text-decoration: none;
}

.drive-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.drive-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.drive-empty h4 {
    margin-bottom: 8px;
    color: var(--text-dark);
}


/* ============================================
   WORKSPACE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .workspace-container {
        flex-direction: column;
    }

    .workspace-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 3px solid var(--primary);
    }

    .sidebar-buyer { border-bottom-color: #3b82f6; border-right-color: transparent; }
    .sidebar-seller { border-bottom-color: #ec4899; border-right-color: transparent; }
    .sidebar-bank { border-bottom-color: #10b981; border-right-color: transparent; }
    .sidebar-fund { border-bottom-color: #f59e0b; border-right-color: transparent; }
    .sidebar-facilitator { border-bottom-color: #8b5cf6; border-right-color: transparent; }

    .workspace-main {
        margin-left: 0;
        padding: 15px;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 10px;
    }

    .sidebar-section-title {
        width: 100%;
        padding: 8px 10px 2px;
    }

    .sidebar-link {
        padding: 6px 12px;
        font-size: 0.8rem;
        border-left: none;
        border-radius: 6px;
    }

    .sidebar-link.active {
        background: #475569;
    }

    .sidebar-team {
        display: none;
    }

    .sidebar-profile {
        padding: 10px 15px;
    }

    .chat-page {
        height: auto;
        min-height: 60vh;
    }

    .chat-messages {
        min-height: 300px;
    }

    .chat-message {
        max-width: 95%;
    }

    .workspace-page-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
