:root {
    --sidebar-bg: #0f172a;
    --sidebar-link: rgba(255,255,255,0.74);
    --sidebar-link-active: #ffffff;
    --surface: #f5f7fb;
    --card-radius: 20px;
}

body {
    background: var(--surface);
    color: #1f2937;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: white;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 0;
    min-height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-logo,
.auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: rgba(255,255,255,0.1);
    color: white;
}

.brand-logo {
    overflow: hidden;
    padding: 0;
}

.brand-logo-image {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
}

.sidebar .nav-link {
    color: var(--sidebar-link);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--sidebar-link-active);
}

.main-content {
    flex: 1;
    padding: 2rem;
}

.topbar {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(10px);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.page-title {
    font-size: 1.85rem;
    font-weight: 800;
}

.metric-card,
.card {
    border-radius: var(--card-radius);
}

.metric-label {
    color: #6b7280;
    font-size: 0.95rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
}

.summary-box {
    border-radius: 18px;
    padding: 1rem;
    color: white;
}

.summary-box.success { background: linear-gradient(135deg, #198754, #34d399); }
.summary-box.danger { background: linear-gradient(135deg, #dc3545, #f87171); }
.summary-box.primary { background: linear-gradient(135deg, #0d6efd, #60a5fa); }

.summary-value {
    font-weight: 800;
    font-size: 1.5rem;
}

.budget-progress {
    height: 12px;
    border-radius: 999px;
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at top left, #dbeafe, #eff6ff 35%, #f8fafc 70%);
}

.auth-card {
    width: 100%;
    max-width: 520px;
    border-radius: 28px;
}

.form-control,
.form-select,
.btn,
textarea {
    border-radius: 14px !important;
}

.table thead th {
    color: #6b7280;
    font-weight: 600;
    border-bottom-width: 1px;
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .main-content {
        padding: 1rem;
    }
}
