:root {
    --login-bg: #eef3f8;
    --login-surface: #ffffff;
    --login-primary: #2ccfa0;
    --login-primary-deep: #16998b;
    --login-text: #16213f;
    --login-muted: #72809a;
    --login-border: #d8e0ec;
    --login-shadow: 0 24px 70px rgba(22, 33, 63, 0.14);
    --login-radius: 32px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.login-body {
    margin: 0;
    min-height: 100vh;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Bahnschrift", "Segoe UI", "Trebuchet MS", sans-serif;
    color: var(--login-text);
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.95), rgba(238, 243, 248, 0.6) 42%, transparent 70%),
        linear-gradient(180deg, #f8fbfe 0%, var(--login-bg) 100%);
}

.auth-wrapper {
    width: min(1380px, 100%);
    border-radius: var(--login-radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.auth-panel {
    display: flex;
    min-height: 760px;
}

.hero-panel,
.form-panel {
    position: relative;
    min-width: 0;
}

.hero-panel {
    flex: 0 0 50.5%;
    padding: 44px 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    background:
        radial-gradient(circle at 85% 12%, rgba(213, 255, 184, 0.85), transparent 20%),
        radial-gradient(circle at 72% 72%, rgba(170, 255, 210, 0.25), transparent 22%),
        linear-gradient(135deg, #138f97 0%, #1eb8aa 44%, #54dfb1 78%, #baf2c3 100%);
    isolation: isolate;
}

.hero-backdrop,
.hero-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-backdrop {
    background:
        radial-gradient(circle at 10% 16%, rgba(255, 255, 255, 0.18), transparent 24%),
        radial-gradient(circle at 68% 36%, rgba(255, 255, 255, 0.09), transparent 26%);
    z-index: -2;
}

.hero-lines::before,
.hero-lines::after {
    content: "";
    position: absolute;
    right: -12%;
    bottom: -9%;
    width: 86%;
    height: 46%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-lines::after {
    right: 4%;
    bottom: -16%;
    width: 58%;
    height: 38%;
    opacity: 0.7;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 500px;
}

.hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 42px rgba(18, 43, 53, 0.16);
}

.hero-logo img {
    width: 70%;
    height: auto;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(3.35rem, 4.2vw, 4.6rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 800;
}

.hero-copy h1 span {
    display: block;
    letter-spacing: 0.02em;
}

.hero-text {
    margin: 18px 0 0;
    max-width: 400px;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.hero-divider {
    width: 54px;
    height: 5px;
    border-radius: 999px;
    background: rgba(114, 255, 205, 0.9);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-feature {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 14px;
    align-items: center;
}

.hero-feature-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    background: rgba(255, 255, 255, 0.12);
    color: #f7fffc;
    font-size: 1.32rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-feature-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    line-height: 1;
    font-size: 1em;
    flex: 0 0 auto;
}

.hero-feature-icon i::before {
    display: block;
    line-height: 1;
}

.hero-feature > div {
    min-width: 0;
}

.hero-feature > div strong,
.hero-feature > div span {
    display: block;
}

.hero-feature > div strong {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-feature > div span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.9rem;
    line-height: 1.38;
}

.hero-footer {
    position: relative;
    z-index: 1;
}

.hero-footer > span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.form-panel {
    flex: 0 0 49.5%;
    padding: 46px 50px;
    background:
        radial-gradient(circle at 18% 12%, rgba(243, 248, 253, 0.95), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.96));
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-shell {
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-brand h2 {
    margin: 0;
    font-size: clamp(2.05rem, 2.8vw, 2.75rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    color: #18264a;
}

.form-brand p {
    margin: 10px 0 0;
    font-size: 0.98rem;
    line-height: 1.48;
    color: var(--login-muted);
}

.form-secondary-copy {
    margin-top: 14px;
}

.form-support-inline {
    color: #21ad97;
    font-weight: 700;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #ffd1c5;
    background: #fff4f1;
    color: #b42318;
    box-shadow: 0 12px 24px rgba(180, 35, 24, 0.08);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    color: #5c6880;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.input-control {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 0 18px;
    border: 1px solid var(--login-border);
    border-radius: 18px;
    background: var(--login-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-control:focus-within {
    border-color: rgba(33, 173, 151, 0.78);
    box-shadow: 0 0 0 4px rgba(44, 207, 160, 0.12);
    transform: translateY(-1px);
}

.input-icon {
    width: 26px;
    flex: 0 0 26px;
    text-align: center;
    color: #7d899d;
    font-size: 1.2rem;
}

.input-control input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--login-text);
    font-size: 1rem;
    font-weight: 500;
}

.input-control input::placeholder {
    color: #95a1b3;
}

.password-toggle {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #717d91;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-toggle:hover {
    color: #21ad97;
    background: rgba(44, 207, 160, 0.08);
}

.login-error-text {
    color: #d93025;
    font-size: 0.84rem;
    font-weight: 600;
}

.login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--login-muted);
    font-size: 0.94rem;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 500;
    cursor: pointer;
}

.remember-option input {
    width: 16px;
    height: 16px;
    accent-color: #21ad97;
}

.login-link {
    color: #21ad97;
    font-weight: 700;
    text-decoration: none;
}

.login-link:hover {
    color: #168d7a;
}

.btn-login {
    width: 100%;
    min-height: 66px;
    padding: 16px 22px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(180deg, #111a35 0%, #0d1630 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-size: 1.04rem;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(13, 22, 48, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 36px rgba(13, 22, 48, 0.22);
}

.btn-login:disabled {
    cursor: wait;
    opacity: 0.9;
}

.btn-login.is-loading .btn-icon {
    animation: loginPulse 0.9s ease-in-out infinite;
}

.btn-icon {
    font-size: 1.22rem;
}

.login-footer {
    margin-top: 4px;
    padding-top: 20px;
    border-top: 1px solid rgba(117, 131, 155, 0.22);
}

.login-body.login-brand-prinic {
    --login-bg: #f1f4ff;
    --login-primary: #6679df;
    --login-primary-deep: #3446a8;
    --login-text: #1f2d70;
    --login-muted: #65729b;
    --login-border: #d9e0fb;
}

.login-body.login-brand-prinic .hero-panel {
    background:
        radial-gradient(circle at 82% 12%, rgba(102, 121, 223, 0.44), transparent 20%),
        radial-gradient(circle at 68% 74%, rgba(255, 255, 255, 0.13), transparent 24%),
        linear-gradient(135deg, #1f2d70 0%, #3446a8 56%, #6679df 100%);
}

.login-body.login-brand-prinic .hero-backdrop {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.10), transparent 22%),
        radial-gradient(circle at 72% 34%, rgba(255, 255, 255, 0.07), transparent 24%);
}

.login-body.login-brand-prinic .hero-logo {
    width: fit-content;
    height: auto;
    border-radius: 16px;
    padding: 12px 16px;
    background: rgba(241, 244, 255, 0.96);
    box-shadow: 0 12px 28px rgba(10, 20, 70, 0.18);
    justify-content: flex-start;
}

.login-body.login-brand-prinic .hero-logo img {
    width: clamp(168px, 18vw, 240px);
    max-width: 100%;
}

.login-body.login-brand-prinic .hero-divider {
    background: linear-gradient(90deg, #6679df 0%, #f1f4ff 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.login-body.login-brand-prinic .hero-feature-icon {
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-body.login-brand-prinic .form-brand h2 {
    color: #1f2d70;
}

.login-body.login-brand-prinic .form-support-inline,
.login-body.login-brand-prinic .login-link {
    color: #3446a8;
}

.login-body.login-brand-prinic .login-link:hover {
    color: #1f2d70;
}

.login-body.login-brand-prinic .input-control:focus-within {
    border-color: rgba(102, 121, 223, 0.72);
    box-shadow: 0 0 0 4px rgba(102, 121, 223, 0.16);
}

.login-body.login-brand-prinic .remember-option input {
    accent-color: #3446a8;
}

.login-body.login-brand-prinic .password-toggle:hover {
    color: #3446a8;
    background: rgba(102, 121, 223, 0.12);
}

.login-body.login-brand-prinic .btn-login {
    background: linear-gradient(180deg, #3446a8 0%, #1f2d70 100%);
    box-shadow: 0 16px 30px rgba(31, 45, 112, 0.24);
}

.login-body.login-brand-prinic .btn-login:hover {
    box-shadow: 0 22px 40px rgba(31, 45, 112, 0.32);
}

.login-body.login-brand-prinic .login-footer-card i {
    background: rgba(102, 121, 223, 0.14);
    color: #3446a8;
}

.login-footer-card {
    width: fit-content;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--login-muted);
    font-size: 1rem;
}

.login-footer-card i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 207, 160, 0.12);
    color: #21ad97;
}

.login-footer-card strong,
.login-footer-card span {
    display: inline;
}

.login-footer-card strong {
    color: #5c6880;
}

.login-footer-card strong::after {
    content: " · ";
    color: #8c98aa;
    font-weight: 500;
}

@keyframes loginPulse {
    0%,
    100% {
        transform: translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateX(4px);
        opacity: 0.72;
    }
}

@media (max-width: 1360px) {
    .auth-panel {
        min-height: 700px;
    }

    .hero-panel,
    .form-panel {
        padding: 38px 40px;
    }

    .hero-copy h1 {
        font-size: clamp(3rem, 4vw, 4rem);
    }

    .hero-content {
        gap: 22px;
    }

    .form-shell {
        width: min(100%, 520px);
    }
}

@media (max-width: 980px) {
    body.login-body {
        padding: 18px;
    }

    .auth-panel {
        flex-direction: column;
    }

    .hero-panel,
    .form-panel {
        flex-basis: auto;
        padding: 34px 28px;
    }

    .hero-copy h1 {
        max-width: 100%;
    }

    .form-shell {
        width: min(100%, 100%);
    }
}

@media (max-width: 640px) {
    body.login-body {
        padding: 0;
    }

    .auth-wrapper {
        border-radius: 0;
        min-height: 100vh;
    }

    .hero-panel,
    .form-panel {
        padding: 28px 20px;
    }

    .hero-content {
        gap: 24px;
    }

    .hero-copy h1 {
        font-size: 3rem;
    }

    .hero-text {
        font-size: 1.02rem;
    }

    .hero-feature {
        grid-template-columns: 54px 1fr;
        gap: 12px;
    }

    .hero-feature-icon {
        width: 54px;
        height: 54px;
        border-radius: 18px;
        font-size: 1.25rem;
    }

    .form-brand h2 {
        font-size: 2.35rem;
    }

    .login-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-login {
        min-height: 66px;
    }
}
