/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header moderne sombre */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-brand a {
    text-decoration: none;
    color: inherit;
}

.navbar-brand h1 {
    color: #f1f5f9;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.brand-slogan {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: italic;
    margin: 0;
    line-height: 1;
}

.navbar-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.navbar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: #f1f5f9;
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 100%;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 3rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f1f5f9;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f1f5f9;
}

/* Créneaux */
.slots-container {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(51, 65, 85, 0.3);
    padding: 2rem;
}

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

.slot-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.slot-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slot-card.booked {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
}

.slot-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.slot-status.available {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.slot-status.booked {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.slot-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
}

.slot-time {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.slot-service {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.slot-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
}

.slot-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Table des réparations */
.repairs-container {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(51, 65, 85, 0.3);
    overflow: hidden;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(51, 65, 85, 0.5);
    color: #cbd5e1;
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.5);
}

.repairs-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    font-weight: 600;
    color: #f1f5f9;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.table-body {
    max-height: 400px;
    overflow-y: auto;
}

.repair-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.repair-row:hover {
    background: rgba(59, 130, 246, 0.1);
}

.table-cell {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.client-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-name {
    font-weight: 600;
    color: #f1f5f9;
}

.client-contact {
    font-size: 0.8rem;
    color: #94a3b8;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.service-type {
    font-weight: 600;
    color: #f1f5f9;
}

.service-description {
    font-size: 0.8rem;
    color: #94a3b8;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: #fbbf24;
}

.rating-score {
    font-weight: 600;
    color: #f1f5f9;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-paid {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Boutons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 0.8);
    color: #f1f5f9;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.3);
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.modal-header h3 {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

/* Formulaires */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #cbd5e1;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    color: #94a3b8;
    text-align: center;
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .navbar-brand {
        align-items: center;
        text-align: center;
    }
    
    .navbar-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .table-header,
    .repair-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .table-header {
        display: none;
    }
    
    .repair-row {
        display: block;
        padding: 1rem;
    }
    
    .table-cell {
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }
    
    .table-cell::before {
        content: attr(data-label) ': ';
        font-weight: 600;
        color: #94a3b8;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .slots-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}