/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 25px 0;
    position: fixed;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.logo {
    padding: 0 25px 30px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 30px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin: 5px 15px;
    border-radius: 8px;
    overflow: hidden;
}

.nav-menu li.active {
    background: rgba(255,255,255,0.15);
    border-left: 4px solid #4fc3f7;
}

.nav-menu li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    transition: all 0.3s;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-menu li.active a {
    color: white;
    font-weight: 600;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 250px; /* Matches sidebar width */
    padding: 30px;
    width: calc(100% - 250px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e6ed;
}

.top-bar h1 {
    font-size: 1.8rem;
    color: #1a237e;
    font-weight: 700;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logout-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #d32f2f;
}

/* ===== KPI CARDS ===== */
.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eef2f7;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.kpi-icon {
    font-size: 2.8rem;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.kpi-content h3 {
    font-size: 0.95rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a237e;
    margin: 5px 0;
    line-height: 1;
}

.kpi-change {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.quick-actions h2 {
    font-size: 1.4rem;
    color: #1a237e;
    margin-bottom: 25px;
    font-weight: 700;
}

.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(26, 35, 126, 0.2);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(26, 35, 126, 0.3);
    background: linear-gradient(135deg, #283593, #303f9f);
}

.action-btn i {
    font-size: 1.2rem;
}

/* ===== TABLES & SECTIONS ===== */
.recent-activity, .admin-preview {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.recent-activity h2, .admin-preview h2 {
    font-size: 1.4rem;
    color: #1a237e;
    margin-bottom: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.badge {
    background: #4fc3f7;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 12px;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.activity-table th {
    text-align: left;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e0e6ed;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    color: #555;
}

.activity-table tr:hover {
    background: #f8fafc;
}

/* ===== ADMIN CARDS ===== */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.admin-card {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
}

.admin-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: #4fc3f7;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
}

.admin-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a237e;
}

.admin-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eef2f7;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-value {
    font-weight: 800;
    font-size: 1.5rem;
    color: #1a237e;
    line-height: 1;
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #999;
    font-style: italic;
    background: #fafbfc;
    border-radius: 12px;
    border: 2px dashed #e0e6ed;
    margin-top: 20px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .kpi-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo span, .nav-menu li a span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 20px;
    }
    
    .kpi-cards {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}