html {
    font-size: 13px;
}

@media (min-width: 768px) {
    html {
        font-size: 13.5px;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 14px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #263238;
    font-family: "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

    a:hover {
        text-decoration: none;
    }

h1,
h2,
h3,
h4,
h5,
h6,
.page-title {
    color: #102a56;
    font-weight: 850;
    letter-spacing: -0.025em;
}

h1,
.page-title {
    font-size: 1.85rem;
}

h2 {
    font-size: 1.55rem;
}

h3 {
    font-size: 1.35rem;
}

p {
    line-height: 1.45;
}

.btn {
    border-radius: 8px;
    font-weight: 650;
    padding: 0.38rem 0.72rem;
    font-size: 0.9rem;
    line-height: 1.25;
}

.btn-sm {
    border-radius: 7px;
    padding: 0.25rem 0.52rem;
    font-size: 0.82rem;
}

.btn-lg {
    border-radius: 10px;
    padding: 0.5rem 0.95rem;
    font-size: 1rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #d7dfeb;
    min-height: 34px;
    font-size: 0.9rem;
    padding: 0.38rem 0.65rem;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #ff7a1a;
        box-shadow: 0 0 0 0.14rem rgba(255, 122, 26, 0.16);
    }

.form-label {
    font-weight: 650;
    color: #344054;
    font-size: 0.84rem;
    margin-bottom: 0.28rem;
}

.form-check-input {
    width: 0.95em;
    height: 0.95em;
}

.form-check-label {
    font-size: 0.9rem;
}

.card {
    border-radius: 12px;
}

.card-header {
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 0.68rem 0.85rem;
}

.card-body {
    padding: 0.85rem;
}

.card.shadow-sm.border-0 {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05) !important;
}

.table {
    font-size: 0.86rem;
    margin-bottom: 0;
}

    .table thead th {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #667085;
        background: #f8fafc;
        border-bottom: 1px solid #e5eaf1;
        white-space: nowrap;
    }

    .table td,
    .table th {
        vertical-align: middle;
        padding: 0.48rem 0.55rem;
    }

.badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.28em 0.55em;
    font-size: 0.75rem;
}

.alert {
    border-radius: 10px;
    border: 0;
    padding: 0.65rem 0.8rem;
}

.text-muted {
    color: #718096 !important;
}

/* Main shell */

.app-shell {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.container-fluid.app-shell.py-4 {
    padding-top: 0.9rem !important;
    padding-bottom: 0.9rem !important;
}

main {
    min-height: calc(100vh - 275px);
}

/* Navbar */

.app-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e6ebf2;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 0;
    z-index: 1020;
}

    .app-navbar .navbar {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
    }

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    color: #102a56 !important;
}

.app-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff8a2a, #ff6b13);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.05rem;
    box-shadow: 0 7px 16px rgba(255, 107, 19, 0.18);
}

.app-brand-title {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.05;
}

.app-brand-subtitle {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #6b7890;
    line-height: 1.05;
}

.navbar .nav-link {
    color: #344054;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.38rem 0.48rem;
    font-size: 0.9rem;
}

    .navbar .nav-link:hover,
    .navbar .nav-link:focus {
        color: #ff6b13;
        background: #fff4ec;
    }

.dropdown-menu {
    border: 0;
    border-radius: 12px;
    padding: 0.38rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    font-size: 0.9rem;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.38rem 0.58rem;
    font-weight: 600;
    color: #344054;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: #fff4ec;
        color: #ff6b13;
    }

.dropdown-header {
    color: #7a8699;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.35rem 0.55rem;
}

.login-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border-radius: 999px;
    background: #f3f6fb;
    border: 1px solid #e4eaf2;
    color: #344054;
    font-weight: 700;
    padding: 0.34rem 0.58rem;
    font-size: 0.88rem;
}

/* Dashboard and page presentation */

.dashboard-page,
.dashboard-lite {
    max-width: 1320px;
    margin: 0 auto;
}

.page-hero,
.dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.16), transparent 25%), linear-gradient(135deg, #061b43 0%, #102f68 58%, #173f84 100%);
    color: #ffffff;
    padding: 1.05rem 1.2rem;
    box-shadow: 0 12px 32px rgba(16, 42, 86, 0.13);
}

    .page-hero::after,
    .dashboard-hero::after {
        content: "";
        position: absolute;
        width: 220px;
        height: 220px;
        right: -80px;
        bottom: -110px;
        border-radius: 50%;
        background: rgba(255, 122, 26, 0.18);
    }

    .dashboard-hero-content,
    .page-hero > * {
        position: relative;
        z-index: 2;
    }

.section-eyebrow,
.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
    margin-bottom: 0.25rem;
}

    .section-eyebrow::before,
    .dashboard-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: #ff7a1a;
    }

.page-hero .page-title,
.dashboard-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: -0.04em;
    margin: 0;
}

.page-subtitle,
.dashboard-subtitle {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.hero-actions,
.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

    .hero-actions .btn,
    .dashboard-actions .btn {
        border-radius: 9px;
        font-weight: 800;
        padding: 0.42rem 0.72rem;
        font-size: 0.88rem;
    }

    .dashboard-actions .btn-outline-light,
    .hero-actions .btn-outline-light {
        border-color: rgba(255, 255, 255, 0.45);
        color: #ffffff;
    }

        .dashboard-actions .btn-outline-light:hover,
        .hero-actions .btn-outline-light:hover {
            color: #102a56;
            background: #ffffff;
            border-color: #ffffff;
        }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.metric-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    padding: 0.82rem;
    box-shadow: 0 7px 22px rgba(16, 42, 86, 0.055);
    min-height: 94px;
}

    .metric-card::after {
        content: "";
        position: absolute;
        width: 78px;
        height: 78px;
        right: -28px;
        top: -28px;
        border-radius: 50%;
        background: #eef4ff;
    }

.metric-card-accent::after {
    background: rgba(255, 122, 26, 0.14);
}

.metric-label {
    position: relative;
    z-index: 2;
    display: block;
    color: #667085;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.metric-value {
    position: relative;
    z-index: 2;
    display: block;
    color: #102a56;
    font-size: 1.48rem;
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 0.22rem;
}

.metric-card small {
    position: relative;
    z-index: 2;
    font-weight: 700;
    font-size: 0.82rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.8rem;
}

.quick-link-card {
    height: 100%;
    min-height: 92px;
    background: #ffffff;
    border: 1px solid #e7edf5;
    border-radius: 15px;
    padding: 0.78rem;
    box-shadow: 0 7px 22px rgba(16, 42, 86, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

    .quick-link-card:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 122, 26, 0.35);
        box-shadow: 0 12px 32px rgba(16, 42, 86, 0.08);
    }

.quick-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff4ec;
    color: #ff6b13;
    font-weight: 950;
    margin-bottom: 0.48rem;
}

.quick-link-card h6 {
    color: #102a56;
    font-weight: 850;
    font-size: 0.96rem;
}

.quick-link-card small {
    font-size: 0.8rem;
}

.dashboard-panel {
    border: 1px solid #e7edf5;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 7px 22px rgba(16, 42, 86, 0.05);
}

    .dashboard-panel .card-header {
        background: #ffffff;
        border-bottom: 1px solid #e7edf5;
        padding: 0.72rem 0.85rem;
    }

        .dashboard-panel .card-header strong {
            color: #102a56;
            font-weight: 850;
        }

    .dashboard-panel .card-body {
        padding: 0;
    }

.dashboard-muted-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    background: #f3f6fb;
    color: #667085;
    font-weight: 800;
    font-size: 0.76rem;
}

.empty-row {
    color: #8492a6;
    font-weight: 700;
}

/* Login page compact */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    background: #eef3fb;
}

.login-left {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 80% 25%, rgba(255, 255, 255, 0.14), transparent 25%), linear-gradient(135deg, #061b43 0%, #102f68 58%, #173f84 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    min-height: 100vh;
}

.login-left-inner {
    width: min(590px, 84%);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.login-left::after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    right: -130px;
    bottom: -130px;
    border-radius: 50%;
    background: rgba(255, 138, 42, 0.15);
}

.login-logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ff9340, #ff6b13);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 900;
    margin-bottom: 1rem;
    box-shadow: 0 12px 30px rgba(255, 107, 19, 0.22);
}

.login-kicker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 900;
    margin-bottom: 0.72rem;
}

    .login-kicker::before {
        content: "";
        width: 7px;
        height: 7px;
        background: #ff7a1a;
        border-radius: 999px;
    }

.login-title {
    font-size: clamp(2.4rem, 5vw, 4.35rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.05em;
    margin-bottom: 0.45rem;
}

.login-subtitle {
    font-size: clamp(1.15rem, 2.1vw, 1.7rem);
    font-weight: 850;
    margin-bottom: 0.95rem;
}

.login-description {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 1.45rem;
}

.login-feature-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    max-width: 600px;
}

.login-feature {
    border: 1px solid rgba(255, 255, 255, 0.17);
    background: rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 0.72rem;
    backdrop-filter: blur(8px);
}

    .login-feature strong {
        display: block;
        margin-bottom: 0.18rem;
    }

    .login-feature span {
        color: rgba(255, 255, 255, 0.72);
        font-size: 0.8rem;
    }

.login-email-pill {
    display: inline-flex;
    margin-top: 1.35rem;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.19);
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.45rem 0.82rem;
}

.login-right {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.35rem;
}

.login-card {
    width: min(100%, 350px);
    background: #ffffff;
    border-radius: 18px;
    padding: 1.35rem;
    box-shadow: 0 18px 50px rgba(16, 42, 86, 0.13);
}

.login-card-kicker {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    color: #ff6b13;
    font-weight: 900;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.72rem;
}

    .login-card-kicker::before {
        content: "";
        width: 7px;
        height: 7px;
        background: #ff6b13;
        border-radius: 999px;
    }

.login-card h1 {
    font-size: 1.55rem;
    font-weight: 950;
    letter-spacing: -0.03em;
    margin-bottom: 0.2rem;
}

.login-card .form-control {
    min-height: 38px;
    border-radius: 9px;
}

.login-card .btn {
    min-height: 40px;
    border-radius: 9px;
    font-size: 0.92rem;
}

.login-card-footer {
    border-top: 1px solid #e8eef6;
    margin-top: 1rem;
    padding-top: 0.82rem;
    text-align: center;
    color: #718096;
    font-size: 0.8rem;
}

/* Footer */

.app-footer {
    background: #102a56;
    color: #ffffff;
    margin-top: 1.4rem;
}

.footer-top {
    padding-top: 1.35rem;
    padding-bottom: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.footer-title {
    color: #ffffff;
    font-weight: 850;
    margin-bottom: 0.6rem;
}

.footer-muted {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.85rem;
}

.footer-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

    .footer-list li {
        margin-bottom: 0.3rem;
    }

    .footer-list a {
        color: rgba(255, 255, 255, 0.72);
        font-weight: 600;
        font-size: 0.84rem;
    }

        .footer-list a:hover {
            color: #ffb27a;
        }

.footer-cta {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.78rem;
}

/* Spacing helpers override oversized bootstrap page spacing */

.py-3 {
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
}

.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.g-4,
.gy-4 {
    --bs-gutter-y: 1rem;
}

.g-4,
.gx-4 {
    --bs-gutter-x: 1rem;
}

/* Responsive */

@media (max-width: 1200px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .navbar .nav-link {
        padding-left: 0.42rem;
        padding-right: 0.42rem;
    }
}

@media (max-width: 992px) {
    .app-shell {
        max-width: 100%;
    }

    .navbar .nav-link {
        padding: 0.44rem 0.55rem;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-left {
        min-height: auto;
        padding: 2.1rem 1rem;
    }

    .login-left-inner {
        width: min(760px, 100%);
    }

    .login-right {
        min-height: auto;
        padding: 1.5rem 1rem 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-hero,
    .dashboard-hero {
        padding: 0.9rem;
        border-radius: 14px;
    }

        .page-hero .page-title,
        .dashboard-title {
            font-size: 1.6rem;
        }

    .dashboard-actions,
    .hero-actions {
        width: 100%;
    }

        .dashboard-actions .btn,
        .hero-actions .btn {
            flex: 1 1 auto;
        }

    .login-feature-row {
        grid-template-columns: 1fr;
    }

    .login-title {
        font-size: 2.7rem;
    }

    .login-subtitle {
        font-size: 1.25rem;
    }

    .login-card {
        border-radius: 16px;
        padding: 1.1rem;
    }

    .footer-top {
        padding-top: 1.1rem;
        padding-bottom: 0.9rem;
    }
}

@media (max-width: 480px) {
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}
