/* تنظیمات فونت ایران‌سنس (فایل‌ها را در پوشه fonts قرار بده) */
@font-face {
    font-family: 'IRANSans';
    src: url('IRANSansWeb.woff2') format('woff2');
}

:root {
    --bg-dark: #020617;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.05);
    --cyan: #22d3ee;
    --emerald: #34d399;
    --rose: #fb7185;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --input-bg: #0f172a;
    --input-border: #334155;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'IRANSans', Tahoma, sans-serif; }
body { background-color: var(--bg-dark); color: var(--text-main); direction: rtl; display: flex; height: 100vh; overflow: hidden; }

/* ساختار اصلی */
.app-container { display: flex; width: 100%; height: 100%; }
.sidebar { width: 260px; background: var(--panel-bg); backdrop-filter: blur(12px); border-left: 1px solid var(--panel-border); padding: 1.5rem; display: flex; flex-direction: column; z-index: 50; transition: 0.3s; }
.sidebar-title { text-align: center; font-size: 1.5rem; font-weight: bold; color: var(--cyan); margin-bottom: 2rem; border-bottom: 1px solid var(--panel-border); padding-bottom: 1rem; }
.nav-link { display: block; padding: 1rem; color: var(--text-main); text-decoration: none; border-radius: 0.75rem; margin-bottom: 0.5rem; transition: 0.2s; }
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--cyan); }
.main-content { flex: 1; overflow-y: auto; padding: 2rem; }

/* کارت‌های شیشه‌ای (Glassmorphism) */
.glass-card { background: var(--panel-bg); backdrop-filter: blur(12px); border: 1px solid var(--panel-border); border-radius: 1.5rem; padding: 1.5rem; margin-bottom: 2rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.border-top-cyan { border-top: 4px solid var(--cyan); }
.border-top-emerald { border-top: 4px solid var(--emerald); }
.border-top-rose { border-top: 4px solid var(--rose); }

/* تایپوگرافی */
.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.text-rose { color: var(--rose); }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
h2, h3 { margin-bottom: 1rem; }

/* جداول */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: right; }
th { padding: 1rem; color: var(--text-muted); border-bottom: 1px solid var(--panel-border); font-weight: normal; }
td { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.02); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* فرم‌ها و دکمه‌ها */
.form-group { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.form-control { flex: 1; min-width: 150px; padding: 0.8rem; background: var(--input-bg); border: 1px solid var(--input-border); color: white; border-radius: 0.75rem; outline: none; transition: 0.3s; }
.form-control:focus { border-color: var(--cyan); }
.ltr { direction: ltr; text-align: left; }

.btn { padding: 0.8rem 1.5rem; border: none; border-radius: 0.75rem; font-weight: bold; cursor: pointer; transition: 0.3s; color: #000; display: inline-block; text-align: center; }
.btn-cyan { background: var(--cyan); }
.btn-cyan:hover { background: #06b6d4; }
.btn-emerald { background: var(--emerald); }
.btn-emerald:hover { background: #10b981; }
.btn-gray { background: #475569; color: white; }
.btn-gray:hover { background: #334155; }
.btn-icon { background: rgba(251, 113, 133, 0.1); color: var(--rose); border: none; padding: 0.5rem 0.8rem; border-radius: 0.5rem; cursor: pointer; }

/* مودال */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 100; justify-content: center; align-items: center; }
.modal-content { width: 100%; max-width: 500px; }
textarea.form-control { height: 120px; resize: none; }

/* موبایل */
.mobile-header { display: none; padding: 1rem; background: var(--panel-bg); justify-content: space-between; align-items: center; border-bottom: 1px solid var(--panel-border); }
@media (max-width: 768px) {
    .sidebar { position: fixed; transform: translateX(100%); }
    .sidebar.active { transform: translateX(0); }
    .mobile-header { display: flex; }
    .main-content { padding: 1rem; }
}
/* ========================================================
   استایل‌های فوق‌حرفه‌ای مخصوص موبایل (ریسپانسیو)
   ======================================================== */
.container { padding: 2rem; max-width: 1000px; margin: 0 auto; }

/* اسکرول نرم برای جداول در موبایل */
.table-responsive { 
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; /* اسکرول روان در آیفون */
    border-radius: 0.75rem;
}
table { white-space: nowrap; } /* جلوگیری از به هم ریختن متن جدول */

@media (max-width: 768px) {
    /* تنظیم پدینگ‌ها برای صفحه نمایش کوچک */
    .container { padding: 1rem; }
    .main-content { padding: 1rem; }
    
    /* شکستن گریدها (باکس‌های مالی و فرم‌ها) به زیر هم */
    .grid-3 { grid-template-columns: 1fr; gap: 1rem; }
    
    /* تنظیم سایز فونت‌ها برای خوانایی بهتر در گوشی */
    h1 { font-size: 1.5rem !important; }
    .glass-card h3 { font-size: 1.1rem; }
    .glass-card p { font-size: 1.5rem !important; } /* سایز مبلغ‌ها */
    
    /* تمام‌عرض کردن فرم‌ها و دکمه‌ها */
    .form-group { flex-direction: column; align-items: stretch; }
    .form-control, .btn { width: 100% !important; margin-top: 0.5rem; }
    
    /* اصلاح هدر پنل مشتری در موبایل */
    .flex-between { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}