:root {
    --sgap-bg: #f3f6fa;
    --sgap-card: #ffffff;
    --sgap-ink: #172033;
    --sgap-muted: #617083;
    --sgap-blue: #1769aa;
    --sgap-green: #1b8f6a;
    --sgap-line: #d8e1ea;
    --sgap-shadow: 0 12px 34px rgba(23, 32, 51, .08);
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--sgap-bg);
    color: var(--sgap-ink);
    font-family: Arial, sans-serif;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
}

.app-main {
    min-width: 0;
    padding: 10px 24px 24px;
}

.app-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 30px;
    margin-bottom: 8px;
    padding: 0 2px;
}

.app-head-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
    white-space: nowrap;
}

.app-head-product {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.app-head-product strong {
    font-size: 16px;
}

.app-head-product > span {
    color: var(--sgap-muted);
    font-size: 10px;
    font-weight: 700;
}

.app-head-credit {
    padding-left: 8px;
    border-left: 1px solid var(--sgap-line);
    color: var(--sgap-muted);
    font-size: 10px;
    font-weight: 600;
}

.app-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid #bfe2d5;
    border-radius: 999px;
    background: #eefaf5;
    color: #126548;
    font-size: 10px;
    font-weight: 700;
}

.app-status--warning {
    border-color: #f6d58a;
    background: #fff7df;
    color: #8a5a00;
}

.app-page-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.app-logout {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid #cbd6e2;
    border-radius: 999px;
    background: #fff;
    color: var(--sgap-ink);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.app-logout:hover {
    border-color: var(--sgap-blue);
    color: var(--sgap-blue);
}

.app-quick-links {
    margin-bottom: 18px;
    padding: 20px 22px;
    background: var(--sgap-card);
    border: 1px solid var(--sgap-line);
    border-radius: 10px;
    box-shadow: var(--sgap-shadow);
}

.app-title-mobile {
    display: none;
}

.app-title-author {
    display: none;
    margin-left: 9px;
    color: var(--sgap-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.app-quick-links__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.app-quick-links__header h2 {
    margin: 2px 0 0;
    font-size: 20px;
    color: var(--sgap-ink);
}

.app-quick-links__header p {
    margin: 0;
    max-width: 420px;
    color: var(--sgap-muted);
    font-size: 13px;
    line-height: 1.45;
}

.app-quick-links__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.app-quick-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 94px;
    padding: 14px;
    border: 1px solid #d9e3ee;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5fb 100%);
    color: var(--sgap-ink);
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.app-quick-link:hover {
    transform: translateY(-1px);
    border-color: var(--sgap-blue);
    box-shadow: 0 10px 18px rgba(23, 32, 51, .08);
}

.app-quick-link strong {
    font-size: 14px;
}

.app-quick-link span {
    color: var(--sgap-muted);
    font-size: 12px;
    line-height: 1.4;
}

.app-content {
    min-height: calc(100vh - 118px);
    padding: 22px;
    overflow: auto;
    background: var(--sgap-card);
    border: 1px solid var(--sgap-line);
    border-radius: 10px;
    box-shadow: var(--sgap-shadow);
}

.app-content.is-loading {
    opacity: .55;
    pointer-events: none;
}

.app-error {
    color: #9f1d1d;
    padding: 16px;
    background: #fff0f0;
    border: 1px solid #ffd1d1;
    border-radius: 8px;
}

.app-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 430px);
}

.app-login-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 8vw, 86px);
    background: #172033;
    color: #fff;
}

.app-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.app-login-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--sgap-blue);
    font-size: 22px;
    font-weight: 700;
}

.app-login-brand p,
.app-login-hero h1,
.app-login-copy {
    margin: 0;
}

.app-login-brand-author {
    display: grid;
    gap: 2px;
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, .24);
    color: #c3d1df;
    font-size: 22px;
    line-height: 1.15;
}

.app-login-brand-author strong {
    color: #fff;
    font-size: 24px;
}

.app-login-hero h1 {
    max-width: 620px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.02;
}

.app-login-copy {
    max-width: 540px;
    margin-top: 18px;
    color: #c3d1df;
    font-size: 17px;
    line-height: 1.55;
}

.app-login-qr {
    width: fit-content;
    max-width: 100%;
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.app-login-qr img {
    width: 96px;
    height: 96px;
    flex: 0 0 auto;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
}

.app-login-qr strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.app-login-qr span {
    display: block;
    max-width: 190px;
    margin-top: 4px;
    color: #c3d1df;
    font-size: 13px;
    line-height: 1.35;
}

.app-login {
    align-self: center;
    margin: 24px;
    padding: 28px;
    background: var(--sgap-card);
    border: 1px solid var(--sgap-line);
    border-radius: 10px;
    box-shadow: var(--sgap-shadow);
}

.app-login h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.app-login-message {
    margin: 0 0 16px;
    padding: 11px 12px;
    border-left: 4px solid var(--sgap-blue);
    border-radius: 7px;
    background: #eef6fd;
    color: #12395c;
    font-size: 13px;
    line-height: 1.4;
}

.app-login fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.app-login legend {
    display: none;
}

.app-login h3 {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--sgap-muted);
}

.app-login input[type="text"],
.app-login input[type="password"] {
    width: 100%;
    height: 40px;
    margin-top: 7px;
    border: 1px solid #cbd6e2;
    border-radius: 7px;
    padding: 0 10px;
    font: inherit;
}

.app-login button[type="submit"] {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 7px;
    background: var(--sgap-blue);
    color: #fff;
    cursor: pointer;
}

.app-login button h4 {
    margin: 0;
    font-size: 13px;
}

.sgap-welcome {
    min-height: 420px;
    display: grid;
    place-items: center;
    padding: 38px 18px;
}

.sgap-welcome__inner {
    max-width: 760px;
    text-align: center;
}

.sgap-welcome__eyebrow {
    margin: 0 0 10px;
    color: var(--sgap-blue);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sgap-welcome h2 {
    margin: 0 0 18px;
    color: var(--sgap-ink);
    font-size: 30px;
}

.sgap-welcome p {
    margin: 0 auto 14px;
    color: #344154;
    font-size: 16px;
    line-height: 1.6;
}

.sgap-welcome__signature {
    margin-top: 28px;
    color: var(--sgap-ink);
    font-size: 24px;
    font-weight: 700;
}

.app-whatsapp {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 80;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-height: 58px;
    padding: 9px 17px 9px 10px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 16px;
    background: #087f5b;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(8, 127, 91, .3);
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.app-whatsapp:hover,
.app-whatsapp:focus-visible {
    background: #066b4d;
    box-shadow: 0 16px 34px rgba(8, 127, 91, .38);
    transform: translateY(-2px);
}

.app-whatsapp:focus-visible {
    outline: 3px solid rgba(8, 127, 91, .28);
    outline-offset: 3px;
}

.app-whatsapp__icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #087f5b;
}

.app-whatsapp__icon svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.app-whatsapp__text {
    display: grid;
    gap: 1px;
    white-space: nowrap;
}

.app-whatsapp__text strong {
    font-size: 14px;
    line-height: 1.2;
}

.app-whatsapp__text small {
    color: rgba(255, 255, 255, .88);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

@media (max-width: 980px) {
    .app-shell { display: block; }
    .app-main { padding: 6px 12px 12px; }
    .app-page-head { padding-left: 42px; }
    .app-quick-links__header { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 981px) and (max-width: 1399px) {
    .app-shell {
        display: block;
    }

    .app-main {
        padding: 10px 18px 18px;
    }

    .app-content {
        min-height: calc(100vh - 186px);
    }
}

@media (max-width: 760px) {
    .app-login-shell { display: block; }
    .app-login-hero {
        min-height: 27vh;
        padding: 24px 18px;
    }
    .app-login-brand {
        gap: 9px;
        margin-bottom: 21px;
    }
    .app-login-mark {
        width: 33px;
        height: 33px;
        border-radius: 8px;
        font-size: 17px;
    }
    .app-login-brand-author {
        gap: 1px;
        margin-left: 2px;
        padding-left: 8px;
        font-size: 16px;
    }
    .app-login-brand-author strong {
        font-size: 18px;
    }
    .app-login-hero h1 {
        font-size: 25.5px;
    }
    .app-login-copy {
        margin-top: 13.5px;
        font-size: 12.75px;
    }
    .app-login-qr { width: 100%; }
    .app-login { margin: 18px; }
    .app-body--shell .app-quick-links { display: none; }
}

@media (max-width: 600px) {
    .app-main { padding: 3px 8px 8px; }
    .app-page-head {
        align-items: center;
        flex-direction: row;
        min-height: 21px;
        margin-bottom: 4px;
        padding-left: 42px;
    }
    .app-head-brand {
        align-items: flex-start;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }
    .app-head-product {
        gap: 3px;
    }
    .app-head-product strong {
        font-size: 12px;
    }
    .app-head-product > span {
        font-size: 8px;
    }
    .app-head-credit {
        max-width: calc(100vw - 140px);
        padding-left: 0;
        border-left: 0;
        font-size: 7.5px;
        line-height: 1.05;
        white-space: normal;
    }
    .app-status,
    .app-logout {
        min-height: 21px;
        padding: 0 6px;
        font-size: 8px;
    }
    .app-content {
        min-height: calc(100vh - 148px);
        padding: 14px;
        border-radius: 8px;
    }
    .app-whatsapp {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        min-height: 52px;
        padding: 7px 12px 7px 8px;
        border-radius: 14px;
    }
    .app-whatsapp__icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
    .app-whatsapp__icon svg {
        width: 24px;
        height: 24px;
    }
    .app-whatsapp__text small {
        font-size: 10px;
    }
}
.app-module-loading{min-height:calc(100vh - 180px);display:grid;place-items:center;background:#f4f6f3;color:#526663;font-weight:750;border-radius:14px}
