/* Login modal — two-pane layout (react-icons via x-ri-icon) */

.auth-modal .modal-dialog.auth-modal__dialog {
    max-width: min(920px, 96vw);
}

.auth-modal .modal-content.auth-modal__shell {
    display: flex;
    flex-direction: row;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 26px 50px rgba(22, 34, 74, 0.18);
    background: #fff;
    min-height: 520px;
    padding: 0;
}

/* Gradient panel (right in RTL) */
.auth-modal__panel {
    flex: 0 0 42%;
    max-width: 42%;
    display: flex;
    flex-direction: column;
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(165deg, oklch(0.32 0.14 282) 0%, oklch(0.42 0.18 270) 45%, oklch(0.48 0.16 255) 100%);
    color: #fff;
    text-align: right;
}

.auth-modal__panel-brand {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
}

.auth-modal__panel-logo {
    max-height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-modal__panel-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.auth-modal__panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 1rem;
    color: #fff;
}

.auth-modal__panel-body {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.auth-modal__panel-body p {
    margin: 0 0 1.25rem;
    font-weight: 400;
}

.auth-modal__panel-body ul,
.auth-modal__panel-body .auth-modal__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-modal__panel-body ul li,
.auth-modal__panel-body .auth-modal__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.auth-modal__panel-body ul li::before,
.auth-modal__panel-body .auth-modal__features li::before {
    content: '';
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/%3E%3C/svg%3E");
    background-size: 1.35rem;
    background-repeat: no-repeat;
    background-position: center;
}

.auth-modal__panel-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    text-align: left;
}

/* Form pane (left in RTL) */
.auth-modal__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.25rem 1.75rem;
    position: relative;
    background: #fff;
}

.auth-modal__close {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.auth-modal__close:hover {
    color: #374151;
    background: #f3f4f6;
}

.auth-modal__close .ri-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.auth-modal__head {
    text-align: right;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.auth-modal__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--kbi-ink, #1a1a2e);
    margin: 0 0 0.35rem;
    line-height: 1.3;
}

.auth-modal__subtitle {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.5;
}

.auth-modal__form {
    text-align: right;
}

.auth-modal__field {
    margin-bottom: 1.1rem;
}

.auth-modal__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--kbi-ink-2, #404057);
    margin-bottom: 0.4rem;
}

.auth-modal__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.auth-modal__label-row .auth-modal__label {
    margin-bottom: 0;
}

.auth-modal__forgot {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--kbi-indigo, oklch(0.48 0.20 282));
    text-decoration: none;
    white-space: nowrap;
}

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

.auth-modal__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-modal__input {
    width: 100%;
    border: 1px solid var(--kbi-border, #e8eaed);
    border-radius: var(--kbi-radius-sm, 13px);
    padding: 0.7rem 2.75rem 0.7rem 2.75rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--kbi-ink, #1a1a2e);
    background: #fff;
    text-align: right;
    direction: rtl;
}

.auth-modal__input:focus {
    outline: none;
    border-color: var(--kbi-indigo, oklch(0.48 0.20 282));
    box-shadow: 0 0 0 3px var(--kbi-indigo-50, #eef2ff);
}

.auth-modal__input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: inline-flex;
}

.auth-modal__input-icon .ri-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.auth-modal__input-icon--end {
    right: 0.85rem;
}

.auth-modal__password-toggle {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem;
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.auth-modal__password-toggle:hover {
    color: #6b7280;
}

.auth-modal__password-toggle .ri-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.auth-modal__password-toggle .auth-modal__eye-closed {
    display: none;
}

.auth-modal__password-toggle.is-visible .auth-modal__eye-open {
    display: none;
}

.auth-modal__password-toggle.is-visible .auth-modal__eye-closed {
    display: inline-flex;
}

.auth-modal__remember {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--kbi-ink-2, #404057);
}

.auth-modal__remember input[type='checkbox'] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--kbi-indigo, oklch(0.48 0.20 282));
    cursor: pointer;
}

.auth-modal__remember label {
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.auth-modal__submit {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 0;
    border-radius: var(--kbi-radius-sm, 13px);
    background: var(--kbi-indigo, oklch(0.48 0.20 282));
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: 0 4px 14px -4px oklch(0.48 0.20 282 / 0.5);
}

.auth-modal__submit:hover {
    background: var(--kbi-indigo-2, #4338ca);
}

.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 400;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--kbi-border, #e8eaed);
}

.auth-modal__google {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--kbi-border, #e8eaed);
    border-radius: var(--kbi-radius-sm, 13px);
    background: #fff;
    color: var(--kbi-ink-2, #404057);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.auth-modal__google:hover {
    background: #f9fafb;
}

.auth-modal__google .ri-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.auth-modal__footer-note {
    text-align: center;
    margin: 1.15rem 0 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

.auth-modal__footer-note a,
.auth-modal__switch-link {
    color: var(--kbi-indigo, oklch(0.48 0.20 282));
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.auth-modal__footer-note a:hover,
.auth-modal__switch-link:hover {
    text-decoration: underline;
}

.auth-modal__alert {
    border-radius: var(--kbi-radius-sm, 13px);
    margin-bottom: 0.85rem;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Register / stacked auth modal (centered single column) */
.auth-modal--stacked .modal-dialog.auth-modal__dialog--stacked {
    max-width: min(440px, 94vw);
}

.auth-modal--stacked .auth-modal__card {
    position: relative;
    border: 0;
    border-radius: 20px;
    padding: 2rem 2rem 1.75rem;
    box-shadow: 0 26px 50px rgba(22, 34, 74, 0.18);
    background: #fff;
}

.auth-modal--stacked .auth-modal__close {
    top: 1.1rem;
    left: 1.1rem;
}

.auth-modal__brand-center {
    display: flex;
    justify-content: center;
    margin-bottom: 1.15rem;
}

.auth-modal__logo-mark {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 14px;
    background: var(--kbi-indigo, oklch(0.48 0.20 282));
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-modal__brand-logo {
    max-height: 3.5rem;
    width: auto;
    object-fit: contain;
}

.auth-modal__head--center {
    text-align: center;
    margin-bottom: 1.35rem;
    padding: 0 0.5rem;
}

.auth-modal__head--center .auth-modal__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.auth-modal__head--center .auth-modal__subtitle {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.55;
    max-width: 20rem;
    margin: 0 auto;
}

.auth-modal__divider--social {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #9ca3af;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .auth-modal .modal-content.auth-modal__shell {
        flex-direction: column;
        min-height: 0;
    }

    .auth-modal__panel {
        flex: none;
        max-width: none;
        padding: 1.5rem;
    }

    .auth-modal__panel-title {
        font-size: 1.2rem;
    }

    .auth-modal__main {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}
