/* ============================================================
   APP THEME OVERRIDES

   Loaded LAST in header.ejs so these rules win without anyone
   editing a vendor stylesheet. bootstrap.min.css sets
   `body{...background-color:#ffffff}`; that file is a minified
   third-party build and patching it would be undone by the next
   Bootstrap update, so the override lives here instead.
   ============================================================ */

/* ------------------------------------------------------------
   APP FONT  (per-user, see custom_js/font_pref.js)

   Everything reads the font through one variable, so a user's
   choice is a single property write on <html> rather than a
   stylesheet swap.

   The sidebar selectors below are repeated because
   sidebar_redesign.css pins 'Plus Jakarta Sans' on them with
   !important. Matching that is the only way the user's choice
   reaches the sidebar as well as the page body.

   Icon elements are deliberately NOT included. Tabler, Font
   Awesome, Material and dripicons are fonts whose glyphs ARE the
   icons - pointing them at a text face renders boxes. They keep
   their own font-family declarations untouched.
   ------------------------------------------------------------ */
:root{
  --app-font:'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body{
  font-family:var(--app-font);
}

.sm-sidebar-wrap,
.sm-sidebar-wrap .sm-menu-item,
.sm-sidebar-wrap .sm-menu-hint,
.sm-sidebar-wrap .sm-order-status,
.sm-logo-text,
.rs-sidebar,
.sk-card{
  font-family:var(--app-font) !important;
}
.sm-fs-item [data-tip]::after{
  font-family:var(--app-font);
}

/* ------------------------------------------------------------
   PAGE BACKGROUND

   The app was pure white end to end, so nothing had an edge:
   a white card on a white page has only its shadow to separate
   it, and on the report pages the list sat on the same white as
   everything around it.

   #f6f7fb is the same neutral the report sidebar already uses
   for --rs-bg, so the shell reads as one system rather than two
   greys that nearly match.

   `html` is painted too: on a short page the browser fills the
   overscroll area from the root element, and leaving it white
   gives a white band under the content on rubber-band scroll.
   ------------------------------------------------------------ */
html{background-color:#f6f7fb}

body{
  background-color:#f6f7fb;
}

/* The shell wrappers must stay see-through or they would paint
   their own white back over the tint. app.min.css gives
   .content-page only margins, so this is belt-and-braces against
   a theme update adding a background to them. */
.content-page,
.content-page > .content,
#wrapper{
  background-color:transparent;
}

/* ------------------------------------------------------------
   SURFACES THAT MUST STAY WHITE

   .card-box already declares #fff in bootstrap.min.css, so cards
   lift off the tint on their own. These are the ones that were
   relying on the body being white and would otherwise sit on
   grey with no surface of their own.
   ------------------------------------------------------------ */
.table,
.dataTables_wrapper .table,
table.dataTable{
  background-color:#fff;
}

/* A table rendered straight onto the page, with no card around
   it, needs its own edge now that the page behind it is tinted. */
.table-responsive > .table,
.dataTables_wrapper{
  background-color:#fff;
  border-radius:8px;
}

/* Modals, dropdowns and popovers paint their own white already,
   but several in this app inherit it. Pin them. */
.modal-content,
.dropdown-menu,
.popover{
  background-color:#fff;
}

/* ------------------------------------------------------------
   PRINT / PDF

   A tinted page would come out as a grey wash on every printed
   report and every PDF generated from a print view. Force white
   back for print only.
   ------------------------------------------------------------ */
@media print{
  html,
  body,
  .content-page,
  .content-page > .content{
    background-color:#fff !important;
  }
}
