:root {
    --auth-accent: #25a39a;
    --auth-accent-dark: #187f78;
    --auth-accent-soft: #e9fbf8;
    --auth-highlight: #fb920d;
    --auth-ink: #203957;
    --auth-muted: #64748b;
    --auth-focus-ring: rgba(37, 163, 154, 0.14);
    --auth-soft-border: rgba(37, 163, 154, 0.22);
    --auth-shadow: rgba(37, 163, 154, 0.24);
    --auth-shadow-strong: rgba(37, 163, 154, 0.32);
    --auth-error: #be123c;
    --auth-error-border: #fecdd3;
    --auth-error-soft: #fff1f3;
}

* {
    box-sizing: border-box;
}

body.auth-login-page {
    background:
        radial-gradient(circle at 8% 8%, rgba(37, 163, 154, 0.16), transparent 30%),
        radial-gradient(circle at 92% 92%, rgba(251, 146, 13, 0.13), transparent 32%),
        #f5fafb;
    color: var(--auth-ink);
    font-family: "Poppins", sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
}

.auth-login-shell {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 24px;
    position: relative;
}

.auth-login-card {
    background: #fff;
    border: 1px solid rgba(199, 225, 222, 0.85);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(32, 57, 87, 0.14);
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
    height: min(720px, calc(100svh - 48px));
    max-width: 1080px;
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.auth-login-story {
    background:
        radial-gradient(circle at 90% 8%, rgba(32, 205, 197, 0.28), transparent 34%),
        radial-gradient(circle at 0% 92%, rgba(251, 146, 13, 0.15), transparent 30%),
        linear-gradient(155deg, #041f31 0%, #06475a 52%, #087b78 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 36px;
    position: relative;
}

.auth-login-story::before,
.auth-login-story::after {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
    position: absolute;
}

.auth-login-story::before {
    height: 270px;
    right: -145px;
    top: 115px;
    width: 270px;
}

.auth-login-story::after {
    bottom: -110px;
    height: 250px;
    left: -110px;
    width: 250px;
}

.auth-login-brand {
    align-items: center;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    display: inline-flex;
    min-height: 64px;
    padding: 10px 16px;
    position: relative;
    z-index: 1;
}

.auth-login-brand img {
    display: block;
    height: 46px;
    max-width: 46px;
    object-fit: contain;
    width: auto;
}

.auth-login-brand .auth-brand-lockup {
    align-items: center;
    display: inline-flex;
    gap: 9px;
    white-space: nowrap;
}

.auth-login-brand .auth-brand-lockup__wordmark {
    align-items: baseline;
    display: inline-flex;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.auth-login-brand .auth-brand-lockup__wordmark > span {
    color: #f38b00;
}

.auth-login-brand .auth-brand-lockup__wordmark > strong {
    color: #20bdb8;
    font-weight: 600;
}

.auth-login-story__content {
    align-items: stretch;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: flex-start;
    margin: auto 0;
    max-width: 100%;
    min-height: 0;
    padding: 28px 0 8px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.auth-role-switcher {
    margin-bottom: 20px;
    width: min(100%, 410px);
}

.auth-role-switcher__label {
    color: rgba(255, 255, 255, 0.72);
    display: block;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 9px;
    text-transform: uppercase;
}

.auth-role-switcher__options {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-role-switcher__option {
    align-items: center;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 800;
    gap: 5px;
    justify-content: center;
    line-height: 1.25;
    min-height: 62px;
    padding: 7px 5px;
    text-align: center;
    text-decoration: none;
}

.auth-role-switcher__option i {
    font-size: 18px;
}

.auth-role-switcher__option:hover,
.auth-role-switcher__option:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.auth-role-switcher__option.is-active {
    background: #fff;
    border-color: #fff;
    box-shadow: 0 12px 28px rgba(1, 30, 42, 0.3);
    color: var(--auth-accent-dark);
}

.auth-login-illustration {
    background: #031d2d;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 20px;
    box-shadow: 0 22px 52px rgba(1, 20, 32, 0.32);
    display: block;
    flex: 0 1 min(330px, 38svh);
    height: min(330px, 38svh);
    max-height: 330px;
    min-height: 235px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.auth-login-illustration::after {
    background: linear-gradient(180deg, transparent 68%, rgba(1, 22, 34, 0.24));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.auth-login-illustration img {
    display: block;
    height: 100%;
    object-fit: contain;
    object-position: center;
    width: 100%;
}

.auth-login-story__message {
    margin-bottom: 16px;
    padding: 0 2px;
}

.auth-login-story__message span {
    color: #72e2d9;
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.auth-login-story__message h1 {
    color: #fff;
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.16;
    margin: 0;
}

.auth-login-story__accent {
    bottom: 28px;
    display: none;
    gap: 7px;
    position: absolute;
    right: 30px;
    z-index: 1;
}

.auth-login-story__accent span {
    background: rgba(255, 255, 255, 0.42);
    border-radius: 99px;
    height: 5px;
    width: 18px;
}

.auth-login-story__accent span:nth-child(2) {
    background: var(--auth-highlight);
    width: 34px;
}

.auth-login-form-panel {
    align-items: center;
    display: flex;
    padding: 44px clamp(34px, 5vw, 70px);
}

.auth-login-form-wrap {
    margin: auto;
    max-width: 440px;
    width: 100%;
}

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

.auth-login-form-role {
    align-items: center;
    background: var(--auth-accent-soft);
    border: 1px solid rgba(37, 163, 154, 0.2);
    border-radius: 99px;
    color: var(--auth-accent-dark);
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    gap: 6px;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    padding: 6px 10px;
    text-transform: uppercase;
}

.auth-login-form-role i {
    font-size: 15px;
}

.auth-login-form-heading h2 {
    color: var(--auth-ink);
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 9px;
}

.auth-login-form-heading p {
    color: var(--auth-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    margin: 0;
}

.auth-login-alert {
    align-items: flex-start;
    border: 1px solid;
    border-radius: 10px;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 9px;
    margin-bottom: 16px;
    padding: 11px 13px;
}

.auth-login-alert ul {
    margin: 0;
    padding-left: 17px;
}

.auth-login-alert--error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.auth-login-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

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

.auth-login-field {
    display: grid;
    min-width: 0;
}

.auth-login-field label,
.auth-login-label-row {
    color: var(--auth-ink);
    font-size: 12px;
    font-weight: 800;
}

.auth-login-field label {
    display: block;
    margin: 0 0 8px;
}

.auth-login-field label > span {
    color: #e11d48;
    margin-left: 2px;
}

.auth-login-label-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.auth-login-label-row a {
    color: var(--auth-accent);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.auth-login-label-row a:hover {
    color: var(--auth-highlight);
}

.auth-login-input {
    align-items: center;
    background: #f8fbfc;
    border: 1px solid #d7e4e7;
    border-radius: 10px;
    display: flex;
    min-height: 50px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-login-input:focus-within {
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-focus-ring);
}

.auth-login-input.has-error {
    border-color: var(--auth-error-border);
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.08);
}

.auth-login-input:has(.is-invalid) {
    border-color: var(--auth-error-border);
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.08);
}

.auth-login-input.has-error > i,
.auth-login-input:has(.is-invalid) > i {
    color: var(--auth-error);
}

.auth-login-input > i {
    color: #7a8ca4;
    flex: 0 0 46px;
    font-size: 19px;
    text-align: center;
}

.auth-login-input input {
    background: transparent;
    border: 0;
    color: var(--auth-ink);
    flex: 1 1 auto;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    height: 48px;
    min-width: 0;
    outline: 0;
    padding: 0 10px 0 0;
}

.auth-login-input input::placeholder {
    color: #9aa8ba;
}

.auth-login-password-toggle {
    align-items: center;
    align-self: stretch;
    background: transparent;
    border: 0;
    color: #63758d;
    display: inline-flex;
    flex: 0 0 45px;
    font-size: 19px;
    justify-content: center;
}

.auth-login-password-toggle:hover {
    color: var(--auth-accent);
}

.auth-login-field-error,
.auth-login-form label.error,
.auth-login-form .invalid-feedback {
    align-items: flex-start;
    background: var(--auth-error-soft);
    border: 1px solid var(--auth-error-border);
    border-radius: 8px;
    color: var(--auth-error);
    display: flex;
    font-size: 10px;
    font-weight: 700;
    gap: 7px;
    line-height: 1.4;
    margin: 6px 0 0;
    min-height: 30px;
    padding: 6px 8px;
    text-align: left;
    width: 100%;
}

.auth-login-field-error::before,
.auth-login-form label.error::before,
.auth-login-form .invalid-feedback::before {
    align-items: center;
    background: var(--auth-error);
    border-radius: 50%;
    color: #fff;
    content: "!";
    display: inline-flex;
    flex: 0 0 15px;
    font-size: 9px;
    font-weight: 900;
    height: 15px;
    justify-content: center;
    line-height: 1;
    width: 15px;
}

.auth-login-password-help {
    background: var(--auth-accent-soft);
    border: 1px solid var(--auth-soft-border);
    border-radius: 9px;
    color: #506581;
    font-size: 11px;
    margin-top: -5px;
    padding: 9px 12px;
}

.auth-login-password-help summary {
    color: var(--auth-accent-dark);
    cursor: pointer;
    font-weight: 800;
}

.auth-login-password-help ul {
    line-height: 1.7;
    margin: 8px 0 0;
    padding-left: 18px;
}

.auth-login-submit {
    align-items: center;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark));
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 24px var(--auth-shadow);
    color: #fff;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    min-height: 50px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    width: 100%;
}

.auth-login-submit:hover,
.auth-login-submit:focus-visible {
    box-shadow: 0 16px 30px var(--auth-shadow-strong);
    color: #fff;
    transform: translateY(-1px);
}

.auth-login-register {
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 600;
    margin: 22px 0 0;
    text-align: center;
}

.auth-login-register a {
    color: var(--auth-accent);
    font-weight: 900;
    margin-left: 4px;
    text-decoration: none;
}

.auth-login-register a:hover {
    color: var(--auth-highlight);
}

@media (max-width: 991px) {
    .auth-login-card {
        grid-template-columns: minmax(300px, 0.8fr) minmax(390px, 1.2fr);
    }

    .auth-login-story {
        padding: 30px;
    }

    .auth-login-form-panel {
        padding: 38px 34px;
    }
}

@media (max-width: 767px) {
    .auth-login-shell {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-login-card {
        grid-template-columns: 1fr;
        height: auto;
        max-width: 560px;
        min-height: 0;
        min-width: 0;
        width: 100%;
    }

    .auth-login-story {
        min-height: auto;
        min-width: 0;
        padding: 24px;
    }

    .auth-login-brand {
        min-height: 54px;
        padding: 7px 12px;
    }

    .auth-login-brand img {
        height: 38px;
        max-width: 150px;
    }

    .auth-login-story__content {
        max-width: 100%;
        min-width: 0;
        padding: 28px 0 10px;
    }

    .auth-login-story__message,
    .auth-login-illustration {
        display: none;
    }

    .auth-role-switcher {
        margin-bottom: 22px;
    }

    .auth-login-story__accent {
        display: none;
    }

    .auth-login-form-panel {
        min-width: 0;
        padding: 34px 24px;
        width: 100%;
    }

    .auth-login-form-wrap,
    .auth-login-form {
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .auth-login-form-heading h2 {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 520px) {
    .auth-login-card {
        border-radius: 14px;
    }

    .auth-login-form-panel {
        padding: 30px 20px;
    }

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

    .auth-login-field-error,
    .auth-login-form label.error,
    .auth-login-form .invalid-feedback {
        font-size: 9.5px;
    }
}

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