:root {
    --ies-navy: #14213d;
    --ies-green: #0f8a55;
    --ies-green-dark: #0a6c42;
    --ies-sidebar: #f5f8fb;
    --ies-border: #dce3ea;
    --ies-muted: #65758b;
}

body {
    color: var(--ies-navy);
    background: #fff;
}

a { color: #1769aa; }
.icon { flex: 0 0 auto; vertical-align: -0.2em; }
.btn-success { --tblr-btn-bg: var(--ies-green); --tblr-btn-border-color: var(--ies-green); --tblr-btn-hover-bg: var(--ies-green-dark); --tblr-btn-hover-border-color: var(--ies-green-dark); }
.btn:focus-visible, .nav-link:focus-visible, a:focus-visible, .form-control:focus-visible { outline: 3px solid rgba(15, 138, 85, .3); outline-offset: 2px; }

.app-sidebar { background: var(--ies-sidebar); border-right: 1px solid var(--ies-border); }
.app-sidebar .container-fluid { min-height: 100%; }
.brand-link { display: flex; align-items: center; gap: .75rem; color: var(--ies-navy); text-decoration: none; font-size: 1.05rem; font-weight: 700; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; }
.brand-mark img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
.app-sidebar .nav-link { border-left: 3px solid transparent; border-radius: 0 .35rem .35rem 0; color: #465977; margin: .1rem 0; padding: .72rem .8rem; }
.app-sidebar .nav-link:hover { color: var(--ies-navy); background: #edf2f6; }
.app-sidebar .nav-link.active { color: var(--ies-green-dark); background: #e5f2ed; border-left-color: var(--ies-green); font-weight: 600; }
.app-sidebar .nav-link-icon { color: currentColor; }
.sidebar-footer { display: flex; align-items: center; gap: .75rem; padding: 1.25rem .75rem; color: #435674; }
.sidebar-footer-icon { display: grid; place-items: center; }
.sidebar-footer small { display: block; color: var(--ies-muted); }

.app-topbar { min-height: 4.25rem; display: flex; align-items: center; border-bottom: 1px solid var(--ies-border); background: #fff; }
.topbar-help { display: inline-flex; align-items: center; gap: .35rem; color: #435674; text-decoration: none; }
.topbar-help .icon { width: 1.2rem; height: 1.2rem; }
.topbar-divider { width: 1px; height: 1.75rem; background: var(--ies-border); }
.page-body { margin-top: 0; padding-top: 1.5rem; }
.page-title { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.1; color: #101d3c; }

.stat-card { border-color: var(--ies-border); box-shadow: none; }
.stat-icon { color: #536889; padding-top: .15rem; }
.stat-icon .icon { width: 2rem; height: 2rem; }
.stat-value { font-size: 1.8rem; line-height: 1.25; font-weight: 700; color: #101d3c; }
.card { border-color: var(--ies-border); box-shadow: 0 1px 2px rgba(20, 33, 61, .03); }
.card-title { color: #14213d; font-weight: 700; }
.empty-state, .placeholder-panel { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; background: #f8fafc; }
.empty-state { border: 1px solid #eef2f6; border-radius: .35rem; }
.empty-state-icon { display: inline-grid; width: 4rem; height: 4rem; place-items: center; color: #536889; margin-bottom: 1rem; }
.empty-state-icon .icon { width: 3rem; height: 3rem; }
.empty-state h3, .placeholder-panel h3 { margin-bottom: .5rem; }
.empty-state p, .placeholder-panel p { max-width: 42rem; margin: 0 auto 1.25rem; color: var(--ies-muted); }
.empty-state hr { max-width: 36rem; margin: 1.5rem auto .75rem; }
.empty-state small { color: var(--ies-muted); }
.process-list > div { display: flex; gap: 1rem; }
.process-list > div + div { border-left: 1px solid var(--ies-border); }
.process-list span { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: 50%; background: #edf2f6; font-weight: 700; }
.process-list p { color: var(--ies-muted); margin: .35rem 0 0; font-size: .9rem; }
.alert-info { color: #174b7a; background: #f0f8ff; border-color: #b9ddfa; }

.auth-page { min-height: 100vh; background: #fff; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(20rem, 42%) 1fr; }
.auth-brand { display: grid; place-items: center; padding: 3rem; color: #fff; background: var(--ies-navy); }
.auth-brand-content { max-width: 30rem; }
.auth-brand-mark { display: grid; width: 6rem; height: 6rem; place-items: center; margin-bottom: 1.5rem; }
.auth-brand-mark img { width: 6rem; height: 6rem; object-fit: contain; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, .18)); }
.auth-brand h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.auth-center-name { color: #72d5a8; font-size: 1rem; font-weight: 700; letter-spacing: .04em; margin: -.35rem 0 1rem; }
.auth-brand p { color: #cad5e5; font-size: 1.1rem; line-height: 1.7; }
.auth-purpose-list { list-style: none; margin: 2.25rem 0 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .15); }
.auth-purpose-list li { display: flex; align-items: baseline; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.auth-purpose-list strong { min-width: 5.5rem; color: #72d5a8; }
.auth-purpose-list span { color: #cad5e5; }
.auth-form-panel { display: grid; place-items: center; padding: 2rem; }
.auth-form-wrap { width: min(100%, 27rem); }
.auth-form-wrap h2 { color: var(--ies-navy); }
.form-control-lg { min-height: 3rem; font-size: 1rem; }

@media (min-width: 992px) {
    .app-sidebar { width: 17rem; }
    .page-wrapper { margin-left: 17rem; }
}

@media (max-width: 991.98px) {
    .app-sidebar .container-fluid { min-height: auto; }
    .app-topbar { min-height: 3.5rem; }
    .process-list > div + div { border-left: 0; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { min-height: auto; padding: 1.5rem; text-align: center; }
    .auth-brand-mark { width: 4rem; height: 4rem; margin: 0 auto .75rem; }
    .auth-brand-mark img { width: 4rem; height: 4rem; filter: none; }
    .auth-brand h1 { font-size: 1.75rem; margin-bottom: .7rem; }
    .auth-center-name { margin-bottom: .7rem; }
    .auth-brand p { max-width: 32rem; margin: 0 auto; font-size: .95rem; line-height: 1.5; }
    .auth-purpose-list { display: none; }
}

@media (max-width: 575.98px) {
    .page-body { padding-top: 1.25rem; }
    .page-header .col-auto { width: 100%; }
    .page-header .col-auto .btn { width: 100%; }
    .app-topbar .topbar-help, .app-topbar .topbar-divider { display: none; }
    .auth-form-panel { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
