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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #1a202c;
    line-height: 1.6;
}

/* Page de connexion */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 2em;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-header h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #a0aec0;
}

.login-header p {
    font-size: 0.9em;
    color: #cbd5e0;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    margin: 20px 30px 0;
    border-radius: 8px;
    border: 1px solid #feb2b2;
    font-size: 14px;
}

.login-form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.login-footer {
    background: #f7fafc;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    margin: 5px 0;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #2d3748;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #4a5568;
    background: linear-gradient(135deg, #2d3748, #4a5568);
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.sidebar-header p {
    color: #a0aec0;
    font-size: 14px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    background: #4a5568;
    color: white;
    border-right: 3px solid #667eea;
}

.nav-icon {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #4a5568;
}

.user-info {
    margin-bottom: 15px;
}

.user-info p {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 3px;
}

.user-info strong {
    color: white;
}

.logout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #e53e3e;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c53030;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 2.5em;
    margin-bottom: 5px;
    color: #2d3748;
}

.content-header p {
    color: #718096;
    font-size: 1.1em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #e2e8f0;
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card.success {
    border-left-color: #38a169;
}

.stat-card.info {
    border-left-color: #3182ce;
}

.stat-card.warning {
    border-left-color: #d69e2e;
}

.stat-card.purple {
    border-left-color: #805ad5;
}

.stat-icon {
    font-size: 2.5em;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2em;
    margin-bottom: 5px;
    color: #2d3748;
    font-weight: 700;
}

.stat-content p {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* Sections */
.section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section h2 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.5em;
}

/* Tables */
.prospects-table {
    overflow-x: auto;
}

.prospects-table table {
    width: 100%;
    border-collapse: collapse;
}

.prospects-table th,
.prospects-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.prospects-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.prospects-table tr:hover {
    background: #f7fafc;
}

.no-data {
    text-align: center;
    color: #718096;
    padding: 40px !important;
    font-style: italic;
}

.no-data a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

/* Status badges */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status.contacte {
    background: #bee3f8;
    color: #2b6cb0;
}

.status.en_discussion {
    background: #fef5e7;
    color: #c05621;
}

.status.accepte {
    background: #c6f6d5;
    color: #2f855a;
}

.status.refuse {
    background: #fed7d7;
    color: #c53030;
}

/* Section graphiques */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.chart-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-container h3 {
    font-size: 1.2em;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 20px;
    }
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .content-header h1 {
        font-size: 2em;
    }
}