:root {
    --brand-blue: #0f4c81;
    --brand-blue-dark: #0a375c;
    --brand-green: #1f8a5c;
    --brand-green-soft: #d9f3e8;
    --brand-white: #ffffff;
    --surface: #f4f8fb;
    --text: #1c2b36;
    --muted: #5c7285;
    --border: #dbe5ee;
}

body {
    background: linear-gradient(180deg, #f7fbff 0%, #eef5fa 100%);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, var(--brand-blue-dark), var(--brand-blue));
    color: var(--brand-white);
    padding: 2rem 1.25rem;
}

.brand-block {
    margin-bottom: 1rem;
}

.sidebar-logo {
    display: block;
    width: min(190px, 100%);
    height: auto;
    background: var(--brand-white);
    border-radius: 8px;
    padding: .35rem;
    margin-bottom: .9rem;
}

.sidebar .brand {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.88);
    border-radius: 12px;
    margin-bottom: .35rem;
    padding: .75rem 1rem;
}

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

.main-panel {
    padding: 1.5rem 2rem 2rem;
}

.topbar {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}

.page-card {
    background: var(--brand-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 76, 129, 0.08);
}

.login-logo {
    width: min(210px, 80%);
    height: auto;
}

.login-title {
    line-height: 1.25;
}

.metric-card {
    background: linear-gradient(135deg, var(--brand-white), #eef8f3);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.15rem;
    height: 100%;
}

.metric-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brand-blue);
}

.btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-success,
.badge.bg-success {
    background-color: var(--brand-green) !important;
    border-color: var(--brand-green) !important;
}

.table thead {
    background-color: #ecf4fb;
}

.form-control:focus,
.form-select:focus {
    border-color: #7cb2d8;
    box-shadow: 0 0 0 .2rem rgba(15, 76, 129, .15);
}

.summary-strip {
    background: var(--brand-green-soft);
    border: 1px solid #b6e4cb;
    border-radius: 16px;
    padding: 1rem 1.2rem;
}

@media (max-width: 991px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 1rem;
    }

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