﻿/* ===== Existing Styles (دست نزن) ===== */

.grid-title-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-family: 'B Yekan', Tahoma;
    font-weight: 600;
    font-size: 14px;
    background-color: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    direction: rtl;
}

.grid-title-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .grid-title-left iconify-icon {
        font-size: 16px;
        color: #60a5fa;
    }

.grid-title-right {
    font-size: 12px;
    color: #94a3b8;
}


/* =================================================
   🎯 STAGE B — VISIBILITY CONTROL (CSS ONLY)
================================================= */

body.card-mode .grid-header {
    display: none;
}

body.report-mode .grid-header {
    display: flex;
}

/* =================================================
   🎨 STAGE B — POLISH #1
   Grid Title + Toolbar Spacing (SAFE)
   ✅ CSS ONLY — NO JS — NO GRID TOUCH
================================================= */

/* Base Grid Header Layout */
.grid-header {
    display: flex;
    flex-direction: column;
    gap: 4px; /* فاصله Title و Subtitle */
    margin-bottom: 6px; /* فاصله از Toolbar */
}

    /* Title */
    .grid-header .grid-title {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
    }

    /* Subtitle */
    .grid-header .grid-subtitle {
        font-size: 12px;
        opacity: 0.85;
    }

    /* Toolbar spacing harmony */
    .grid-header + .mb-3 {
        margin-top: 4px !important;
    }

/* Desktop refinement */
@media (min-width: 768px) {
    .grid-header {
        margin-bottom: 8px;
    }
}

/* Mobile refinement */
@media (max-width: 767px) {
    .grid-header {
        margin-bottom: 6px;
    }
}
