@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary-color: #0d9488; /* teal-600 */
    --bg-overlay: rgba(255, 255, 255, 0.7);
}

html, body {
    font-family: 'Vazir', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --- اسکرول‌بار مدرن و باریک --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- افکت شیشه‌ای (Glassmorphism) --- */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* --- انیمیشن‌های ریز --- */
.hover-scale {
    transition: transform 0.2s ease-in-out;
}
.hover-scale:hover {
    transform: scale(1.02);
}

/* --- استایل کارت‌های داشبورد (بهبود یافته) --- */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.03);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* تنظیم Tooltip نمودارها برای راست‌چین */
.chartjs-tooltip {
    direction: rtl;
    text-align: right;
}

/* --- ریسپانسیو جداول (Mobile Cards) --- */
@media (max-width: 768px) {
    table thead { display: none; }
    
    table tbody tr {
        display: flex;
        flex-direction: column;
        background: white;
        border: 1px solid #f3f4f6;
        margin-bottom: 1rem;
        border-radius: 1rem; /* گردتر */
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    }
    
    table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 0;
        border-bottom: 1px dashed #f3f4f6;
    }
    
    table tbody td:last-child {
        border-bottom: none;
        justify-content: center;
        padding-top: 1rem;
    }
    
    table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.85rem;
        margin-left: 1rem;
    }
}