﻿@import url('~/lib/Vazirmatn/css/css2.css');

:root {
    --accent: #4f46e5;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-body: #f1f5f9;
    --white: #ffffff;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    direction: rtl;
    background: var(--bg-body);
    font-family: 'Vazirmatn','IRANSansX', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-card {
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04);
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

    .auth-header h1 {
        font-size: 22px;
        font-weight: 900;
        color: var(--text-main);
        margin: 0;
    }

    .auth-header p {
        font-size: 13px;
        color: var(--text-muted);
        margin-top: 8px;
    }

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

/* ساختار ورودی‌ها برای جلوگیری از بیرون زدگی */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
}

.auth-input {
    width: 100% !important; /* حیاتی برای فیت شدن */
    padding: 12px 42px 12px 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

    .auth-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    }

.otp-input {
    letter-spacing: 12px !important;
    text-align: center !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    padding: 12px !important; /* حذف پدینگ آیکون برای کد تایید */
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

    .btn-primary:hover {
        background: #4338ca;
        transform: translateY(-1px);
    }

.msg-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 15px;
    border-right: 4px solid var(--error);
}


/* استایل باکس‌های جداگانه کد تایید */
.otp-inputs-wrapper {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr; /* اعداد از چپ به راست */
    margin: 25px 0;
}

.otp-box {
    width: 45px;
    height: 55px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: var(--accent);
}

    .otp-box:focus {
        border-color: var(--accent);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
        transform: translateY(-2px);
    }

    /* حذف فلش‌های بالا و پایین در ورودی عدد */
    .otp-box::-webkit-inner-spin-button,
    .otp-box::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent) 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    position: relative;
    overflow: hidden;
}

    .login-btn:hover {
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
        transform: translateY(-2px);
        filter: brightness(1.1);
    }

    .login-btn:active {
        transform: translateY(0);
    }

    /* افکت درخشش هنگام عبور ماوس */
    .login-btn::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: rgba(255, 255, 255, 0.1);
        transform: rotate(45deg);
        transition: 0.5s;
        opacity: 0;
    }

    .login-btn:hover::after {
        left: 100%;
        opacity: 1;
    }