/* PulseCRM custom styles — plain CSS (Tailwind CDN cannot process @apply). */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    border-radius: .5rem; padding: .5rem .875rem;
    font-size: .875rem; font-weight: 500; line-height: 1.2;
    border: 1px solid transparent; cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s, border-color .15s;
    text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary  { background:#4f46e5; color:#fff; box-shadow: 0 1px 2px rgba(79,70,229,.25); }
.btn-primary:hover { background:#4338ca; }
.btn-outline  { background:#fff; border-color:#cbd5e1; color:#334155; }
.btn-outline:hover { background:#f8fafc; }
.btn-danger   { background:#e11d48; color:#fff; }
.btn-danger:hover { background:#be123c; }
.btn-ghost    { color:#475569; background:transparent; }
.btn-ghost:hover { background:#f1f5f9; }

/* ---------- Cards ---------- */
.card {
    background:#fff; border-radius:.75rem; border:1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.kpi { background:#fff; border-radius:.75rem; border:1px solid #e2e8f0;
       box-shadow:0 1px 2px rgba(15,23,42,.04); padding:1.25rem; }

/* ---------- Form ---------- */
.input {
    width:100%; border-radius:.5rem; border:1px solid #cbd5e1;
    padding:.5rem .75rem; font-size:.875rem; background:#fff; color:#0f172a;
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color:#6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.35); }
.input-sm { padding:.3rem .5rem; font-size:.75rem; }
.label {
    display:block; font-size:.75rem; font-weight:500; color:#475569; margin-bottom:.25rem;
}

/* ---------- Tom Select (searchable dropdowns) — match .input ---------- */
.ts-wrapper { width:100%; }
.ts-wrapper.single .ts-control,
.ts-wrapper.multi  .ts-control {
    width:100%; border-radius:.5rem; border:1px solid #cbd5e1;
    padding:.4rem .65rem; min-height: 2.25rem;
    font-size:.875rem; background:#fff; color:#0f172a;
    box-shadow:none; transition:border-color .15s, box-shadow .15s;
}
.ts-wrapper.single .ts-control > input,
.ts-wrapper.multi  .ts-control > input { font-size:.875rem; }
.ts-wrapper.focus .ts-control,
.ts-wrapper.single.input-active .ts-control {
    border-color:#6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.35);
}
.ts-wrapper.disabled .ts-control { background:#f1f5f9; color:#64748b; cursor:not-allowed; }
.ts-wrapper .ts-dropdown {
    border:1px solid #cbd5e1; border-radius:.5rem;
    box-shadow:0 8px 20px rgba(15,23,42,.12);
    margin-top:.25rem; font-size:.875rem; z-index:60;
}
.ts-wrapper .ts-dropdown .ts-dropdown-content { max-height:250px; overflow-y:auto; }
.ts-wrapper .ts-dropdown .option { padding:.45rem .75rem; }
.ts-wrapper .ts-dropdown .option.active,
.ts-wrapper .ts-dropdown .active { background:#eef2ff; color:#3730a3; }
.ts-wrapper .ts-dropdown .option .ts-sub {
    display:block; font-size:.7rem; color:#64748b; margin-top:1px;
}
.ts-wrapper.multi .ts-control > div {
    background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe;
    border-radius:.375rem; padding:.1rem .4rem; font-size:.75rem;
}
/* keep dropdown above modal */
.ts-dropdown { z-index:70; }

/* ---------- Skeleton loader ---------- */
.skel-line {
    display:block; height:.875rem; border-radius:.375rem;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: skel-shimmer 1.2s infinite linear;
}
@keyframes skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.btn-sm { padding: .25rem .5rem; font-size: .75rem; }

/* ---------- Tables ---------- */
.table { width:100%; font-size:.875rem; text-align:left; border-collapse: collapse; }
.table thead {
    background:#f8fafc; font-size:.7rem; text-transform:uppercase; letter-spacing:.05em; color:#64748b;
}
.table th, .table td { padding:.75rem 1rem; border-bottom:1px solid #f1f5f9; vertical-align: middle; }
.table tbody tr:hover { background: rgba(248,250,252,.6); }

/* Scrollable table container with sticky header.
   Wrap any <table class="table"> in <div class="table-wrap"> to enable. */
.table-wrap {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    border-radius: .5rem;
}
.table-wrap thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
    box-shadow: inset 0 -1px 0 #e2e8f0;
}
.input-xs { font-size:.75rem; padding:.125rem .375rem; height:auto; }

/* ---------- Modal ---------- */
.modal-backdrop {
    position:fixed; inset:0; z-index:40; background:rgba(15,23,42,.4);
    backdrop-filter: blur(2px);
}
.modal-shell {
    position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center; padding:1rem;
}
.modal-card {
    background:#fff; border-radius:.75rem; border:1px solid #e2e8f0;
    box-shadow:0 10px 25px rgba(15,23,42,.15);
    width:100%; max-width:32rem; padding:1.5rem; max-height: 90vh; overflow-y: auto;
    position: relative;
}
/* Close button for modals (sits inline inside modal headers) */
.modal-close-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; min-height: 0 !important;
    border-radius: .375rem; background: transparent; border: 0;
    cursor: pointer; color: #64748b; padding: 0; flex-shrink: 0;
    transition: background-color .15s, color .15s;
}
.modal-close-btn:hover { background: #f1f5f9; color: #0f172a; }
html.dark .modal-close-btn { color: var(--c-muted, #94a3b8); }
html.dark .modal-close-btn:hover { background: var(--c-hover, #1f2937); color: var(--c-text, #f1f5f9); }

/* ---------- Tabs ---------- */
.tab {
    padding:.5rem .75rem; font-size:.875rem; font-weight:500; color:#64748b;
    border-bottom:2px solid transparent; cursor:pointer;
}
.tab:hover { color:#1e293b; }
.tab.active { color:#4338ca; border-bottom-color:#4f46e5; }

/* ---------- Toasts ---------- */
#toastWrap {
    position: fixed; top: 1rem; right: 1rem; z-index: 60;
    display: flex; flex-direction: column; gap: .5rem;
}
.toast {
    display: flex; align-items: center; gap: .5rem;
    background: #fff; border: 1px solid #e2e8f0; border-left-width: 4px;
    border-radius: .5rem; padding: .625rem .875rem; font-size: .875rem;
    box-shadow: 0 4px 12px rgba(15,23,42,.1);
    min-width: 220px; max-width: 380px;
    transition: opacity .2s, transform .2s;
}
.toast.success { border-left-color:#10b981; color:#065f46; }
.toast.error   { border-left-color:#e11d48; color:#9f1239; }
.toast.info    { border-left-color:#4f46e5; color:#3730a3; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background:#94a3b8; }

/* ---------- Sidebar ---------- */
.app-sidebar {
    width: 240px;
    transition: width .2s ease;
}
.app-sidebar.collapsed { width: 70px; }

/* Hide all text labels when collapsed */
.app-sidebar.collapsed .menu-text { display: none; }

/* Tighter padding & centered icons in collapsed mode */
.app-sidebar.collapsed .sb-head { padding-left: .5rem; padding-right: .5rem; justify-content: center; }
.app-sidebar.collapsed .sb-link { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
.app-sidebar.collapsed nav      { padding-left: .375rem; padding-right: .375rem; }

/* Toggle-button icon swap */
.app-sidebar .sb-icon-expand   { display: none; }
.app-sidebar.collapsed .sb-icon-collapse { display: none; }
.app-sidebar.collapsed .sb-icon-expand   { display: inline-block; }

/* Optional: hover-expand peek (desktop only). Uncomment to enable. */
/*
@media (min-width: 1024px) {
    .app-sidebar.collapsed:hover { width: 240px; }
    .app-sidebar.collapsed:hover .menu-text { display: block; }
    .app-sidebar.collapsed:hover .sb-head,
    .app-sidebar.collapsed:hover .sb-link  { justify-content: flex-start; padding-left: 1rem; padding-right: 1rem; }
}
*/

/* ===== Chip-style multi-select ===== */
.chip-native { display: none !important; }
.chip-select { position: relative; width: 100%; }
.chip-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: .375rem;
  min-height: 2.5rem; padding: .375rem .625rem;
  background: #fff; border: 1px solid rgb(226 232 240);
  border-radius: .5rem; cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.chip-box:hover { border-color: rgb(203 213 225); }
.chip-box:focus, .chip-box.open {
  outline: none;
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
.chip-list { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .25rem .125rem .625rem;
  background: rgb(238 242 255); color: rgb(67 56 202);
  border-radius: 9999px; font-size: .8125rem; font-weight: 500;
  line-height: 1.25rem; max-width: 100%;
}
.chip-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.125rem; height: 1.125rem; border-radius: 9999px;
  color: rgb(99 102 241); font-size: 1rem; line-height: 1;
  cursor: pointer; border: 0; background: transparent; padding: 0;
}
.chip-x:hover { background: rgb(199 210 254); color: rgb(49 46 129); }
.chip-add {
  font-size: .8125rem; color: rgb(148 163 184);
  padding: .125rem .25rem; user-select: none;
}
.chip-box.open .chip-add { color: rgb(99 102 241); }
.chip-caret {
  margin-left: auto; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid rgb(148 163 184); transition: transform .15s;
}
.chip-box.open .chip-caret { transform: rotate(180deg); }

.chip-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid rgb(226 232 240);
  border-radius: .5rem; box-shadow: 0 10px 25px -5px rgba(15,23,42,.15);
  z-index: 60; overflow: hidden;
}
.chip-search-row {
  padding: .5rem; border-bottom: 1px solid rgb(241 245 249);
}
.chip-search-input {
  width: 100%; padding: .375rem .5rem;
  border: 1px solid rgb(226 232 240); border-radius: .375rem;
  font-size: .875rem; outline: none;
}
.chip-search-input:focus {
  border-color: rgb(99 102 241);
  box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}
.chip-options { max-height: 240px; overflow-y: auto; padding: .25rem; }
.chip-opt {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: .5rem .625rem; border-radius: .375rem;
  cursor: pointer; font-size: .875rem; color: rgb(30 41 59);
}
.chip-opt:hover, .chip-opt.active {
  background: rgb(238 242 255); color: rgb(49 46 129);
}
.chip-opt-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-opt-sub { font-size: .75rem; color: rgb(100 116 139); }
.chip-empty { padding: 1rem; text-align: center; color: rgb(148 163 184); font-size: .875rem; }

/* ===== Row-link (clickable rows / cards) ===== */
tr[data-href], .card[data-href] { transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; cursor: pointer; }
tr[data-href]:hover { background: #f9fafb; }
.card[data-href]:hover { box-shadow: 0 4px 12px -2px rgba(15,23,42,.08); transform: translateY(-1px); }
tr[data-href] td:last-child, .card[data-href] .card-actions { position: relative; }
/* Right-arrow indicator on hover (table rows only) */
tr[data-href] .row-arrow {
  display: inline-block; opacity: 0; transform: translateX(-4px);
  transition: opacity .15s ease, transform .15s ease;
  color: rgb(99 102 241); margin-left: .25rem; vertical-align: middle;
}
tr[data-href]:hover .row-arrow { opacity: 1; transform: translateX(0); }

/* =========================================================
   DARK MODE + MOBILE LAYOUT LAYER (additive — does not break
   existing pages). Uses Tailwind's `class` strategy: when
   <html class="dark"> is set, the variables below flip and
   every existing component updates without page-by-page edits.
   ========================================================= */

:root {
  --c-bg:        #f8fafc;
  --c-surface:   #ffffff;
  --c-surface-2: #f8fafc;
  --c-border:    #e2e8f0;
  --c-border-2:  #cbd5e1;
  --c-text:      #0f172a;
  --c-text-2:    #334155;
  --c-muted:     #64748b;
  --c-muted-2:   #94a3b8;
  --c-primary:   #4f46e5;
  --c-primary-2: #4338ca;
  --c-hover:     #f1f5f9;
  --c-row-hover: #f9fafb;
  --c-input-bg:  #ffffff;
  --c-thead:     #f8fafc;
}
html.dark {
  --c-bg:        #0b1220;
  --c-surface:   #111827;
  --c-surface-2: #0f172a;
  --c-border:    #1f2937;
  --c-border-2:  #334155;
  --c-text:      #f1f5f9;
  --c-text-2:    #cbd5e1;
  --c-muted:     #94a3b8;
  --c-muted-2:   #64748b;
  --c-primary:   #6366f1;
  --c-primary-2: #818cf8;
  --c-hover:     #1f2937;
  --c-row-hover: #1e293b;
  --c-input-bg:  #0f172a;
  --c-thead:     #0f172a;
}

/* Body / app shell */
html.dark body { background: var(--c-bg); color: var(--c-text); }

/* Cards / KPIs */
html.dark .card,
html.dark .kpi {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.45);
}
html.dark .card[data-href]:hover { background: var(--c-row-hover); }

/* Buttons */
html.dark .btn-outline {
  background: var(--c-surface);
  border-color: var(--c-border-2);
  color: var(--c-text-2);
}
html.dark .btn-outline:hover { background: var(--c-hover); color: var(--c-text); }
html.dark .btn-ghost { color: var(--c-text-2); }
html.dark .btn-ghost:hover { background: var(--c-hover); }

/* Inputs / labels */
html.dark .input {
  background: var(--c-input-bg);
  border-color: var(--c-border-2);
  color: var(--c-text);
}
html.dark .input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(99,102,241,.35); }
html.dark .input::placeholder { color: var(--c-muted-2); }
html.dark .label { color: var(--c-muted); }

/* Tom Select */
html.dark .ts-wrapper.single .ts-control,
html.dark .ts-wrapper.multi  .ts-control {
  background: var(--c-input-bg); border-color: var(--c-border-2); color: var(--c-text);
}
html.dark .ts-wrapper .ts-dropdown {
  background: var(--c-surface); border-color: var(--c-border-2); color: var(--c-text);
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
html.dark .ts-wrapper .ts-dropdown .option.active,
html.dark .ts-wrapper .ts-dropdown .active { background: rgba(99,102,241,.15); color: #c7d2fe; }
html.dark .ts-wrapper.multi .ts-control > div {
  background: rgba(99,102,241,.18); color: #c7d2fe; border-color: rgba(99,102,241,.35);
}

/* Tables */
html.dark .table thead { background: var(--c-thead); color: var(--c-muted); }
html.dark .table th, html.dark .table td { border-bottom-color: var(--c-border); }
html.dark .table tbody tr:hover { background: var(--c-row-hover); }
html.dark .table-wrap thead th { background: var(--c-thead); box-shadow: inset 0 -1px 0 var(--c-border); }
html.dark tr[data-href]:hover { background: var(--c-row-hover); }

/* Modals */
html.dark .modal-backdrop { background: rgba(0,0,0,.65); }
html.dark .modal-card {
  background: var(--c-surface); border-color: var(--c-border); color: var(--c-text);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

/* Tabs */
html.dark .tab { color: var(--c-muted); }
html.dark .tab:hover { color: var(--c-text); }
html.dark .tab.active { color: #c7d2fe; border-bottom-color: var(--c-primary); }

/* Toasts */
html.dark .toast { background: var(--c-surface); border-color: var(--c-border); color: var(--c-text); }
html.dark .toast.success { color: #6ee7b7; }
html.dark .toast.error   { color: #fda4af; }
html.dark .toast.info    { color: #c7d2fe; }

/* Skeleton loader */
html.dark .skel-line {
  background: linear-gradient(90deg, #1f2937 0%, #334155 50%, #1f2937 100%);
  background-size: 200% 100%;
}

/* Scrollbar */
html.dark ::-webkit-scrollbar-thumb { background: #334155; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #475569; }

/* Sidebar */
html.dark .app-sidebar { background: var(--c-surface) !important; border-color: var(--c-border) !important; }
html.dark .app-sidebar .sb-head { border-color: var(--c-border) !important; }
html.dark .app-sidebar nav a { color: var(--c-text-2); }
html.dark .app-sidebar nav a:hover { background: var(--c-hover); color: var(--c-text); }
html.dark .app-sidebar nav a.active,
html.dark .app-sidebar nav a[aria-current="page"] { background: rgba(99,102,241,.15); color: #c7d2fe; }
html.dark .app-sidebar nav .bg-indigo-50 { background: rgba(99,102,241,.15) !important; }
html.dark .app-sidebar nav .text-indigo-700 { color: #c7d2fe !important; }

/* Topbar */
html.dark header.app-topbar { background: rgba(17,24,39,.85) !important; border-color: var(--c-border) !important; }
html.dark header.app-topbar h1 { color: var(--c-text); }
html.dark header.app-topbar p  { color: var(--c-muted); }
html.dark header.app-topbar .topbar-icon-btn { color: var(--c-text-2); }
html.dark header.app-topbar .topbar-icon-btn:hover { background: var(--c-hover); }
html.dark header.app-topbar input { background: var(--c-input-bg); border-color: var(--c-border-2); color: var(--c-text); }
html.dark header.app-topbar input::placeholder { color: var(--c-muted-2); }

/* Footer */
html.dark footer { background: var(--c-surface); border-color: var(--c-border); color: var(--c-muted); }

/* Common Tailwind utility overrides used across pages */
html.dark .bg-white       { background-color: var(--c-surface) !important; }
html.dark .bg-slate-50    { background-color: var(--c-surface-2) !important; }
html.dark .bg-slate-100   { background-color: var(--c-hover) !important; }
html.dark .bg-gray-50     { background-color: var(--c-surface-2) !important; }
html.dark .bg-gray-100    { background-color: var(--c-hover) !important; }
html.dark .text-slate-900 { color: var(--c-text) !important; }
html.dark .text-slate-800 { color: var(--c-text) !important; }
html.dark .text-slate-700 { color: var(--c-text-2) !important; }
html.dark .text-slate-600 { color: var(--c-text-2) !important; }
html.dark .text-slate-500 { color: var(--c-muted) !important; }
html.dark .text-slate-400 { color: var(--c-muted-2) !important; }
html.dark .text-gray-900  { color: var(--c-text) !important; }
html.dark .text-gray-700  { color: var(--c-text-2) !important; }
html.dark .text-gray-500  { color: var(--c-muted) !important; }
html.dark .border-slate-200 { border-color: var(--c-border) !important; }
html.dark .border-slate-300 { border-color: var(--c-border-2) !important; }
html.dark .border-gray-200  { border-color: var(--c-border) !important; }
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color: var(--c-border) !important; }
html.dark .divide-gray-100  > :not([hidden]) ~ :not([hidden]) { border-color: var(--c-border) !important; }
html.dark .hover\:bg-slate-50:hover  { background-color: var(--c-hover) !important; }
html.dark .hover\:bg-slate-100:hover { background-color: var(--c-hover) !important; }
html.dark .hover\:bg-gray-50:hover   { background-color: var(--c-hover) !important; }

/* Chip multi-select dark */
html.dark .chip-box { background: var(--c-input-bg); border-color: var(--c-border-2); }
html.dark .chip-panel { background: var(--c-surface); border-color: var(--c-border-2); }
html.dark .chip-search-input { background: var(--c-input-bg); border-color: var(--c-border-2); color: var(--c-text); }
html.dark .chip-options .chip-opt { color: var(--c-text-2); }
html.dark .chip-options .chip-opt:hover, html.dark .chip-options .chip-opt.active { background: rgba(99,102,241,.18); color: #c7d2fe; }
html.dark .chip { background: rgba(99,102,241,.18); color: #c7d2fe; }
html.dark .chip-x { color: #c7d2fe; }
html.dark .chip-x:hover { background: rgba(99,102,241,.30); }

/* =========================================================
   MOBILE SIDEBAR DRAWER (off-canvas) + general responsive
   ========================================================= */

/* Mobile: sidebar slides in from left when body has .sb-open */
@media (max-width: 1023px) {
  .app-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 50;
    width: 260px !important;
    display: flex !important;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
  }
  body.sb-open .app-sidebar { transform: translateX(0); }
  .sb-backdrop {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(15,23,42,.45);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  body.sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
  body.sb-open { overflow: hidden; }
}

/* Touch-friendly minimum height for buttons and inputs on small screens */
@media (max-width: 640px) {
  .btn { min-height: 40px; padding: .5rem .875rem; }
  .btn-sm { min-height: 32px; }
  .input { min-height: 40px; }
  /* Compact card padding on mobile */
  .card.p-5, .card.p-6 { padding: .75rem !important; }
  .kpi { padding: 1rem; }
  /* Filter rows wrap nicely */
  .card.p-4.flex { gap: .5rem; }
  /* Make most page-level buttons full width when stacked alone in a row.
     Pages that explicitly opt-out can use .btn-fixed. */
  .filter-bar > .input,
  .filter-bar > select.input,
  .filter-bar > .ts-wrapper { width: 100%; }
}

/* Pipeline horizontal scroll on small screens.
   Pages should use class="pipeline-board" together with grid;
   pipeline.php is patched accordingly. */
.pipeline-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: .5rem;
}
.pipeline-board > * {
  flex: 0 0 86vw;
  max-width: 320px;
  min-width: 260px;
  scroll-snap-align: start;
}
@media (min-width: 1024px) {
  .pipeline-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
  .pipeline-board > * { flex: initial; max-width: none; min-width: 0; }
}

/* Theme toggle button (topbar) */
.theme-btn { position: relative; }
.theme-btn .theme-sun { display: none; }
html.dark .theme-btn .theme-moon { display: none; }
html.dark .theme-btn .theme-sun  { display: inline-block; }

/* Notification filter pills */
.nf-pill {
  font-size: .7rem; font-weight: 500; line-height: 1;
  padding: .375rem .625rem; border-radius: 9999px;
  background: rgb(241 245 249); color: rgb(71 85 105);
  border: 0; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.nf-pill:hover { background: rgb(226 232 240); color: rgb(15 23 42); }
.nf-pill.nf-active { background: #4f46e5; color: #fff; }
html.dark .nf-pill { background: rgba(148,163,184,.15); color: var(--c-text-2); }
html.dark .nf-pill:hover { background: rgba(148,163,184,.25); color: var(--c-text); }
html.dark .nf-pill.nf-active { background: var(--c-primary); color: #fff; }

/* =========================================================
   GLOBAL SEARCH DROPDOWN (App.globalSearch)
   ========================================================= */
.gs-results {
  position: absolute;
  z-index: 200;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .625rem;
  box-shadow: 0 8px 28px -4px rgba(15,23,42,.14);
  max-height: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gs-section { padding: .25rem 0; border-bottom: 1px solid #f1f5f9; }
.gs-section:last-child { border-bottom: none; }
.gs-section-header {
  display: flex; align-items: center; gap: .375rem;
  padding: .4rem .75rem;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #94a3b8;
}
.gs-item {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .45rem .75rem;
  text-decoration: none; color: #0f172a;
  transition: background-color .1s;
  font-size: .875rem;
}
.gs-item:hover { background: #f8fafc; color: #4f46e5; }
.gs-item-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.gs-item-sub  { color: #64748b; font-size: .75rem; }
.gs-item-branch { color: #94a3b8; font-size: .7rem; margin-left: auto; }
.gs-empty, .gs-loading { padding: .75rem 1rem; text-align: center; color: #94a3b8; font-size: .875rem; }

/* Dark mode */
html.dark .gs-results { background: var(--c-surface); border-color: var(--c-border); box-shadow: 0 8px 28px rgba(0,0,0,.5); }
html.dark .gs-section { border-color: var(--c-border); }
html.dark .gs-item { color: var(--c-text); }
html.dark .gs-item:hover { background: var(--c-hover); color: #818cf8; }
html.dark .gs-item-sub { color: var(--c-muted); }
html.dark .gs-item-branch { color: var(--c-muted-2); }

/* Mobile: full width */
@media (max-width: 640px) {
  .gs-results { position: fixed; top: 56px; left: .5rem; right: .5rem; max-height: 60vh; }
}

/* =========================================================
   BULK ACTION TOOLBAR (App.bulk)
   ========================================================= */
[data-bulk-toolbar] {
  display: flex; align-items: center; gap: .625rem; flex-wrap: wrap;
  padding: .5rem .875rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: .5rem;
  font-size: .875rem;
  color: #1e40af;
}
[data-bulk-toolbar].hidden { display: none; }
[data-bulk-toolbar] .bulk-label { font-weight: 500; white-space: nowrap; }
[data-bulk-toolbar] .bulk-actions { display: flex; gap: .375rem; flex-wrap: wrap; margin-left: auto; }

html.dark [data-bulk-toolbar] {
  background: rgba(99,102,241,.12);
  border-color: rgba(99,102,241,.3);
  color: #c7d2fe;
}

/* Line clamp utility (for notification messages) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   v22 � Branding + mobile polish + dark-mode consistency.
   Appended (not refactored) so no existing rules change.
   ============================================================ */

/* Brand logo container in sidebar � keep image on white card so transparent
   logos remain readable in dark mode too. */
.brand-logo { background:#ffffff; }
html.dark .brand-logo { background:#ffffff; border-color: rgba(255,255,255,.08); }

/* Hide the welcome subtitle on phones (saves space in topbar). */
@media (max-width: 640px) {
  header.app-topbar p { display: none; }
  header.app-topbar h1 { font-size: 1rem; }
  header.app-topbar { padding-left: .25rem; padding-right: .25rem; }
  header.app-topbar > div { padding-left: .75rem; padding-right: .75rem; height: 56px; gap: .25rem; }
  /* Logout / profile chevron */
  header.app-topbar .topbar-icon-btn .lucide-chevron-down { display: none; }
}

/* Mobile-first responsive hardening (<= 768px) */
@media (max-width: 768px) {
  main { padding-left: .75rem !important; padding-right: .75rem !important; padding-top: .75rem !important; }

  /* Stop wide grids from overflowing on phones */
  .grid.grid-cols-3,
  .grid.grid-cols-4,
  .grid.grid-cols-5,
  .grid.grid-cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .grid.md\:grid-cols-3,
  .grid.md\:grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Dashboard stat cards: 2 columns on phones */
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .5rem !important; }

  /* Cards & KPIs span full width with tighter padding */
  .card { width: 100%; }
  .kpi  { padding: .875rem; }
  .card.p-4 { padding: .75rem !important; }

  /* Form controls fill available width; selects & buttons in filter rows stack */
  .input, select.input, textarea.input { width: 100% !important; max-width: 100% !important; }

  /* Tables become horizontally scrollable instead of overflowing the screen */
  .table-wrap, .overflow-x-auto { -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; }

  /* Charts respect the card width */
  canvas { max-width: 100% !important; height: auto !important; }

  /* Topbar hygiene */
  .topbar, header.app-topbar { padding: 0 !important; }

  /* Modals: bottom-sheet feel */
  .modal-card { width: 100% !important; max-width: 100% !important; border-radius: 1rem 1rem 0 0 !important; margin-top: auto; }

  /* Page-level "+ New" / action buttons sit nicely when wrapped */
  .action-buttons { display: flex; flex-direction: column; gap: .5rem; }
  .action-buttons > * { width: 100%; }
}

/* Extra: stat cards 2-up on really small screens, single-column on tiny */
@media (max-width: 380px) {
  .dashboard-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Dark-mode consistency patches ----------
   Ensure components that hard-code white survive dark mode. */
html.dark body { background: var(--c-bg, #0f172a) !important; color: var(--c-text, #e5e7eb) !important; }
html.dark main { background: transparent; }
html.dark .card,
html.dark .kpi { background: var(--c-surface, #1e293b) !important; border-color: var(--c-border, #334155) !important; color: var(--c-text, #e5e7eb); }
html.dark .btn-outline { background: var(--c-surface, #1e293b); border-color: var(--c-border-2, #475569); color: var(--c-text, #e5e7eb); }
html.dark .btn-outline:hover { background: var(--c-hover, #334155); }
html.dark .btn-ghost:hover { background: var(--c-hover, #334155); }
html.dark .text-black { color: var(--c-text, #e5e7eb) !important; }
html.dark .bg-white\/80 { background-color: rgba(30,41,59,.85) !important; }
html.dark .bg-white\/90 { background-color: rgba(30,41,59,.92) !important; }
html.dark .bg-indigo-50\/40 { background-color: rgba(99,102,241,.10) !important; }
html.dark .bg-indigo-50 { background-color: rgba(99,102,241,.15) !important; }
html.dark .text-indigo-700 { color: #a5b4fc !important; }
html.dark .text-indigo-600 { color: #818cf8 !important; }

/* Topbar dropdowns & lists */
html.dark [data-dropdown-menu] { background: var(--c-surface, #1e293b) !important; border-color: var(--c-border, #334155) !important; color: var(--c-text); }
html.dark [data-dropdown-menu] a:hover,
html.dark [data-dropdown-menu] .notif-item:hover { background: var(--c-hover, #334155) !important; }
html.dark .notif-item { border-bottom-color: var(--c-border, #334155) !important; }

/* ============================================================
   v23 - APP-LIKE MOBILE SHELL: bottom nav, FAB, safe area.
   All rules scoped to <= 1023px (md breakpoint) so desktop is untouched.
   ============================================================ */

/* Bottom nav: hidden on >= lg */
.app-bottom-nav { display: none; }
.app-fab        { display: none; }

@media (max-width: 1023px) {
  /* Restore the off-canvas sidebar — accessible via hamburger (admin needs it).
     The existing .app-sidebar fixed+translateX behaviour (lines 460-470) handles the
     slide-in; all we do here is ensure it IS visible when triggered. */
  /* Do NOT hide .app-sidebar here — let the existing off-canvas rules handle it. */
  /* Restore the hamburger trigger (inside topbar) on mobile. */
  #btnSidebar { display: inline-flex !important; }

  /* Hide the long footer on mobile (replaced by bottom nav). */
  body > div > div > footer,
  footer.app-footer { display: none; }

  /* Page content gets bottom padding so nothing hides behind bottom nav + FAB.
     148px = 60px nav + 56px FAB + 32px gap, so submit buttons & last-row items
     are always reachable by scrolling. */
  body { padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }

  /* Sticky header tweaks (already sticky; reduce padding to mobile-app feel). */
  header.app-topbar { backdrop-filter: saturate(160%) blur(8px); }

  /* Bottom navigation */
  .app-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 18px rgba(15,23,42,.06);
    z-index: 60;
    align-items: stretch;
    justify-content: space-around;
  }
  html.dark .app-bottom-nav { background: var(--c-surface, #1e293b); border-top-color: var(--c-border, #334155); }

  .bn-link {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px;
    color: #64748b; font-size: 11px; font-weight: 500;
    text-decoration: none; padding: 6px 0;
    transition: color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
  }
  .bn-link:active { transform: scale(.94); }
  .bn-link .bn-icon { width: 22px; height: 22px; }
  .bn-link .bn-label { letter-spacing: .01em; }
  .bn-link.bn-active { color: #4f46e5; }
  html.dark .bn-link { color: var(--c-muted, #94a3b8); }
  html.dark .bn-link.bn-active { color: #a5b4fc; }
  .bn-link.bn-active::before {
    content: '';
    position: absolute; top: 0; height: 3px; width: 28px;
    background: #4f46e5; border-radius: 0 0 4px 4px;
  }
  .bn-link { position: relative; }
  html.dark .bn-link.bn-active::before { background: #818cf8; }

  /* FAB */
  .app-fab {
    display: inline-flex; align-items: center; justify-content: center;
    position: fixed;
    right: 16px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width: 56px; height: 56px; border-radius: 9999px;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    box-shadow: 0 10px 24px rgba(99,102,241,.45), 0 4px 8px rgba(0,0,0,.12);
    border: 0; cursor: pointer;
    z-index: 61;
    transition: transform .15s, box-shadow .15s;
  }
  .app-fab:hover { box-shadow: 0 14px 30px rgba(99,102,241,.55), 0 4px 8px rgba(0,0,0,.15); }
  .app-fab:active { transform: scale(.95); }
  /* Hide FAB while the filter bottom-sheet is open */
  body.filter-sheet-open .app-fab {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.82);
    transition: opacity .18s ease, transform .18s ease;
  }

  /* Tap-friendly controls on mobile */
  button, .btn, a.btn { min-height: 44px; }
  .btn-sm { min-height: 32px; }
  .input, select.input, textarea.input { min-height: 44px; border-radius: 10px; }

  /* Cards: full width, mobile-app rounding */
  .card { border-radius: 14px; }
}

/* FAB action sheet (used by all sizes; just opens on FAB click) */
.app-fab-sheet { position: fixed; inset: 0; z-index: 80; }
.app-fab-sheet.hidden { display: none; }
.app-fab-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.45);
  opacity: 0; transition: opacity .2s;
}
.app-fab-sheet.open .app-fab-backdrop { opacity: 1; }
.app-fab-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .25s ease;
  box-shadow: 0 -10px 30px rgba(15,23,42,.15);
}
.app-fab-sheet.open .app-fab-panel { transform: translateY(0); }
html.dark .app-fab-panel { background: var(--c-surface, #1e293b); color: var(--c-text, #e5e7eb); }
.app-fab-handle {
  width: 40px; height: 4px; border-radius: 4px; background: #cbd5e1;
  margin: 4px auto 12px; cursor: pointer;
}
html.dark .app-fab-handle { background: #475569; }
.app-fab-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 0 4px 8px; }
html.dark .app-fab-title { color: var(--c-muted, #94a3b8); }
.app-fab-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px; border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: background-color .12s;
}
.app-fab-item:hover { background: #f1f5f9; }
html.dark .app-fab-item:hover { background: var(--c-hover, #334155); }
.app-fab-item .app-fab-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Desktop layout safety: at >= lg the bottom nav and FAB stay hidden. */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

/* ============================================================
   v24 - Compact mobile UI: collapsible filters, list-as-cards,
   hide duplicate add buttons, tighter spacing.
   All rules scoped to max-width: 768px / 1023px only.
   ============================================================ */

/* ---- Collapsible filter boxes ---------------------------------------- */
/* Pages can wrap their filter row in <div class="filter-box card ..."> and
   the header in <button class="filter-header">. The body collapses by default
   on mobile; users tap the header to expand. */
@media (max-width: 768px) {
  .filter-box .filter-body { display: none; }
  .filter-box.open .filter-body { display: block; }
}
.filter-header {
  display: none; /* only shown on mobile */
  width: 100%; text-align: left; font-weight: 600;
  padding: .5rem .25rem; background: transparent; border: 0;
  cursor: pointer; gap: .375rem; align-items: center;
  font-size: .875rem; color: inherit;
}
.filter-header .fh-chevron { transition: transform .2s; margin-left: auto; }
.filter-box.open .filter-header .fh-chevron { transform: rotate(180deg); }
@media (max-width: 768px) {
  .filter-header { display: flex; }
}

/* ---- Hide duplicated page-level "+ New" buttons on mobile ---- */
/* Add class="inline-add-btn" to any button that duplicates the FAB. */
@media (max-width: 768px) {
  .inline-add-btn { display: none !important; }
}

/* ---- Table ? block cards on mobile ---- */
@media (max-width: 768px) {
  .table-card-mobile thead { display: none; }
  .table-card-mobile tbody tr {
    display: block;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
  }
  html.dark .table-card-mobile tbody tr { background: var(--c-surface, #1e293b); border-color: var(--c-border, #334155); }
  .table-card-mobile tbody td {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 4px 0; border: 0; font-size: .8rem; line-height: 1.4;
  }
  .table-card-mobile tbody td::before {
    content: attr(data-label);
    font-weight: 600; color: #64748b; min-width: 90px; flex-shrink: 0;
  }
  html.dark .table-card-mobile tbody td::before { color: var(--c-muted, #94a3b8); }
  /* Hide empty cells */
  .table-card-mobile tbody td:empty { display: none; }
}

/* ---- Tighter card & input spacing on mobile ---- */
@media (max-width: 768px) {
  .card { padding: 10px !important; margin-bottom: 8px; }
  .kpi  { padding: 10px !important; }
  .btn  { height: 40px !important; font-size: .875rem; }
  .btn-sm { height: 32px !important; }
  /* inputs were min-height 44 in v23; keep 44 for thumbs but override explicit heights */
  .input, select.input { height: 44px; }
  /* main padding tighter */
  main { padding-left: .5rem !important; padding-right: .5rem !important; padding-top: .5rem !important; padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)) !important; }
  /* space-y inside cards */
  .card > .space-y-4 > * + * { margin-top: .5rem; }
  .card > .space-y-3 > * + * { margin-top: .375rem; }
}

/* ---- FAB: sit cleanly above bottom-nav (64px) + gap ---- */
@media (max-width: 1023px) {
  .app-fab {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
  }
}

/* ================================================================
   v25 – Mobile Bottom-Sheet Filters (Global — all list pages)
   App.MobileFilterSheet() in assets/js/app.js drives the sheet.
   .filters-desktop  → hidden on <768px, visible on ≥768px
   .mob-filter-bar   → visible on <768px, hidden on ≥768px
   ================================================================ */

@media (max-width: 767px) {
  .filters-desktop { display: none !important; }
  .mob-filter-bar  { display: flex !important; }
}
@media (min-width: 768px) {
  .mob-filter-bar          { display: none !important; }
  .filter-sheet            { display: none !important; }
  .filter-sheet-backdrop   { display: none !important; }
}

/* Backdrop */
.filter-sheet-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity .25s;
}
.filter-sheet-backdrop.open { display: block; opacity: 1; }

/* Sheet panel */
.filter-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-height: 88vh;
  background: var(--card, #fff);
  border-radius: 16px 16px 0 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -4px 32px rgba(0,0,0,.18);
}
.filter-sheet.open { transform: translateY(0); }
html.dark .filter-sheet { background: var(--c-surface, #1e293b); }

/* Sheet drag handle */
.fsh-handle {
  width: 40px; height: 4px;
  background: rgba(0,0,0,.18);
  border-radius: 2px;
  margin: 10px auto 2px;
  flex-shrink: 0;
}
html.dark .fsh-handle { background: rgba(255,255,255,.2); }

/* Sheet header */
.fsh-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 10px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
}
html.dark .fsh-header { border-color: rgba(255,255,255,.08); }

/* Scrollable body */
.fsh-body {
  flex: 1; overflow-y: auto;
  padding: 14px 16px 4px;
  -webkit-overflow-scrolling: touch;
}

/* Sticky footer buttons — padding absorbs home-bar safe area */
.fsh-footer {
  display: flex; gap: 10px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
  background: var(--card, #fff);
}
html.dark .fsh-footer { background: var(--c-surface, #1e293b); border-color: rgba(255,255,255,.08); }

/* Filter sections */
.fsh-section { margin-bottom: 18px; }
.fsh-section:last-child { margin-bottom: 2px; }
.fsh-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: #94a3b8; margin-bottom: 8px;
}

/* Chip / pill */
.fchip {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500;
  border: 1.5px solid #e2e8f0;
  background: transparent; cursor: pointer;
  transition: all .15s; color: #475569;
  white-space: nowrap;
}
.fchip:hover { border-color: #6366f1; color: #4f46e5; }
.fchip.factive { background: #4f46e5; border-color: #4f46e5; color: #fff; }
html.dark .fchip { border-color: #334155; color: #94a3b8; }
html.dark .fchip:hover { border-color: #6366f1; color: #a5b4fc; }
html.dark .fchip.factive { background: #4f46e5; border-color: #4f46e5; color: #fff; }

.fchip-group { display: flex; flex-wrap: wrap; gap: 6px; }

/* 2-column grid for selects */
.fsh-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* View toggle inside sheet */
.fsh-view-row {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px 4px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
  justify-content: center;
}
html.dark .fsh-view-row { border-color: rgba(255,255,255,.08); }
.fsh-view-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 18px; font-size: 13px; font-weight: 500;
  border-radius: 8px; border: 1.5px solid #e2e8f0;
  background: transparent; cursor: pointer; color: #64748b;
  transition: all .15s;
}
.fsh-view-btn.factive { background: #4f46e5; border-color: #4f46e5; color: #fff; }
html.dark .fsh-view-btn { border-color: #334155; color: #94a3b8; }
html.dark .fsh-view-btn.factive { background: #4f46e5; border-color: #4f46e5; color: #fff; }

/* Mobile filter trigger bar */
.mob-filter-bar { gap: 8px; align-items: center; }
.mob-filter-btn {
  display: flex; align-items: center; gap: 6px; flex: 1;
  height: 42px; padding: 0 16px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; background: transparent;
  font-size: 14px; font-weight: 500; color: #374151; cursor: pointer;
  justify-content: center; transition: all .15s;
}
.mob-filter-btn:hover,
.mob-filter-btn.has-filters { border-color: #4f46e5; color: #4f46e5; background: #eef2ff; }
html.dark .mob-filter-btn { border-color: #334155; color: #94a3b8; }
html.dark .mob-filter-btn.has-filters { border-color: #4f46e5; background: #1e1b4b; color: #a5b4fc; }

.mob-filter-badge {
  display: none; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 10px;
  background: #4f46e5; color: #fff;
  font-size: 11px; font-weight: 700; padding: 0 4px;
}
.mob-filter-badge.show { display: flex; }
