:root {
    --sidebar-width: 240px;
    --primary-color: #2563eb;
    --sidebar-bg: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #2563eb;
}

body {
    background-color: #f1f5f9;
    font-family: "Segoe UI", "Sarabun", Tahoma, sans-serif;
}

/* ---------- Login Page ---------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background-color: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: margin-left 0.3s ease;
}

.sidebar .brand {
    color: #fff;
    font-weight: 700;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: block;
    text-decoration: none;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.7rem 1.25rem;
    font-size: 0.93rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link i {
    width: 20px;
    display: inline-block;
    margin-right: 8px;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar .nav-link.active {
    background-color: rgba(37,99,235,0.15);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

/* ---------- Main content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    transition: margin-left 0.3s ease;
}

.topbar {
    background: #fff;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    padding: 1.25rem;
    color: #fff;
}

.stat-card .stat-icon {
    font-size: 1.8rem;
    opacity: 0.85;
}

.stat-card.bg-blue { background: linear-gradient(135deg,#2563eb,#3b82f6); }
.stat-card.bg-green { background: linear-gradient(135deg,#16a34a,#22c55e); }
.stat-card.bg-red { background: linear-gradient(135deg,#dc2626,#ef4444); }
.stat-card.bg-orange { background: linear-gradient(135deg,#ea580c,#f97316); }

.card-panel {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.badge-success-soft { background-color:#dcfce7; color:#15803d; }
.badge-danger-soft { background-color:#fee2e2; color:#b91c1c; }
.badge-warning-soft { background-color:#fef9c3; color:#a16207; }

@media (max-width: 991px) {
    .sidebar { margin-left: calc(-1 * var(--sidebar-width)); }
    .sidebar.show { margin-left: 0; }
    .main-content { margin-left: 0; }
}
