html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--new-color-page-bg);
}

.authImage {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background: none !important;
    overflow: hidden !important;
}

.new-auth-page {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
   font-family: var(--new-font-family);
    background: var(--new-color-page-bg);
}

.new-auth-shell {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 58vw 42vw;
    overflow: hidden;
     background: var(--new-color-page-bg);
}

.new-auth-brand-panel {
    position: relative;
    width: 58vw;
    height: 100vh;
    overflow: hidden;
    background: var(--new-brand-panel-bg), var(--new-brand-bg-image);
    background-size: cover;
    background-position: center;
}

.new-auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 4% 8%, rgba(255, 255, 255, 0.28) 0, rgba(255, 255, 255, 0.18) 11vw, transparent 11.2vw),
        radial-gradient(circle at 96% 96%, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0.15) 8vw, transparent 8.2vw),
        radial-gradient(circle at 98% 8%, rgba(255, 255, 255, 0.10) 0, rgba(255, 255, 255, 0.08) 28vw, transparent 28.2vw);
    pointer-events: none;
}

.new-auth-brand-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
}

.new-auth-badge {
    position: absolute;
    top: 3vh;
    left: 3.6vw;
    display: inline-flex;
    align-items: center;
    gap: 0.55vw;
    padding: 0.52vw 1.05vw;
    border-radius: 10vw;
    background: var(--new-badge-bg);
    color: var(--new-badge-text);
    box-shadow: inset 0 0 0 0.08vw var(--new-badge-border);
    font-size: 0.72vw;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(12px);
}

.new-auth-badge span {
    width: 0.55vw;
    height: 0.55vw;
    border-radius: 50%;
    background: var(--new-color-white);
    box-shadow: 0 0 0 0.38vw rgba(255, 255, 255, 0.16);
    flex: 0 0 auto;
}

.new-auth-main-logo {
    position: absolute;
    top: 30vh;
    left: 50%;
    width: 32vw;
    transform: translateX(-50%);
    display: block;
    text-align: center;
}

.new-auth-main-logo img {
    width: 100%;
    height: auto;
    display: block;

}

.new-auth-brand-text {
    position: absolute;
    left: 3.6vw;
    bottom: 16vh;
    width: 46vw;
}

.new-auth-brand-text h2 {
    margin: 0 0 1.3vw;
    color: #10283a;
    font-size: 3vw;
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -0.08vw;
}

.new-auth-brand-text p {
    width: 42vw;
    margin: 0;
    color: var(--new-color-white);
    font-size: 1.05vw;
    line-height: 1.85;
    font-weight: 800;
}

.new-auth-stats,
.new-auth-brand-glow {
    display: none;
}

.new-auth-form-panel {
    position: relative;
    width: 42vw;
    height: 100vh;
    overflow: hidden;
   background:
        radial-gradient(circle at 88% 10%, rgba(var(--new-color-primary-rgb), 0.12), transparent 16vw),
        linear-gradient(180deg, var(--new-color-form-bg) 0%, var(--new-color-form-soft-bg) 100%);
}

.new-auth-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28vw;
    transform: translate(-50%, -50%);
}

.new-auth-logo-wrap {
    width: 100%;
    text-align: center;
    margin-bottom: 2.5vh;
}

.new-auth-logo-wrap img {
    width: 22vw;
    height: auto;
    display: inline-block;
}

.new-auth-heading {
    text-align: center;
    margin-bottom: 3vh;
}

.new-auth-heading span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.52vw 1.35vw;
    border-radius: 10vw;
   background: rgba(var(--new-color-primary-rgb), 0.12);
    color: var(--new-color-primary-deep);
    font-size: 0.75vw;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09vw;
    margin-bottom: 1.45vh;
}

.new-auth-heading h1 {
    margin: 0;
   color: var(--new-color-muted);
    font-size: 1.9vw;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.04vw;
}

.new-auth-heading p {
    margin: 1.1vh 0 0;
    color: #657882;
    font-size: 0.92vw;
    line-height: 1.4;
    font-weight: 700;
}

.new-auth-form {
    width: 100%;
}

.new-auth-field {
    width: 100%;
    margin-bottom: 2.1vh;
}

.new-auth-field label {
    display: block;
    color: var(--new-color-muted);
    font-size: 0.86vw;
    line-height: 1;
    font-weight: 600;
    margin-bottom: 1vh;
}

.new-auth-field input {
    width: 100%;
    height: 5.3vh;
    min-height: 3.1vw;
    border-radius: 1.05vw;
    border: 0.08vw solid var(--new-input-border);
    background: var(--new-input-bg);
    color: var(--new-input-text);
    font-size: 0.94vw;
    font-weight: 600;
    padding: 0 1.25vw;
    outline: none;
    transition: 0.22s ease;
}

.new-auth-field input:focus {
    border-color: var(--new-input-border-focus);
    background: var(--new-input-bg-focus);
    box-shadow: 0 0 0 0.34vw var(--new-input-focus-shadow);
}

.new-auth-field input::placeholder {
    color: var(--new-input-placeholder);
}

.new-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1vw;
    margin: 0.4vh 0 3vh;
}

.new-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55vw;
    margin: 0;
    color: var(--new-color-muted);
    font-size: 0.9vw;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.new-auth-check input {
    width: 1vw;
    height: 1vw;
    min-width: 1vw;
    accent-color: var(--new-color-primary-deep);
}

.new-auth-row a {
    color: var(--new-link-color);
    font-size: 0.86vw;
    line-height: 1;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.new-auth-row a:hover {
    color: var(--new-link-hover);
}

.new-auth-submit {
    width: 100%;
    height: 5.7vh;
    min-height: 3.35vw;
    border: 0;
    border-radius: 1vw;
    color: var(--new-button-text);
    background: var(--new-color-primary-deep);
    font-size: 0.95vw;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1.4vw 2.4vw var(--new-button-shadow);
    transition: 0.22s ease;
}

.new-auth-submit:hover {
    transform: translateY(-0.12vw);
    box-shadow: 0 1.8vw 2.8vw var(--new-button-shadow-hover);
}

.new-auth-role-grid {
    display: none;
}

.new-auth-alert {
    padding: 1vw;
    margin-bottom: 1.3vh;
    border-radius: 1vw;
    background: #fff4f4;
    border: 0.08vw solid #ffd1d1;
    color: #b42318;
    font-size: 0.82vw;
    font-weight: 800;
}

/* Mobile only */
@media (max-width: 767px) {
    html,
    body {
        height: auto;
        overflow-y: auto;
    }

    .authImage,
    .new-auth-page,
    .new-auth-shell {
        width: 100%;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    .new-auth-shell {
        display: block;
    }

    .new-auth-brand-panel,
    .new-auth-form-panel {
        width: 100%;
        height: auto;
        min-height: auto;
    }

    .new-auth-brand-panel {
        padding: 28px 18px;
    }

    .new-auth-brand-content {
        height: auto;
    }

    .new-auth-badge,
    .new-auth-main-logo,
    .new-auth-brand-text,
    .new-auth-card {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        transform: none;
    }

    .new-auth-badge {
        font-size: 12px;
        padding: 9px 14px;
        gap: 8px;
        margin-bottom: 32px;
    }

    .new-auth-badge span {
        width: 8px;
        height: 8px;
        min-width: 8px;
    }

    .new-auth-main-logo {
        max-width: 270px;
        margin: 0 auto 34px;
    }

    .new-auth-brand-text h2 {
        font-size: 28px;
        letter-spacing: -0.6px;
    }

    .new-auth-brand-text p {
        width: 100%;
        font-size: 15px;
    }

    .new-auth-form-panel {
        padding: 34px 18px 42px;
    }

    .new-auth-card {
        max-width: 100%;
    }

    .new-auth-logo-wrap img {
        width: 280px;
        max-width: 90%;
    }

    .new-auth-heading span {
        font-size: 11px;
        padding: 8px 15px;
    }

    .new-auth-heading h1 {
        font-size: 25px;
    }

    .new-auth-heading p {
        font-size: 14px;
    }

    .new-auth-field label,
    .new-auth-check,
    .new-auth-row a,
    .new-auth-field input,
    .new-auth-submit {
        font-size: 14px;
    }

    .new-auth-field input,
    .new-auth-submit {
        height: 54px;
        min-height: 54px;
        border-radius: 16px;
    }

    .new-auth-check input {
        width: 18px;
        height: 18px;
        min-width: 18px;
    }
}

.new-auth-error-box {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px 16px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: var(--new-error-bg);
    border: 1px solid var(--new-error-border);
    box-shadow: 0 14px 34px rgba(185, 28, 28, 0.08);
}

.new-auth-error-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: var(--new-error-icon-bg);
    color: var(--new-color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    margin-top: 1px;
}

.new-auth-error-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.new-auth-error-content strong {
    color: var(--new-error-title);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.new-auth-error-content span {
   color: var(--new-error-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.new-auth-field input.new-auth-input-error {
    border-color: var(--new-error-input-border) !important;
    background: var(--new-error-input-bg) !important;
}

.new-auth-field input.new-auth-input-error:focus {
    border-color: var(--new-error-focus-border) !important;
    box-shadow: 0 0 0 5px var(--new-error-focus-shadow) !important;
}

.new-auth-toast-root {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
}

.new-auth-toast {
    width: 390px;
    max-width: calc(100vw - 32px);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--new-error-bg, #fff4f4);
    border: 1px solid var(--new-error-input-border, #ffcaca);
    box-shadow: 0 22px 55px rgba(185, 28, 28, 0.14);
    opacity: 0;
    transform: translateY(-14px) translateX(16px);
    transition: 0.3s ease;
    pointer-events: auto;
}

.new-auth-toast-show {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.new-auth-toast-hide {
    opacity: 0;
    transform: translateY(-14px) translateX(16px);
}

.new-auth-toast-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--new-error-icon-bg, #dc2626);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.new-auth-toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.new-auth-toast-content strong {
    color: var(--new-error-title, #991b1b);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.new-auth-toast-content span {
    color: var(--new-error-text, #b42318);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.new-auth-toast-close {
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: var(--new-error-text, #b42318);
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

@media only screen and (max-width: 575px) {
    .new-auth-toast-root {
        top: 16px;
        right: 16px;
        left: 16px;
    }

    .new-auth-toast {
        width: 100%;
    }
}

.new-auth-reset-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 0.36fr;
    gap: 0.9vw;
    align-items: center;
    margin-top: 1.4vh;
}

.new-auth-reset-submit {
    width: 100%;
}

.new-auth-cancel-btn {
    width: 100%;
    height: 5.7vh;
    min-height: 3.35vw;
    border: 0.08vw solid rgba(var(--new-color-primary-rgb, 44, 176, 178), 0.22);
    border-radius: 1vw;
    background: rgba(var(--new-color-primary-rgb, 44, 176, 178), 0.10);
    color: var(--new-color-primary-deep, #128b98) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.95vw;
    line-height: 1;
    font-weight: 600;
    text-decoration: none !important;
    transition: 0.22s ease;
}

.new-auth-cancel-btn:hover {
    background: rgba(var(--new-color-primary-rgb, 44, 176, 178), 0.18);
    border-color: rgba(var(--new-color-primary-rgb, 44, 176, 178), 0.34);
    color: var(--new-link-hover, #20305f) !important;
    text-decoration: none !important;
    transform: translateY(-0.08vw);
}

@media only screen and (max-width: 767px) {
    .new-auth-reset-actions {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 18px;
    }

    .new-auth-cancel-btn {
        height: 54px;
        min-height: 54px;
        border-radius: 16px;
        font-size: 14px;
    }
}

.new-auth-submit:disabled,
.new-auth-submit-loading {
    opacity: 0.78;
    cursor: not-allowed;
    transform: none !important;
}

.new-auth-btn-loader {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.new-auth-btn-loader::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: newAuthSpin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: -3px;
}

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