.app-guest {
    min-height: 100vh;
    padding: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.11), transparent 28%),
        radial-gradient(circle at 88% 82%, rgba(15, 23, 42, 0.08), transparent 30%),
        #eef2f7;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px;
    box-sizing: border-box;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    width: min(1120px, 100%);
    min-height: 680px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 48px;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.13), transparent 48%),
        #0f172a;
    color: #ffffff;
}

.login-brand-panel::before,
.login-brand-panel::after {
    position: absolute;
    content: '';
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand-panel::before {
    right: -180px;
    bottom: -210px;
    width: 520px;
    height: 520px;
}

.login-brand-panel::after {
    right: -75px;
    bottom: -100px;
    width: 310px;
    height: 310px;
}

.login-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.login-brand-emblem {
    width: 60px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.login-brand-name {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.login-brand-caption {
    margin-top: 4px;
    color: #aebbd0;
    font-size: 14px;
    font-weight: 700;
}

.login-intro {
    position: relative;
    z-index: 1;
    margin: auto 0;
    padding: 70px 0;
}

.login-eyebrow,
.login-form-kicker {
    display: inline-block;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-intro h1 {
    max-width: 560px;
    margin: 18px 0 20px;
    color: #ffffff;
    font-size: clamp(36px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.login-intro p {
    max-width: 500px;
    margin: 0;
    color: #b8c4d6;
    font-size: 17px;
    line-height: 1.65;
}

.login-security-note {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.login-security-icon {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 11px;
    color: #93c5fd;
    font-weight: 900;
}

.login-security-icon::before {
    width: 8px;
    height: 14px;
    content: '';
    border-right: 3px solid #93c5fd;
    border-bottom: 3px solid #93c5fd;
    transform: translateY(-2px) rotate(45deg);
}

.login-security-note div strong,
.login-security-note div > span {
    display: block;
}

.login-security-note strong {
    margin-bottom: 3px;
    font-size: 14px;
}

.login-security-note div > span {
    color: #aebbd0;
    font-size: 12px;
    line-height: 1.45;
}

.login-form-panel {
    display: grid;
    place-items: center;
    padding: 54px;
    background: #ffffff;
}

.login-form-wrap {
    width: min(390px, 100%);
}

.login-form-heading {
    margin-bottom: 30px;
}

.login-form-kicker {
    color: #2563eb;
}

.login-form-heading h2 {
    margin: 10px 0 8px;
    color: #0f172a;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.login-form-heading p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 13px 14px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    color: #9f1239;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.login-alert > span {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background: #e11d48;
    border-radius: 50%;
    color: #ffffff;
    font-size: 12px;
}

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

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap input {
    width: 100%;
    max-width: none;
    min-height: 54px;
    box-sizing: border-box;
    padding: 0 104px 0 46px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    color: #0f172a;
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.login-field:first-child .login-input-wrap input {
    padding-right: 16px;
}

.login-input-wrap input::placeholder {
    color: #94a3b8;
}

.login-input-wrap input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.login-input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    z-index: 1;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 9px;
    text-align: center;
}

.login-input-icon:not(.login-lock-icon) {
    border: 2px solid #64748b;
    border-radius: 50%;
    color: transparent;
    box-sizing: border-box;
}

.login-input-icon:not(.login-lock-icon)::after {
    position: absolute;
    top: 13px;
    left: -4px;
    width: 18px;
    height: 9px;
    content: '';
    border: 2px solid #64748b;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    box-sizing: border-box;
}

.login-lock-icon {
    width: 15px;
    height: 13px;
    border: 2px solid #64748b;
    border-radius: 3px;
    box-sizing: border-box;
}

.login-lock-icon::before {
    position: absolute;
    top: -9px;
    left: 2px;
    width: 7px;
    height: 8px;
    content: '';
    border: 2px solid #64748b;
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    padding: 7px 5px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #475569;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
    color: #2563eb;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    margin-top: 4px;
    padding: 0 20px;
    background: #2563eb;
    border: 0;
    border-radius: 13px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 850;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.login-submit:hover {
    background: #1d4ed8;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-help {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.login-version {
    margin-top: 18px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
}

.login-version span {
    margin: 0 5px;
}

.twofa-input-wrap input {
    padding-right: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 16px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.twofa-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    background: #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.login-field-hint {
    margin-top: 8px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.twofa-back-link {
    display: block;
    margin-top: 23px;
    padding-top: 21px;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
}

.twofa-back-link:hover {
    color: #2563eb;
}

@media (max-width: 900px) {
    .login-page {
        padding: 22px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        width: min(620px, 100%);
        min-height: 0;
    }

    .login-brand-panel {
        padding: 32px;
    }

    .login-intro {
        padding: 54px 0 38px;
    }

    .login-intro h1 {
        max-width: 520px;
        font-size: clamp(32px, 7vw, 44px);
    }

    .login-security-note {
        max-width: 480px;
    }

    .login-form-panel {
        padding: 46px 32px;
    }
}

@media (max-width: 540px) {
    .login-page {
        display: block;
        min-height: 100vh;
        padding: 0;
        background: #ffffff;
    }

    .login-shell {
        width: 100%;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-brand-panel {
        padding: 25px 22px 28px;
    }

    .login-brand-emblem {
        width: 46px;
    }

    .login-brand-name {
        font-size: 23px;
    }

    .login-intro {
        padding: 38px 0 0;
    }

    .login-intro h1 {
        margin: 13px 0 14px;
        font-size: 30px;
    }

    .login-intro p {
        font-size: 14px;
        line-height: 1.55;
    }

    .login-security-note {
        display: none;
    }

    .login-form-panel {
        padding: 35px 22px 42px;
    }

    .login-form-heading {
        margin-bottom: 25px;
    }

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

@media (prefers-reduced-motion: reduce) {
    .login-input-wrap input,
    .login-submit {
        transition: none;
    }
}
