/* ── Forgot Password — extends auth-login.css ── */

html, body {
    overflow-x: hidden;
}

.auth-page--forgot .auth-brand__tagline {
    font-size: 0.92rem;
}

.auth-card--wide {
    max-width: 480px;
}

.auth-forgot-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.auth-steps {
    font-size: 0.85rem;
    color: var(--auth-muted);
    line-height: 1.65;
    margin: 0;
    padding: 0.85rem 1rem;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    border-radius: 12px;
}

.auth-steps strong {
    color: var(--auth-text);
}

/* channel tabs */
.auth-channels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.auth-channel {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.5rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-input-bg);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--auth-muted);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.auth-channel svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-channel.is-active {
    border-color: var(--auth-primary);
    background: #eef5fc;
    color: var(--auth-primary);
}

.auth-channel.is-active[data-channel="whatsapp"],
.auth-channel.is-active[data-channel="whatsapp_otp"] {
    border-color: #25d366;
    background: #f0fdf4;
    color: #15803d;
}

.auth-channel:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.auth-channel--full {
    flex: 1 1 100%;
}

.auth-panel {
    display: none;
}

.auth-panel.is-active {
    display: block;
}

.auth-panel .auth-field {
    margin-bottom: 0;
}

.auth-forgot-form .auth-btn {
    margin-top: 0.25rem;
}

.auth-btn--wa {
    background: #25d366;
}

.auth-btn--wa:hover {
    background: #1da851;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.28);
}

.auth-hint {
    font-size: 0.82rem;
    color: var(--auth-muted);
    line-height: 1.55;
    margin-top: 0.5rem;
}

.auth-hint--warn {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.8rem;
    line-height: 1.55;
}

.auth-hint--warn strong {
    color: #78350f;
}

/* phone row — prevent horizontal scroll */
.phone-country-block {
    width: 100%;
    min-width: 0;
}

.phone-country-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--auth-text);
}

.phone-row {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.phone-row__code,
.phone-row__number {
    min-width: 0;
    max-width: 100%;
}

.phone-row .form-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--auth-input-bg);
    color: var(--auth-text);
}

.phone-row .form-control:focus {
    outline: none;
    border-color: #25d366;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.phone-row .form-control.is-invalid {
    border-color: #ef4444;
}

/* select2 containment */
.phone-row .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    border: 1.5px solid var(--auth-border) !important;
    border-radius: 12px !important;
    background: var(--auth-input-bg) !important;
    padding: 4px 8px;
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px !important;
    font-size: 0.85rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #25d366 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.select2-container--bootstrap-5 .select2-results__option img,
.select2-container--bootstrap-5 .select2-selection__rendered img {
    width: 18px;
    height: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.select2-dropdown {
    max-width: calc(100vw - 2rem);
    border-radius: 12px !important;
    overflow: hidden;
}

.auth-back {
    text-align: center;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--auth-border);
}

.auth-back a {
    color: var(--auth-primary);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
}

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

@media (max-width: 640px) {
    .phone-row {
        grid-template-columns: 1fr;
    }

    .auth-channel {
        flex: 1 1 100%;
    }

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

@media (max-width: 380px) {
    .auth-channels {
        flex-direction: column;
    }

    .auth-channel {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (min-width: 641px) and (max-width: 991.98px) {
    .phone-row {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    }
}
