/* ===== تنظیمات کلی و فونت ===== */
*{ box-sizing: border-box; margin: 0; padding: 0; }

/* فونت معمولی */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansWeb.eot');
    src: url('../fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
         url('../fonts/IRANSansWeb.woff2') format('woff2'),
         url('../fonts/IRANSansWeb.woff') format('woff'),
         url('../fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* فونت بولد */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/IRANSansWeb-Bold.woff2') format('woff2'),
         url('../fonts/IRANSansWeb-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: IRANSans, Tahoma, sans-serif !important;
    direction: rtl;
    background: url('../images/train.png') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
}

body::before {
    content: ""; position: fixed; inset: 0;
    background: rgba(255, 255, 255, 0.88); z-index: -1;
}

input, textarea, select, button {
    font-family: IRANSans, Tahoma, sans-serif !important;
}
::placeholder {
    font-family: IRANSans, Tahoma, sans-serif !important;
}
::-webkit-input-placeholder { font-family: IRANSans !important; }
:-ms-input-placeholder { font-family: IRANSans !important; }
::placeholder { font-family: IRANSans !important; }

/* ===== استایل‌های صفحه لاگین (بدون تغییر جهت حفظ ظاهر قبلی) ===== */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 380px; background: rgba(255, 255, 255, 0.95); padding: 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.login-title { text-align: center; font-size: 20px; margin-bottom: 20px; color: #2f4050; font-weight: bold; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; color: #333; }
.input-wrapper { position: relative; width: 100%; }
.input-wrapper input { width: 100%; padding: 12px 40px 12px 12px; border-radius: 8px; border: 1px solid #ccc; outline: none; font-family: IRANSans; background: #f9f9f9; }
.input-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: #888; }
.submit-btn { width: 100%; padding: 12px; background: #1e88e5; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.error { color: red; text-align: center; margin-bottom: 10px; font-size: 13px; }

/* ===== استایل‌های داشبورد (مشابه تصویر 222) ===== */
.topbar {
    height: 60px; background: #2f4050; color: #fff;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 15px; position: fixed; top: 0; right: 0; left: 0; z-index: 1001;
}

.menu-toggle {
    background: none; border: 1px solid rgba(255,255,255,0.2);
    color: #fff; padding: 5px 10px; border-radius: 5px;
    cursor: pointer; display: none; margin-left: 10px;
}

.sidebar {
    position: fixed; right: 0; top: 60px; width: 250px; bottom: 0;
    background: #34495e; transition: 0.3s; z-index: 1000;
}

.sidebar a {
    display: block; padding: 15px 20px; color: #ecf0f1; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar a:hover { background: #2c3e50; padding-right: 30px; }

.main { margin-right: 250px; margin-top: 60px; padding: 25px; transition: 0.3s; }

/* کارت‌های مدرن مشابه تصویر 222 */
.card { background: #fff; padding: 25px; border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 25px; }
.welcome-box { border-right: 5px solid #1e88e5; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.dash-card {
    background: #fff; height: 150px; border-radius: 15px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; color: #333; transition: 0.3s; border: 1px solid #eee;
}
.dash-card .icon { font-size: 35px; margin-bottom: 10px; transition: 0.3s; }
.dash-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: #1e88e5; }
.dash-card:hover .icon { transform: scale(1.1); }

/* ===== ریسپانسیو (وب‌اپلیکیشن) ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .sidebar { transform: translateX(250px); } /* مخفی کردن سایدبار در موبایل */
    .sidebar.active { transform: translateX(0); } /* نمایش با کلیک منو */
    .main { margin-right: 0; padding: 15px; }
    .topbar-right span { font-size: 11px; }
    .topbar-left { font-size: 11px; }
}

/* ===== استایل شیشه‌ای و مدرن برای فرم‌ها ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-title {
    font-size: 22px;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modern-form .form-group {
    margin-bottom: 20px;
}

.modern-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.modern-form input, .modern-form select, .modern-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.9);
    font-family: 'IRANSans';
    transition: 0.3s;
}

.modern-form input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    outline: none;
}

.wagon-row {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    border: 1px dashed #3498db;
}

/* دکمه‌های مدرن */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-family: 'IRANSans';
    transition: 0.3s;
}

.btn-secondary {
    background: #fff;
    color: #3498db;
    border: 2px solid #3498db;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .glass-card { padding: 15px; border-radius: 15px; }
    .form-title { font-size: 18px; }
}
/* 📱 بهبود نمایش تقویم فقط در موبایل */
@media (max-width: 600px) {

    /* باکس اصلی تقویم */
    .jdp-container {
        position: absolute !important;

        /* 👇 اندازه جمع و جور */
        width: 280px !important;
        max-width: 90% !important;

        /* 👇 زیر input و وسط‌چین */
        left: 50% !important;
        transform: translateX(-50%) !important;

        margin-top: 6px !important;
        border-radius: 14px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.2) !important;
        padding: 6px !important;
    }

    /* هدر ماه */
    .jdp-header {
        font-size: 14px !important;
        padding: 6px !important;
    }

    /* دکمه‌های ماه قبل/بعد */
    .jdp-header button {
        font-size: 14px !important;
        padding: 4px 6px !important;
    }

    /* جدول روزها */
    .jdp-days td {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
    }

    /* فاصله‌ها کمتر */
    .jdp-days, .jdp-months {
        margin: 0 auto !important;
    }
}
/* =========================
   استایل حرفه‌ای تقویم
========================= */

/* رنگ انتخاب شده */
.jdp-days td.selected span {
    background: #27ae60 !important;
    color: #fff !important;
    border-radius: 50% !important;
}

/* هایلایت امروز */
.jdp-days td.today span {
    border: 2px solid #27ae60 !important;
    border-radius: 50% !important;
}

/* hover زیباتر */
.jdp-days td span:hover {
    background: #2ecc71 !important;
    color: #fff !important;
    border-radius: 50% !important;
}

@media (max-width:600px){
    .btn-primary,
    .btn-secondary{
        width:100%;
    }
}

/* کپچا داخل همان استایل input-wrapper اصلی */
.captcha-wrapper{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:10px;
}

/* ردیف بالا */
.captcha-top{
    display:flex;
    gap:10px;
    direction:rtl;
}

/* تصویر */
.captcha-img{
    flex:1;
    height:40px;
    border-radius:8px;
    border:1px solid #ddd;
}

/* دکمه رفرش */
.refresh-btn{
    width:40px;
    height:40px;
    border:none;
    border-radius:8px;
    background:#e9ecef;
    font-size:18px;
    cursor:pointer;
}

/* کادر دور فیلد کپچا */
.captcha-wrapper input{
    border:1px solid #dcdfe3;
    border-radius:10px;
    background:#fff;
    padding:10px;
    width:100%;
    text-align:center;
    font-size:14px;
}

/* افکت فوکوس */
.captcha-wrapper input:focus{
    border-color:#3498db;
    box-shadow:0 0 0 2px rgba(52,152,219,0.1);
}
/* باکس فیلد کپچا */
.captcha-input{
    position:relative;
    margin-top:10px; /* فاصله از تصویر کپچا */
}

/* input کپچا */
.captcha-input input{
    width:100%;
    padding:10px 40px 10px 10px;
    border:1px solid #dcdfe3;
    border-radius:10px;
    background:#fff;
    text-align:center;
    font-size:14px;
    outline:none;
    transition:0.2s;
}

/* آیکن سپر داخل فیلد */
.captcha-lock{
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    width:18px;
    height:18px;
    fill:#9aa0a6;
    pointer-events:none;
}

/* حالت صحیح */
.captcha-success input{
    border-color:#2ecc71;
    background:#ecfff3;
}

/* حالت خطا */
.captcha-error input{
    border-color:#e74c3c;
    background:#fff1f0;
}

/* انیمیشن لرزش */
@keyframes shake {
    0% { transform:translateX(0); }
    25% { transform:translateX(-5px); }
    50% { transform:translateX(5px); }
    75% { transform:translateX(-5px); }
    100% { transform:translateX(0); }
}

.shake{
    animation:shake 0.3s;
}
.success{
    background:#d4edda;
    color:#155724;
    padding:10px;
    border-radius:6px;
    margin-bottom:10px;
}