body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
}

header {
    background: #1f2d3d;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.stats {
    display: flex;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.card h3 {
    margin: 0 0 10px;
}

.card p {
    font-size: 24px;
    font-weight: bold;
}

.latest-users {
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

table th, table td {
    padding: 10px;
    border: 1px solid #ddd;
}

table th {
    background-color: #f0f0f0;
}

.actions {
    padding: 20px;
    text-align: center;
}

.btn {
    background: #007BFF;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

/* ===========================
   FORMULAIRE CREATION USER
=========================== */

.form-container {
    max-width: 500px;
    margin: 60px auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 10px; /* coins arrondis */
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007BFF;
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-submit:hover {
    background: #0056b3;
}

/* ================================
   CREATE USER MODERN DESIGN
================================ */

.page-wrapper {
    background: linear-gradient(135deg, #eef2f7, #d9e4f5);
    min-height: 100vh;
    padding: 40px 20px;
}

.top-bar {
    max-width: 600px;
    margin: 0 auto 20px;
}

.btn-back {
    text-decoration: none;
    background: #1f2d3d;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.3s;
}

.btn-back:hover {
    background: #111c29;
}

.card-form {
    max-width: 600px;
    margin: auto;
    background: #ffffff;
    padding: 35px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-header {
    text-align: center;
    margin-bottom: 25px;
}

.icon-header {
    font-size: 40px;
    color: #007BFF;
    margin-bottom: 10px;
}

.card-header h2 {
    margin: 0;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group label i {
    margin-right: 6px;
    color: #007BFF;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007BFF;
    box-shadow: 0 0 6px rgba(0,123,255,0.3);
    outline: none;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #007BFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-submit:hover {
    background: #0056b3;
}

/* ================================
   DASHBOARD MODERN
================================ */

.top-bar-dashboard {
    max-width: 1100px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.top-bar-dashboard h2 {
    margin: 0;
}

.btn-primary, .btn-danger {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    margin-left: 10px;
    font-size: 14px;
    transition: 0.3s;
}

.btn-primary {
    background: #007BFF;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
}

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

.stats-modern {
    max-width: 1100px;
    margin: auto;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 220px;
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.icon-stat {
    font-size: 32px;
    color: #007BFF;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
}

.card-table {
    max-width: 1100px;
    margin: 30px auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

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

.card-table th, 
.card-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.card-table th {
    background: #f5f7fa;
    text-align: left;
}

body {
    margin:0;
    font-family:Arial, sans-serif;
    background:#f4f6f9;
}

.admin-layout {
    display:flex;
    min-height:100vh;
}

.sidebar {
    width:220px;
    background:#1f2d3d;
    color:white;
    padding:20px;
    display:flex;
    flex-direction:column;
}

.sidebar a {
    color:white;
    text-decoration:none;
    margin:10px 0;
}

.main-content {
    flex:1;
    padding:30px;
}

.cards {
    display:flex;
    gap:20px;
}

.card {
    background:white;
    padding:20px;
    border-radius:10px;
    flex:1;
    text-align:center;
}

.chart-container {
    margin-top:40px;
}

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

.modern-table th, .modern-table td {
    padding:12px;
    border-bottom:1px solid #ddd;
}

.dark-mode {
    background:#121212;
    color:white;
}

.dark-mode .card,
.dark-mode .sidebar {
    background:#1e1e1e;
}

.toast {
    position:fixed;
    bottom:20px;
    right:20px;
    background:#28a745;
    color:white;
    padding:12px 20px;
    border-radius:8px;
}

.error-box {
    background: #ffe5e5;
    color: #b00020;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.4s ease;
}

.success-box {
    background: #e6f9ec;
    color: #1e7e34;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    border: 1px solid #b7e4c7;
    animation: fadeIn 0.4s ease;
}

.success-box i {
    font-size: 18px;
}

/* Animation douce */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   PASSWORD TOGGLE
=========================== */

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    transition: 0.2s ease;
}

.toggle-password:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 576px) {
    .toggle-password {
        right: 10px;
        font-size: 15px;
    }
}

/* ===========================
   CAPS LOCK WARNING
=========================== */

.caps-warning {
    display: none;
    margin-top: 6px;
    font-size: 13px;
    color: #d9534f;
    font-weight: 500;
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Responsive */
@media (max-width: 576px) {
    .caps-warning {
        font-size: 12px;
    }
}
