/* assets/style.css */

/* =========================================
   1. Tailwind Imports
   ========================================= */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* =========================================
   2. Fonts & Base Configuration
   ========================================= */
/* assets/style.css */

/* =========================================
   2. Fonts & Base Configuration
   ========================================= */
/* معرفی فونت‌های محلی */
@font-face {
    font-family: 'Vazirmatn';
    src: url('./fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('./fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('./fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Lalezar';
    src: url('./fonts/Lalezar-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f8fafc; /* Slate-50 */
    color: #1e293b; /* Slate-800 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden; /* جلوگیری از اسکرول بادی اصلی */
}

/* فونت اختصاصی برای تیتر عیار */
.font-lalezar {
    font-family: 'Lalezar', cursive;
}

/* =========================================
   3. Custom Scrollbar (مدرن و باریک)
   ========================================= */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #cbd5e1; /* Slate-300 */
    border-radius: 20px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background-color 0.3s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8; /* Slate-400 */
}

/* پنهان کردن اسکرول‌بار برای نوار تب‌ها (Pills) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* =========================================
   4. Animations
   ========================================= */

/* ظهور نرم (Fade In) */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* حرکت از پایین به بالا (Slide Up) */
@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* انیمیشن آبشاری برای ردیف‌های جدول */
tbody tr {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}
tbody tr:nth-child(1) { animation-delay: 0.05s; }
tbody tr:nth-child(2) { animation-delay: 0.1s; }
tbody tr:nth-child(3) { animation-delay: 0.15s; }
tbody tr:nth-child(4) { animation-delay: 0.2s; }
tbody tr:nth-child(5) { animation-delay: 0.25s; }
tbody tr:nth-child(n+10) { animation-delay: 0.3s; }

/* =========================================
   5. Components & Utilities
   ========================================= */

/* --- Form Inputs --- */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1); /* Teal Glow */
}

/* --- Tables --- */
table th {
    font-weight: 800; /* Extra Bold */
    letter-spacing: -0.01em;
}

/* --- Sidebar Items --- */
.nav-item.bg-teal-50 {
    position: relative;
}
.nav-item.bg-teal-50::before {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    background-color: #0d9488; /* Teal-600 */
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}
.sidebar-logo-shadow {
    filter: drop-shadow(0 4px 6px rgba(13, 148, 136, 0.2));
}

/* --- Glassmorphism --- */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Tab System (Unified) --- */
/* استایل یکپارچه برای تمام تب‌های پروژه */
.settings-tab-btn, 
.kit-tab-btn, 
.sigma-tab-btn {
    @apply px-4 py-2 rounded-full text-xs font-bold text-slate-500 transition-colors duration-200 whitespace-nowrap cursor-pointer z-10 relative;
}

/* حالت فعال */
.settings-tab-btn.active, 
.kit-tab-btn.active, 
.sigma-tab-btn.active {
    @apply text-slate-800;
}

/* حالت هاور */
.settings-tab-btn:not(.active):hover, 
.kit-tab-btn:not(.active):hover, 
.sigma-tab-btn:not(.active):hover {
    @apply text-slate-600;
}


/* assets/style.css */

#qc-pill-bg, 
#bi-pill-bg, 
#ver-pill-bg, 
#log-pill-bg, 
#qa-pill-bg, 
#tool-pill-bg,
#settings-pill-bg,
#kit-pill-bg {
    position: absolute;  /* این خط اضافه شد */
    top: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 9999px;
    z-index: 0;
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* =========================================
   6. Print Styles
   ========================================= */
@media print {
    /* مخفی کردن تمام اجزای اضافی */
    body * {
        visibility: hidden;
    }
    
    /* مخفی کردن سایدبار و دکمه‌های کنترلی */
    #sidebar-container, .no-print, button, .modal {
        display: none !important;
    }

    /* نمایش محتوای اصلی و سربرگ */
    #print-area, #print-area * {
        visibility: visible;
    }

    #print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        background: white;
    }

    /* استایل سربرگ اجباری */
    .print-header {
        display: flex !important;
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
        padding-bottom: 10px;
        align-items: center;
        justify-content: space-between;
    }

    /* واترمارک اجباری عیار (گوشه پایین) */
    .ayar-watermark {
        position: fixed;
        bottom: 10px;
        left: 10px;
        font-family: 'Lalezar', sans-serif;
        font-size: 10px;
        color: #94a3b8;
        opacity: 0.7;
        display: flex !important;
        align-items: center;
        gap: 5px;
    }
}

/* مخفی کردن المان‌های پرینت در حالت عادی */
.print-header, .ayar-watermark {
    display: none;
}