﻿:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --card-bg: rgba(255, 255, 255, 0.97);
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-attachment: fixed;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: 18px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    padding: 1.4rem 1.5rem 1rem;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #eee;
}

    .auth-header img {
        width: 70px;
        margin-bottom: 0.6rem;
    }

    .auth-header h4 {
        font-weight: 700;
        color: #1a1a1a;
        margin: 0;
        font-size: 1.25rem;
    }

    .auth-header p {
        color: #6c757d;
        font-size: 0.9rem;
        margin-top: 0.3rem;
    }

.auth-body {
    padding: 1.4rem 1.6rem 1.6rem;
}

.step {
    display: none;
    animation: fadeIn 0.3s ease;
}

    .step.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-control {
    height: 46px;
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

    .form-control:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15);
    }

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.btn-primary-custom {
    height: 46px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    border: none;
    transition: all 0.25s;
}

    .btn-primary-custom:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(13, 110, 253, 0.3);
    }

.btn-outline-custom {
    height: 46px;
    border-radius: 10px;
    font-weight: 500;
    border: 1.5px solid #dee2e6;
    color: #495057;
    background: white;
}

    .btn-outline-custom:hover {
        background: #f8f9fa;
        border-color: #adb5bd;
    }

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.1rem 0;
    color: #adb5bd;
    font-size: 0.88rem;
}

    .divider::before,
    .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #e9ecef;
    }

    .divider span {
        padding: 0 0.9rem;
    }

.back-link {
    color: #6c757d;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

    .back-link:hover {
        color: var(--primary);
    }

.user-type-toggle {
    display: flex;
    background: #f1f3f5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.1rem;
}

    .user-type-toggle button {
        flex: 1;
        border: none;
        background: transparent;
        padding: 0.55rem;
        border-radius: 8px;
        font-weight: 500;
        color: #6c757d;
        transition: all 0.2s;
    }

        .user-type-toggle button.active {
            background: white;
            color: var(--primary);
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        }

.otp-input {
    letter-spacing: 10px;
    font-size: 1.5rem !important;
    text-align: center;
    font-weight: 600;
}

.phone-display {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-weight: 500;
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

/* Password eye icon */
.password-wrapper {
    position: relative;
}

    .password-wrapper .form-control {
        padding-left: 45px; /* space for eye icon (RTL) */
    }

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    padding: 0;
    z-index: 5;
    cursor: pointer;
}
    .password-toggle:hover {
        color: var(--primary);
    }

/* Hide Bootstrap validation icons completely for password fields */
#regPassword.is-valid,
#regPassword.is-invalid,
#regRePassword.is-valid,
#regRePassword.is-invalid {
    background-image: none !important;
    padding-right: 0.75rem !important; /* reset Bootstrap padding */
}


/* Loading */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 18px;
}

.spinner-border {
    width: 2.8rem;
    height: 2.8rem;
}

/* Resend button disabled state */
#btnResend:disabled {
    color: #adb5bd !important;
    text-decoration: none;
    cursor: not-allowed;
}

/* Utility */
.mb-3 {
    margin-bottom: 0.9rem !important;
}

.mb-4 {
    margin-bottom: 1.1rem !important;
}

/* Validation colors */
.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#passwordErrorMsg {
    font-size: 0.85rem;
    margin-top: 6px;
}