﻿/* ═══════════════════════════════════════════════
   01-BASE — پایه (فونت، متغیرها، Reset)
   ═══════════════════════════════════════════════ */

/* ─── Font: Vazirmatn (Local — بدون نیاز به اینترنت) ─── */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت روی کل برنامه */
body, input, button, select, textarea {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

/* ─── متغیرها (رنگ‌ها و اندازه‌ها) ─── */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #EEF2FF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --bg: #F3F4F6;
    --card: #FFFFFF;
    --text: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --sidebar-bg: #1F2937;
    --sidebar-hover: #374151;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Utility ─── */
.hidden {
    display: none !important;
}

.muted {
    color: var(--text-muted);
}
/* ═══ SVG Icons در Sidebar ═══ */
.nav-group-icon.has-svg,
.nav-icon.has-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .nav-group-icon.has-svg svg {
        width: 16px;
        height: 16px;
        opacity: 1;
    }

    .nav-icon.has-svg svg {
        width: 18px;
        height: 18px;
    }

/* رنگ آیکن‌ها با state */
.nav-item:hover .nav-icon.has-svg svg {
    color: #fff;
}

.nav-item.active .nav-icon.has-svg svg {
    color: #fff;
}

.nav-item .nav-icon.has-svg svg {
    color: #9CA3AF;
    transition: color 0.15s;
}

/* آیکن‌های توی کارت‌ها (اختیاری) */
[data-icon] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

    [data-icon] svg {
        width: 18px;
        height: 18px;
        color: currentColor;
    }