
:root {
    --bg-color: #f4f6f8;
    --text-color: #111827;
    --card-bg: #fff;
    --sidebar-bg: #1f2937;
    --sidebar-link: #d1d5db;
    --sidebar-active: #374151;
}
body.dark {
    --bg-color: #0f172a;
    --text-color: #e2e8f0;
    --card-bg: #1e293b;
    --sidebar-bg: #0f172a;
    --sidebar-link: #94a3b8;
    --sidebar-active: #1e293b;
}
body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    display: flex;
    height: 100vh;
    background: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s, color 0.3s;
}
.sidebar {
    width: 230px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 25px 0;
    transition: background 0.3s;
}
.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #60a5fa;
}
.sidebar a {
    color: var(--sidebar-link);
    text-decoration: none;
    padding: 12px 25px;
    display: block;
    transition: 0.3s;
    font-weight: 500;
}
.sidebar a:hover,
.sidebar a.active {
    background: var(--sidebar-active);
    color: #fff;
}
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.header {
    background: var(--card-bg);
    padding: 15px 25px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header h1 {
    font-size: 20px;
}
.toggle-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}
.toggle-btn:hover {
    background: #1e40af;
}
.logout-btn {
    background: #dc2626;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    margin-left: 10px;
}
.logout-btn:hover {
    background: #b91c1c;
}
.dashboard-content {
    padding: 30px;
    overflow-y: auto;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: background 0.3s, color 0.3s;
}
.card h3 {
    margin: 10px 0;
}
.card span {
    font-size: 26px;
    font-weight: bold;
    color: #2563eb;
}
.chart-container {
    margin-top: 40px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: background 0.3s;
}
.chart-container h3 {
    margin-bottom: 15px;
}
.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
@media(max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}
