/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f5;
    color: #1a1a2e;
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 30px;
}

.sidebar-brand i {
    font-size: 28px;
    color: #4facfe;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    list-style: none;
}

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

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(79, 172, 254, 0.15);
    color: #fff;
}

.sidebar-menu a i {
    width: 20px;
    font-size: 18px;
}

.sidebar-menu .badge {
    margin-left: auto;
    background: #f56565;
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-footer {
    position: absolute;
    bottom: 30px;
    left: 20px;
    right: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
}

.sidebar-footer .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.sidebar-footer .user-details {
    flex: 1;
}

.sidebar-footer .user-details .name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.sidebar-footer .user-details .role {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.sidebar-footer .logout-btn {
    color: rgba(255,255,255,0.5);
    transition: color 0.3s ease;
}

.sidebar-footer .logout-btn:hover {
    color: #f56565;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
}

/* ==================== TOP BAR ==================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 25px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.topbar-left p {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-right .date-time {
    color: #666;
    font-size: 14px;
}

.topbar-right .notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f2f5;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #1a1a2e;
}

.topbar-right .notification-btn:hover {
    background: #e0e0e0;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-card .stat-icon.blue {
    background: rgba(79, 172, 254, 0.15);
    color: #4facfe;
}

.stat-card .stat-icon.green {
    background: rgba(72, 187, 120, 0.15);
    color: #48bb78;
}

.stat-card .stat-icon.orange {
    background: rgba(237, 137, 54, 0.15);
    color: #ed8936;
}

.stat-card .stat-icon.purple {
    background: rgba(159, 122, 234, 0.15);
    color: #9f7aea;
}

.stat-card .stat-icon.red {
    background: rgba(245, 101, 101, 0.15);
    color: #f56565;
}

.stat-card .stat-icon.teal {
    background: rgba(56, 178, 172, 0.15);
    color: #38b2ac;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 5px;
}

.stat-card .stat-change {
    font-size: 13px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.stat-card .stat-change.positive {
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.stat-card .stat-change.negative {
    color: #f56565;
    background: rgba(245, 101, 101, 0.1);
}

/* ==================== TABLES ==================== */
.table-section {
    background: #fff;
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.table-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.table-controls input,
.table-controls select {
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #fff;
    transition: border-color 0.3s ease;
    min-width: 150px;
}

.table-controls input:focus,
.table-controls select:focus {
    outline: none;
    border-color: #4facfe;
}

.table-controls .btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
}

.btn-success {
    background: #48bb78;
    color: #fff;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: #fff;
}

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

.btn-warning {
    background: #ed8936;
    color: #fff;
}

.btn-warning:hover {
    background: #dd6b20;
}

.btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #666;
}

.btn-outline:hover {
    background: #f7fafc;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.table-wrapper {
    overflow-x: auto;
}

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

table thead {
    background: #f7fafc;
    border-radius: 10px;
}

table th {
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 14px;
}

table tbody tr:hover {
    background: #f7fafc;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.pending {
    background: #fefcbf;
    color: #d69e2e;
}

.status-badge.approved {
    background: #c6f6d5;
    color: #276749;
}

.status-badge.rejected {
    background: #fed7d7;
    color: #9b2c2c;
}

.status-badge.completed {
    background: #bee3f8;
    color: #2a69ac;
}

.status-badge.active {
    background: #c6f6d5;
    color: #276749;
}

.status-badge.inactive {
    background: #fed7d7;
    color: #9b2c2c;
}

.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* ==================== TABS ==================== */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.tab:hover {
    color: #1a1a2e;
}

.tab.active {
    color: #4facfe;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4facfe;
    border-radius: 2px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f2f5;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e2e8f0;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.modal-body .detail-row .label {
    color: #666;
    font-weight: 500;
}

.modal-body .detail-row .value {
    color: #1a1a2e;
    font-weight: 600;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1a1a2e;
}

.pagination button:hover:not(:disabled) {
    background: #4facfe;
    color: #fff;
    border-color: #4facfe;
}

.pagination button.active {
    background: #4facfe;
    color: #fff;
    border-color: #4facfe;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== TOAST ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 20px;
    border-radius: 10px;
    color: #fff;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
    min-width: 250px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.toast.success {
    background: #48bb78;
}

.toast.error {
    background: #f56565;
}

.toast.info {
    background: #4facfe;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== LOADING ==================== */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading i {
    animation: spin 1s linear infinite;
    font-size: 24px;
    color: #4facfe;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 48px;
    color: #e2e8f0;
    margin-bottom: 15px;
}

.empty-state h4 {
    color: #1a1a2e;
    margin-bottom: 5px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
        padding-top: 70px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-controls {
        flex-wrap: wrap;
    }

    .table-controls input,
    .table-controls select,
    .table-controls .btn {
        flex: 1;
        min-width: 120px;
    }

    .menu-toggle {
        display: block !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #1a1a2e;
        color: #fff;
        border: none;
        padding: 10px 15px;
        border-radius: 10px;
        cursor: pointer;
        font-size: 20px;
    }

    .modal {
        max-width: 95%;
        padding: 20px;
    }
}

.menu-toggle {
    display: none;
}

/* ==================== ADDITIONAL STATUS BADGES ==================== */
.status-badge.suspended {
    background: #fefcbf;
    color: #d69e2e;
}

.status-badge.deleted {
    background: #fed7d7;
    color: #9b2c2c;
}

.status-badge.active {
    background: #c6f6d5;
    color: #276749;
}

.status-badge.inactive {
    background: #fed7d7;
    color: #9b2c2c;
}

.status-badge.deleted {
    background: #e2e8f0;
    color: #4a5568;
}

/* Dark icon for deleted users stat */
.stat-icon.dark {
    background: rgba(74, 85, 104, 0.15);
    color: #4a5568;
}