:root {
    --ink: #17243b;
    --muted: #718096;
    --brand: #244eb8;
    --brand-dark: #193a8c;
    --teal: #18a6a0;
    --surface: #ffffff;
    --canvas: #f3f6fc;
    --line: #e6ebf3;
    --shadow: 0 12px 32px rgba(27, 44, 80, .07);
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 10% 0%, rgba(80, 120, 230, .07), transparent 34rem),
        var(--canvas);
    color: var(--ink);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: -.01em;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.navbar {
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(226, 232, 242, .9);
    box-shadow: 0 4px 18px rgba(27, 44, 80, .035);
    backdrop-filter: blur(14px);
}

.navbar-brand { min-width: max-content; }
.bi { display: inline-block; line-height: 1; vertical-align: -.08em; }
.nav-link .bi { margin-right: .25rem; font-size: .95em; }
.btn .bi { margin-right: .2rem; }
.navbar-toggler { display: inline-grid; width: 42px; height: 40px; place-items: center; border-color: #dce3ee; color: var(--brand); font-size: 1.4rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(55, 89, 215, .13); }
.brand-mark { display: inline-block; width: 96px; height: 42px; object-fit: contain; }
.brand-login { display: block; width: min(250px, 82%); height: auto; margin: 0 auto 1.25rem; }
.brand-name { color: var(--ink); font-size: 1.02rem; font-weight: 760; letter-spacing: -.035em; }
.page-wrap { max-width: 1240px; }

main.page-wrap > .d-flex.flex-wrap.justify-content-between {
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem !important;
    border: 1px solid rgba(226, 232, 242, .9);
    border-radius: 18px;
    background: linear-gradient(110deg, #fff 0%, #fbfcff 100%);
    box-shadow: 0 6px 20px rgba(27, 44, 80, .035);
}

main.page-wrap > .d-flex.flex-wrap.justify-content-between h1 {
    color: #172b50;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 760;
    letter-spacing: -.045em;
}

.card, .form-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.card { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { box-shadow: 0 16px 36px rgba(27, 44, 80, .09); }
.card h2, .card h3 { color: #1d3155; font-weight: 720; letter-spacing: -.025em; }

.stat-card {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    padding: 1.2rem !important;
}

.stat-card::after {
    position: absolute;
    right: -20px;
    bottom: -34px;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: var(--stat-tint, rgba(55, 89, 215, .08));
    content: "";
}

.row.g-3.mb-4 > div:nth-child(1) { --stat-tint: rgba(55, 89, 215, .09); }
.row.g-3.mb-4 > div:nth-child(2) { --stat-tint: rgba(24, 166, 160, .11); }
.row.g-3.mb-4 > div:nth-child(3) { --stat-tint: rgba(245, 169, 65, .14); }
.row.g-3.mb-4 > div:nth-child(4) { --stat-tint: rgba(60, 169, 119, .12); }
.stat-label { position: relative; z-index: 1; color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat-value { position: relative; z-index: 1; margin-top: .35rem; color: #1e376b; font-size: 2.25rem; font-weight: 780; letter-spacing: -.055em; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .9rem .8rem; vertical-align: middle; border-bottom-color: #edf0f5; }
.table thead th { color: #77849a; background: #f8faff; font-size: .75rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { --bs-table-bg: #f8faff; }
.table-responsive { border: 1px solid #edf0f5; border-radius: 13px; }

.form-card { max-width: 720px; padding: 2rem; }
.form-card > .mb-4 { text-align: center; }
.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    align-items: center;
    overflow-x: hidden;
    background:
        radial-gradient(ellipse at 15% 15%, rgba(54, 91, 193, .15), transparent 31rem),
        radial-gradient(ellipse at 90% 85%, rgba(24, 166, 160, .13), transparent 28rem),
        #f3f6fc;
}

.login-page::before, .login-page::after {
    position: fixed;
    z-index: 0;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(55, 89, 215, .08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-page::before { top: -165px; right: -65px; box-shadow: 0 0 0 35px rgba(55, 89, 215, .025), 0 0 0 75px rgba(55, 89, 215, .02); }
.login-page::after { bottom: -210px; left: -100px; width: 380px; height: 380px; box-shadow: 0 0 0 40px rgba(24, 166, 160, .025); }
.login-page > main { position: relative; z-index: 1; width: 100%; }
.login-page .form-card { max-width: 490px; padding: clamp(1.5rem, 5vw, 2.5rem); border-color: rgba(255, 255, 255, .85); box-shadow: 0 24px 70px rgba(28, 48, 91, .13); }
.login-page .form-card h1 { color: #1b315b; font-weight: 780; letter-spacing: -.045em; }
.login-page .form-card > .mb-4 { margin-bottom: 1.8rem !important; }

.form-label { color: #35445e; font-size: .9rem; font-weight: 650; }
.form-control, .form-select {
    min-height: 46px;
    border-color: #dce3ee;
    border-radius: 10px;
    color: var(--ink);
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(28, 48, 91, .025);
}
textarea.form-control { min-height: auto; }
.form-control::placeholder { color: #a0a9b8; }
.form-control:focus, .form-select:focus {
    border-color: #7993e3;
    box-shadow: 0 0 0 .22rem rgba(55, 89, 215, .13);
}

.btn { border-radius: 10px; font-weight: 650; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: var(--brand); background: linear-gradient(135deg, #315bd0, #2449ac); box-shadow: 0 5px 13px rgba(36, 78, 184, .18); }
.btn-primary:hover { border-color: var(--brand-dark); background: linear-gradient(135deg, #284fbf, #1d3e99); box-shadow: 0 7px 17px rgba(36, 78, 184, .25); }
.login-page .btn-primary { min-height: 48px; }
.btn-outline-secondary { border-color: #d7dfeb; color: #53627a; background: #fff; }
.btn-outline-secondary:hover { border-color: #b8c5d8; color: #273955; background: #f7f9fc; }

.alert { border: 0; border-radius: 13px; box-shadow: 0 4px 14px rgba(27, 44, 80, .045); }
.status-pill { display: inline-block; border-radius: 30px; padding: .32rem .7rem; font-size: .78rem; font-weight: 680; white-space: nowrap; }
.status-submitted { color: #2849b8; background: #e8f0ff; }
.status-approved { color: #16734a; background: #e1f6ed; }
.status-rejected { color: #a93535; background: #ffebeb; }
.status-draft { color: #596579; background: #eef0f4; }
.muted-small { color: var(--muted); font-size: .85rem; }
.nav-link { margin: .15rem .1rem; border-radius: 8px; color: #64728a; font-size: .9rem; font-weight: 580; }
.nav-link:hover { color: var(--brand); background: #f4f7ff; }
.nav-link.active { color: var(--brand) !important; background: #edf2ff; font-weight: 720; }
footer.page-wrap { color: #8894a8 !important; }

@media (max-width: 991.98px) {
    .navbar-nav { padding-top: .65rem; }
    .navbar-nav .nav-link { padding: .6rem .75rem; }
}

@media (max-width: 575.98px) {
    main.page-wrap { padding-top: 1rem !important; }
    main.page-wrap > .d-flex.flex-wrap.justify-content-between { padding: 1rem; border-radius: 14px; }
    main.page-wrap > .d-flex.flex-wrap.justify-content-between form,
    main.page-wrap > .d-flex.flex-wrap.justify-content-between form select { width: 100%; }
    .form-card { padding: 1.25rem; }
    .brand-mark { width: 78px; height: 36px; }
    .brand-name { font-size: .92rem; }
    .table > :not(caption) > * > * { padding: .7rem .6rem; }
}

@media print {
    body { background: #fff; }
    .navbar, .no-print, .btn, form { display: none !important; }
    .card { box-shadow: none; border-color: #ccc; }
    .page-wrap { max-width: none; }
}
