/* ============================================================
   UTILITIES — Reusable Flexbox, Grid, Spacing, Typography & Theme
   Strictly complies with <= 350 lines limit
   ============================================================ */

/* ── Flexbox & Grid Helpers ───────────────────────────────── */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-none { display: none !important; }

.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.self-center { align-self: center; }
.self-start { align-self: flex-start; }
.self-end { align-self: flex-end; }

/* ── Responsive Screen Helpers (Mobile/Tablet/Desktop) ──────── */
@media (max-width: 640px) {
    .sm-flex-col { flex-direction: column !important; }
    .sm-w-100 { width: 100% !important; }
    .sm-hidden { display: none !important; }
    .sm-text-left { text-align: left !important; }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .md-flex-wrap { flex-wrap: wrap !important; }
}

/* ── Gaps ──────────────────────────────────────────────────── */
.gap-025 { gap: 0.25rem; }
.gap-035 { gap: 0.35rem; }
.gap-04  { gap: 0.4rem; }
.gap-05  { gap: 0.6rem; }
.gap-075 { gap: 0.85rem; }
.gap-1   { gap: 1.25rem; }
.gap-125 { gap: 1.5rem; }
.gap-15  { gap: 1.75rem; }
.gap-2   { gap: 2.25rem; }

/* ── Margins ───────────────────────────────────────────────── */
.m-0 { margin: 0 !important; }
.m-auto { margin: 0 auto; }
.mt-0 { margin-top: 0; }
.mt-025 { margin-top: 0.25rem; }
.mt-05 { margin-top: 0.5rem; }
.mt-075 { margin-top: 0.85rem; }
.mt-1 { margin-top: 1.25rem; }
.mt-125 { margin-top: 1.5rem; }
.mt-15 { margin-top: 1.75rem; }
.mt-2 { margin-top: 2.25rem; }

.mb-0 { margin-bottom: 0 !important; }
.mb-025 { margin-bottom: 0.25rem; }
.mb-05 { margin-bottom: 0.5rem; }
.mb-075 { margin-bottom: 0.85rem; }
.mb-1 { margin-bottom: 1.25rem; }
.mb-125 { margin-bottom: 1.5rem; }
.mb-15 { margin-bottom: 1.75rem; }
.mb-2 { margin-bottom: 2.25rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* ── Paddings ──────────────────────────────────────────────── */
.p-0 { padding: 0 !important; }
.p-05 { padding: 0.6rem; }
.p-075 { padding: 0.85rem; }
.p-1 { padding: 1.35rem; }
.p-125 { padding: 1.5rem; }
.p-15 { padding: 1.85rem; }
.p-2 { padding: 2.25rem; }

.py-025 { padding-top: 0.35rem; padding-bottom: 0.35rem; }
.py-05 { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.py-1 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.px-05 { padding-left: 0.6rem; padding-right: 0.6rem; }
.px-075 { padding-left: 0.85rem; padding-right: 0.85rem; }
.px-1 { padding-left: 1.25rem; padding-right: 1.25rem; }

/* ── Typography & Text Alignments ──────────────────────────── */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-xs { font-size: 0.72rem; }
.text-sm { font-size: 0.82rem; }
.text-base { font-size: 0.88rem; }
.text-md { font-size: 0.95rem; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.35rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-indigo { color: var(--accent-indigo); }
.text-white { color: #ffffff; }

/* ── Borders & Dividers ────────────────────────────────────── */
.border-top { border-top: 1px solid var(--border-subtle); }
.border-bottom { border-bottom: 1px solid var(--border-subtle); }
.border-subtle { border: 1px solid var(--border-subtle); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }

/* ── Widths & Sizing ───────────────────────────────────────── */
.w-100 { width: 100%; }
.w-auto { width: auto; }
.w-40px { width: 40px; }
.cursor-pointer { cursor: pointer; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* ── Additional Sizing & Layout Helpers ─────────────────────── */
.text-xs-muted { font-size: 0.75rem; color: var(--text-muted); }
.text-sm-muted { font-size: 0.85rem; color: var(--text-muted); }
.text-emerald { color: var(--accent-emerald); }
.text-crimson { color: var(--accent-crimson); }
.h3-clean { margin: 0; font-size: 1.2rem; color: var(--text-primary); }
.h4-clean { margin: 0; font-size: 1.05rem; color: var(--text-primary); }
.section-title-clean { margin: 0 0 0.75rem 0; color: var(--accent-indigo); font-size: 0.95rem; }
.form-card-box {
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
}
.filter-input-sm {
    max-width: 200px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
}
.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Responsive Form Grid Utilities ────────────────────────── */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.grid-5-col {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem;
}
.text-xxs {
    font-size: 0.7rem;
}

@media (max-width: 1024px) {
    .grid-5-col {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 768px) {
    .grid-2-col, .grid-3-col, .grid-4-col, .grid-5-col {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* ── Premium Executive Overview Card Grids ─────────────────── */
.overview-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}
.overview-stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.45rem 1.6rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.overview-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.overview-stat-val {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0.45rem 0 0.25rem 0;
    font-family: var(--font-heading);
}


