/* ==========================================================================
   DYNAMIC POS — DASHBOARD & SIDEBAR REDESIGN
   Single stylesheet, loaded last. Remove the <link> in
   resources/views/layouts/partials/css.blade.php to fully revert.

   Step 1: Sidebar. Step 2: Top bar.
   ========================================================================== */

:root {
  --dp-accent: #2F5BFF;
  --dp-ink-bg: #0B1230;
  --dp-page-bg: #F3F5FA;
  --dp-card-bg: #FFFFFF;
  --dp-border: #E6E9F2;
  --dp-text: #0E1530;
  --dp-muted: #566079;
  --dp-sidebar-text: #B9C1DB;
  --dp-sidebar-section-label: #7B86AA;
  --dp-sidebar-chevron: #6D7898;
  --dp-online-dot: #3DD68C;
}

/* Actually load the fonts the spec asks for — a declared font-family with
   nothing backing it just silently falls back to the system font, which is
   what made sidebar text look unstyled before this fix. */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&display=swap');

.dp-sidebar,
.dp-sidebar * {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* A dark-on-dark sidebar makes the browser's default click/selection
   highlight look like a stray white patch. Keep keyboard focus visible
   (accessibility) but drop the mouse-click ring and tint text selection
   to match the theme instead of the default light-gray/white. */
.dp-sidebar a,
.dp-sidebar button {
  -webkit-tap-highlight-color: transparent;
}

.dp-sidebar a:focus,
.dp-sidebar button:focus {
  outline: none;
}

.dp-sidebar ::selection {
  background: rgba(47, 91, 255, 0.45);
  color: #fff;
}

/* ── Sidebar shell ────────────────────────────────────────────────────── */
.dp-sidebar {
  width: 272px !important;
  max-width: 272px !important;
  background: var(--dp-ink-bg) !important;
  border-right: none !important;
}

/* ── Top logo block ───────────────────────────────────────────────────── */
/* Matches .dp-topbar's 72px so the dark sidebar and white top bar share one
   clean horizontal seam instead of stepping at two different heights. */
.dp-sidebar-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 72px !important;
  padding: 0 16px !important;
  box-sizing: border-box;
}

.dp-logo-square {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--dp-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.dp-brand-text {
  min-width: 0;
}

.dp-brand-name {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-brand-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--dp-sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--dp-online-dot);
  flex-shrink: 0;
  display: inline-block;
}

/* ── Menu wrapper ─────────────────────────────────────────────────────── */
.dp-sidebar-menu {
  padding: 4px 12px 12px !important;
}

/* ── Section labels ───────────────────────────────────────────────────── */
.dp-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dp-sidebar-section-label);
  padding: 14px 12px 6px;
  margin: 0;
}

/* ── Menu items (links without a submenu) ────────────────────────────── */
.dp-menu-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--dp-sidebar-text) !important;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}

.dp-menu-item:hover,
.dp-menu-item:focus {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #fff !important;
  text-decoration: none;
}

.dp-menu-item.dp-active {
  background: var(--dp-accent) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Dropdown toggle whose submenu contains the active page — a softer cue than
   the solid accent pill, since the toggle itself isn't the active page.
   NOT scoped to .dp-menu-item: the presenter also stamps this class alone
   (plus the legacy tw-bg-gray-200/tw-rounded-md/tw-pb-1 utility classes)
   onto the plain wrapping <div> around the whole toggle+submenu block, and
   that div is what showed up as a stray light-gray/white panel against the
   dark sidebar. Un-scoped, this rule reaches both that div and the toggle. */
.dp-active-parent {
  background: transparent !important;
  border-radius: 0 !important;
  padding-bottom: 0 !important;
  color: #fff !important;
  font-weight: 700;
}

.dp-menu-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.dp-menu-icon svg {
  width: 20px !important;
  height: 20px !important;
}

.dp-menu-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dp-chevron {
  width: 16px !important;
  height: 16px !important;
  color: var(--dp-sidebar-chevron);
  flex-shrink: 0;
  transition: transform .15s ease;
}

/* ── Submenu (the ".chiled" container — class name kept, not renamed) ──── */
.dp-submenu {
  padding-left: 32px !important;
}

.dp-submenu .dp-submenu-link {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dp-sidebar-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color .15s ease, color .15s ease;
}

.dp-submenu .dp-submenu-link:hover,
.dp-submenu .dp-submenu-link:focus {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  text-decoration: none;
}

.dp-submenu .dp-submenu-link.dp-active {
  background: var(--dp-accent);
  color: #fff;
  font-weight: 700;
}

/* ── Focus visibility (accessibility) ─────────────────────────────────── */
.dp-sidebar a:focus-visible,
.dp-sidebar button:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

/* ── Responsive: phone widths ─────────────────────────────────────────── */
@media (max-width: 991px) {
  .dp-sidebar {
    width: 272px !important;
    max-width: 85vw !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dp-menu-item,
  .dp-submenu .dp-submenu-link,
  .dp-chevron {
    transition: none !important;
  }
}

/* ==========================================================================
   TOP BAR (Step 2)
   ========================================================================== */

.dp-topbar,
.dp-topbar * {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.dp-topbar {
  /* Matches the sidebar's top logo block: both read the "-800" shade of
     whichever theme colour is active via the same Tailwind gradient
     variable the markup's own tw-from-X-800 class already sets, so this
     stays correct if the business changes its theme colour, not just for
     the default blue. background-image:none drops the 800→900 gradient
     the class also implies, so the whole bar is one flat shade like the
     sidebar's logo block rather than fading toward the darker end. */
  background-image: none !important;
  background-color: var(--tw-gradient-from, #0040C1) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .14) !important;
  min-height: 72px;
}

.dp-topbar-pad {
  padding: 0 36px !important;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.dp-topbar-row {
  width: 100%;
  flex-wrap: wrap;
  row-gap: 10px;
}

.dp-topbar-left {
  gap: 14px !important;
}

.dp-topbar-right {
  gap: 8px !important;
}

.dp-page-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ── 40px outline icon buttons (collapse, register, today's profit) ─────── */
.dp-icon-btn {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border: 1px solid var(--dp-border) !important;
  background: var(--dp-card-bg) !important;
  color: #3A4560 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color .15s ease;
}

.dp-icon-btn:hover,
.dp-icon-btn:focus {
  background: #F3F5FA !important;
  color: #3A4560 !important;
}

.dp-icon-btn svg {
  width: 20px !important;
  height: 20px !important;
  stroke: currentColor !important;
  color: #3A4560 !important;
}

/* One sidebar-toggle icon, not two: .small-view-button (mobile overlay-open) and
   .side-bar-collapse (desktop show/hide) used to swap in/out by breakpoint, which read
   as two redundant icons sitting side by side. .side-bar-collapse's plain
   $('.side-bar').toggle('slow') works regardless of screen size, so it's kept as the
   one visible control at every width and .small-view-button is simply hidden. */
.dp-topbar .small-view-button {
  display: none !important;
}
.dp-topbar .side-bar-collapse {
  display: inline-flex !important;
}

/* ── POS button ───────────────────────────────────────────────────────── */
.dp-pos-btn {
  background: var(--dp-accent) !important;
  color: #fff !important;
  height: 40px;
  padding: 0 16px !important;
  border-radius: 12px !important;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.dp-pos-btn:hover,
.dp-pos-btn:focus {
  background: #2448d6 !important;
  color: #fff !important;
}

/* ── Date chip ────────────────────────────────────────────────────────── */
.dp-date-chip {
  height: 40px;
  padding: 0 14px !important;
  border-radius: 12px !important;
  border: 1px solid var(--dp-border) !important;
  background: var(--dp-card-bg) !important;
  color: #3A4560 !important;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  gap: 8px;
}

.dp-date-chip svg {
  color: #3A4560 !important;
}

/* ── User chip ────────────────────────────────────────────────────────── */
.dp-user-chip {
  height: 40px;
  padding: 0 12px 0 6px !important;
  border-radius: 12px !important;
  border: 1px solid var(--dp-border) !important;
  background: var(--dp-card-bg) !important;
  gap: 8px;
}

.dp-user-chip:hover,
.dp-user-chip:focus {
  background: #F3F5FA !important;
}

.dp-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--dp-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dp-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--dp-text) !important;
  white-space: nowrap;
}

.dp-user-chevron {
  color: var(--dp-muted) !important;
  flex-shrink: 0;
}

/* ── Notifications bell (header-notifications.blade.php isn't part of this
   step's file list, so it's restyled from here via its existing unique id) ── */
#show_unread_notifications {
  width: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  border: 1px solid var(--dp-border) !important;
  background: var(--dp-card-bg) !important;
  color: #3A4560 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

#show_unread_notifications:hover,
#show_unread_notifications:focus {
  background: #F3F5FA !important;
  color: #3A4560 !important;
}

#show_unread_notifications svg {
  width: 20px !important;
  height: 20px !important;
  color: #3A4560 !important;
}

.notifications-menu {
  display: flex;
  align-items: center;
}

/* ── Accessibility: visible keyboard focus ring on every new control ────── */
.dp-topbar .dp-icon-btn:focus-visible,
.dp-topbar .dp-pos-btn:focus-visible,
.dp-topbar .dp-date-chip:focus-visible,
.dp-topbar .dp-user-chip:focus-visible,
.dp-topbar #show_unread_notifications:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

/* ── Responsive: phone widths ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .dp-topbar-pad {
    padding: 0 16px !important;
  }
}

/* ==========================================================================
   DASHBOARD STAT CARDS (Step 3)
   ========================================================================== */

/* The dashboard's own blue gradient banner is still in the markup (other
   sections rely on it being present even though its own inline CSS already
   hides the gradient layer) — this just also whitens the two page-background
   strips so the new white cards don't sit on a lingering blue surface. */
.dp-dashboard,
.dp-dashboard.tw-bg-gradient-to-r {
  background: var(--dp-page-bg) !important;
  background-image: none !important;
}

.dp-dashboard,
.dp-dashboard * {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.dp-welcome-heading {
  font-size: 34px !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em;
  color: var(--dp-text) !important;
}

.dp-welcome-date {
  font-size: 14px;
  color: var(--dp-muted);
  margin-top: 4px;
}

.dp-filter-date-btn {
  height: 44px;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid #DCE0EB !important;
  background: var(--dp-card-bg) !important;
  color: var(--dp-text) !important;
  font-size: 14px;
  font-weight: 700;
  transition: background-color .15s ease;
}

.dp-filter-date-btn:hover,
.dp-filter-date-btn:focus {
  background: #F3F5FA !important;
  color: var(--dp-text) !important;
}

.dp-filter-date-btn:focus-visible {
  outline: 2px solid var(--dp-accent);
  outline-offset: 2px;
}

/* ── Row labels ───────────────────────────────────────────────────────── */
.dp-card-row-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5B6580;
  margin-bottom: 10px;
}

/* ── Card grid ────────────────────────────────────────────────────────── */
.dp-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.dp-card {
  background: var(--dp-card-bg);
  border: 1px solid var(--dp-border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(11, 18, 48, .04);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.dp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(11, 18, 48, .09);
}

@media (prefers-reduced-motion: reduce) {
  .dp-card {
    transition: none;
  }
  .dp-card:hover {
    transform: none;
  }
}

.dp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Icon + label, side by side, vertically centered to the icon's height. */
.dp-card-icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dp-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dp-card-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Icon chip tints (background / icon colour) */
.dp-chip-blue   { background: #E9EEFF; color: #2446C8; }
.dp-chip-green  { background: #E1F5EC; color: #0B7A55; }
.dp-chip-amber  { background: #FDF0D5; color: #9A5B00; }
.dp-chip-red    { background: #FDE7EA; color: #B3213A; }
.dp-chip-orange { background: #FFEADB; color: #B4470C; }
.dp-chip-cyan   { background: #DDF3FA; color: #0A6E8A; }
.dp-chip-violet { background: #EEE8FD; color: #6A3AD0; }

/* Info icon (Net's @show_tooltip span, Sell/Purchase Return's popover <i>) —
   repositioned into the card's top row, right-aligned next to the icon chip. */
.dp-card-info {
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.dp-card-info svg {
  display: block;
}

.dp-card-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--dp-muted);
  margin: 0;
}

.dp-card-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--dp-text);
  margin: 0;
  overflow-wrap: anywhere;
}

/* The currency formatter (public/js/home.js, via accounting.js) writes the
   symbol as plain text ("৳ 1,234.56"), not in its own span, so ::first-letter
   is the only way to mute just the symbol without touching that shared JS. */
.dp-card-value::first-letter {
  color: #7A849E;
  font-weight: 600;
  margin-right: 6px;
}

/* Same look as .dp-card-value, minus the ::first-letter mute - for quantity/percentage
   values with no leading currency symbol, where muting the first digit would look broken. */
.dp-card-value-plain {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--dp-text);
  margin: 0;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   PRODUCT STOCK ALERT CARD & TABLE (Step 4)
   ========================================================================== */

.dp-stock-alert-card {
  border: 1px solid var(--dp-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(11, 18, 48, .04) !important;
}

.dp-stock-alert-card > .tw-p-4 {
  padding: 24px !important;
}

.dp-stock-alert-card,
.dp-stock-alert-card * {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

/* ── Header row ───────────────────────────────────────────────────────── */
.dp-stock-alert-icon {
  width: 44px !important;
  height: 44px !important;
  border: none !important;
  border-radius: 14px !important;
  background: #FDF0D5 !important;
  color: #9A5B00 !important;
}

.dp-stock-alert-icon svg {
  width: 22px !important;
  height: 22px !important;
  color: #9A5B00 !important;
}

.dp-stock-alert-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  color: var(--dp-text) !important;
}

/* The info icon is @show_tooltip()'s own <i class="fa fa-info-circle text-info ...">,
   rendered inline right after the title text — restyled by its existing classes,
   scoped to this card so no other page's .text-info icons are affected. */
.dp-stock-alert-title .text-info {
  color: #7A849E !important;
}

/* ── Export buttons (DataTables Buttons extension — same .dt-button markup,
   restyled here rather than touched in public/js/common.js) ──────────────── */
#stock_alert_table_wrapper .dt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#stock_alert_table_wrapper .dt-button {
  height: 34px;
  padding: 0 12px !important;
  border-radius: 10px !important;
  border: 1px solid #DCE0EB !important;
  background: var(--dp-card-bg) !important;
  color: #3A4560 !important;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
}

#stock_alert_table_wrapper .dt-button:hover,
#stock_alert_table_wrapper .dt-button:focus {
  background: #F3F5FA !important;
  color: #3A4560 !important;
}

/* ── Table ────────────────────────────────────────────────────────────── */
.dp-stock-alert-table {
  border-collapse: separate !important;
  border-spacing: 0;
}

.dp-stock-alert-table > thead > tr > th {
  background: #F6F8FC !important;
  color: #566079 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px !important;
  border-color: #EEF1F7 !important;
}

.dp-stock-alert-table > thead > tr > th:first-child {
  border-top-left-radius: 10px;
}

.dp-stock-alert-table > thead > tr > th:last-child {
  border-top-right-radius: 10px;
}

.dp-stock-alert-table > tbody > tr > td {
  padding: 12px 16px !important;
  font-size: 14px;
  border-color: #EEF1F7 !important;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
/* DataTables generates <td class="dataTables_empty"> itself (text from the
   zeroRecords/emptyTable language strings in common.js) when a server-side
   response has no rows — the real "is it empty" logic is untouched, this
   only dresses up that cell. A CSS ::before/::after pair can't carry two
   independently-styled text lines, so the heading and the muted description
   below it share one font-size/weight/colour here rather than the two-tier
   15px/700 + 13px/400 split in the spec — flagging that as a known
   approximation of a pure-CSS approach. */
.dp-stock-alert-table .dataTables_empty {
  color: transparent !important;
  padding: 48px 16px !important;
  text-align: center !important;
  position: relative;
}

.dp-stock-alert-table .dataTables_empty::before {
  content: '\2713';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #E1F5EC;
  color: #0B7A55;
  font-size: 22px;
  font-weight: 700;
}

.dp-stock-alert-table .dataTables_empty::after {
  content: 'Nothing is running low\AProducts that fall below their alert quantity will be listed here.';
  white-space: pre-line;
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  line-height: 1.7;
}

/* ── Footer: info text + pagination ──────────────────────────────────── */
#stock_alert_table_wrapper .dataTables_info {
  font-size: 13px;
  color: #566079;
}

#stock_alert_table_wrapper .dataTables_paginate .paginate_button {
  height: 34px;
  min-width: 34px;
  padding: 0 10px !important;
  margin-left: 6px !important;
  border-radius: 10px !important;
  border: 1px solid var(--dp-border) !important;
  background: var(--dp-card-bg) !important;
  color: #3A4560 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#stock_alert_table_wrapper .dataTables_paginate .paginate_button.disabled {
  background: #F6F8FC !important;
  color: #7A849E !important;
  border-color: var(--dp-border) !important;
}

#stock_alert_table_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--dp-accent) !important;
  border-color: var(--dp-accent) !important;
  color: #fff !important;
}

#stock_alert_table_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled):not(.current) {
  background: #F3F5FA !important;
}

/* ── Responsive: phone widths ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .dp-stock-alert-card > .tw-p-4 {
    padding: 16px !important;
  }
}

/* ==========================================================================
   OUT-OF-SCOPE SPOT FIX (explicitly requested, not part of the redesign)

   Suppliers/Customers list (#contact_table): the "Actions" dropdown button's
   column was claiming far more width than its content needs. The button
   markup itself (tw-dw-btn ... tw-w-max dropdown-toggle) is shared verbatim
   across ~10 other pages' tables and isn't the cause — this is a plain
   table-layout:auto quirk where a sparsely-filled table hands its leftover
   horizontal space to whichever column has no explicit width, which here is
   the first (action) column. "width:1%" is the standard fix: it tells the
   browser to shrink this column to its content's natural width instead.
   Scoped to #contact_table's id only, so no other table/page is affected.
   ========================================================================== */
#contact_table > thead > tr > th:first-child,
#contact_table > tbody > tr > td:first-child {
  width: 1% !important;
  white-space: nowrap;
}

/* ==========================================================================
   FIX: Font Awesome icons render as a broken "tofu" glyph inside the
   redesigned containers (topbar, sidebar, dashboard cards, stock alert
   card). Each of those containers has a "<container> *" rule above that
   forces every descendant onto the Plus Jakarta Sans font. That also hits
   any <i class="fa fa-*"> icon (e.g. the subscription renew badge in the
   topbar, @show_tooltip() info icons on dashboard cards and the stock
   alert heading) — Plus Jakarta Sans has no glyph at Font Awesome's
   private-use codepoints, so the browser falls back to a blank/garbled box.
   Restoring Font Awesome's own font-family for .fa/.fas/.far/.fab elements
   inside these containers fixes the icon without touching the global
   font-family reset itself.
   ========================================================================== */
.dp-sidebar .fa,
.dp-sidebar .fas,
.dp-sidebar .far,
.dp-topbar .fa,
.dp-topbar .fas,
.dp-topbar .far,
.dp-dashboard .fa,
.dp-dashboard .fas,
.dp-dashboard .far,
.dp-stock-alert-card .fa,
.dp-stock-alert-card .fas,
.dp-stock-alert-card .far {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
}

.dp-sidebar .fab,
.dp-topbar .fab,
.dp-dashboard .fab,
.dp-stock-alert-card .fab {
  font-family: "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
}

/* ============================================================
   INVENTORY: Stock Search / Stock Report
   ============================================================ */

.dp-stock-type-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.dp-stock-type-in {
  background: #E1F5EC;
  color: #0B7A55;
}

.dp-stock-type-out {
  background: #FDE7EA;
  color: #B3213A;
}

.dp-stock-qty-in {
  color: #0B7A55;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dp-stock-qty-out {
  color: #B3213A;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
