html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #092b55;
    background:
        radial-gradient(circle at 12% 18%, rgba(18, 101, 213, 0.18), transparent 30%),
        radial-gradient(circle at 86% 16%, rgba(21, 155, 107, 0.15), transparent 28%),
        linear-gradient(135deg, #eef6ff 0%, #f8fbff 42%, #e7f1fb 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
}

body::before {
    left: -90px;
    bottom: -110px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(18, 101, 213, 0.10);
}

body::after {
    right: -80px;
    top: -90px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(21, 155, 107, 0.10);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100vw - 42px));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 440px);
    gap: 28px;
    align-items: stretch;
}

.login-institutional,
.login-container {
    border: 1px solid rgba(194, 214, 237, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 24px 60px rgba(13, 52, 95, 0.14);
    backdrop-filter: blur(8px);
}

.login-institutional {
    position: relative;
    min-height: 430px;
    display: grid;
    align-content: center;
    gap: 26px;
    padding: 44px;
    overflow: hidden;
}

.login-institutional::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(18, 101, 213, 0.08);
}

.login-mark {
    position: relative;
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: #0b5fad;
    background: linear-gradient(135deg, #e3f0ff, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(18, 101, 213, 0.12);
}

.login-mark::before,
.login-mark::after,
.login-mark span {
    content: "";
    position: absolute;
    display: block;
}

.login-mark::before {
    width: 34px;
    height: 42px;
    border: 3px solid currentColor;
    border-radius: 9px;
    background:
        linear-gradient(currentColor, currentColor) 8px 12px / 18px 3px no-repeat,
        linear-gradient(currentColor, currentColor) 8px 22px / 18px 3px no-repeat;
}

.login-mark::after {
    width: 17px;
    height: 10px;
    right: 18px;
    bottom: 19px;
    border-left: 4px solid #159b6b;
    border-bottom: 4px solid #159b6b;
    transform: rotate(-45deg);
}

.login-mark span {
    left: 16px;
    top: 15px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #159b6b;
}

.login-system-label {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #0f6a4f;
    background: #e4f8ef;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-copy h1 {
    max-width: 620px;
    margin: 0;
    color: #062b57;
    font-size: clamp(38px, 4.6vw, 62px);
    line-height: .98;
    letter-spacing: -0.02em;
}

.login-copy p {
    max-width: 590px;
    margin: 18px 0 0;
    color: #31598b;
    font-size: 18px;
    line-height: 1.5;
}

.login-security-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-security-strip span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #d5e3f4;
    border-radius: 999px;
    color: #123e75;
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
}

.login-security-strip span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #159b6b;
    box-shadow: 0 0 0 4px rgba(21, 155, 107, 0.12);
}

.login-container {
    align-self: center;
    padding: 34px;
}

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

.login-badge {
    justify-self: start;
    padding: 8px 13px;
    border-radius: 999px;
    color: #0b5fad;
    background: #edf6ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-form h2 {
    margin: 4px 0 0;
    color: #062b57;
    font-size: 31px;
    line-height: 1.08;
}

.login-subtitle {
    margin: -5px 0 8px;
    color: #526d8c;
    font-size: 15px;
}

.login-messages {
    display: grid;
    gap: 8px;
}

.login-message {
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.login-message.error {
    color: #9e2f2f;
    background: #fff0f0;
    border-color: #f0c6c6;
}

.login-message.success {
    color: #1f6f4a;
    background: #edfbf5;
    border-color: #bfe7d3;
}

.input-container {
    position: relative;
}

.login-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 30px;
    height: 30px;
    transform: translateY(-50%);
    border-radius: 10px;
    background: #edf6ff;
    box-shadow: inset 0 0 0 1px #d4e5f8;
}

.login-field-icon::before,
.login-field-icon::after {
    content: "";
    position: absolute;
}

.input-user .login-field-icon::before {
    left: 10px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0b5fad;
}

.input-user .login-field-icon::after {
    left: 7px;
    bottom: 6px;
    width: 16px;
    height: 9px;
    border-radius: 10px 10px 5px 5px;
    background: #0b5fad;
}

.input-password .login-field-icon::before {
    left: 8px;
    top: 13px;
    width: 14px;
    height: 11px;
    border-radius: 4px;
    background: #0b5fad;
}

.input-password .login-field-icon::after {
    left: 10px;
    top: 6px;
    width: 8px;
    height: 10px;
    border: 2px solid #0b5fad;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.input-container .icon {
    display: none;
}

.input-container input {
    width: 100%;
    height: 54px;
    box-sizing: border-box;
    padding: 0 56px 0 56px;
    border: 1px solid #c9d9ea;
    border-radius: 14px;
    color: #15395f;
    background: #fff;
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}

.input-container input:focus {
    outline: none;
    border-color: #1265d5;
    box-shadow: 0 0 0 4px rgba(18, 101, 213, 0.13);
    transform: translateY(-1px);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 12px;
    color: #0b5fad;
    background: #edf6ff;
    box-shadow: inset 0 0 0 1px #d4e5f8;
    cursor: pointer;
    transition: background .18s ease, box-shadow .18s ease, transform .14s ease;
}

.password-toggle:hover {
    background: #e3f0ff;
    box-shadow: inset 0 0 0 1px #bdd6f5, 0 8px 16px rgba(18, 101, 213, 0.12);
    transform: translateY(-50%) scale(1.02);
}

.password-toggle:focus-visible {
    outline: 3px solid rgba(18, 101, 213, 0.22);
    outline-offset: 2px;
}

.password-toggle-icon {
    position: relative;
    width: 20px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 50% / 58%;
}

.password-toggle-icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.password-toggle[aria-pressed="true"] .password-toggle-icon::after {
    content: "";
    position: absolute;
    left: 8px;
    top: -5px;
    width: 2px;
    height: 24px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    box-shadow: 0 0 0 2px #edf6ff;
}

.login-button {
    width: 100%;
    height: 54px;
    margin-top: 4px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #1265d5 0%, #074c9e 100%);
    box-shadow: 0 14px 26px rgba(18, 101, 213, 0.22);
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .14s ease, box-shadow .18s ease, filter .18s ease;
}

.login-button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(18, 101, 213, 0.26);
}

.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 14px;
    z-index: 1;
    color: #31598b;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 920px) {
    body {
        overflow: auto;
        padding: 24px 0 58px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        width: min(94vw, 520px);
    }

    .login-institutional {
        min-height: auto;
        padding: 28px;
    }

    .login-copy h1 {
        font-size: 36px;
    }
}

@media (max-width: 520px) {
    .login-container,
    .login-institutional {
        padding: 22px;
        border-radius: 18px;
    }

    .login-copy h1 {
        font-size: 31px;
    }

    .login-copy p {
        font-size: 15px;
    }

    .login-form h2 {
        font-size: 27px;
    }
}
