/* ─── فونت اسنپ (اصلاح شده) ─── */
@font-face {
    font-family: 'Snapp';
    src: url('/assets/Snapp1.9-ExtraBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap; /* برای لود سریع‌تر و جلوگیری از پرش متن */
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Snapp', Tahoma, Arial, sans-serif;
    /* بک‌گراند مدرن و ملایم‌تر (طوسی-آبی بسیار روشن) */
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 30px 15px 50px;
    color: #1e293b; /* رنگ متن خواناتر و نرم‌تر از مشکی خالص */
    direction: rtl;
    line-height: 1.6;
}

/* ─── Container اصلی ─── */
.container {
    max-width: 720px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px; /* گوشه‌های گردتر و مدرن‌تر */
    /* سایه نرم و چندلایه (Soft layered shadow) */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* ─── هدر فرم ─── */
.form-header {
    background: linear-gradient(135deg, #00d26a 0%, #00964b 100%); /* رنگ سبز زنده‌تر و شاداب‌تر */
    color: #ffffff;
    text-align: center;
    padding: 40px 24px;
    position: relative;
}

.form-header .logo {
    width: 85px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); /* سایه ملایم برای لوگو */
}

.form-header h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ─── بخش‌های فرم ─── */
.form-section {
    padding: 32px 32px 12px;
    border-bottom: 1px dashed #e2e8f0; /* خط جداکننده نقطه‌چین و مدرن */
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.1rem;
    color: #00a651;
    margin-bottom: 24px;
    display: inline-block;
    position: relative;
}

/* خط تزئینی زیر عنوان هر بخش */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 4px;
    background: #00a651;
    border-radius: 4px;
}

/* ─── گروه فیلدها ─── */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 580px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-section {
        padding: 24px 20px 8px;
    }
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.required {
    color: #ef4444;
    margin-right: 4px;
    font-weight: bold;
}

/* ─── استایل فیلدهای ورودی ─── */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 12px; /* گوشه‌های گرد برای فیلدها */
    font-family: inherit;
    font-size: 0.95rem;
    color: #0f172a;
    background: #f8fafc; /* پس‌زمینه بسیار محو طوسی */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* انیمیشن نرم‌تر */
    outline: none;
}

/* افکت جذاب هنگام تایپ و کلیک روی فیلد */
input:focus,
textarea:focus,
select:focus {
    border-color: #00a651;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.15); /* هاله سبز رنگ */
    transform: translateY(-1px); /* یک پرش میکرو برای حس پویایی */
}

input[readonly] {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
    border-color: transparent;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* فیلد آپلود فایل */
input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
    background: #ffffff;
    border: 1px dashed #94a3b8; /* بوردر خط‌چین برای فایل */
}
input[type="file"]:hover {
    border-color: #00a651;
    background: #f0fdf4;
}

/* ─── خطاها و راهنما ─── */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.error-msg {
    display: none;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 6px;
    font-weight: 600;
}

.field-hint {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

/* ─── دکمه ثبت (طراحی شناور و مدرن) ─── */
.form-actions {
    padding: 32px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.btn-submit {
    background: linear-gradient(135deg, #00d26a 0%, #00964b 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 16px 56px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(0, 166, 81, 0.5); /* سایه رنگی همرنگ دکمه */
}

.btn-submit:hover {
    transform: translateY(-3px); /* بالا آمدن دکمه */
    box-shadow: 0 12px 24px -8px rgba(0, 166, 81, 0.6); /* تعمیق سایه */
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: #94a3b8;
}

/* ─── لودر دکمه ─── */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── پیام موفقیت ─── */
.success-message {
    text-align: center;
    padding: 80px 32px;
}

.success-icon {
    font-size: 4.5rem;
    margin-bottom: 24px;
    animation: scaleUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    0%   { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.success-message h2 {
    font-size: 1.8rem;
    color: #00a651;
    margin-bottom: 16px;
}

.success-message p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
}

.success-note {
    font-size: 0.85rem !important;
    color: #94a3b8 !important;
    margin-top: 24px !important;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

/* ─── صفحه خطا ─── */
.error-box {
    text-align: center;
    padding: 80px 32px;
}

.error-box h2 {
    font-size: 1.5rem;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-box p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 32px;
}

.btn-back {
    display: inline-block;
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 32px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-new-form {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -6px rgba(234, 88, 12, 0.4);
}

.btn-new-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(234, 88, 12, 0.5);
}
