/* =========================================================
   OLCOT · V3.0.205 — Login responsive con tema heredado
   - El tema se cambia únicamente dentro del sistema.
   - El login hereda la última preferencia guardada en "modoOscuro".
   - Escritorio: 1920×1024 y 1366×768.
   - Tablet y móvil: composición vertical, sin selector de tema.
   ========================================================= */
html, body { min-height: 100%; }
html.dark { color-scheme: dark; }

body:has(.olcot-login-page) {
    margin: 0 !important;
    min-height: 100vh !important;
    display: block !important;
    background: #e9eef4 !important;
    color: #112038 !important;
    overflow: auto;
}
html.dark body:has(.olcot-login-page),
body.dark:has(.olcot-login-page) {
    background: #0f1722 !important;
    color: #eef5fb !important;
}

.olcot-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}
.olcot-login-card {
    width: min(1180px, calc(100vw - 56px));
    min-height: 638px;
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(25, 45, 72, .10);
}
.olcot-login-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 54px 64px;
    background: #fff;
}
.olcot-login-form-inner { width: min(420px, 100%); }
.olcot-login-kicker {
    color: #0e8b82;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 17px;
}
.olcot-login-form-inner h1 {
    margin: 0;
    color: #10223c;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 760;
}
.olcot-login-subtitle {
    margin: 14px 0 34px;
    color: #718096;
    font-size: 16px;
}
.olcot-login-form-inner label {
    display: block;
    margin: 0 0 8px;
    color: #10223c;
    font-size: 13px;
    font-weight: 700;
}
.olcot-login-form-inner input {
    width: 100% !important;
    height: 50px;
    margin: 0 0 20px !important;
    padding: 0 14px !important;
    box-sizing: border-box;
    border: 1px solid #cbd8e6 !important;
    border-radius: 9px !important;
    outline: 0;
    background: #eef4fb !important;
    color: #0f172a !important;
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.olcot-login-form-inner input:focus {
    border-color: #15958b !important;
    box-shadow: 0 0 0 3px rgba(21,149,139,.14);
    background: #fff !important;
}
.olcot-password-wrap { position: relative; }
.olcot-password-wrap input { padding-right: 48px !important; }
.olcot-password-toggle {
    position: absolute;
    right: 8px;
    top: 7px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}
.olcot-password-toggle:hover { background: #e1eaf5; color: #0f766e; }
.olcot-login-submit {
    width: 100%;
    height: 51px;
    margin-top: 5px;
    border: 1px solid #13877f;
    border-radius: 9px;
    background: #198f87;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(25,143,135,.14);
    transition: background .16s ease, transform .08s ease, box-shadow .16s ease;
}
.olcot-login-submit:hover { background: #117b74; box-shadow: 0 7px 18px rgba(17,123,116,.20); }
.olcot-login-submit:active { transform: translateY(1px); }
.olcot-login-forgot {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #4d647f;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}
.olcot-login-forgot:hover { color: #0f766e; text-decoration: underline; }
.olcot-login-error {
    margin: -14px 0 20px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fff1f2;
    color: #b42318;
    font-size: 13px;
}
.olcot-login-brand-pane {
    margin: 24px 24px 24px 0;
    display: grid;
    place-items: center;
    background: #111b2b;
    color: #fff;
    min-height: 590px;
}
.olcot-login-brand-content {
    width: 100%;
    text-align: center;
    padding: 48px 30px;
    box-sizing: border-box;
}
.olcot-login-logo {
    width: min(360px, 72%);
    height: 260px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
}
.olcot-login-product {
    margin-top: 5px;
    color: #fff;
    font-size: 18px;
    font-weight: 760;
}
.olcot-login-tagline {
    margin-top: 8px;
    color: #90c2ef;
    font-size: 13px;
}

/* Tema oscuro heredado del sistema. No existe control de tema en login. */
html.dark .olcot-login-card,
html.dark .olcot-login-form-pane,
body.dark .olcot-login-card,
body.dark .olcot-login-form-pane {
    background: #17212e;
    border-color: #263548;
}
html.dark .olcot-login-form-inner h1,
html.dark .olcot-login-form-inner label,
body.dark .olcot-login-form-inner h1,
body.dark .olcot-login-form-inner label { color: #eef5fb; }
html.dark .olcot-login-subtitle,
body.dark .olcot-login-subtitle { color: #9eafc2; }
html.dark .olcot-login-form-inner input,
body.dark .olcot-login-form-inner input {
    background: #101a27 !important;
    color: #eff6ff !important;
    border-color: #34475d !important;
}
html.dark .olcot-login-form-inner input:focus,
body.dark .olcot-login-form-inner input:focus {
    background: #142235 !important;
    border-color: #2bb3a8 !important;
    box-shadow: 0 0 0 3px rgba(43,179,168,.16);
}
html.dark .olcot-password-toggle,
body.dark .olcot-password-toggle { color: #b9c7d8; }
html.dark .olcot-password-toggle:hover,
body.dark .olcot-password-toggle:hover { background: #223247; color: #5eead4; }
html.dark .olcot-login-forgot,
body.dark .olcot-login-forgot { color: #b2c2d4; }
html.dark .olcot-login-forgot:hover,
body.dark .olcot-login-forgot:hover { color: #63d8cd; }
html.dark .olcot-login-error,
body.dark .olcot-login-error {
    background: #341b21;
    color: #fecdd3;
    border-color: #6b2632;
}

/* Laptop 1366×768: conserva las dos columnas pero compacta altura. */
@media (min-width: 901px) and (max-width: 1500px), (min-width: 901px) and (max-height: 820px) {
    .olcot-login-page { padding: 18px 24px; }
    .olcot-login-card {
        width: min(1080px, calc(100vw - 48px));
        min-height: 560px;
    }
    .olcot-login-form-pane { padding: 38px 52px; }
    .olcot-login-form-inner { width: min(390px, 100%); }
    .olcot-login-form-inner h1 { font-size: 35px; }
    .olcot-login-subtitle { margin: 10px 0 25px; font-size: 14px; }
    .olcot-login-form-inner input { height: 46px; margin-bottom: 16px !important; }
    .olcot-login-submit { height: 48px; }
    .olcot-login-brand-pane { margin: 18px 18px 18px 0; min-height: 524px; }
    .olcot-login-brand-content { padding: 34px 24px; }
    .olcot-login-logo { width: min(310px, 74%); height: 220px; margin-bottom: 12px; }
}

/* Tablet: formulario arriba y marca abajo, ambos visibles. */
@media (min-width: 601px) and (max-width: 900px) {
    .olcot-login-page { padding: 18px; }
    .olcot-login-card {
        width: min(650px, calc(100vw - 36px));
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-areas: "form" "brand";
        border-radius: 20px;
    }
    .olcot-login-form-pane {
        grid-area: form;
        padding: 38px 44px 30px;
    }
    .olcot-login-form-inner { width: min(470px, 100%); }
    .olcot-login-form-inner h1 { font-size: 35px; }
    .olcot-login-subtitle { margin: 10px 0 26px; }
    .olcot-login-brand-pane {
        grid-area: brand;
        display: grid;
        margin: 0;
        min-height: 175px;
        border-radius: 0;
    }
    .olcot-login-brand-content { padding: 20px 24px 18px; }
    .olcot-login-logo { width: min(260px, 55%); height: 86px; margin: 0 auto 4px; }
    .olcot-login-product { font-size: 15px; margin-top: 0; }
    .olcot-login-tagline { margin-top: 3px; font-size: 11px; }
}

/* Móvil: diseño vertical aprobado, con marca compacta inferior. */
@media (max-width: 600px) {
    .olcot-login-page {
        min-height: 100svh;
        padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
        place-items: center;
    }
    .olcot-login-card {
        width: 100%;
        max-width: 430px;
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-areas: "form" "brand";
        border-radius: 18px;
    }
    .olcot-login-form-pane {
        grid-area: form;
        padding: 30px 22px 26px;
    }
    .olcot-login-form-inner { width: 100%; }
    .olcot-login-kicker { display: block; margin-bottom: 10px; font-size: 12px; }
    .olcot-login-form-inner h1 { font-size: 32px; line-height: 1.08; text-align: left; }
    .olcot-login-subtitle { margin: 8px 0 24px; font-size: 14px; text-align: left; }
    .olcot-login-form-inner label { font-size: 14px; margin-bottom: 8px; }
    .olcot-login-form-inner input {
        min-height: 58px;
        height: 58px;
        margin-bottom: 18px !important;
        padding: 0 16px !important;
        font-size: 17px;
        border-radius: 11px !important;
    }
    .olcot-password-wrap input { padding-right: 58px !important; }
    .olcot-password-toggle {
        width: 44px;
        height: 44px;
        right: 7px;
        top: 7px;
        font-size: 18px;
    }
    .olcot-login-submit {
        min-height: 56px;
        height: 56px;
        margin-top: 2px;
        font-size: 17px;
        border-radius: 11px;
    }
    .olcot-login-forgot { margin-top: 18px; font-size: 14px; }
    .olcot-login-brand-pane {
        grid-area: brand;
        display: grid;
        margin: 0;
        min-height: 0;
        padding: 12px 18px 14px;
        border-radius: 0;
    }
    .olcot-login-brand-content { padding: 0; }
    .olcot-login-logo { width: min(190px, 64%); height: 62px; margin: 0 auto 1px; }
    .olcot-login-product { font-size: 13px; margin-top: 0; }
    .olcot-login-tagline { margin-top: 2px; font-size: 10px; }
}

/* OLCOT V3.0.250 — Mostrar/ocultar ambas contraseñas en restablecimiento. */
.olcot-login-form-inner .olcot-show-password {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin: -4px 0 18px;
    color: #4d647f;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
}
.olcot-login-form-inner .olcot-show-password input[type="checkbox"] {
    appearance: auto;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    accent-color: #198f87;
    cursor: pointer;
}
html.dark .olcot-login-form-inner .olcot-show-password,
body.dark .olcot-login-form-inner .olcot-show-password { color: #b2c2d4; }
