/* ============================================
   RAMOZ DESIGN SYSTEM — RESET + TOKENS
   Hybrid theme: dark sidebar + light content
   ============================================ */
@import url('./vazirmatn-local.css');

:root {
    /* Primary (Brand) */
    --brand-50: #eff6ff;
    --brand-100: #dbeafe;
    --brand-200: #bfdbfe;
    --brand-300: #93c5fd;
    --brand-400: #60a5fa;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;

    /* Sidebar (Dark) */
    --sidebar-bg: #111827;
    --sidebar-bg-hover: #1f2937;
    --sidebar-bg-active: #2563eb;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;
    --sidebar-border: #1f2937;
    --sidebar-width: 264px;
    --sidebar-width-collapsed: 76px;
    --sidebar-header-bg: #0b1120;

    /* Topbar */
    --topbar-bg: #ffffff;
    --topbar-border: #e5e7eb;

    /* Content Backgrounds */
    --bg-page: #f4f6f8;
    --bg-card: #ffffff;
    --bg-hover: #f8fafc;
    --bg-subtle: #f1f5f9;

    /* Text */
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;

    /* Neutral Grays */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Status Colors */
    --success-50: #ecfdf5;
    --success-100: #d1fae5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    --info-50: #eff6ff;
    --info-100: #dbeafe;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    --info-700: #1d4ed8;

    /* Success semantic aliases */
    --success: var(--success-500);
    --success-hover: var(--success-600);
    --warning: var(--warning-500);
    --warning-hover: var(--warning-600);
    --danger: var(--danger-500);
    --danger-hover: var(--danger-600);
    --info: var(--info-500);
    --info-hover: var(--info-600);

    /* Borders */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 22px;
    --radius-full: 9999px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Typography */
    --font-sans: 'Vazirmatn', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 0.95rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.375rem;
    --font-size-2xl: 1.75rem;
    --font-size-3xl: 2.25rem;

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Layout */
    --topbar-height: 64px;
    --container-max: 1500px;

    /* ============ LEGACY ALIASES (old theme compat) ============ */
    --primary-color: var(--brand-600);
    --secondary-color: var(--gray-600);
    --text-color: var(--text-primary);
    --border-color: var(--border-medium);
    --white: #ffffff;
    --primary: var(--brand-600);
    --primary-dark: var(--brand-700);
    --secondary: var(--gray-600);
    --dark: var(--gray-900);
    --dark-color: var(--gray-900);
    --gray: var(--text-muted);
    --accent: var(--brand-500);
    --accent-color: var(--brand-500);
    --radius: var(--radius-lg);
    --shadow: var(--shadow-md);
    --shadow-hover: var(--shadow-lg);
    --danger-200: var(--danger-100);
    --warning-200: var(--warning-100);
}

/* ============ RESET ============ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-page);
    direction: rtl;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover { color: var(--brand-700); }

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

ul, ol { list-style: none; }

button {
    font-family: var(--font-sans);
    cursor: pointer;
}

input, select, textarea {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
}

table { border-collapse: collapse; width: 100%; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
    border: 2px solid var(--bg-page);
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in { animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
