@import url('./font.css');

/* =========================================
   ریست پایه و تنظیمات عمومی
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
    font-family: 'Peyda', sans-serif !important;
}
/* =========================================
   کارت‌های صفحه اصلی (انتخاب فرم)
   ========================================= */
.home-header {
    text-align: center;
    margin-bottom: 40px;
}
.home-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}
.form-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}
.form-card {
    background: #fff;
    padding: 50px 30px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: block;
}
.form-card:hover {
    border-color: #9DA287;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.form-card h3 {
    color: #5a6268;
    margin-bottom: 15px;
    font-size: 22px;
}
.form-card p {
    color: #888;
    font-size: 14px;
    line-height: 1.8;
}

/* استایل دکمه ورود در هدر */
.header-nav-wrapper {
    display: flex;
    align-items: center;
}
.btn-login {
    background-color: #9DA287;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    transition: 0.3s;
}
.btn-login:hover {
    background-color: #334155;
    transform: translateY(-2px);
}

/* =========================================
   ساختار اصلی پنل مدیریت (سایدبار و محتوا)
   ========================================= */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #334155;
    color: #fff;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 20px 0;
}

.sidebar-title {
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 18px;
}

.sidebar-menu a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 12px 20px;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #334155;
    color: #fff;
    border-right: 4px solid #3b82f6;
}

.main-content {
    flex: 1;
    margin-right: 250px;
    padding: 30px;
}

/* کارت‌ها و تیترها در پنل مدیریت */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-x: auto;
}

/* جداول پنل مدیریت */
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.table th,
.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.table tr:hover {
    background-color: #f1f5f9;
}

/* بج‌ها (نشان‌های وضعیت) */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-blue {
    background-color: #e0f2fe;
    color: #0369a1;
}

.badge-purple {
    background-color: #f3e8ff;
    color: #7e22ce;
}

/* فرم‌ها و دکمه‌های پنل مدیریت */
.form-select {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    font-weight: 500;
}

.btn-outline {
    border: 1px solid #475569;
    color: #475569;
    background: transparent;
}

.btn-outline:hover {
    background-color: #475569;
    color: #fff;
}

.btn-primary {
    background-color: #3b82f6;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2563eb;
}

/* یوتیلیتی‌ها (کلاس‌های کمکی) */
.text-end { text-align: left; direction: ltr; }
.text-center { text-align: center; }
.text-muted { color: #64748b; }
.text-danger { color: #ef4444; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-4 { margin-bottom: 20px; }
.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 20px; }

/* =========================================
   استایل‌های پرینت (برای چاپ فرم‌ها در پنل)
   ========================================= */
.print-container {
    max-width: 210mm;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
}

.print-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title {
    background-color: #f1f5f9;
    padding: 8px 12px;
    font-weight: 700;
    border-right: 4px solid #334155;
    margin: 25px 0 15px 0;
    font-size: 15px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-full {
    grid-column: span 2;
}

.info-row {
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 5px;
}

.doc-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    max-height: 250px;
}

.declaration-box {
    background-color: #f8fafc;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: #fff;
    }
    @page {
        margin: 1cm;
        size: A4;
    }
}

/* =========================================
   استایل‌های بخش کاربری (Public Layout)
   ========================================= */
.public-body {
    background-color: #f4f5f7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header & Footer عمومی */
.public-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: #5a6268;
    margin: 0;
    font-weight: 900;
    font-size: 24px;
}

.logo span {
    font-size: 12px;
    color: #999;
}

.top-nav a {
    margin-right: 20px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: 0.3s;
}

.top-nav a:hover {
    color: #9DA287;
}

.public-main {
    flex: 1;
    padding: 40px 0;
}

.public-footer {
    text-align: center;
    padding: 20px 0;
    background-color: #fff;
    color: #888;
    font-size: 13px;
    margin-top: auto;
}

/* =========================================
   فرم‌های مرحله‌ای و طراحی متریال (کاربری)
   ========================================= */
.form-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}


/* نوار پیشرفت (Progress Bar) */
.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    flex-wrap: wrap; /* اجازه شکسته شدن به خط بعد را می‌دهد */
    gap: 15px; /* فاصله بین دایره‌ها وقتی در چند خط قرار می‌گیرند */
}

/* خط‌چین پس‌زمینه در حالت دسکتاپ */
.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(to right, #ccc 0, #ccc 5px, transparent 5px, transparent 10px);
    z-index: 1;
    transform: translateY(-50%);
}

.step-circle {
    width: 45px; /* اندازه دایره‌ها کمی بزرگتر شد تا زیباتر شود */
    height: 45px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #ccc;
    position: relative;
    z-index: 2;
    transition: 0.3s;
    font-size: 16px;
}

.step-circle.active {
    border-color: #9DA287;
    background-color: #9DA287;
    color: #fff;
}

.step-circle.completed {
    border-color: #9DA287;
    color: #9DA287;
}
/* محتوای مراحل */
.step-content {
    display: none;
    animation: fadeIn 0.5s;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-section-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

/* ورودی‌های متریال دیزاین (Material Design Inputs) */
.material-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 10px 5px;
    font-family: inherit;
    font-size: 14px;
    background: transparent;
    outline: none;
    transition: 0.3s;
    color: #333;
}

.material-input:focus {
    border-bottom-color: #9DA287;
}

.material-input::placeholder {
    color: #aaa;
}

.input-group {
    margin-bottom: 30px;
    position: relative;
}

.input-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #444;
}

/* دکمه‌های رادیویی و چک‌باکس‌های اختصاصی */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.custom-radio input {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #eee;
    margin-left: 8px;
    position: relative;
    transition: 0.2s;
}

.custom-radio input:checked + .checkmark {
    background: #9DA287;
    border-color: #9DA287;
}

/* برای چک‌باکس‌ها، مربع نمایش می‌دهیم */
.custom-checkbox .checkmark {
    border-radius: 4px;
}

/* دکمه‌های ناوبری فرم (قبل، بعد، ثبت) */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-next, .btn-prev, .btn-submit {
    padding: 10px 30px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.btn-next, .btn-submit {
    background-color: #9DA287;
    color: #fff;
}

.btn-next:hover, .btn-submit:hover {
    background-color: #6b8494;
}

.btn-prev {
    background-color: transparent;
    color: #888;
    border: 1px solid #ccc;
}

.btn-prev:hover {
    background-color: #f4f4f4;
    color: #333;
}

/* استایل برای باکس‌های تاریخ */
.date-box {
    border: 1px solid #ced4da !important; /* رنگ حاشیه */
    border-radius: 6px; /* گردی گوشه‌ها */
    padding: 8px 10px; /* فاصله داخلی */
    background-color: #fff; /* پس‌زمینه سفید */
    font-family: inherit;
    font-size: 14px;
    color: #495057;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out;
}

.date-box:focus {
    border-color: #80bdff !important; /* رنگ حاشیه هنگام کلیک */
    outline: 0;
}

.date-wrapper {
    display: flex;
    gap: 10px; /* فاصله بین باکس‌های روز، ماه و سال */
    width: 100%;
}


/* =========================================
   صفحه لاگین مدیریت
   ========================================= */
.login-wrapper { max-width: 400px; margin: 80px auto; }
.login-card { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.login-title { text-align: center; font-size: 22px; color: #1e293b; margin-bottom: 30px; font-weight: 900; }


/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .grid-full {
        grid-column: span 1;
    }
    .step-circle {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    .form-box {
        padding: 20px;
    }

     /* تنظیمات نوار پیشرفت در موبایل */
    .step-indicator {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 25px 0px; 
        justify-items: center;
        margin-bottom: 40px;
        position: relative;
        
        /* جادوی رسم خطوط در پس‌زمینه (کاملاً زیر دایره‌ها قرار می‌گیرد) */
        background-image: 
            /* خط ردیف اول (80 درصد عرض کادر) */
            repeating-linear-gradient(to right, #ccc 0, #ccc 5px, transparent 5px, transparent 10px),
            /* خط ردیف دوم (60 درصد عرض کادر) */
            repeating-linear-gradient(to right, #ccc 0, #ccc 5px, transparent 5px, transparent 10px);
        
        /* طول دقیق خطوط برای نرسیدن به لبه‌ها */
        background-size: 80% 2px, 60% 2px;
        
        /* موقعیت‌دهی دقیق خطوط دقیقاً از وسط دایره اول تا وسط دایره آخر */
        background-position: center 19px, right 25% top 84px;
        background-repeat: no-repeat;
    }

    /* مخفی کردن خط ممتد دسکتاپ */
    .step-indicator::before {
        display: none;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 15px;
        border-width: 2px;
        position: relative;
        z-index: 2; /* این باعث می‌شود دایره‌ها همیشه روی خط پس‌زمینه قرار بگیرند */
    }

    /* حذف هرگونه خط اضافی که قبلاً ساخته بودیم */
    .step-circle::before, .step-circle::after {
        display: none !important;
    }

    @media print {
    .no-print {
        display: none !important;
    }
}
}

/* //////////////////////////////////////////////// */

