.otp-code-input {
    width: 100%;
}

/* Login cards are forms, not interactive theme surfaces. */
.auth-login-card:hover {
    color: var(--theme-surface-text, var(--theme-page-text, #1f2937));
    border-color: var(--theme-surface-border, var(--theme-page-border, #e5e7eb));
}

.auth-phone-input {
    min-height: 52px;
    display: flex;
    align-items: stretch;
    direction: ltr;
    overflow: hidden;
    border: 1.5px solid #d9dde5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(23, 32, 51, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-phone-input:hover {
    border-color: #b7beca;
}

.auth-phone-input:focus-within {
    border-color: var(--color-primary, #ff5e14);
    box-shadow: 0 0 0 3px var(--rgba-primary-1, rgba(255, 94, 20, 0.12));
    transform: translateY(-1px);
}

.auth-phone-prefix {
    min-width: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    border-right: 1px solid #e4e7ec;
    background: #f7f8fa;
    color: #444d5e;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.auth-phone-prefix i {
    color: var(--color-primary, #ff5e14);
}

.auth-phone-input .auth-phone-field {
    min-width: 0;
    flex: 1;
    width: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172033;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-align: left;
    direction: ltr;
    font-variant-numeric: tabular-nums;
}

.auth-phone-input .auth-phone-field::placeholder {
    color: #a5abb5;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* The shared main.css invalid-focus rule is intended for submitted fields.
   This component shows validation on its wrapper after user interaction. */
.auth-phone-input .auth-phone-field:invalid:focus {
    outline: none;
    box-shadow: none;
}

.auth-phone-status {
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #20a464;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-phone-input.is-complete {
    border-color: #65c995;
}

.auth-phone-input.is-complete .auth-phone-status {
    opacity: 1;
    transform: scale(1);
}

.auth-phone-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.auth-phone-hint {
    display: block;
    margin-top: 7px;
    color: #7b8290;
    font-size: 0.75rem;
}

.form-group > .log-red-alert {
    width: 100%;
    margin-bottom: 0;
}

.otp-code-slots {
    display: grid;
    grid-template-columns: repeat(6, minmax(38px, 52px));
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
    direction: ltr;
}

.otp-code-input .otp-code-digit {
    width: 100%;
    aspect-ratio: 1 / 1.08;
    min-height: 46px;
    padding: 0;
    border: 1.5px solid #d9dde5;
    border-radius: 12px;
    background: #fff;
    color: #172033;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    caret-color: var(--color-primary, #ff5e14);
    box-shadow: 0 3px 12px rgba(23, 32, 51, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.otp-code-input .otp-code-digit:hover {
    border-color: #b7beca;
}

.otp-code-input .otp-code-digit:focus,
.otp-code-input .otp-code-digit.is-filled {
    outline: none;
    border-color: var(--color-primary, #ff5e14);
    box-shadow: 0 0 0 3px var(--rgba-primary-1, rgba(255, 94, 20, 0.12));
}

.otp-code-input .otp-code-digit:focus {
    transform: translateY(-2px);
}

.otp-resend-wrap {
    min-height: 38px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #727986;
}

.otp-countdown-time {
    min-width: 42px;
    display: inline-block;
    direction: ltr;
    color: #30394a;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.otp-resend-button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--color-primary, #ff5e14);
    font-weight: 700;
    cursor: pointer;
}

.otp-resend-button:hover:not(:disabled) {
    text-decoration: underline;
}

.otp-resend-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.otp-resend-error {
    width: 100%;
    margin-top: 4px;
    color: #dc3545;
    font-size: 0.75rem;
}

@media (max-width: 380px) {
    .auth-phone-prefix {
        min-width: 76px;
        padding: 0 10px;
    }

    .otp-code-slots {
        grid-template-columns: repeat(6, minmax(34px, 1fr));
        gap: 5px;
    }

    .otp-code-input .otp-code-digit {
        min-height: 42px;
        border-radius: 10px;
        font-size: 1.15rem;
    }
}
