/* ═══════════════════════════════════════════════════════
   main.css — متغیرها، ریست، و استایل‌های پایه
   ═══════════════════════════════════════════════════════ */

/* ─── متغیرهای CSS ─────────────────────────────────────── */
:root {
    /* رنگ‌های اصلی */
    --primary:        #1d4ed8;
    --primary-dark:   #1e40af;
    --primary-light:  #dbeafe;
    --primary-hover:  #2563eb;
    --secondary:      #7c3aed;
    --secondary-light:#ede9fe;
    --success:        #047857;
    --success-light:  #d1fae5;
    --warning:        #b45309;
    --warning-light:  #fef3c7;
    --danger:         #b91c1c;
    --danger-light:   #fee2e2;
    --info:           #0369a1;
    --info-light:     #e0f2fe;

    /* رنگ‌های پس‌زمینه */
    --bg:             #f1f5f9;
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --surface-3:      #f1f5f9;

    /* رنگ‌های متن */
    --text:           #0f172a;
    --text-muted:     #475569;
    --text-light:     #94a3b8;
    --text-inverse:   #ffffff;

    /* کادرها */
    --border:         #e2e8f0;
    --border-dark:    #cbd5e1;

    /* سایدبار */
    --sidebar-bg:     #0f172a;
    --sidebar-text:   #94a3b8;
    --sidebar-active: #1d4ed8;
    --sidebar-hover:  #1e293b;
    --sidebar-border: #1e293b;
    --sidebar-width:  265px;

    /* ابعاد */
    --header-height:  64px;
    --radius-xs:      4px;
    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      14px;
    --radius-xl:      20px;
    --radius-full:    9999px;

    /* سایه‌ها */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
    --shadow-md: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 25px rgba(0,0,0,.10), 0 10px 10px rgba(0,0,0,.04);

    /* فونت و انیمیشن */
    --font:       'Tahoma', 'Arial', sans-serif;
    --font-mono:  'Courier New', monospace;
    --transition: all .2s cubic-bezier(.4,0,.2,1);
}

/* ─── ریست جهانی ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    direction: rtl;
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

input, textarea, select, button {
    font-family: var(--font);
    font-size: .9rem;
}

ul, ol { list-style: none; }

/* ─── سودمند ─────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-1        { gap: .5rem; }
.gap-2        { gap: 1rem; }
.mt-1         { margin-top: .5rem; }
.mt-2         { margin-top: 1rem; }
.mb-1         { margin-bottom: .5rem; }
.mb-2         { margin-bottom: 1rem; }
.w-100        { width: 100%; }
.no-print     {}
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
