.cj-auth-modal__dialog {
    width: min(100%, 540px);
    border-radius: 18px;
    overflow: hidden;
}
.cj-auth-modal__content {
    padding: 28px 32px 30px;
    background: var(--cj-color-surface, #fff);
}
.cj-auth-modal__brand img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    display: block;
    margin-bottom: 18px;
}
.cj-auth-modal__title {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.1;
}
.cj-auth-modal__copy {
    margin: 0 0 24px;
    color: var(--cj-text-secondary, #5f6575);
    font-size: 1rem;
}
.cj-auth-modal__actions,
.cj-auth-modal__form {
    display: grid;
    gap: 16px;
}
.cj-auth-modal__provider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    border-radius: 999px;
    border: 1px solid var(--cj-border, #d9dbe4);
    background: #fff;
    color: var(--cj-text-primary, #172036);
    font-weight: 600;
    text-decoration: none;
}
.cj-auth-modal__submit { min-height: 56px; }
.cj-auth-modal__name-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.cj-auth-modal__back {
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 12px;
    font-size: 1rem;
}
.cj-auth-modal__switch {
    background: transparent;
    border: 0;
    color: var(--cj-text-primary, #172036);
    text-decoration: underline;
    font-weight: 600;
}
.cj-auth-modal__close { top: 18px; right: 18px; }
@media (max-width: 640px) {
    .cj-auth-modal__content { padding: 24px 20px 24px; }
    .cj-auth-modal__name-grid { grid-template-columns: 1fr; }
}


.cj-auth-modal__form .cj-password-field--auth {
    position: relative;
}

.cj-auth-modal__form .cj-password-field--auth input {
    width: 100%;
    min-height: 54px;
    padding: 0 3.25rem 0 1rem;
    border: 1px solid var(--cj-border, #d9dbe4);
    border-radius: 14px;
    background: #fff;
}

.cj-auth-modal__form .cj-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--cj-text-secondary, #5f6575);
}

.cj-auth-modal__form .cj-password-toggle:hover {
    background: rgba(212, 1, 27, 0.08);
    color: var(--brand-700);
}


.cj-auth-modal__meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.cj-auth-modal__forgot {
    color: var(--brand-700, #d4011b);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.cj-auth-modal__forgot:hover {
    text-decoration: underline;
}

.cj-auth-modal__legal {
    margin: 4px 0 0;
    color: var(--cj-text-secondary, #5f6575);
    font-size: 0.78rem;
    line-height: 1.55;
    text-align: center;
}

.cj-auth-modal__legal a {
    color: var(--cj-text-primary, #172036);
    font-weight: 600;
    text-decoration: none;
}

.cj-auth-modal__legal a:hover {
    text-decoration: underline;
}

.cj-auth-modal__screen[data-cj-auth-screen="login"] .cj-auth-modal__title,
.cj-auth-modal__screen[data-cj-auth-screen="register"] .cj-auth-modal__title {
    margin-bottom: 14px;
}
