body.body-login {
    min-height: 100vh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 0;
    overflow-x: hidden;
    background: #0f5132 !important;
    color: #092760;
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

.login-shell {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(380px, 1fr);
}

.login-hero {
    position: relative;
    min-height: 620px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 22px;
    padding: 30px 34px 26px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.78) 42%, rgba(238, 248, 241, 0.58) 68%, rgba(16, 70, 43, 0.42) 100%),
        url("../images/login-liceo-luis-leyton.png") center / cover no-repeat;
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(12, 55, 34, 0.28) 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(238, 248, 241, 0.14));
    pointer-events: none;
}

.login-hero > * {
    position: relative;
    z-index: 1;
}

.school-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
}

.school-brand img {
    width: 66px;
    height: 66px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(5, 38, 91, 0.2));
}

.school-brand p {
    margin: 0;
    color: #092760 !important;
    font-size: clamp(23px, 2.2vw, 35px);
    line-height: 1.05;
    font-weight: 950;
    text-transform: uppercase;
}

.school-brand span {
    display: inline-block;
    margin-top: 6px;
    padding-bottom: 6px;
    border-bottom: 3px solid #f6a800;
    color: #0f3b82 !important;
    font-size: 13px;
    font-style: italic;
    font-weight: 900;
}

.welcome-copy {
    align-self: center;
    max-width: 460px;
    display: grid;
    gap: 10px;
}

.eyebrow,
.section-label {
    margin: 0;
    color: #0a3475 !important;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

.welcome-copy h1 {
    margin: 0;
    color: #062762 !important;
    font-size: clamp(38px, 4.2vw, 58px);
    line-height: 0.98;
    font-weight: 950;
}

.welcome-copy h1::first-line {
    color: #062762;
}

.welcome-copy p:last-child {
    max-width: 390px;
    margin: 0;
    color: #0a3475 !important;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 850;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: 780px;
}

.feature-strip article {
    min-height: 118px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 7px;
    padding: 12px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(4, 31, 76, 0.16);
    text-align: center;
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff !important;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 20px;
}

.feature-icon.blue {
    background: #1463f3;
}

.feature-icon.amber {
    background: #f59e0b;
}

.feature-icon.green {
    background: #18a34a;
}

.feature-icon.purple {
    background: #7c3aed;
}

.feature-strip strong {
    color: #062762 !important;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 950;
}

.feature-strip small {
    color: #153f80 !important;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 850;
}

.login-area {
    position: relative;
    display: grid;
    place-items: center;
    padding: 36px 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.16), transparent 28%),
        radial-gradient(circle at 82% 84%, rgba(247, 181, 0, 0.16), transparent 30%),
        linear-gradient(135deg, #0b3d26 0%, #137044 54%, #2ca062 100%);
}

.login-area::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        repeating-linear-gradient(132deg, rgba(255, 255, 255, 0.08) 0 2px, transparent 2px 76px);
    opacity: 0.72;
    pointer-events: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    display: grid;
    gap: 18px;
    padding: 28px 28px 26px;
    border: 1px solid rgba(24, 118, 67, 0.16);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(236, 248, 241, 0.97)) !important;
    box-shadow: 0 24px 60px rgba(3, 38, 22, 0.32) !important;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(135deg, rgba(22, 101, 52, 0.035) 0 2px, transparent 2px 28px);
    pointer-events: none;
}

.login-card > * {
    position: relative;
    z-index: 1;
}

.form-header {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.form-header img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.form-header h2 {
    margin: 6px 0 0;
    color: #12301f !important;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 950;
}

.section-label {
    max-width: 210px;
    color: #12301f !important;
    font-size: 16px;
    line-height: 1.08;
    font-weight: 950;
}

.login-form {
    display: grid;
    gap: 13px;
}

.form-group {
    display: grid;
    gap: 5px;
}

.form-group label {
    color: #12301f !important;
    font-size: 12px;
    font-weight: 950;
}

.input-wrapper {
    position: relative;
    min-height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(8, 44, 107, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(5, 38, 91, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #2ca062;
    box-shadow: 0 0 0 4px rgba(44, 160, 98, 0.14);
}

.input-icon {
    width: 42px;
    display: grid;
    place-items: center;
    color: #166534 !important;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 18px;
}

.input-wrapper input {
    width: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #12301f !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
}

.input-wrapper input::placeholder {
    color: #8aa0bf;
}

.toggle-password {
    min-height: 34px;
    margin-right: 7px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: #eef8f2;
    color: #166534 !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: #12301f !important;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.checkbox-label input {
    width: 17px;
    height: 17px;
    accent-color: #2ca062;
}

.btn-login {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 999px;
    background: #2ca062 !important;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(44, 160, 98, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-login:hover,
.btn-login:focus-visible {
    transform: translateY(-1px);
    background: #166534 !important;
    box-shadow: 0 16px 30px rgba(22, 101, 52, 0.26);
    outline: none;
}

.btn-login:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
}

.error-message,
.error-general {
    color: #d01f2f !important;
    font-size: 12px;
    font-weight: 900;
    display: none;
}

.error-message.show,
.error-general.show {
    display: block;
}

.error-general {
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 4px solid #d01f2f;
    background: #fff1f2;
}

.login-footer {
    min-height: 78px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 16px;
    padding: 10px 70px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: #0b3d26;
    color: #ffffff;
    box-shadow: 0 -6px 18px rgba(3, 38, 22, 0.24);
}

.login-footer div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
}

.login-footer span {
    grid-row: span 2;
    color: #f7b500 !important;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
    font-size: 25px;
}

.developer-badge {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(260px, calc(100% - 36px));
    padding: 8px 10px;
    border: 1px solid rgba(24, 118, 67, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #12301f;
    box-shadow: 0 10px 24px rgba(15, 70, 42, 0.14);
}

.developer-badge img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.developer-badge span {
    color: #12301f !important;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 800;
}

.developer-badge strong {
    color: #166534 !important;
}

.login-footer strong {
    color: #ffffff !important;
    font-size: 13px;
    line-height: 1.1;
    font-weight: 950;
}

.login-footer small {
    color: rgba(255, 255, 255, 0.74) !important;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 800;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    display: none;
    max-width: calc(100vw - 48px);
    padding: 14px 16px;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(4, 31, 76, 0.2);
}

.toast.show {
    display: block;
}

.toast.success {
    border-left: 4px solid #18a34a;
    color: #166534 !important;
}

.toast.error {
    border-left: 4px solid #d01f2f;
    color: #7f1d1d !important;
}

.password-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    padding: 18px;
    background: rgba(6, 40, 24, 0.72);
    backdrop-filter: blur(5px);
}

.password-modal.show {
    display: grid;
}

.password-modal-card {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 26px;
    border: 1px solid rgba(24, 118, 67, 0.18);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 248, 241, 0.98));
    box-shadow: 0 26px 70px rgba(3, 38, 22, 0.34);
}

.password-modal-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #e8f7ee;
    color: #166534;
}

.password-modal-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-modal-card h2 {
    margin: 0;
    color: #12301f !important;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 950;
}

.password-modal-card p {
    margin: 0;
    color: #3f5b4b !important;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 800;
}

.password-modal-card label {
    display: grid;
    gap: 6px;
    color: #12301f !important;
    font-size: 12px;
    font-weight: 950;
}

.password-modal-card input {
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(8, 44, 107, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    color: #12301f !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
}

.password-modal-card input:focus {
    border-color: #2ca062;
    box-shadow: 0 0 0 4px rgba(44, 160, 98, 0.14);
    outline: none;
}

.password-modal-error {
    min-height: 16px;
    color: #d01f2f !important;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 1060px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-area {
        min-height: 520px;
    }

    .login-footer {
        padding-inline: 24px;
    }
}

@media (max-width: 760px) {
    .login-hero {
        min-height: 560px;
        padding: 20px;
    }

    .feature-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-footer {
        grid-template-columns: 1fr;
        padding: 16px 18px;
    }
}

@media (max-width: 520px) {
    .login-shell {
        min-height: auto;
    }

    .login-hero {
        min-height: auto;
        gap: 18px;
        padding: 18px 14px;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.76) 42%, rgba(16, 70, 43, 0.5) 100%),
            url("../images/login-liceo-luis-leyton.png") center / cover no-repeat;
    }

    .school-brand img {
        width: 50px;
        height: 50px;
    }

    .school-brand p {
        font-size: 20px;
    }

    .school-brand span {
        font-size: 11px;
    }

    .welcome-copy h1 {
        font-size: 32px;
    }

    .welcome-copy p:last-child {
        font-size: 13px;
    }

    .feature-strip {
        grid-template-columns: 1fr;
    }

    .feature-strip article {
        min-height: 82px;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: start;
        text-align: left;
    }

    .feature-icon {
        grid-row: span 2;
    }

    .login-area {
        min-height: auto;
        padding: 18px 14px 58px;
    }

    .login-card {
        border-radius: 18px;
        padding: 22px 18px;
    }

    .login-footer {
        gap: 12px;
    }

    .developer-badge {
        right: 14px;
        bottom: 12px;
    }

    .toast {
        right: 10px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 10px;
        max-width: none;
    }
}
