
/* ========== فونت‌های وزیرمتن ========== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/dgid/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/dgid/assets/fonts/Vazirmatn-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@import url('/dgid/assets/fonts/material-icons/material-icons.css');

/* ========== پایه ========== */
* {
    box-sizing: border-box;
}

body.auth-page {
    background: linear-gradient(135deg, #e8f5e9 0%, #a5d6a7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    direction: rtl;
    padding: 10vh 0;
}

.auth-container {
    width: 80%;
    max-width: 480px;
    margin: auto;
    position: relative;
    z-index: 1;
}

/* ========== کارت فرم (سفید بدون سایه) ========== */
.auth-card {
    position: relative;
    width: 100%;
    border-radius: 20px;
    background: #ffffff;
    padding: 2rem 1.8rem;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 90px;
    width: auto;
}

/* ========== انیمیشن Slide-In ========== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-item {
    animation: slideInUp 0.4s ease both;
}

.anim-item:nth-child(1) { animation-delay: 0.05s; }
.anim-item:nth-child(2) { animation-delay: 0.1s; }
.anim-item:nth-child(3) { animation-delay: 0.15s; }
.anim-item:nth-child(4) { animation-delay: 0.2s; }
.anim-item:nth-child(5) { animation-delay: 0.25s; }
.anim-item:nth-child(6) { animation-delay: 0.3s; }
.anim-item:nth-child(7) { animation-delay: 0.35s; }
.anim-item:nth-child(8) { animation-delay: 0.4s; }

/* ========== عناوین ========== */
.welcome-title {
    color: #000000;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-align: center;

}

.welcome-subtitle {
    color: #000000;
    font-size: 0.9rem;
    text-align: right;
    margin-bottom: 1.5rem;
    font-weight: 400;
        margin-top: 50px;

}

/* ========== فیلدهای ورودی ========== */
.auth-card .form-control {
    border-radius: 12px;
    border: 1px solid #0096f5;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f9fafb;
    color: #000000;
    text-align: right;
    direction: rtl;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

.auth-card .form-control::placeholder {
    text-align: right;
    direction: rtl;
    color: #6c757d;
    opacity: 1;
}

.auth-card .form-control:focus {
    border-color: #0096f5;
    box-shadow: 0 0 0 3px rgba(0, 150, 245, 0.15);
    background: #ffffff;
    transform: scale(1.02);
}

/* ========== خطای زیر فیلد ========== */
.field-error {
    color: #d32f2f;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    text-align: right;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

.form-control.error {
    border-color: #d32f2f;
}

/* ========== دکمه‌ها ========== */
.btn-sabz {
    background-color: #0096f5;
    border: none;
    color: #ffffff;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    transition: background 0.3s, color 0.3s;
}

.btn-sabz:hover {
    background-color: #575757;
    color: #ffffff;
}

.btn-outline-sabz {
    background-color: transparent;
    border: 2px solid #0096f5;
    color: #0096f5;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.65rem;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    transition: background 0.3s, color 0.3s;
}

.btn-outline-sabz:hover {
    background-color: #0096f5;
    color: #ffffff;
}

/* ========== دکمه در حال لودینگ ========== */
.btn-sabz.loading,
.btn-outline-sabz.loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
    background-color: #0096f5 !important;
    border-color: transparent !important;
}

.btn-sabz.loading::before,
.btn-outline-sabz.loading::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid #ffffff;
    border-radius: 12px;
    opacity: 0.8;
    animation: pulse-border 1s ease-out infinite;
}

@keyframes pulse-border {
    0%   { opacity: 0.8; }
    50%  { opacity: 0.3; }
    100% { opacity: 0.8; }
}

.btn-loading-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-loading-dots span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    animation: dot-bounce 1.2s infinite ease-in-out both;
}

.btn-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.btn-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.btn-loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ========== لینک‌ها ========== */
.auth-link {
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
        font-size: 13px;

}

.auth-link:hover {
    color: #0096f5;
    text-decoration: underline;
}

/* ========== پیام‌های کلی ========== */
.auth-error,
.auth-success {
    border-radius: 12px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

.auth-error {
    background: #ffebee;
    color: #c62828;
}

.auth-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ========== تایمر ========== */
.timer-text {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    color: #575757;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ========== Select ========== */
.auth-card select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230096f5'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 18px;
}

/* ========== موبایل ========== */
@media (max-width: 576px) {
    body.auth-page {
        padding: 5vh 0;
    }

    .auth-container {
        width: 80%;
        max-width: 100%;
    }
}
