.login-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 2rem;
    background: radial-gradient(circle at 12% 15%, rgba(29, 123, 105, 0.18), transparent 32%), radial-gradient(circle at 92% 92%, rgba(47, 119, 153, 0.16), transparent 32%), linear-gradient(135deg, #edf6f3 0%, #f7faf8 48%, #edf3f6 100%);
}

.login-shell::before,
.login-shell::after {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    content: "";
    pointer-events: none;
}

.login-shell::before {
    width: 340px;
    height: 340px;
    top: -170px;
    right: -90px;
    border: 1px solid rgba(22, 121, 106, 0.12);
    box-shadow: 0 0 0 56px rgba(22, 121, 106, 0.025), 0 0 0 112px rgba(22, 121, 106, 0.018);
}

.login-shell::after {
    width: 240px;
    height: 240px;
    bottom: -130px;
    left: -80px;
    border: 1px solid rgba(31, 105, 135, 0.12);
    box-shadow: 0 0 0 45px rgba(31, 105, 135, 0.025);
}

.login-container {
    position: relative;
    z-index: 1;
    width: min(100%, 1040px);
    animation: login-arrive 0.55s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.login-card {
    display: grid;
    min-height: 620px;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border: 1px solid rgba(202, 218, 213, 0.9);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(25, 65, 58, 0.16), 0 8px 24px rgba(25, 65, 58, 0.08);
}

.login-header {
    position: relative;
    isolation: isolate;
    display: flex;
    grid-column: 1;
    grid-row: 1 / 3;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding: 4rem;
    background: radial-gradient(circle at 75% 22%, rgba(124, 215, 187, 0.18), transparent 28%), linear-gradient(145deg, #123a3c 0%, #175b52 58%, #1f7565 100%);
    color: #fff;
    text-align: left;
}

.login-header::before {
    position: absolute;
    z-index: -1;
    width: 420px;
    height: 420px;
    top: -240px;
    right: -170px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.018);
    content: "";
}

.login-header::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(130deg, transparent 45%, rgba(255, 255, 255, 0.045) 45% 46%, transparent 46%);
    content: "";
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.8rem;
    padding: 0.5rem 0.78rem;
    border: 1px solid rgba(222, 249, 240, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #dff4ed;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.11em;
}

.login-header .logo {
    display: grid;
    width: 76px;
    height: 76px;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.11);
    color: #c4f0e2;
    box-shadow: 0 18px 35px rgba(7, 43, 38, 0.23);
    font-size: 2rem;
    place-items: center;
    backdrop-filter: blur(8px);
}

.login-header h1 {
    max-width: 430px;
    margin: 0 0 0.85rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 750;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.login-header p {
    max-width: 390px;
    margin: 0;
    color: #c3dcd5;
    font-size: 0.96rem;
    line-height: 1.7;
}

.security-visual {
    position: relative;
    width: 100%;
    max-width: 390px;
    margin-top: 2.4rem;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.075);
    backdrop-filter: blur(10px);
}

.security-visual__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: #e8f7f2;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.security-status {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: #b9eadb;
}

.security-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6be1bd;
    box-shadow: 0 0 0 4px rgba(107, 225, 189, 0.12);
    content: "";
}

.security-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    height: 62px;
}

.security-chart span {
    flex: 1;
    min-width: 8px;
    border-radius: 5px 5px 2px 2px;
    background: linear-gradient(to top, rgba(133, 220, 191, 0.38), #92e4c8);
}

.security-chart span:nth-child(1) {
    height: 32%;
}

.security-chart span:nth-child(2) {
    height: 48%;
}

.security-chart span:nth-child(3) {
    height: 40%;
}

.security-chart span:nth-child(4) {
    height: 70%;
}

.security-chart span:nth-child(5) {
    height: 58%;
}

.security-chart span:nth-child(6) {
    height: 88%;
}

.security-chart span:nth-child(7) {
    height: 75%;
}

.security-chart span:nth-child(8) {
    height: 100%;
}

.login-body {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3rem 2.4rem;
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}

.login-body .welcome-title {
    margin: 0 0 0.45rem;
    color: #163b3d;
    font-size: 1.65rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.login-body .welcome-copy {
    margin: 0 0 1.75rem;
    color: #718087;
    font-size: 0.88rem;
    line-height: 1.6;
}

.form-floating {
    margin-bottom: 1rem !important;
}

.form-floating>.form-control {
    height: 58px;
    min-height: 58px;
    padding: 1.5rem 3rem 0.45rem 1rem;
    border: 1px solid #d7e2df;
    border-radius: 10px;
    background: #fbfdfc;
    color: #18383b;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-floating>.form-control:focus {
    border-color: #2f8a76;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(47, 138, 118, 0.11);
}

.form-floating>label {
    padding: 1rem;
    color: #73858a;
    font-size: 0.88rem;
}

.form-floating>label::after {
    background: transparent !important;
}

.form-floating>.form-control:-webkit-autofill,
.form-floating>.form-control:-webkit-autofill:hover,
.form-floating>.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: inset 0 0 0 1000px #fbfdfc !important;
    -webkit-text-fill-color: #18383b !important;
    caret-color: #18383b;
}

.form-floating>label i {
    color: #2e806f;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.7rem;
    z-index: 5;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #7a8b8d;
    cursor: pointer;
    transform: translateY(-50%);
    place-items: center;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #eaf4f1;
    color: #246e60;
    outline: 0;
}

.btn-login {
    position: relative;
    width: 100%;
    min-height: 54px;
    overflow: hidden;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #1b7464, #267e6c);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(28, 112, 94, 0.23);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-login::after {
    position: absolute;
    width: 90px;
    height: 90px;
    top: -42px;
    right: -28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    content: "";
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #176558, #1f806d);
    color: #fff;
    box-shadow: 0 14px 30px rgba(28, 112, 94, 0.3);
    filter: saturate(1.08);
}

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

.btn-login:focus-visible {
    outline: 3px solid rgba(47, 138, 118, 0.25);
    outline-offset: 3px;
}

.btn-login.is-loading {
    cursor: wait;
    opacity: 0.8;
}

.btn-login.is-loading i {
    animation: spin 0.7s linear infinite;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.15rem;
    padding: 0.85rem 1rem;
    border: 1px solid #f0c8c1;
    border-radius: 9px;
    background: #fff5f3;
    color: #a33c35;
    font-size: 0.82rem;
    line-height: 1.45;
}

.alert i {
    margin-top: 0.08rem;
}

.login-help {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.25rem;
    color: #718087;
    font-size: 0.78rem;
}

.login-help a {
    color: #227462;
    font-weight: 700;
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

.login-footer {
    display: flex;
    grid-column: 2;
    grid-row: 2;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e8efed;
    background: #f8faf9;
    color: #819094;
    font-size: 0.72rem;
}

.login-footer span:first-child {
    color: #5f7275;
    font-weight: 600;
}

.login-footer a {
    color: #2f7c6b;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

@keyframes login-arrive {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-height: 690px) and (min-width: 721px) {
    .login-card {
        min-height: 560px;
    }
    .login-header {
        padding: 2.5rem;
    }
    .login-header .logo {
        width: 62px;
        height: 62px;
        margin-bottom: 1.1rem;
    }
    .login-header h1 {
        font-size: 2rem;
    }
    .security-visual {
        margin-top: 1.5rem;
    }
    .login-body {
        padding: 2.5rem 2.75rem 1.7rem;
    }
}

@media (max-width: 720px) {
    .login-shell {
        padding: 1rem;
    }
    .login-card {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        border-radius: 18px;
    }
    .login-header {
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        padding: 2rem 1.5rem 1.6rem;
        text-align: center;
    }
    .login-header::before {
        right: -260px;
    }
    .login-eyebrow {
        margin-bottom: 1rem;
    }
    .login-header .logo {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
        font-size: 1.6rem;
    }
    .login-header h1 {
        max-width: 360px;
        font-size: 1.5rem;
    }
    .login-header p {
        font-size: 0.84rem;
    }
    .security-visual {
        display: none;
    }
    .login-body {
        grid-column: 1;
        grid-row: 2;
        padding: 1.8rem 1.5rem 1.5rem;
    }
    .login-body .welcome-title {
        font-size: 1.4rem;
    }
    .login-footer {
        grid-column: 1;
        grid-row: 3;
        justify-content: center;
        text-align: center;
    }
    .login-footer span:last-child {
        display: none;
    }
}

@media (max-width: 420px) {
    .login-shell {
        padding: 0.65rem;
    }
    .login-header {
        padding: 1.65rem 1.2rem 1.4rem;
    }
    .login-body {
        padding: 1.5rem 1.2rem 1.25rem;
    }
    .login-footer {
        padding: 0.9rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-container,
    .btn-login,
    .btn-login i {
        animation: none;
        transition: none;
    }
}