/* ==========================================================================
   One clean font for the whole admin (every page that uses views/userHome.php).
   Before: body / headings asked for 'Public Sans' (never loaded -> fallback font with browser-made "fake" bold),
   tables used Segoe UI, the account theme Montserrat, the logo Helvetica - 4-5 fonts mixed on one page.
   Now: Inter (the project's own variable font, assets/vendor/Inter-4.1 - every weight is real, nothing faked),
   smooth rendering, even-width numbers in tables. Icon fonts and monospace bits (sale no, IMEI ...) keep theirs:
   only elements / text classes are set, never <i> or icon classes.
   ========================================================================== */
@font-face {
    font-family: "ZiafInter"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("../../assets/vendor/Inter-4.1/web/InterVariable.woff2") format("woff2");
}
@font-face {
    font-family: "ZiafInter"; font-style: italic; font-weight: 100 900; font-display: swap;
    src: url("../../assets/vendor/Inter-4.1/web/InterVariable-Italic.woff2") format("woff2");
}

:root {
    --zf-font: "ZiafInter", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-font-sans-serif: var(--zf-font);
    --bs-body-font-family: var(--zf-font);
}

html body {
    font-family: var(--zf-font) !important;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility; font-synthesis: none; font-optical-sizing: auto;
    font-feature-settings: "cv11", "ss03";   /* Inter: straight-legged l / open digits - easier to read */
    letter-spacing: normal;
}

/* elements / classes that the old stylesheets gave their own (unloaded or mixed) font - their children inherit */
html body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, p, label, legend, table, #datatable, .table,
        .main-header .logo, .main-sidebar, .dropdown-menu, .modal, .tooltip, .popover, .select2-container, .select2-results,
        .datepicker, .sweet-alert, .swal2-popup, .sticky-notes-badge, .pc-scope):not([class*="ziaf_font"]):not([class*="mono"]) {
    font-family: var(--zf-font) !important;
}
/* form controls do not inherit by default */
html body :is(button, input, optgroup, select, textarea, .btn, .form-control, .form-select):not([class*="ziaf_font"]):not([class*="mono"]):not([class*="fa-"]):not([class^="ri-"]):not([class*=" ri-"]):not([class*="ti-"]) {
    font-family: var(--zf-font) !important; font-synthesis: none;
}
html body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) { letter-spacing: -0.01em; }

/* ---------- lighter, cleaner weights (the old CSS set 700-800 on labels / card titles / buttons - looked heavy) ----------
   page titles 700, card titles 600, labels 500, table headers 600, table text 400, buttons 600, fields 400 */
html body :is(label, .usr-field label, .usr-label, .sales-filter-label, .sh-f label, .pu-f label, .pd-sup-body label,
        .form-group > label, .control-label):not(.btn) {
    font-weight: 500 !important; letter-spacing: 0;
}
html body :is(.usr-card-title, .pd-table-head h3, .fmd-section h4, .card-title, .card-header, .box-title,
        .modal-title, .fm-list-title, .fm-card-title, .ac-card-h h3) {
    font-weight: 600 !important; letter-spacing: 0;
}
html body :is(h4, h5, h6, .h4, .h5, .h6) { font-weight: 600; }
html body :is(table thead th, table tfoot th) { font-weight: 600 !important; }
html body :is(table tbody td) { font-weight: 400; }
html body #datatable tbody td { font-weight: 400 !important; }
html body :is(.btn, button, .usr-btn-ghost, .usr-btn-add, .usr-btn-primary, .usr-btn-generate, .usr-file-preview-btn,
        .ph-chip, .sl-chip, .sales-clear-btn, .pd-chip, .pd-back, .pd-submit, .usr-chip, .usr-count-pill):not([class*="fa-"]) {
    font-weight: 600 !important;
}
html body :is(input, select, textarea, .form-control, .select2-selection__rendered) { font-weight: 400 !important; }
/* big page titles stay strong but not cramped */
html body :is(.ph-hero-txt h2, .sl-hero-txt h2, .pd-hero-txt h2, section.content-header .top-left-header, section.content-header h1, section.content-header h2, section.content-header h3) {
    font-weight: 700 !important; letter-spacing: -0.005em !important;
}

/* numbers line up in tables, totals and KPI figures */
html body :is(table td, table th, .sl-amt, .sl-kpi b, .pd-kpi b, .ph-count, .usr-count-pill) { font-variant-numeric: tabular-nums; }

/* keep the intentional monospace bits monospace (sale no, references, IMEI, codes) */
html body :is(code, pre, kbd, samp, .sl-saleno, .badge-sale-no, .sh-imei, .ph-mono, .pu-ref, .sh-saleno) {
    font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace !important;
}
