:root {
    --bg-main: #f4f7fb;
    --bg-sidebar: #101728;
    --text-main: #1d2a45;
    --text-muted: #697a96;
    --card-bg: #ffffff;
    --gradient-1: linear-gradient(135deg, #00a8cc, #007ea7);
    --gradient-2: linear-gradient(135deg, #18a999, #2e7d32);
    --gradient-3: linear-gradient(135deg, #f4a300, #ef6c00);
    --gradient-4: linear-gradient(135deg, #e53935, #c62828);
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 30px rgba(16, 23, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top right, #e6f4ff 0%, #f4f7fb 45%, #eef3f9 100%);
    color: var(--text-main);
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #111a2d 0%, #0b1323 100%);
    color: #d8e1f5;
    transition: all 0.25s ease;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 82px;
}

.sidebar .brand {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.6px;
}

.sidebar .nav-link {
    color: #c4d1ee;
    border-radius: 12px;
    margin: 0.2rem 0;
    padding: 0.65rem 0.8rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}

.sidebar .menu-text {
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .brand-text {
    opacity: 0;
    display: none;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: all 0.25s ease;
}

.main-content.expanded {
    margin-left: 82px;
    width: calc(100% - 82px);
}

.top-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e8eef7;
    box-shadow: 0 4px 20px rgba(13, 27, 55, 0.04);
}

.content-area {
    padding: 1.4rem;
}

.dashboard-card {
    border: none;
    border-radius: var(--radius-lg);
    color: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.dashboard-card h6 {
    opacity: 0.9;
    font-size: 0.9rem;
}

.dashboard-card .stat {
    font-size: 1.7rem;
    font-weight: 600;
}

.card-surface {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    box-shadow: var(--shadow-soft);
}

.form-floating > label {
    color: #7283a1;
}

.table thead th {
    font-weight: 600;
    color: #3a4e73;
}

.btn {
    border-radius: 10px;
}

.breadcrumb {
    margin-bottom: 0;
}

.spinner-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    z-index: 2000;
}

.spinner-overlay.active {
    display: flex;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, #d8f1ff 0%, #f4f7fb 40%, #e6f0ff 100%);
    padding: 1rem;
}

.login-card {
    max-width: 460px;
    width: 100%;
    border-radius: 20px;
    border: none;
    box-shadow: 0 24px 60px rgba(20, 45, 80, 0.15);
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content,
    .main-content.expanded {
        margin-left: 0;
        width: 100%;
    }
}
