:root {
    --green-950: #08281f;
    --green-900: #103b2f;
    --green-700: #1d6b4f;
    --gold-500: #c99a2e;
    --gold-100: #fff4d8;
    --ink: #16211d;
    --muted: #66736d;
    --surface: #ffffff;
    --line: #d9e5de;
    --danger: #7c2417;
    --danger-bg: #fff0ed;
    --focus-dark: #1d6b4f;
    --focus-light: #fff4d8;
    --shadow: 0 24px 60px rgba(8, 40, 31, 0.16);
    color-scheme: light;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(135deg, #f5f8f4 0%, #edf4ef 52%, #fbf7ec 100%);
}
button,
input { font: inherit; }
:focus-visible {
    outline: 3px solid var(--focus-dark);
    outline-offset: 3px;
}
.sidebar :focus-visible,
.topbar :focus-visible { outline-color: var(--focus-light); }
.app-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 28px;
    padding: 28px;
    color: #fff;
    background: linear-gradient(180deg, var(--green-950), var(--green-900));
}
.brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}
.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border-radius: 14px;
    color: var(--green-950);
    background: var(--gold-500);
    font-weight: 800;
    letter-spacing: -0.04em;
}
.brand-copy { min-width: 0; }
.brand-name,
.brand-context {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
}
.brand-name { font-weight: 800; }
.brand-context {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}
.sidebar-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.92rem;
    line-height: 1.55;
}
.main-panel {
    min-width: 0;
    padding: 28px;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 18px 22px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(90deg, var(--green-900), var(--green-700));
    box-shadow: var(--shadow);
}
.eyebrow {
    margin: 0 0 5px;
    color: var(--gold-500);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.topbar-title {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}
.session-nav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}
.session-user {
    overflow-wrap: anywhere;
    font-size: 0.9rem;
}
.logout-form { margin: 0; }
.logout-button {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    color: var(--gold-100);
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-weight: 750;
}
.logout-button:hover { background: rgba(255, 255, 255, 0.18); }
.content-card,
.login-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}
.content-card {
    min-width: 0;
    padding: 26px;
}
.content-card h1,
.login-card h1 {
    margin: 0;
    color: var(--green-950);
    letter-spacing: -0.04em;
}
.content-card p {
    color: var(--muted);
    line-height: 1.6;
}
.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
}
.login-card {
    width: min(100%, 440px);
    padding: 30px;
}
.login-brand {
    margin-bottom: 24px;
    color: var(--green-950);
}
.login-brand .brand-context { color: var(--muted); }
.login-intro {
    margin: 10px 0 22px;
    color: var(--muted);
    line-height: 1.55;
}
.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #e3b0a4;
    border-radius: 14px;
    color: var(--danger);
    background: var(--danger-bg);
    line-height: 1.45;
}
.login-form {
    display: grid;
    gap: 16px;
}
.login-form label {
    display: grid;
    gap: 8px;
    color: var(--green-950);
    font-weight: 700;
}
.login-form input:not([type="hidden"]) {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--surface);
}
.login-form input:not([type="hidden"]):focus { border-color: var(--green-700); }
.primary-button {
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--green-700);
    cursor: pointer;
    font-weight: 800;
}
.primary-button:hover { background: var(--green-900); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.report-module { container: informe-report / inline-size; }
.national-slide {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    color: #15191d;
    background: #f7f8f7 url("../img/pfpb-slide-background.jpg") center / cover no-repeat;
    box-shadow: 0 15px 38px rgba(21, 37, 31, 0.16);
}
.national-slide .report-header {
    position: absolute;
    top: 1.15%;
    left: 2.45%;
    width: 65.5%;
}
.national-slide .report-titles h1,
.national-slide .report-titles p { margin: 0; font-weight: 900; line-height: 1.05; }
.national-slide .report-titles h1 { color: #691c32; font-size: 2.65cqw; letter-spacing: -0.018em; white-space: nowrap; }
.national-slide .report-titles p { margin-top: 0.15em; color: #bc955c; font-size: 2.5cqw; }
.national-slide .kpi-report-grid {
    position: absolute;
    top: 14.22%;
    left: 15.15%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2.58%;
    width: 79.4%;
    height: 62.67%;
}
.national-slide .report-kpi {
    position: relative;
    min-width: 0;
    border-radius: 1.2cqw;
    background: #fff;
    box-shadow: 0.35cqw 0.42cqw 0.55cqw rgba(0, 0, 0, 0.32);
}
.national-slide .report-kpi h3 {
    position: absolute;
    z-index: 4;
    top: 0;
    width: 100%;
    height: 16.75%;
    margin: 0;
    padding: 0.2em 0.15em;
    border-radius: 1.2cqw 1.2cqw 0 0;
    color: #fff;
    background: #285c4d;
    font-size: 1.9cqw;
    line-height: 1.28;
    text-align: center;
}
.national-slide .report-kpi h3 span { display: block; }
.national-slide .report-kpi--entregado h3 { background: #3d7f75; }
.national-slide .report-kpi--derechohabientes h3 { background: #691c32; }
.national-slide .report-kpi--superficie h3 { background: #bc955c; }
.national-slide .report-kpi > img { position: absolute; top: 16.75%; width: 100%; height: 23.7%; object-fit: contain; }
.national-slide .report-kpi dl { position: absolute; top: 41.17%; width: 100%; height: 23.95%; margin: 0; }
.national-slide .report-kpi dl div { position: relative; height: 33.333%; border-bottom: 2px solid #fff; background: rgba(236, 236, 236, 0.86); }
.national-slide .report-kpi dt,
.national-slide .report-kpi dd { margin: 0; padding: 0 0.15em; font-size: 2.05cqw; line-height: 1.37; white-space: nowrap; }
.national-slide .report-kpi dt { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.national-slide .report-kpi dd { font-size: 2.35cqw; line-height: 1.2; text-align: center; }
.national-slide .report-kpi:first-child dt { top: 0; right: 100%; display: flex; align-items: center; width: 52.5%; height: 100%; margin: 0; overflow: visible; clip: auto; background: rgba(236, 236, 236, 0.94); }
.national-slide .report-kpi dl div:nth-child(2) { font-weight: 900; }
.national-slide .report-kpi dl div:last-child { color: #691c32; }
.national-slide .report-donut {
    position: absolute;
    bottom: 1.38%;
    left: 50%;
    display: grid;
    width: 63.1%;
    aspect-ratio: 1;
    border-radius: 50%;
    place-items: center;
    transform: translateX(-50%);
}
.national-slide .report-donut--suministrado { color: #285c4d; background: conic-gradient(#285c4d 95.34%, #9fb5b0 0); }
.national-slide .report-donut--entregado { color: #3d7f75; background: conic-gradient(#3d7f75 88.60%, #a7c0b7 0); }
.national-slide .report-donut--derechohabientes { color: #691c32; background: conic-gradient(#691c32 91.05%, #c9a5b0 0); }
.national-slide .report-donut--superficie { color: #bc955c; background: conic-gradient(#bc955c 88.78%, #e2d1aa 0); }
.national-slide .report-donut::before { content: ""; grid-area: 1 / 1; width: 76%; aspect-ratio: 1; border-radius: 50%; background: #fff; }
.national-slide .report-donut strong { z-index: 1; grid-area: 1 / 1; color: inherit; font-size: 3.45cqw; }
.national-slide .report-notes { position: absolute; top: 80.11%; left: 1.58%; width: 92.23%; margin: 0; padding: 0.45em 0 0 1.4em; font-size: 1.458cqw; line-height: 1.32; }
.national-slide .report-footer { position: absolute; top: 94.8%; right: 0; display: flex; align-items: center; justify-content: flex-end; width: 36%; height: 5.2%; padding-right: 1.6%; color: #fff; background: transparent; }
.national-slide .report-footer time { font-size: 2.14cqw; font-weight: 900; line-height: 1; text-shadow: 0 1px 1px #161a1d; }
@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { padding: 20px; }
    .sidebar-copy { display: none; }
    .main-panel { padding: 18px; }
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .session-nav {
        width: 100%;
        justify-content: space-between;
    }
    .content-card { padding: 20px; }
}
@container informe-report (max-width: 860px) {
    .national-slide { aspect-ratio: auto; padding: 18px 12px 0; overflow: visible; background: #f7f8f7; }
    .national-slide .report-header,
    .national-slide .kpi-report-grid,
    .national-slide .report-notes,
    .national-slide .report-footer { position: static; width: auto; height: auto; }
    .national-slide .report-titles h1 { font-size: clamp(1.25rem, 5vw, 2rem); white-space: normal; }
    .national-slide .report-titles p { font-size: clamp(1.2rem, 4.8vw, 1.8rem); }
    .national-slide .kpi-report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
    .national-slide .report-kpi { display: grid; grid-template-rows: auto 120px auto 180px; min-height: 480px; overflow: hidden; border-radius: 13px; }
    .national-slide .report-kpi h3,
    .national-slide .report-kpi > img,
    .national-slide .report-kpi dl,
    .national-slide .report-donut { position: static; width: auto; height: auto; transform: none; }
    .national-slide .report-kpi h3 { padding: 10px; font-size: 1rem; }
    .national-slide .report-kpi > img { width: 100%; height: 120px; }
    .national-slide .report-kpi dl div { display: grid; grid-template-columns: 36% 64%; height: auto; }
    .national-slide .report-kpi dt,
    .national-slide .report-kpi:first-child dt { position: static; display: block; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; background: transparent; }
    .national-slide .report-kpi dt,
    .national-slide .report-kpi dd { font-size: 1rem; }
    .national-slide .report-donut { width: 150px; align-self: center; justify-self: center; }
    .national-slide .report-donut strong { font-size: 2.2rem; }
    .national-slide .report-notes { padding: 18px 0 18px 1.4em; font-size: 0.95rem; }
    .national-slide .report-footer { min-height: 58px; margin: 0 -12px; padding: 12px; justify-content: center; background: #691c32; }
    .national-slide .report-footer time { font-size: 1rem; }
}
@media (max-width: 520px) {
    .main-panel,
    .login-page { padding: 10px; }
    .topbar,
    .content-card,
    .login-card { border-radius: 18px; }
    .login-card { padding: 22px 18px; }
    .session-nav {
        align-items: flex-start;
        flex-direction: column;
    }
}
@container informe-report (max-width: 520px) {
    .national-slide .kpi-report-grid { grid-template-columns: 1fr; }
}
