:root {
    --sidebar-width: 260px;
    --primary-color: #667eea;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7fafc;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    z-index: 1000;
    transition: all 0.3s;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    text-align: center;
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

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

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid var(--primary-color);
}

.sidebar-menu a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Logout — last menu item with a separator */
.sidebar-logout {
    margin-top: 12px !important;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 8px;
}
.sidebar-logout a:hover {
    background: rgba(220,53,69,0.25) !important;
    border-left-color: #dc3545 !important;
    color: #fff !important;
}

.user-info {
    margin-bottom: 10px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-wrapper {
    padding: 30px;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 5px;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
}

.stat-card.bg-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card.bg-success { background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); }
.stat-card.bg-warning { background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); }
.stat-card.bg-info { background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%); }

.stat-icon {
    font-size: 3rem;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
}

.stat-content p {
    margin: 0;
    opacity: 0.9;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 20px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table th {
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

/* Metric Box */
.metric-box {
    padding: 15px;
    text-align: center;
}

.metric-box h4 {
    font-size: 1.5rem;
    margin: 10px 0 5px;
    color: #2d3748;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Quick Amounts */
.quick-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ── Header avatar circle ── */
.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
/* Warning (yellow) needs dark text for contrast */
.avatar-circle.bg-warning { color: #212529; }
