/* ===========================
   Dashboard Layout
=========================== */

.admin-dashboard {
    display: flex;
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
    background: #f3f4f6;
}

/* Sidebar */
.admin-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #4f46e5, #7c3aed);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.menu {
    list-style: none;
    padding: 0;
}

.menu li {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.7rem;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu li:hover,
.menu li.active {
    background: rgba(255, 255, 255, 0.15);
}

.logout-btn {
    background: #ef4444;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

/* Main */
.admin-main {
    flex: 1;
    padding: 2rem 3rem;
}

/* Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-user {
    background: white;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Card */
.admin-card {
    background: white;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.section-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
}

/* Buttons */
.primary-btn {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 1rem;
}

.secondary-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
}

/* Status Message */
.status-message {
    margin-top: 1.5rem;
    padding: 12px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #065f46;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {

    .admin-dashboard {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 1rem;
    }

    .menu {
        display: flex;
        gap: 0.5rem;
    }

    .menu li {
        margin-bottom: 0;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .admin-main {
        padding: 1.5rem;
    }
}

.admin-sidebar {
    width: 240px;
    transition: width 0.3s ease;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.collapse-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Dark Mode */
.admin-dashboard.dark {
    background: #111827;
    color: #f9fafb;
}

.admin-dashboard.dark .admin-card,
.admin-dashboard.dark .stat-card {
    background: #1f2937;
    color: white;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.status-online {
    color: #10b981;
}

/* Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th,
.modern-table td {
    padding: 12px;
}

.pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
}

/* Spinner */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 250px;
    padding: 14px 18px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease forwards;
}

.toast-success { background: #28a745; }
.toast-error   { background: #dc3545; }
.toast-info    { background: #007bff; }
.toast-warning { background: #ffc107; color: black; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}



.csv-upload-container {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}


