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

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

/* Navigation */
.admin-nav {
    background: #1E293B;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}
.admin-logo {
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-logo i { color: #3B82F6; }
.admin-nav-links {
    display: flex;
    gap: 0.5rem;
}
.admin-nav-links a {
    color: #94A3B8;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.admin-nav-links a:hover { color: white; background: #334155; }
.admin-nav-links a.active { color: white; background: #3B82F6; }

/* Main */
.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}
.admin-main h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    border: 1px solid #E2E8F0;
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.stat-blue .stat-icon { background: #EFF6FF; color: #1D4ED8; }
.stat-orange .stat-icon { background: #FFF7ED; color: #EA580C; }
.stat-green .stat-icon { background: #ECFDF5; color: #065F46; }
.stat-purple .stat-icon { background: #F3E8FF; color: #7C3AED; }
.stat-number { font-size: 1.5rem; font-weight: 800; display: block; }
.stat-label { font-size: 0.85rem; color: #64748B; }
.stat-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #EF4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

/* Panels */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.admin-panel {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.admin-panel h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1E293B;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table thead th {
    background: #F8FAFC;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748B;
    border-bottom: 2px solid #E2E8F0;
}
.admin-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.9rem;
}
.admin-table tbody tr:hover { background: #F8FAFC; }
.amount { font-weight: 700; color: #EA580C; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.status-nouveau { background: #DBEAFE; color: #1D4ED8; }
.status-en_cours { background: #FEF3C7; color: #92400E; }
.status-accepte { background: #D1FAE5; color: #065F46; }
.status-refuse { background: #FEE2E2; color: #991B1B; }
.status-archive { background: #E2E8F0; color: #475569; }

/* Buttons */
.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #EFF6FF;
    color: #1D4ED8;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-view:hover { background: #1D4ED8; color: white; }

/* Filters */
.admin-filters { margin-bottom: 1.5rem; }
.filter-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}
.filter-input {
    padding: 10px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}
.filter-input:focus { border-color: #3B82F6; }
.filter-select {
    padding: 10px 14px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    outline: none;
}
.btn-filter {
    padding: 10px 18px;
    background: #1D4ED8;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-filter:hover { background: #1E40AF; }
.btn-clear {
    padding: 10px 14px;
    background: #F1F5F9;
    color: #64748B;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.result-count { font-size: 0.85rem; color: #64748B; margin-bottom: 1rem; }

/* Detail view */
.breadcrumb { margin-bottom: 1rem; }
.breadcrumb a { color: #3B82F6; text-decoration: none; font-size: 0.9rem; }
.breadcrumb a:hover { text-decoration: underline; }
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #F1F5F9;
}
.detail-label { font-weight: 600; color: #64748B; }
.detail-message {
    background: #F8FAFC;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid #E2E8F0;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
}
.login-container {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo i { font-size: 2.5rem; color: #3B82F6; }
.login-logo h1 { font-size: 1.8rem; font-weight: 800; margin-top: 0.5rem; }
.login-logo p { color: #64748B; }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
}
.login-form input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
}
.login-form input:focus { border-color: #3B82F6; }
.btn-login {
    width: 100%;
    padding: 12px;
    background: #1D4ED8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}
.btn-login:hover { background: #1E40AF; }
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}
.login-footer a { color: #64748B; text-decoration: none; font-size: 0.9rem; }
.login-footer a:hover { color: #3B82F6; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.empty-state { text-align: center; padding: 2rem; color: #94A3B8; }

/* Form groups */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; color: #475569; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 768px) {
    .admin-nav-links { display: none; }
    .admin-grid, .detail-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
