/* === General Styles === */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    margin: 5px;
    padding: 0;
}

/* === Admin Dashboard Layout === */
.admin-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* === Sidebar Styling (Collapsible) === */
.sidebar {
    width: 250px;
    background-color: #2C3E50;
    color: white;
    padding: 20px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: all 0.3s ease;
}

    .sidebar h2 {
        text-align: center;
        margin-bottom: 20px;
        font-size: 22px;
        font-weight: bold;
    }

    .sidebar ul {
        list-style: none;
        padding: 0;
    }

        .sidebar ul li {
            padding: 12px 15px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

            .sidebar ul li a {
                color: white;
                text-decoration: none;
                font-size: 16px;
                display: block;
                transition: all 0.3s ease;
                text-align: center;
            }

                .sidebar ul li a:hover {
                    background-color: rgba(255, 255, 255, 0.1);
                    padding-left: 5px;
                }

/* === Main Content Styling (Centered) === */
.main-content {
    margin: 0 auto;
    padding: 30px;
    max-width: 900px;
    text-align: center;
    transition: margin-left 0.3s ease-in-out;
}

/* === Dashboard Cards (Centered Blocks) === */
.card {
    background-color: white;
    padding: 20px;
    margin: 15px auto;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    text-align: center;
}

/* === Table Styling (Centered & Professional) === */
.table-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    table thead {
        background-color: #34495E;
        color: white;
    }

    table th, table td {
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid #ddd;
    }

    table tbody tr:hover {
        background-color: #f9f9f9;
    }

/* === Buttons (Simple & Clean) === */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s ease;
}

.btn-primary {
    background-color: #2980B9;
    color: white;
}

    .btn-primary:hover {
        background-color: #1F618D;
    }

.btn-danger {
    background-color: #C0392B;
    color: white;
}

    .btn-danger:hover {
        background-color: #A93226;
    }

.btn-secondary {
    background-color: #7F8C8D;
    color: white;
}

    .btn-secondary:hover {
        background-color: #5D6D7E;
    }

/* === Responsive Design (Better Centering for Mobile) === */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        max-width: 90%;
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .table-container {
        max-width: 100%;
    }

    .card {
        max-width: 90%;
    }
}

/* === Overview Section Styling === */
.overview-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.overview-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 180px;
    transition: transform 0.3s ease-in-out;
}

    .overview-card:hover {
        transform: translateY(-5px);
    }

    .overview-card h3 {
        margin-bottom: 5px;
        color: #2C3E50;
        font-size: 18px;
    }

    .overview-card p {
        font-size: 22px;
        font-weight: bold;
        color: #2980B9;
    }

/* === Overview Table Styling === */
.table-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 20px auto;
    overflow-x: auto;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    table thead {
        background-color: #2C3E50;
        color: white;
    }

    table th, table td {
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid #ddd;
    }

    table tbody tr:hover {
        background-color: #f9f9f9;
    }

    table td strong {
        color: #2980B9;
        font-size: 16px;
    }

/* Success Message Styling */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

/* Navigation Buttons */
.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

/* Profile & Admin Buttons */
.btn-profile, .btn-admin {
    background-color: #007bff;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

    .btn-profile:hover, .btn-admin:hover {
        background-color: #0056b3;
    }

/* Logout Button */
.btn-logout {
    background-color: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

    .btn-logout:hover {
        background-color: #a71d2a;
    }

/* Login Button */
.btn-login {
    background-color: #28a745;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
}

    .btn-login:hover {
        background-color: #218838;
    }

/* Admin Container */
.admin-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Success/Error Messages */
.success-message {
    color: green;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.error-message {
    color: red;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

/* Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    .admin-table th, .admin-table td {
        border: 1px solid #ddd;
        padding: 10px;
        text-align: center;
    }

    .admin-table th {
        background: #696eaf;
        color: white;
    }

/* Buttons */
.btn-edit, .btn-delete, .btn-save, .btn-cancel {
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    display: inline-block;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-save {
    background: #007bff;
    color: white;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

/* Admin Dashboard Container */
.admin-dashboard {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background: #727380;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}
    .admin-dashboard h2 {
        color: white;
        text-decoration: underline;
    }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px auto; /* Center the grid horizontally */
    max-width: 1000px; /* Optional: prevent stretching too wide */
    width: 100%; /* Responsive */
    justify-content: center; /* Extra alignment help */
}

/* Stat Cards */
.stat-card {
    background: #696eaf;
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);

}

    .stat-card h3 {
        margin: 0 0 10px;
        font-size: 16px;
        font-weight: normal;
    }

/* Admin Buttons */
.admin-actions {
    margin-top: 30px;
    display: flex;
    grid-template-columns: repeat(4, 1fr); /* 4 per row */
    gap: 15px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.btn-admin {
    background: #ff6a00;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 16px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease-in-out;
}

    .btn-admin:hover {
        background: #FEB602;
    }

.user-activity ul {
    list-style: none;
    padding: 0;
}

    .user-activity ul li {
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }

.user-activity a {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

    .user-activity a:hover {
        text-decoration: underline;
    }

.edit-user-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edit-user-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

    .edit-user-row label {
        flex: 1 0 100px;
        font-weight: bold;
    }

    .edit-user-row input,
    .edit-user-row select {
        flex: 2 0 250px;
        padding: 8px;
        font-size: 14px;
    }

.profile-picture-preview {
    max-width: 150px;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .edit-user-row {
        flex-direction: column;
        align-items: flex-start;
    }

        .edit-user-row input,
        .edit-user-row select {
            width: 100%;
        }
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

