.ngr-auth-page {
    direction: rtl;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fb;
}

.ngr-auth-page > .container-4xl {
    width: 100%;
}

.ngr-auth-card {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.ngr-auth-step {
    display: none;
}

.ngr-auth-step.is-active {
    display: block;
}

.ngr-auth-head {
    text-align: right;
}

.ngr-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.ngr-auth-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.ngr-auth-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.ngr-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ngr-auth-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ngr-auth-grid-item--full {
    grid-column: 1 / -1;
}

.ngr-auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ngr-auth-label {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 600;
}

.ngr-auth-field input,
.ngr-auth-field textarea {
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 1rem;
    background-color: #f8fafc;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ngr-auth-field textarea {
    resize: vertical;
    min-height: 120px;
}

.ngr-auth-field input:focus,
.ngr-auth-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background-color: #ffffff;
}

input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    transition: background-color 9999s ease-in-out 0s;
    -webkit-text-fill-color: inherit;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    background-color: transparent !important;
}

.ngr-auth-submit {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ngr-auth-submit:hover,
.ngr-auth-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(99, 102, 241, 0.25);
}

.ngr-auth-submit:disabled,
.ngr-auth-submit[disabled] {
    background: #cbd5f5;
    cursor: not-allowed;
    box-shadow: none;
}

.ngr-auth-link {
    background: none;
    border: none;
    color: #4f46e5;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ngr-auth-link:hover,
.ngr-auth-link:focus {
    color: #312e81;
}

.ngr-auth-actions {
    justify-content: space-between;
}

.ngr-auth-feedback {
    background-color: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: #3730a3;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.95rem;
    display: none !important;
}

.ngr-auth-feedback[data-state="error"] {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

.ngr-auth-feedback[data-state="success"] {
    background-color: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #047857;
}

.ngr-auth-feedback[data-state="info"],
.ngr-auth-feedback[data-state="warning"] {
    display: none;
}

.ngr-auth-countdown {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.ngr-auth-brand {
    position: relative;
}

.ngr-auth-back-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    color: #0f172a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    background-color: transparent;
}

.ngr-auth-back-button:hover,
.ngr-auth-back-button:focus {
    color: #000000;
}

.ngr-auth-back-button i {
    font-size: 18px;
}

.ngr-password-strength {
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 12px;
    padding: 12px 16px;
    background-color: #f8fafc;
}

.ngr-password-strength__bars {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.ngr-password-strength__bars span {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background-color: #e2e8f0;
    transition: background-color 0.2s ease;
}

.ngr-password-strength__bars span.is-active {
    background-color: #fbbf24;
}

.ngr-password-strength[data-strength="weak"] .ngr-password-strength__bars span.is-active {
    background-color: #f87171;
}

.ngr-password-strength[data-strength="medium"] .ngr-password-strength__bars span.is-active {
    background-color: #fbbf24;
}

.ngr-password-strength[data-strength="strong"] .ngr-password-strength__bars span.is-active {
    background-color: #34d399;
}

.ngr-password-strength__label {
    font-size: 0.9rem;
    color: #475569;
    margin: 0 0 8px 0;
}

.ngr-password-strength__rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ngr-password-strength__rules li {
    font-size: 0.85rem;
    color: #94a3b8;
    position: relative;
    padding-right: 16px;
}

.ngr-password-strength__rules li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.ngr-password-strength__rules li.is-passed {
    color: #0f9d58;
}

.ngr-auth-countdown {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ngr-otp-input {
    text-align: center;
    letter-spacing: 1.5rem;
    font-size: 1.5rem;
    direction: ltr;
}

.is-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.4rem;
    height: 1.4rem;
    margin-top: -0.7rem;
    margin-left: -0.7rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--ngr-spinner-color, rgba(255, 255, 255, 0.9));
    border-radius: 50%;
    animation: ngr-auth-spin 0.8s linear infinite;
}

@keyframes ngr-auth-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.ngr-auth-divider {
    position: relative;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.ngr-auth-divider::before,
.ngr-auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: #e2e8f0;
}

.ngr-auth-toast {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    min-width: 240px;
    max-width: calc(100% - 2rem);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border-radius: 999px;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
}

.ngr-auth-toast[data-state="error"] {
    background: rgba(220, 38, 38, 0.95);
}

.ngr-auth-toast[data-state="success"] {
    background: rgba(16, 185, 129, 0.95);
}

.ngr-auth-toast__close {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ngr-auth-toast[hidden] {
    display: none !important;
}

.ngr-auth-toast {
    position: absolute;
    left: 50%;
    font-size: 1.5rem;
    bottom: 5rem;
    transform: translateX(-50%);
    min-width: 240px;
    max-width: calc(100% - 2rem);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border-radius: 999px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10;
}

.ngr-auth-toast[data-state="error"] {
    background: #e03838;
}

.ngr-auth-toast[data-state="success"] {
    background: #10b92ff2;
}

.ngr-auth-toast__close {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ngr-auth-toast[hidden] {
    display: none;
}

.ngr-auth-divider::before {
    right: 0;
}

.ngr-auth-divider::after {
    left: 0;
}

.ngr-auth-divider span {
    padding: 0 10px;
    background-color: #ffffff;
}

.ngr-auth-otp-actions button[disabled],
.ngr-auth-otp-actions button:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.ngr-auth-countdown {
    margin: 0;
}

.ngr-auth-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.95rem;
    color: #475569;
}

.ngr-auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.ngr-auth-terms {
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 992px) {
    .ngr-auth-page {
        align-items: flex-start;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .ngr-auth-card {
        box-shadow: 0;
        border-radius: 0px;
        border: 0;
    }
}

@media (max-width: 576px) {
    .ngr-auth-card {
        padding: 24px 20px;
    }

    .ngr-auth-title {
        font-size: 1.3rem;
    }

    .ngr-auth-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .ngr-auth-divider::before,
    .ngr-auth-divider::after {
        width: 30%;
    }
}
.ngr-floating-input {
    position: relative;
    background-color: transparent;
    border: 1px solid #e0e0e2;
}

.ngr-floating-input label {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    padding: 0 4px;
    color: #999;
    font-size: 12px;
    pointer-events: none;
    transition: .2s ease;
}

/* وقتی فوکوس می‌شود یا مقدار وارد می‌شود: لیبل برود بالا */
.ngr-floating-input input:focus + label,
.ngr-floating-input input:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%) scale(1);
    color: #333333;
}

.input-focus-changeborder.focused {
    border: 2px solid #333333 !important;
    outline: none !important;
}
@media only screen and (min-width: 1024px) {
  .input-focus-changeborder.focused {
    border: 2px solid #333333;
  }
}
.input-focus-changeborder.focused button {
  color: #333333;
}
