/* 00-core.css */
/* Shared toolkit styles (toasts, confirm dialog, drawer, small utilities). Scripts: includes/scripts/ux/00-core.js (FmUI). */

/* ---------- toasts ---------- */
.fmx-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 600000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.fmx-toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #0f2a3d; color: #fff; box-shadow: 0 14px 36px rgba(8, 47, 73, .35); font-size: 14px; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: opacity .22s, transform .22s; }
.fmx-toast.is-in { opacity: 1; transform: none; }
.fmx-toast i { margin-top: 2px; font-size: 16px; }
.fmx-toast span { flex: 1; overflow-wrap: anywhere; }
.fmx-toast button { background: none; border: 0; color: inherit; opacity: .6; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.fmx-toast button:hover { opacity: 1; }
.fmx-toast--success i { color: #34d399; }
.fmx-toast--error { background: #7f1d1d; } .fmx-toast--error i { color: #fecaca; }
.fmx-toast--warn i { color: #fbbf24; }
.fmx-toast--info i { color: #7dd3fc; }
#msg { display: none !important; } /* the legacy slide-down bar: its text is shown as a toast instead */

/* ---------- confirm dialog ---------- */
.fmx-modal { position: fixed; inset: 0; z-index: 600001; background: rgba(8, 25, 40, .5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; transition: opacity .18s; }
.fmx-modal.is-in { opacity: 1; }
.fmx-modal__box { background: #fff; border-radius: 18px; padding: 24px 24px 18px; width: min(420px, 100%); box-shadow: 0 30px 80px rgba(8, 47, 73, .35); transform: translateY(8px); transition: transform .18s; }
.fmx-modal.is-in .fmx-modal__box { transform: none; }
.fmx-modal__box h3 { font-size: 18px; margin: 0 0 6px; }
.fmx-modal__box p { color: #5b6b7d; margin: 0 0 18px; }
.fmx-modal__actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- drawer ---------- */
.fmx-drawer { position: fixed; inset: 0; z-index: 560000; pointer-events: none; }
.fmx-drawer__scrim { position: absolute; inset: 0; background: rgba(8, 25, 40, .45); opacity: 0; transition: opacity .22s; }
.fmx-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; max-width: 720px; background: #fff; box-shadow: -20px 0 60px rgba(8, 47, 73, .25); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.fmx-drawer.is-open { pointer-events: auto; }
.fmx-drawer.is-open .fmx-drawer__scrim { opacity: 1; }
.fmx-drawer.is-open .fmx-drawer__panel { transform: none; }
.fmx-drawer__panel > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #e4e8f0; }
.fmx-drawer__panel > header h3 { margin: 0; font-size: 16px; }
.fmx-drawer__x { background: #f1f5f9; border: 0; width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.fmx-drawer__body { flex: 1; overflow: auto; }
.fmx-drawer__body iframe { width: 100%; height: 100%; border: 0; display: block; }
body.fmx-noscroll { overflow: hidden; }

/* ---------- small utilities ---------- */
.fmx-kbd { display: inline-block; padding: 1px 6px; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 6px; font: 600 11px/1.5 Inter, system-ui, sans-serif; color: #475569; background: #f8fafc; }
.fmx-skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: fmx-sk 1.3s ease infinite; border-radius: 8px; }
@keyframes fmx-sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .fmx-toast, .fmx-modal, .fmx-modal__box, .fmx-drawer__panel, .fmx-drawer__scrim { transition: none !important; } .fmx-skeleton { animation: none; } }


/* 10-shell.css */
/* =====================================================================
   App shell (loaded automatically on every logged-in page; behaviour: includes/scripts/ux/10-shell.js)
   Sections:  1 skip link & focus   2 sidebar (collapsible, count chips)   3 top bar (title, search trigger, bell, menus)
              4 command palette     5 notification centre                   6 shortcuts overlay & session dialog
              7 page header / message pages / skeletons / progress bar      8 dark theme (CSS variables)
              9 print               10 reduced motion
   ===================================================================== */

/* ---------- 1. Skip link & focus --------------------------------------- */
.fm-skip { position: fixed; left: 12px; top: -60px; z-index: 700000; background: var(--fm-primary); color: #fff !important; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .15s; }
.fm-skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 2px; border-radius: 4px; }
.fm-sidebar a:focus-visible, .fm-sidebar button:focus-visible { outline-color: #7dd3fc; outline-offset: -2px; }
.fm-row:focus-visible { outline-offset: -2px; }
#front_middle:focus { outline: none; }

/* ---------- 2. Sidebar ------------------------------------------------- */
.fm-sidebar, .fm-main { transition: width .2s ease, margin-left .2s ease, transform .22s ease; }
.fm-nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-nav a .fm-nav-text { flex: 1 1 auto; }
.fm-nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(251, 191, 36, .22); color: #fcd34d; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.fm-nav a:hover .fm-nav-count, .fm-nav a.active .fm-nav-count { background: rgba(251, 191, 36, .3); }
.fm-nav-item:hover .fm-nav-count { visibility: hidden; } /* the "+" quick-add takes its place on hover */
.fm-nav-item:focus-within .fm-nav-count { visibility: hidden; }

.fm-sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 18px; }
.fm-sidebar-company { flex: 1 1 auto; min-width: 0; line-height: 1.25; }
.fm-sidebar-company strong { display: block; color: #e2f1fb; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-sidebar-company span { display: block; font-size: 11.5px; color: #7ea6c0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-collapse-btn { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .07); color: #9cc3dc; display: inline-flex; align-items: center; justify-content: center; }
.fm-collapse-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.fm-collapse-btn i { transition: transform .2s; }

/* desktop only: icon rail */
@media (min-width: 992px) {
	body.fm-nav-collapsed { --fm-sidebar-w: 72px; }
	body.fm-nav-collapsed .fm-nav-text, body.fm-nav-collapsed .fm-nav-label, body.fm-nav-collapsed .fm-nav-badge, body.fm-nav-collapsed .fm-nav-add { display: none !important; }
	body.fm-nav-collapsed .fm-sidebar-brand { justify-content: center; padding: 0; }
	body.fm-nav-collapsed .fm-nav a { justify-content: center; padding: 11px 0; position: relative; }
	body.fm-nav-collapsed .fm-nav a > i { width: auto; font-size: 16px; }
	body.fm-nav-collapsed .fm-nav-count { position: absolute; top: 3px; right: 10px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
	body.fm-nav-collapsed .fm-nav-item:hover .fm-nav-count { visibility: visible; }
	body.fm-nav-collapsed .fm-sidebar-scroll { padding: 14px 10px 20px; }
	body.fm-nav-collapsed .fm-nav + .fm-nav { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); }
	body.fm-nav-collapsed .fm-sidebar-foot { justify-content: center; padding: 10px 0; }
	body.fm-nav-collapsed .fm-collapse-btn i { transform: rotate(180deg); }
}
@media (max-width: 991.98px) {
	.fm-collapse-btn { display: none; }
	.fm-sidebar { width: min(300px, 86vw); }
}

/* ---------- 3. Top bar -------------------------------------------------- */
.fm-topbar { gap: 12px; }
.fm-topbar-title { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; min-width: 0; flex: 0 0 auto; max-width: 240px; }
.fm-topbar-crumb { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fm-muted); }
.fm-topbar-name { font-size: 16px; font-weight: 650; color: var(--fm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the old search form became a button that opens the command palette */
button.fm-search { display: flex; align-items: center; gap: 10px; flex: 0 1 440px; margin-left: 14px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--fm-line); border-radius: 10px; background: var(--fm-bg); color: var(--fm-muted); font-size: 13.5px; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
button.fm-search:hover { background: var(--fm-surface); border-color: #c9d4e4; }
button.fm-search i { position: static; transform: none; font-size: 13px; }
.fm-search-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-search-kbd { display: inline-flex; gap: 3px; }
.fm-search-kbd kbd, .fmx-pal kbd, .fmx-keys kbd { font: 600 11px/1.5 var(--fm-font); padding: 0 6px; border: 1px solid var(--fm-line); border-bottom-width: 2px; border-radius: 6px; background: var(--fm-surface); color: var(--fm-ink-2); }

.fm-icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--fm-ink-2); font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.fm-icon-btn:hover, .fm-icon-btn.show { background: var(--fm-neutral-bg); }
.fm-icon-btn::after { display: none !important; }
.fm-search-mobile { display: none; }
/* the "+" quick-create button is a plain icon like search and the bell: no fill, no caret, at every width */
.fm-new-btn { flex-shrink: 0; }

.fm-plan-pill.is-warn { background: var(--fm-warning-bg); color: var(--fm-warning); }

/* the count sits on the bell's top-right corner; border-box keeps it 18px tall so it never covers the bell itself */
.fm-bell-badge { position: absolute; top: 1px; right: 0; transform: translate(25%, -15%); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; border: 2px solid var(--fm-surface); box-sizing: border-box; pointer-events: none; white-space: nowrap; }
.fm-bell-badge[hidden] { display: none; }

.fm-menu-who { padding: 8px 10px 4px; line-height: 1.3; }
.fm-menu-who strong { display: block; font-size: 13.5px; }
.fm-menu-who span { font-size: 12px; color: var(--fm-muted); }
.fm-topbar button.dropdown-item { width: 100%; background: none; border: 0; text-align: left; }
.fm-link-btn { background: none; border: 0; padding: 0; color: var(--fm-primary); font-size: 12.5px; font-weight: 600; }
.fm-link-btn:hover { text-decoration: underline; }

/* the search button may shrink (its label ellipsises) and the right-hand group never wraps, so the bar
   always fits its width; without min-width:0 the button kept its ~330px content width and pushed the
   account menu off-screen on tablets and small laptops */
button.fm-search { min-width: 0; }
.fm-topbar > .dropdown, .fm-topbar > .fm-plan-pill { flex-shrink: 0; }
.fm-topbar .fm-user-meta { max-width: 190px; min-width: 0; }
.fm-topbar .fm-user-meta > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1199.98px) {
	.fm-topbar .fm-user-meta, .fm-topbar .fm-plan-link { display: none; }
}
@media (max-width: 991.98px) {
	.fm-topbar-title { flex: 0 1 auto; }
	button.fm-search { flex-basis: 220px; margin-left: 4px; }
}
@media (max-width: 899.98px) {
	.fm-topbar .fm-plan-pill { display: none; }
}
@media (max-width: 767.98px) {
	.fm-search-kbd { display: none; }
	button.fm-search { flex: 0 0 auto; width: 38px; padding: 0; justify-content: center; margin-left: 0; }
	.fm-search-text { display: none; }
}
@media (max-width: 575.98px) {
	button.fm-search { display: none; }
	.fm-search-mobile { display: inline-flex; }
	.fm-topbar { padding: 0 10px; gap: 4px; }
	.fm-topbar-name { font-size: 15px; max-width: 34vw; }
	.fm-user-btn { padding: 2px; }
}

/* ---------- 4. Command palette ------------------------------------------ */
.fmx-pal { position: fixed; inset: 0; z-index: 600002; background: rgba(8, 25, 40, .5); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 11vh 16px 16px; opacity: 0; transition: opacity .15s; }
.fmx-pal.is-in { opacity: 1; }
.fmx-pal__box { width: min(640px, 100%); max-height: min(560px, 78vh); display: flex; flex-direction: column; background: var(--fm-surface); border: 1px solid var(--fm-line); border-radius: 18px; box-shadow: 0 30px 80px rgba(8, 47, 73, .4); overflow: hidden; transform: translateY(-8px) scale(.99); transition: transform .15s; }
.fmx-pal.is-in .fmx-pal__box { transform: none; }
.fmx-pal__head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--fm-line-2); }
.fmx-pal__head > i { color: var(--fm-muted); font-size: 15px; }
.fmx-pal .fmx-pal__input { flex: 1 1 auto; height: 56px; border: 0 !important; border-radius: 0; outline: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0; margin: 0; font-size: 16px; color: var(--fm-ink); min-width: 0; width: auto; }
.fmx-pal__input::placeholder { color: #9aa4b8; }
.fmx-pal__spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fm-primary-100); border-top-color: var(--fm-primary); animation: fmspin .7s linear infinite; opacity: 0; }
.fmx-pal.is-busy .fmx-pal__spin { opacity: 1; }
.fmx-pal__list { overflow-y: auto; padding: 6px 8px 8px; flex: 1 1 auto; overscroll-behavior: contain; }
.fmx-pal__group { padding: 12px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--fm-muted); }
.fmx-pal__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--fm-ink); cursor: pointer; }
.fmx-pal__item.is-active { background: var(--fm-primary-50); }
.fmx-pal__ico { flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--fm-primary-50); color: var(--fm-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.fmx-pal__item.is-active .fmx-pal__ico { background: var(--fm-primary); color: #fff; }
.fmx-pal__main { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.fmx-pal__title { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmx-pal__sub { display: block; font-size: 12px; color: var(--fm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmx-pal__meta { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--fm-muted); white-space: nowrap; }
.fmx-pal__meta.is-danger { color: var(--fm-danger); }
.fmx-pal__keys { flex: 0 0 auto; display: inline-flex; gap: 3px; }
.fmx-pal mark { background: rgba(14, 165, 233, .22); color: inherit; border-radius: 3px; padding: 0 1px; }
.fmx-pal__empty { padding: 34px 16px; text-align: center; color: var(--fm-muted); }
.fmx-pal__empty i { display: block; font-size: 26px; margin-bottom: 8px; opacity: .6; }
.fmx-pal__empty a { font-weight: 600; }
.fmx-pal__foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--fm-line-2); font-size: 12px; color: var(--fm-muted); background: var(--fm-bg); }
.fmx-pal__foot span { display: inline-flex; align-items: center; gap: 5px; }
.fmx-pal__sk { display: flex; align-items: center; gap: 12px; padding: 9px 10px; }
.fmx-pal__sk > span:first-child { width: 34px; height: 34px; border-radius: 9px; }
.fmx-pal__sk > span:last-child { flex: 1; height: 28px; }
@media (max-width: 575.98px) {
	.fmx-pal { padding: 0; align-items: stretch; }
	.fmx-pal__box { width: 100%; max-height: none; border-radius: 0; border: 0; }
	.fmx-pal__foot { display: none; }
	.fmx-pal__input { height: 60px; font-size: 17px; }
}

/* ---------- 5. Notification centre -------------------------------------- */
.fm-bell-menu { width: 380px; max-width: calc(100vw - 20px); padding: 0 !important; overflow: hidden; }
.fm-bell-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--fm-line-2); }
.fm-bell-head strong { font-size: 14px; }
.fm-bell-body { max-height: min(60vh, 460px); overflow-y: auto; }
.fm-bell-foot { padding: 10px 16px; border-top: 1px solid var(--fm-line-2); text-align: center; font-size: 13px; font-weight: 600; background: var(--fm-bg); }
.fm-bell-empty { padding: 28px 16px; text-align: center; color: var(--fm-muted); font-size: 13.5px; }
.fm-bell-empty i { display: block; font-size: 26px; margin-bottom: 6px; color: var(--fm-success); }
.fm-bell-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--fm-line-2); color: inherit; position: relative; }
.fm-bell-item:last-child { border-bottom: 0; }
.fm-bell-item:hover { background: var(--fm-primary-50); color: inherit; }
.fm-bell-item.is-unseen::before { content: ''; position: absolute; left: 5px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--fm-accent); }
.fm-bell-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--fm-info-bg); color: var(--fm-info); }
.fm-bell-ico.tone-danger { background: var(--fm-danger-bg); color: var(--fm-danger); }
.fm-bell-ico.tone-warning { background: var(--fm-warning-bg); color: var(--fm-warning); }
.fm-bell-text { min-width: 0; line-height: 1.35; }
.fm-bell-text strong { display: block; font-size: 13.5px; }
.fm-bell-text span { display: block; font-size: 12.5px; color: var(--fm-muted); }
.fm-bell-text em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--fm-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) {
	.fm-bell { position: static; }
	.fm-bell-menu { position: fixed !important; left: 10px !important; right: 10px !important; top: calc(var(--fm-topbar-h) + 4px) !important; width: auto; transform: none !important; max-width: none; }
}

/* ---------- 6. Shortcuts overlay & session dialog ------------------------ */
.fmx-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 28px; margin: 4px 0 10px; }
.fmx-keys h4 { grid-column: 1 / -1; margin: 12px 0 2px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--fm-muted); }
.fmx-keys div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.fmx-keys span.k { display: inline-flex; gap: 3px; align-items: center; color: var(--fm-muted); font-size: 12px; }
.fmx-modal__box.is-wide { width: min(560px, 100%); }
.fmx-modal__box .fm-field { margin-bottom: 12px; text-align: left; }
.fmx-modal__box .fm-field label { display: block; margin-bottom: 4px; }
.fmx-modal__err { color: var(--fm-danger); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
@media (max-width: 575.98px) { .fmx-keys { grid-template-columns: 1fr; } }

/* ---------- 7. Page header / message pages / skeletons / progress -------- */
.fm-page-head-main { min-width: 0; }
.fm-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; font-size: 12px; color: var(--fm-muted); }
.fm-crumbs a { color: var(--fm-muted); font-weight: 500; }
.fm-crumbs a:hover { color: var(--fm-primary); }
.fm-crumbs i { font-size: 9px; opacity: .6; }
.fm-page-head h1 .fm-page-icon { color: var(--fm-primary); margin-right: 6px; font-size: .85em; }
.fm-page-chips { display: inline-flex; gap: 6px; vertical-align: middle; margin-left: 6px; font-size: 13px; font-weight: 500; }
.fm-message-card { max-width: 560px; margin: 8vh auto 0; }
.fm-message-card .fm-empty { padding: 48px 28px; }
.fm-message-title { font-size: 20px; margin-bottom: 6px; }
.fm-message-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.fm-empty-icon.fm-tone-danger { background: var(--fm-danger-bg); color: var(--fm-danger); }

/* skeleton building blocks (use with .fmx-skeleton from 00-core.css) */
.fm-skel-line { display: block; height: 12px; border-radius: 6px; margin: 8px 0; }
.fm-skel-line.w-25 { width: 25%; } .fm-skel-line.w-50 { width: 50%; } .fm-skel-line.w-75 { width: 75%; }
.fm-skel-block { display: block; height: 120px; border-radius: 12px; }
.fm-skel-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.fm-skel-row > .fm-skel-dot { flex: 0 0 36px; height: 36px; border-radius: 10px; }

/* thin progress bar while the next page loads */
.fm-progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 700001; background: linear-gradient(90deg, #38bdf8, var(--fm-primary)); box-shadow: 0 0 8px rgba(14, 165, 233, .6); opacity: 0; transition: width .4s ease, opacity .2s; pointer-events: none; }
.fm-progress.is-on { opacity: 1; width: 70%; transition: width 8s cubic-bezier(.1, .8, .3, 1); }

/* ---------- 8. Dark theme ------------------------------------------------ */
/* The whole app is built on the --fm-* tokens; the dark theme swaps the tokens and then fixes the few hard-coded white surfaces.
   <html data-theme="dark"> is set by the inline script in menu_after_login.php before first paint. */
:root[data-theme="dark"] {
	color-scheme: dark;
	--fm-primary: #38bdf8; --fm-primary-600: #7dd3fc; --fm-primary-50: rgba(56, 189, 248, .12); --fm-primary-100: rgba(56, 189, 248, .26); --fm-accent: #38bdf8;
	--fm-ink: #e7eef6; --fm-ink-2: #c2cfdd; --fm-muted: #8fa1b5;
	--fm-line: #26374b; --fm-line-2: #1f2e41; --fm-bg: #0b1623; --fm-surface: #122032;
	--fm-success: #4ade80; --fm-success-bg: rgba(74, 222, 128, .13); --fm-warning: #fbbf24; --fm-warning-bg: rgba(251, 191, 36, .13);
	--fm-danger: #f87171; --fm-danger-bg: rgba(248, 113, 113, .14); --fm-info: #7ab1ff; --fm-info-bg: rgba(122, 177, 255, .14); --fm-neutral-bg: #1b2b3f;
	--fm-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35); --fm-shadow: 0 2px 10px rgba(0, 0, 0, .35); --fm-shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}
:root[data-theme="dark"] body, :root[data-theme="dark"] body.bg-light { background-color: var(--fm-bg) !important; color: var(--fm-ink); }
:root[data-theme="dark"] a { color: #7dd3fc; }
:root[data-theme="dark"] a:hover { color: #bae6fd; }
:root[data-theme="dark"] .btn-theme, :root[data-theme="dark"] .btn-primary { background: #0284c7 !important; border-color: #0284c7 !important; }
:root[data-theme="dark"] .btn-theme:hover, :root[data-theme="dark"] .btn-primary:hover { background: #0369a1 !important; border-color: #0369a1 !important; }
:root[data-theme="dark"] .fm-skip { background: #0284c7; }
:root[data-theme="dark"] .fm-avatar { background: linear-gradient(135deg, #0284c7, #0369a1); } /* the light dark-theme primary made the white initials hard to read */
:root[data-theme="dark"] .fm-topbar { background: rgba(18, 32, 50, .92); }
:root[data-theme="dark"] .fm-loader { background: rgba(11, 22, 35, .92) !important; }
:root[data-theme="dark"] .btn-default, :root[data-theme="dark"] .btn-light, :root[data-theme="dark"] .btn-secondary, :root[data-theme="dark"] .btn-outline-primary,
:root[data-theme="dark"] .btn-outline-secondary { background: var(--fm-surface); border-color: var(--fm-line); color: var(--fm-ink-2); }
:root[data-theme="dark"] .btn-default:hover, :root[data-theme="dark"] .btn-light:hover, :root[data-theme="dark"] .btn-secondary:hover { background: var(--fm-neutral-bg); color: var(--fm-ink); border-color: #35506b; }
:root[data-theme="dark"] .form-control, :root[data-theme="dark"] .form-select, :root[data-theme="dark"] input.form-control, :root[data-theme="dark"] textarea.form-control,
:root[data-theme="dark"] .bootstrap-select > .dropdown-toggle { background-color: var(--fm-bg) !important; border-color: var(--fm-line) !important; color: var(--fm-ink); }
:root[data-theme="dark"] .form-control:focus, :root[data-theme="dark"] .form-select:focus { background-color: var(--fm-bg) !important; }
:root[data-theme="dark"] .form-control:disabled, :root[data-theme="dark"] .form-control[readonly] { background-color: var(--fm-neutral-bg) !important; }
:root[data-theme="dark"] .form-control::placeholder { color: #66788d; }
:root[data-theme="dark"] .dropdown-menu, :root[data-theme="dark"] .modal-content, :root[data-theme="dark"] .ui-datepicker, :root[data-theme="dark"] .ui-autocomplete,
:root[data-theme="dark"] .bootstrap-select .dropdown-menu { background: var(--fm-surface); color: var(--fm-ink); border-color: var(--fm-line); }
:root[data-theme="dark"] .dropdown-item { color: var(--fm-ink-2); }
:root[data-theme="dark"] .dropdown-item:hover, :root[data-theme="dark"] .dropdown-item:focus { background: var(--fm-primary-50); color: var(--fm-ink); }
:root[data-theme="dark"] .modal-footer { background: var(--fm-bg) !important; border-color: var(--fm-line); }
:root[data-theme="dark"] .modal-header { border-color: var(--fm-line); }
:root[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }
:root[data-theme="dark"] .table { color: var(--fm-ink); }
:root[data-theme="dark"] .table thead th, :root[data-theme="dark"] .table > tbody > tr > th, :root[data-theme="dark"] .fm-table thead th { background: #0f1c2c; color: var(--fm-muted); }
:root[data-theme="dark"] .fm-table tbody tr td { color: var(--fm-ink); }
:root[data-theme="dark"] .fm-table tbody tr.fm-row:hover { background: rgba(56, 189, 248, .08) !important; }
:root[data-theme="dark"] .white-box, :root[data-theme="dark"] .fm-me-card, :root[data-theme="dark"] .fm-opt-tile, :root[data-theme="dark"] .fm-quick a, :root[data-theme="dark"] .fm-quick button,
:root[data-theme="dark"] .options-area .fm-settings-menu, :root[data-theme="dark"] .fm-receive-box { background: var(--fm-surface) !important; border-color: var(--fm-line); color: var(--fm-ink); }
:root[data-theme="dark"] .fm-opt-body b, :root[data-theme="dark"] .fm-me-card h3 { color: var(--fm-ink); }
:root[data-theme="dark"] div.fme_pagination a, :root[data-theme="dark"] div.fme_pagination span { background: var(--fm-surface) !important; color: var(--fm-ink-2) !important; border-color: var(--fm-line) !important; }
:root[data-theme="dark"] div.fme_pagination span.current { background: #0284c7 !important; color: #fff !important; border-color: #0284c7 !important; }
:root[data-theme="dark"] .fm-badge.neutral, :root[data-theme="dark"] .fm-badge { color: var(--fm-ink-2); }
:root[data-theme="dark"] .fm-badge.success { color: var(--fm-success); } :root[data-theme="dark"] .fm-badge.warning { color: var(--fm-warning); }
:root[data-theme="dark"] .fm-badge.danger { color: var(--fm-danger); } :root[data-theme="dark"] .fm-badge.info { color: var(--fm-info); }
:root[data-theme="dark"] .nav-tabs .nav-link.active, :root[data-theme="dark"] .fx-tabs a.active { color: #7dd3fc; border-bottom-color: #38bdf8; }
:root[data-theme="dark"] .fmx-modal__box, :root[data-theme="dark"] .fmx-drawer__panel { background: var(--fm-surface); color: var(--fm-ink); }
:root[data-theme="dark"] .fmx-modal__box p { color: var(--fm-muted); }
:root[data-theme="dark"] .fmx-drawer__panel > header { border-color: var(--fm-line); }
:root[data-theme="dark"] .fmx-drawer__x { background: var(--fm-neutral-bg); color: var(--fm-ink); }
:root[data-theme="dark"] .fmx-skeleton { background: linear-gradient(90deg, #1a2a3d 25%, #223650 37%, #1a2a3d 63%); background-size: 400% 100%; }
:root[data-theme="dark"] .fmx-kbd { background: var(--fm-neutral-bg); color: var(--fm-ink-2); border-color: var(--fm-line); }
:root[data-theme="dark"] .fm-detail-pane iframe { background: var(--fm-surface); }
:root[data-theme="dark"] .fm-app-footer { color: var(--fm-muted); }
:root[data-theme="dark"] button.fm-search:hover { border-color: #35506b; }
:root[data-theme="dark"] .fm-bell-badge { border-color: var(--fm-surface); }
:root[data-theme="dark"] hr { border-color: var(--fm-line); }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2c4058; }
:root[data-theme="dark"] * { scrollbar-color: #2c4058 transparent; }

/* 8b. Hard-coded white surfaces of the Options area (account / billing / integrations / lists): without this the light text of the dark theme sat on white cards. */
:root[data-theme="dark"] .fm-company-card, :root[data-theme="dark"] .account-area-box, :root[data-theme="dark"] .fm-fact > i,
:root[data-theme="dark"] .fmco-card, :root[data-theme="dark"] .fmco-sum, :root[data-theme="dark"] .fmco-done, :root[data-theme="dark"] .fmco-step, :root[data-theme="dark"] .fmpl-cycle,
:root[data-theme="dark"] .bl-tile, :root[data-theme="dark"] .bl-use, :root[data-theme="dark"] .bl-card, :root[data-theme="dark"] .bl-inv,
:root[data-theme="dark"] .fi-card, :root[data-theme="dark"] .fmpr-row, :root[data-theme="dark"] .fmpr-term, :root[data-theme="dark"] .fop-sec,
:root[data-theme="dark"] .fmto-card, :root[data-theme="dark"] .fmto-val, :root[data-theme="dark"] .fmtv-opt, :root[data-theme="dark"] .fmtv-chip, :root[data-theme="dark"] .fmcf-check
	{ background: var(--fm-surface); color: var(--fm-ink); border-color: var(--fm-line); }
:root[data-theme="dark"] .fm-company-logo { background: var(--fm-surface); border-color: var(--fm-surface); }
:root[data-theme="dark"] .fmco-trust, :root[data-theme="dark"] .fmco-facts div { background: var(--fm-bg); color: var(--fm-ink-2); border-color: var(--fm-line-2); }
:root[data-theme="dark"] .fmco-f input, :root[data-theme="dark"] .fmco-f select { background: var(--fm-bg); color: var(--fm-ink); border-color: var(--fm-line); }
:root[data-theme="dark"] .bl-bar { background: var(--fm-neutral-bg); }
:root[data-theme="dark"] .fmco-seg input:checked + span, :root[data-theme="dark"] .fmco-addon.is-on { background: var(--fm-primary-50); }
:root[data-theme="dark"] .custom_fields_list_ul li { border-bottom-color: var(--fm-line); }
:root[data-theme="dark"] .custom_fields_list_ul li:hover { background: var(--fm-primary-50); }
:root[data-theme="dark"] .company_logo_box, :root[data-theme="dark"] .fm-settings-menu-li { border-color: var(--fm-line); }
:root[data-theme="dark"] .fm-settings-menu-li-right-description { color: var(--fm-muted); }

/* ---------- 9. Print ------------------------------------------------------ */
@media print {
	.fm-sidebar, .fm-topbar, .fm-sidebar-backdrop, .fm-app-footer, .fm-skip, .fmx-toasts, .fmx-pal, .fm-progress, .fm-page-actions, .fm-filters, .fm-table-foot .fme_pagination,
	.fm-quick, .fm-dash-range, .fm-dash-actions, .fm-loader, .cookie_box_fm { display: none !important; }
	html, body, body.bg-light { background: #fff !important; color: #000 !important; }
	:root[data-theme="dark"] { --fm-ink: #000; --fm-ink-2: #222; --fm-muted: #555; --fm-line: #ccc; --fm-line-2: #ddd; --fm-bg: #fff; --fm-surface: #fff; }
	.fm-main { margin: 0 !important; }
	.fm-page { padding: 0 !important; max-width: none; }
	.fx-card, .white-box { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
	.fm-table th, .fm-table td { padding: 6px 8px !important; }
	a { color: inherit !important; text-decoration: none !important; }
	.fm-row { cursor: default; }
	@page { margin: 14mm; }
}

/* ---------- 10. Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.fm-sidebar, .fm-main, .fmx-pal, .fmx-pal__box, .fm-collapse-btn i, .fm-progress, .fm-skip { transition: none !important; }
	.fmx-pal__spin { animation-duration: 2s; }
	html { scroll-behavior: auto !important; }
	.fmx-skeleton { animation: none !important; }
	.fm-loader::after { animation-duration: 3s; }
}


/* 12-dashboard.css */
/* Dashboard ("Today" workspace) - markup: user-dashboard.php, behaviour: includes/scripts/ux/12-dashboard.js. Colours come from the --fm-* tokens (dark theme aware). */

.fmd-page { max-width: 1480px; }
.fmd-page .fm-page-head { margin-bottom: 14px; }
.fmd-page .fm-page-head h1 { font: 800 clamp(24px, 3vw, 30px)/1.15 'Plus Jakarta Sans', var(--fm-font); letter-spacing: -.02em; }
.fmd-h-ico { color: var(--fm-primary); margin-right: 6px; font-size: .9em; }

/* range toggle + segmented controls */
.fmd-range, .fmd-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--fm-neutral-bg); gap: 2px; }
.fmd-range button, .fmd-seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--fm-muted); }
.fmd-seg { margin-left: auto; }
.fmd-seg button { padding: 4px 10px; }
.fmd-range button.is-on, .fmd-seg button.is-on { background: var(--fm-surface); color: var(--fm-primary); box-shadow: var(--fm-shadow-sm); }
.fmd-range button:not(.is-on):hover, .fmd-seg button:not(.is-on):hover { color: var(--fm-ink); }

/* quick actions */
.fmd-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.fmd-quick .btn { border-radius: 999px; padding: 7px 14px; }
.fmd-quick .btn i { margin: 0 6px 0 0; }

/* onboarding */
.fmd-onboard { margin-bottom: 18px; padding: 20px 22px; background: linear-gradient(135deg, var(--fm-primary-50), var(--fm-surface) 60%); border-color: var(--fm-primary-100); position: relative; }
.fmd-onboard-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; position: relative; padding-right: 36px; }
.fmd-onboard-head h2 { margin: 0; font-size: 18px; }
.fmd-onboard-head p { margin: 2px 0 0; color: var(--fm-muted); }
.fmd-ring { width: 56px; height: 56px; flex: 0 0 56px; }
.fmd-ring circle { fill: none; stroke-width: 6; }
.fmd-ring .bg { stroke: var(--fm-line); }
.fmd-ring .fg { stroke: var(--fm-primary); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.fmd-ring-num { position: absolute; left: 0; width: 56px; text-align: center; font-size: 13px; font-weight: 700; color: var(--fm-primary); }
.fmd-dismiss { position: absolute; right: -6px; top: -6px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--fm-muted); font-size: 22px; line-height: 1; }
.fmd-dismiss:hover { background: var(--fm-neutral-bg); color: var(--fm-ink); }
.fmd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.fmd-steps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--fm-surface); border: 1px solid var(--fm-line); color: var(--fm-ink); height: 100%; transition: border-color .15s, transform .15s, box-shadow .15s; }
.fmd-steps a:hover { border-color: var(--fm-primary); box-shadow: var(--fm-shadow); transform: translateY(-1px); color: var(--fm-ink); }
.fmd-steps strong { display: block; font-size: 13.5px; }
.fmd-steps small { display: block; color: var(--fm-muted); font-size: 12px; line-height: 1.35; }
.fmd-step-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--fm-primary-50); color: var(--fm-primary); display: inline-flex; align-items: center; justify-content: center; }
.fmd-steps li.is-done a { background: transparent; border-style: dashed; }
.fmd-steps li.is-done .fmd-step-ico { background: var(--fm-success-bg); color: var(--fm-success); }
.fmd-steps li.is-done strong { text-decoration: line-through; text-decoration-color: var(--fm-muted); color: var(--fm-muted); }

/* KPI tiles */
.fmd-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; min-height: 120px; }
@media (min-width: 1500px) { .fmd-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .fmd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 359.98px) { .fmd-kpis { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) {
	.fmd-spark { display: none; }
	.fmd-kpi { padding: 14px; min-height: 96px; }
	.fmd-quick { flex-wrap: nowrap; overflow-x: auto; margin-left: -14px; margin-right: -14px; padding: 2px 14px 6px; scrollbar-width: none; }
	.fmd-quick .btn { flex: 0 0 auto; white-space: nowrap; }
	.fmd-onboard { padding: 16px; }
	.fmd-range { width: 100%; } .fmd-range button { flex: 1; }
}
.fmd-kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 14px; border-radius: 16px; color: inherit; overflow: hidden; min-height: 112px; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.fmd-kpi:hover { box-shadow: var(--fm-shadow); transform: translateY(-1px); border-color: var(--fm-primary-100); color: inherit; }
.fmd-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--fm-muted); }
.fmd-kpi-value { font: 800 clamp(20px, 2.2vw, 26px)/1.15 'Plus Jakarta Sans', var(--fm-font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0 4px; overflow-wrap: anywhere; }
.fmd-kpi-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; }
.fmd-kpi-note { color: var(--fm-muted); }
.fmd-kpi-note.is-bad { color: var(--fm-danger); font-weight: 600; }
.fmd-delta { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--fm-neutral-bg); color: var(--fm-ink-2); }
.fmd-delta i { font-size: 9px; }
.fmd-delta.is-up { background: var(--fm-success-bg); color: var(--fm-success); }
.fmd-delta.is-down { background: var(--fm-danger-bg); color: var(--fm-danger); }
.fmd-spark { position: absolute; right: 12px; top: 14px; width: 88px; height: 28px; opacity: .95; }
.fmd-spark .line { fill: none; stroke: var(--fm-primary); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fmd-spark .area { fill: var(--fm-primary); opacity: .1; }
.fmd-spark.ok .line { stroke: var(--fm-success); } .fmd-spark.ok .area { fill: var(--fm-success); }
.fmd-spark .flat { stroke: var(--fm-line); stroke-width: 1.5; stroke-dasharray: 3 3; }
.fmd-kpi-sk { gap: 8px; }

/* layout */
.fmd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fmd-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (max-width: 1199.98px) { .fmd-grid { grid-template-columns: 1fr; } }
.fmd-page .fx-card { border-radius: 16px; }
.fmd-count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--fm-danger-bg); color: var(--fm-danger); font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.fmd-foot { margin: 18px 4px 0; text-align: center; }

/* attention feed */
.fmd-clear { padding: 38px 20px; }
.fmd-group { padding: 14px 18px 10px; border-bottom: 1px solid var(--fm-line-2); }
.fmd-group:last-child { border-bottom: 0; }
.fmd-group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fmd-group-ico { flex: 0 0 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--fm-info-bg); color: var(--fm-info); }
.tone-danger .fmd-group-ico { background: var(--fm-danger-bg); color: var(--fm-danger); }
.tone-warning .fmd-group-ico { background: var(--fm-warning-bg); color: var(--fm-warning); }
.fmd-group-text { flex: 1 1 200px; min-width: 0; line-height: 1.35; }
.fmd-group-text strong { display: block; font-size: 14.5px; }
.fmd-group-text span { display: block; font-size: 12.5px; color: var(--fm-muted); }
.fmd-group-link { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.fmd-group-link i { font-size: 10px; margin-left: 2px; }
.fmd-items { list-style: none; margin: 8px 0 0 50px; padding: 0; }
.fmd-items li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--fm-line-2); }
.fmd-item-main { flex: 1 1 auto; min-width: 0; color: var(--fm-ink); display: flex; flex-direction: column; line-height: 1.3; }
.fmd-item-main:hover { color: var(--fm-primary); }
.fmd-item-main strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmd-item-sub { font-size: 12px; color: var(--fm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmd-item-meta { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--fm-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fmd-item-meta.is-bad { color: var(--fm-danger); }
.fmd-chip { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--fm-neutral-bg); color: var(--fm-ink-2); white-space: nowrap; }
.fmd-chip.is-ok { background: var(--fm-success-bg); color: var(--fm-success); }
.fmd-reorder { white-space: nowrap; }
.fmd-reorder i, .fmd-reorder-all i { margin: 0 4px 0 0; font-size: 11px; }
.is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 575.98px) { .fmd-items { margin-left: 0; } .fmd-group-text { flex-basis: 140px; } }

/* sales trend chart */
.fmd-trend-sum { margin-left: auto; font-size: 13px; color: var(--fm-ink-2); display: inline-flex; align-items: center; gap: 8px; }
.fmd-trend-sum strong { font-size: 15px; color: var(--fm-ink); }
.fmd-chart { position: relative; padding: 10px 14px 6px; min-height: 270px; outline-offset: -3px; border-radius: 12px; min-width: 0; }
.fmd-svg { display: block; max-width: 100%; overflow: visible; }
.fmd-svg .grid { stroke: var(--fm-line-2); stroke-width: 1; }
.fmd-svg .ax { fill: var(--fm-muted); font-size: 11px; font-family: var(--fm-font); }
.fmd-svg .line { fill: none; stroke: var(--fm-primary); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.fmd-svg .prev { fill: none; stroke: var(--fm-muted); stroke-width: 1.6; stroke-dasharray: 5 5; opacity: .55; vector-effect: non-scaling-stroke; }
.fmd-svg .cursor { stroke: var(--fm-primary); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; }
.fmd-svg .dot { fill: var(--fm-surface); stroke: var(--fm-primary); stroke-width: 2.5; }
.fmd-tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--fm-ink); color: var(--fm-surface); border-radius: 10px; padding: 6px 10px; font-size: 12px; line-height: 1.35; pointer-events: none; white-space: nowrap; box-shadow: var(--fm-shadow-lg); z-index: 2; display: flex; flex-direction: column; }
.fmd-tip[hidden] { display: none; }
.fmd-tip b { font-size: 11.5px; opacity: .8; font-weight: 600; } .fmd-tip span { font-size: 14px; font-weight: 700; } .fmd-tip small { opacity: .75; }
.fmd-chart-empty { position: absolute; left: 0; right: 0; top: 0; height: calc(100% - 40px); padding: 0 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--fm-muted); pointer-events: none; font-size: 13.5px; }
.fmd-legend-inline { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--fm-muted); padding-top: 2px; }
.fmd-legend-inline i { display: inline-block; width: 18px; border-top: 3px solid var(--fm-primary); margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.fmd-legend-inline i.l2 { border-top: 2px dashed var(--fm-muted); opacity: .7; }
@media (max-width: 575.98px) {
	.fmd-chart { padding: 8px 10px 6px; min-height: 0; }
	.fmd-chart-empty { font-size: 13px; line-height: 1.4; }
	.fmd-legend-inline { flex-wrap: wrap; gap: 6px 14px; padding-top: 6px; }
	.fmd-trend-sum { gap: 6px; }
	.fmd-trend .fx-card-head { flex-wrap: wrap; row-gap: 6px; }
	.fmd-trend .fx-card-head h2 { white-space: nowrap; }
	.fmd-trend-sum .fmd-delta { white-space: nowrap; }
}

/* top products */
.fmd-toplist { padding: 6px 18px 14px; min-height: 100px; }
.fmd-toplist ol { list-style: none; margin: 0; padding: 0; }
.fmd-toplist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'rk nm vl' '. bar bar'; align-items: center; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid var(--fm-line-2); }
.fmd-toplist li:last-child { border-bottom: 0; }
.fmd-toplist .rk { grid-area: rk; width: 22px; height: 22px; border-radius: 7px; background: var(--fm-primary-50); color: var(--fm-primary); font-size: 11.5px; font-weight: 700; text-align: center; line-height: 22px; }
.fmd-toplist .nm { grid-area: nm; min-width: 0; color: var(--fm-ink); line-height: 1.25; }
.fmd-toplist .nm strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmd-toplist .nm small { color: var(--fm-muted); font-size: 11.5px; }
.fmd-toplist .vl { grid-area: vl; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.fmd-toplist .bar { grid-area: bar; height: 5px; border-radius: 5px; background: var(--fm-neutral-bg); overflow: hidden; }
.fmd-toplist .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #38bdf8, var(--fm-primary)); }
.fmd-top-empty { padding: 26px 0; text-align: center; color: var(--fm-muted); }

/* stock health */
.fmd-health-body { display: flex; align-items: center; gap: 22px; padding: 16px 20px 18px; flex-wrap: wrap; }
.fmd-donut { width: 132px; height: 132px; flex: 0 0 132px; }
.fmd-donut .bg { fill: none; stroke: var(--fm-neutral-bg); stroke-width: 12; }
.fmd-donut .num { font: 800 17px 'Plus Jakarta Sans', var(--fm-font); fill: var(--fm-ink); }
.fmd-donut .lbl { font-size: 7px; fill: var(--fm-muted); }
.fmd-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 160px; }
.fmd-legend a { display: flex; align-items: center; gap: 10px; padding: 7px 0; color: var(--fm-ink-2); font-size: 13.5px; border-bottom: 1px solid var(--fm-line-2); }
.fmd-legend li:last-child a { border-bottom: 0; }
.fmd-legend a:hover { color: var(--fm-primary); }
.fmd-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.fmd-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--fm-ink); }

/* activity timeline */
.fmd-timeline { list-style: none; margin: 0; padding: 6px 18px 12px; position: relative; }
.fmd-timeline::before { content: ''; position: absolute; left: 35px; top: 18px; bottom: 22px; width: 2px; background: var(--fm-line-2); }
.fmd-timeline li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; position: relative; }
.fmd-dot { flex: 0 0 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--fm-primary-50); color: var(--fm-primary); border: 3px solid var(--fm-surface); z-index: 1; }
.fmd-dot.tone-success { background: var(--fm-success-bg); color: var(--fm-success); }
.fmd-dot.tone-warning { background: var(--fm-warning-bg); color: var(--fm-warning); }
.fmd-timeline li > a { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; color: var(--fm-ink); line-height: 1.35; padding-top: 2px; }
.fmd-timeline li > a:hover .fmd-ev-text { color: var(--fm-primary); }
.fmd-ev-text { font-size: 13.5px; font-weight: 500; }
.fmd-ev-meta { font-size: 12px; color: var(--fm-muted); }
.fmd-timeline time { flex: 0 0 auto; font-size: 12px; color: var(--fm-muted); padding-top: 4px; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .fmd-kpi, .fmd-steps a, .fmd-ring .fg { transition: none !important; } }

/* part 10: location filter, customize panel, "Orders to ship" and "Stock by location" widgets (includes/functions/dash_widgets.php) */
.fmd-loc { width: auto; min-width: 150px; max-width: 220px; height: 36px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.fmd-custom { height: 36px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.fmd-locnote { margin: 0 0 12px; font-size: 13px; color: var(--fm-ink-2); }
.fmd-locnote i { color: var(--fm-primary); margin-right: 4px; }
.fmd-h-loc { font-size: 12px; font-weight: 600; color: var(--fm-muted); margin-left: 6px; }
.fmd-shiplist { margin-left: 0; }
.fmd-shiplist .fmd-star { color: #f59e0b; font-size: 12px; }
.fmd-avail { flex: 0 0 auto; font-size: 11.5px; }
.fmd-loclist { list-style: none; margin: 4px 0 0; padding: 0; }
.fmd-loclist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-top: 1px dashed var(--fm-line-2); }
.fmd-loclist li:first-child { border-top: 0; }
.fmd-loclist li.is-on .fmd-loc-name { color: var(--fm-primary); font-weight: 700; }
.fmd-loc-name { font-weight: 600; color: var(--fm-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmd-loc-num { text-align: right; font-variant-numeric: tabular-nums; }
.fmd-loc-num b { display: block; font-size: 13.5px; color: var(--fm-ink); }
.fmd-loc-num small { color: var(--fm-muted); font-size: 12px; }
.fmd-loc-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--fm-neutral-bg); overflow: hidden; }
.fmd-loc-bar i { display: block; height: 100%; border-radius: 6px; background: var(--fm-primary); opacity: .75; }
.fmd-loc-foot { margin: 8px 0 0; font-size: 12px; color: var(--fm-muted); }
.fmd-cz h4.fmc-h { font-size: 13px; font-weight: 700; margin: 6px 0 0; color: var(--fm-ink); }
.fmd-cz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fmd-cz-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--fm-line); border-radius: 12px; background: var(--fm-surface); }
.fmd-cz-ico { flex: 0 0 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--fm-neutral-bg); color: var(--fm-primary); }
.fmd-cz-txt { flex: 1 1 auto; min-width: 0; }
.fmd-cz-txt b { display: block; font-size: 13.5px; color: var(--fm-ink); }
.fmd-cz-txt small { display: block; font-size: 12px; color: var(--fm-muted); line-height: 1.35; }
.fmd-cz-acts { flex: 0 0 auto; display: inline-flex; gap: 4px; }
.fmd-cz-acts .fo-iconbtn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: var(--fm-neutral-bg); color: var(--fm-ink-2); display: inline-flex; align-items: center; justify-content: center; }
.fmd-cz-acts .fo-iconbtn:disabled { opacity: .35; }
.fmd-cz-empty { padding: 8px 10px; font-size: 12.5px; color: var(--fm-muted); border: 1px dashed var(--fm-line); border-radius: 12px; }
@media (max-width: 575.98px) { .fmd-loc { max-width: none; flex: 1 1 100%; } .fmd-custom { flex: 1 1 auto; justify-content: center; } }


/* 15-table-stack.css */
/*
 * Data tables that never get cut off at the right edge (see includes/scripts/ux/15-table-stack.js).
 * A table gets class fm-stacked when it does not fit the width it has (always below 768px). Each row then becomes a small card:
 * the main cell across the top, the other columns two per line with their heading above the value, action buttons along the bottom.
 */
table.fm-stack.fm-stacked, table.fm-stack.fm-stacked > tbody, table.fm-stack.fm-stacked > tfoot { display: block; width: 100% !important; min-width: 0 !important; }
table.fm-stack.fm-stacked > thead { display: none; }
table.fm-stack.fm-stacked > tbody > tr, table.fm-stack.fm-stacked > tfoot > tr {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 14px;
	position: relative; padding: 12px 14px; border-bottom: 1px solid var(--fm-line-2, #e8edf3);
}
table.fm-stack.fm-stacked > tbody > tr:last-child { border-bottom: 0; }
table.fm-stack.fm-stacked > tfoot > tr { border-top: 1px solid var(--fm-line, #e2e8f0); border-bottom: 0; }
table.fm-stack.fm-stacked > tbody > tr > td, table.fm-stack.fm-stacked > tfoot > tr > td {
	display: block; min-width: 0; width: auto !important; padding: 0 !important; border: 0 !important;
	text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; font-size: 13.5px;
}
table.fm-stack.fm-stacked > tbody > tr > td::before, table.fm-stack.fm-stacked > tfoot > tr > td::before {
	content: attr(data-label); display: block; margin-bottom: 2px;
	font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; color: var(--fm-muted, #6b7689);
}
table.fm-stack.fm-stacked td[data-label=""]::before, table.fm-stack.fm-stacked td.fm-stack-main::before,
table.fm-stack.fm-stacked td.fm-stack-act::before, table.fm-stack.fm-stacked td.fm-stack-chk::before { display: none; }
table.fm-stack.fm-stacked td.fm-stack-main, table.fm-stack.fm-stacked td.fm-stack-wide, table.fm-stack.fm-stacked td.fm-stack-act { grid-column: 1 / -1; }
table.fm-stack.fm-stacked td.fm-stack-main { font-size: 14.5px; }
table.fm-stack.fm-stacked td.fm-stack-empty { display: none !important; }
table.fm-stack.fm-stacked td.fm-stack-act { display: flex !important; flex-wrap: wrap; gap: 8px; }
table.fm-stack.fm-stacked td.fm-stack-act .btn { flex: 0 1 auto; }
/* a row with a select box: the box sits in the top right corner of the card */
table.fm-stack.fm-stacked td.fm-stack-chk { position: absolute; top: 12px; right: 12px; }
table.fm-stack.fm-stacked tr:has(> td.fm-stack-chk) > td.fm-stack-main { padding-right: 34px !important; }
/* empty-list message keeps its centring */
table.fm-stack.fm-stacked td.fm-stack-wide[style*="text-align:center"] { text-align: center !important; }
/* the table no longer needs the sideways scroller */
.fm-table-wrap:has(> table.fm-stacked), .fmpl-tablewrap:has(> table.fm-stacked), .bl-inv:has(> table.fm-stacked), .table-responsive:has(> table.fm-stacked) { overflow-x: visible; }

/* products list (table layout): checkbox left of the name, "more" menu in the top right */
table.fmpl-table.fm-stacked > tbody > tr { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); padding: 12px 12px 12px 46px; }
table.fmpl-table.fm-stacked td.fmpl-c-sel { position: absolute; left: 12px; right: auto; top: 14px; }
table.fmpl-table.fm-stacked td.fmpl-c-act { position: absolute; right: 8px; top: 8px; grid-column: auto; display: block !important; }
table.fmpl-table.fm-stacked td.fmpl-c-name { padding-right: 34px !important; }
table.fmpl-table.fm-stacked td.num { text-align: left !important; }
table.fmpl-table.fm-stacked .fm-thumb-fallback, table.fmpl-table.fm-stacked .fm-thumb { width: 34px; height: 34px; }
/* team list (Settings > Account): badges wrap, buttons sit at the bottom */
table.fm-team-table.fm-stacked td .fm-badge { margin: 0 4px 4px 0; }
table.fm-team-table th:first-child { text-align: left; }

/* sales / purchase lists, customers, vendors: one card per row, heading on the left and value on the right.
   (the same look the list already had below 760px, now also used when the table is too wide for a tablet or small laptop) */
table.fl-table.fm-stacked thead { display: none; }
table.fl-table.fm-stacked, table.fl-table.fm-stacked tbody, table.fl-table.fm-stacked tr, table.fl-table.fm-stacked td { display: block; width: 100%; }
table.fl-table.fm-stacked tr.fl-row { padding: 12px 14px; border-bottom: 1px solid var(--fm-line, #e4e8f0); position: relative; }
/* the heading floats left and the whole value stays together on the right (a value with two parts, e.g. contact name and
   e-mail, used to be pulled apart to both edges) */
table.fl-table.fm-stacked td { border: 0; padding: 3px 0; display: block; text-align: right; overflow-wrap: anywhere; }
table.fl-table.fm-stacked td::after { content: ""; display: table; clear: both; }
table.fl-table.fm-stacked td::before { content: attr(data-label); float: left; margin-right: 12px; font-size: 11px; line-height: 20px; text-transform: uppercase; color: var(--fm-muted, #6b7689); font-weight: 700; }
table.fl-table.fm-stacked td .fl-sub { display: block; }
table.fl-table.fm-stacked td.fl-c-main { text-align: left; padding-right: 34px; }
table.fl-table.fm-stacked td.fl-c-main::before, table.fl-table.fm-stacked td.fl-c-chk::before { display: none; }
table.fl-table.fm-stacked td.fl-c-chk { position: absolute; right: 12px; top: 12px; width: auto; padding: 0; }
table.fl-table.fm-stacked td.fl-c-act { display: none !important; }
table.fl-table.fm-stacked td[colspan] { text-align: center; }
table.fl-table.fm-stacked td[colspan]::before { display: none; }
@media (min-width: 761px) {
	/* tablet / laptop cards: two columns of heading-value pairs so a card is not one long thin list */
	table.fl-table.fm-stacked tr.fl-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
	table.fl-table.fm-stacked tr.fl-row > td { width: auto; }
	table.fl-table.fm-stacked tr.fl-row > td.fl-c-main { grid-column: 1 / -1; margin-bottom: 4px; }
}
.fm-table-wrap:has(> table.fl-table.fm-stacked) { overflow-x: visible; }

/* settings tabs (Personal, Global ... Billing): the row scrolls sideways on small screens; a soft fade shows there is more */
@media (max-width: 1399.98px) { .fx-tabs a { padding-left: 11px; padding-right: 11px; } }
@media (max-width: 1199.98px) {
	.fx-tabs { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
	.fx-tabs.is-end { -webkit-mask-image: none; mask-image: none; }
	.fx-tabs::-webkit-scrollbar { display: none; }
}

/* label / value rows (Settings > Personal: e-mail settings, personal defaults): the value goes under the label on phones
   so a long e-mail address is not broken in the middle */
@media (max-width: 575.98px) {
	.fm-me-list > div { flex-direction: column; align-items: flex-start; gap: 2px; }
	.fm-me-list dd { text-align: left; }
}

/* phones: the settings tabs wrap onto extra lines, so every tab is visible without swiping */
@media (max-width: 575.98px) {
	.fx-tabs { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; gap: 2px 0; }
	.fx-tabs a { padding: 9px 10px; font-size: 13px; gap: 6px; }
}

/* "Nothing here yet" rows (one cell spanning the table) and tables inside pop-ups: the message wraps onto more lines
   instead of running off the right edge on phones */
table tr > [colspan]:only-child { white-space: normal; overflow-wrap: anywhere; }
.modal-body table { width: 100%; max-width: 100%; table-layout: auto; }
.modal-body table th, .modal-body table td { white-space: normal; overflow-wrap: anywhere; }
.modal-body table .btn { white-space: nowrap; }
.fm-modal-empty { text-align: center; padding: 18px 12px !important; color: var(--fm-muted, #667085); font-size: 14px; line-height: 1.5; text-transform: none; letter-spacing: 0; }
.fm-modal-empty a { font-weight: 600; white-space: nowrap; }
/* "Add vendor to product" pop-up: vendor name and its button on one centred row; the button drops below a long name on narrow phones */
#product_vendorModal .fm-vendor-row-cp td { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; }
#product_vendorModal .fm-vendor-row-cp .add_vendor_to_product { float: none; margin-left: auto; }


/* 20-bins.css */
/* PICK BINS - inline cell, popover editor, bulk drawer, options card. Scripts: includes/scripts/ux/20-bins-0core.js, 20-bins-bulk.js */
.fmb-cell{display:inline-flex;align-items:center;gap:6px;border:1px dashed transparent;background:none;border-radius:9px;padding:3px 9px;font:600 13px Inter,system-ui,sans-serif;color:#075985;cursor:pointer;min-height:30px}
.fmb-cell:hover,.fmb-cell:focus-visible{background:#e0f2fe;border-color:#7dd3fc;outline:0}
.fmb-cell .fmb-label{font-variant-numeric:tabular-nums;letter-spacing:.01em}
.fmb-cell.is-empty{color:#667085;font-weight:500}.fmb-cell.is-empty .fmb-add{opacity:.75}
.fmb-label{display:inline-block;background:#f0f9ff;color:#075985;border-radius:8px;padding:1px 8px;font-weight:700;font-size:12.5px}
.fmb-cell .fmb-label{background:#f0f9ff}
.fmb-grid .fmb-cell{min-width:90px}
/* popover */
.fmb-pop{position:fixed;z-index:610000;width:320px;max-width:calc(100vw - 16px);background:#fff;border:1px solid #d6e4ee;border-radius:14px;box-shadow:0 18px 50px rgba(8,47,73,.28);padding:14px}
.fmb-pop-t{font:700 13px "Plus Jakarta Sans",Inter,sans-serif;margin-bottom:8px;color:#0f2a3d}
.fmb-pop-g{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.fmb-pop-g label{display:block;font-size:11.5px;color:#667085}.fmb-pop-g input{margin-top:3px;height:38px;text-align:center}
.fmb-prev{margin:10px 0 2px;font-size:12.5px;color:#667085}.fmb-prev b{color:#075985}
.fmb-pop-f{display:flex;align-items:center;gap:8px;margin-top:10px}.fmb-grow{flex:1}
/* bulk drawer */
.fmb-bulk{padding:4px 2px}
.fmb-bulk-top{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;background:#f3f8fc;border-radius:12px;padding:10px 12px;margin-bottom:12px}
.fmb-bulk-top label{font-size:11.5px;color:#667085;display:block}.fmb-bulk-top input{width:92px;height:36px}
.fmb-bulk-note{font-size:12.5px;color:#667085;margin:0 0 10px}
.fmb-bulk-table{width:100%;border-collapse:collapse}
.fmb-bulk-table th{font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:#667085;text-align:left;padding:6px 6px;border-bottom:1px solid #e4e8f0;position:sticky;top:0;background:#fff}
.fmb-bulk-table td{padding:6px 6px;border-bottom:1px solid #eef1f6;vertical-align:middle}
.fmb-bulk-table td input{width:86px;height:34px;text-align:center}
.fmb-bulk-table .fmb-nm b{display:block}.fmb-bulk-table .fmb-nm small{color:#667085}
.fmb-bulk-table tr.is-changed td{background:#fffbeb}
.fmb-bulk-foot{display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-top:14px;position:sticky;bottom:0;background:#fff;padding:10px 0}
/* options card */
.fmb-opt{display:grid;gap:14px;max-width:560px}.fmb-f span{display:block;font-weight:600;margin-bottom:3px}.fmb-f small,.fmb-c small{color:#667085;display:block}
.fmb-c{display:flex;gap:10px;align-items:flex-start;cursor:pointer}.fmb-c input{margin-top:4px}.fmb-c small{display:inline}
.fmb-actions{display:flex;justify-content:flex-end}
@media (max-width:560px){.fmb-bulk-table td input{width:64px}.fmb-cell{min-height:38px}}
.fmb-cell,.fmb-label,.fmb-add{white-space:nowrap}

/* dark theme: the position popover and the bulk editor were white with dark-grey text */
:root[data-theme="dark"] .fmb-pop { background: var(--fm-surface); color: var(--fm-ink); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmb-pop-t { color: var(--fm-ink); }
:root[data-theme="dark"] .fmb-pop-g label, :root[data-theme="dark"] .fmb-bulk-top label, :root[data-theme="dark"] .fmb-bulk-note, :root[data-theme="dark"] .fmb-bulk-table .fmb-nm small, :root[data-theme="dark"] .fmb-bulk-table th { color: var(--fm-muted); }
:root[data-theme="dark"] .fmb-bulk-top { background: var(--fm-bg); }
:root[data-theme="dark"] .fmb-bulk-table th, :root[data-theme="dark"] .fmb-bulk-foot { background: var(--fm-surface); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmb-bulk-table td { border-color: var(--fm-line-2); }


/* 20-products.css */
/*
 * Products workspace (/account/products/): stats, search, filter chips, sort chips, card grid + table, floating bulk bar,
 * onboarding and the small dialogs. Markup: fm-products.php and includes/functions/products_ux.php; behaviour: includes/scripts/ux/20-products.js.
 * Uses the design tokens of fm-ui.css (--fm-*) so it follows the brand colour.
 */

.fmpl { --fmpl-ok: #15803d; --fmpl-low: #b45309; --fmpl-out: #b91c1c; --fmpl-na: #94a3b8; padding-bottom: 96px; }

/* ---------- stats strip ---------- */
.fmpl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.fmpl-stat { background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; padding: 12px 16px; text-align: left; display: flex; flex-direction: column; gap: 1px; box-shadow: var(--fm-shadow-sm); font: inherit; color: inherit; }
.fmpl-stat small { color: var(--fm-muted, #6b7689); font-weight: 600; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; }
.fmpl-stat b { font: 700 22px/1.2 'Plus Jakarta Sans', Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.fmpl-stat > span { color: var(--fm-muted, #6b7689); font-size: 12.5px; }
.fmpl-stat.is-link { cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.fmpl-stat.is-link:hover { border-color: var(--fm-primary-100, #c9e8f7); box-shadow: 0 6px 18px rgba(3, 105, 161, .1); transform: translateY(-1px); }
.fmpl-stat.is-warn b { color: var(--fmpl-low); }
.fmpl-stat.is-bad b { color: var(--fmpl-out); }
.fmpl-attn { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fmpl-attn button { border: 1px solid var(--fm-line, #e4e8f0); background: var(--fm-bg, #f2f7fb); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--fm-ink-2, #3a4560); }
.fmpl-attn button b { font: 700 12.5px Inter, sans-serif; color: var(--fm-ink, #1b2437); }
.fmpl-attn button:not(:disabled):hover { background: var(--fm-primary-50, #e9f6fd); border-color: var(--fm-primary-100, #c9e8f7); }
.fmpl-attn button:disabled { opacity: .45; cursor: default; }

/* ---------- toolbar ---------- */
.fmpl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.fmpl-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.fmpl-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--fm-muted, #6b7689); font-size: 13px; pointer-events: none; }
.fmpl-search input { width: 100%; height: 42px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-surface, #fff); padding: 0 40px 0 36px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.fmpl-search input:focus { outline: none; border-color: var(--fm-accent, #0ea5e9); box-shadow: 0 0 0 3px rgba(14, 165, 233, .18); }
.fmpl-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.fmpl-search input:focus + kbd, .fmpl-search input:not(:placeholder-shown) + kbd { display: none; }
.fmpl-search.is-busy > i { color: var(--fm-accent, #0ea5e9); animation: fmpl-pulse 1s ease-in-out infinite; }
@keyframes fmpl-pulse { 50% { opacity: .35; } }

.fmpl-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.fmpl-chipwrap { position: relative; }
.fmpl-chip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--fm-ink-2, #3a4560); transition: background .15s, border-color .15s; white-space: nowrap; }
.fmpl-chip > i:first-child { color: var(--fm-muted, #6b7689); font-size: 12px; }
.fmpl-chip:hover { border-color: var(--fm-primary-100, #c9e8f7); background: var(--fm-primary-50, #e9f6fd); }
.fmpl-chip.is-on { background: var(--fm-primary-50, #e9f6fd); border-color: var(--fm-primary-100, #c9e8f7); color: var(--fm-primary-600, #075985); font-weight: 600; }
.fmpl-chip.is-on > i:first-child { color: var(--fm-primary, #0369a1); }
.fmpl-caret { font-size: 9px; opacity: .6; }

.fmpl-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 250px; max-width: min(340px, 92vw); max-height: min(60vh, 420px); overflow: auto; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; box-shadow: var(--fm-shadow-lg); padding: 6px; }
.fmpl-pop[hidden] { display: none; }
.fmpl-pop h4 { margin: 8px 10px 4px; font: 600 11.5px Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--fm-muted, #6b7689); }
.fmpl-opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--fm-ink, #1b2437); }
.fmpl-opt:hover { background: var(--fm-primary-50, #e9f6fd); }
.fmpl-opt.is-on { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); font-weight: 600; }
.fmpl-opt .n { margin-left: auto; color: var(--fm-muted, #6b7689); font-size: 12px; font-variant-numeric: tabular-nums; }
.fmpl-opt .fmpl-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.fmpl-pop .fmpl-form { padding: 8px 10px 10px; display: grid; gap: 8px; }
.fmpl-pop .fmpl-form label { font-size: 12.5px; font-weight: 600; color: var(--fm-ink-2, #3a4560); }
.fmpl-viewrow { display: flex; align-items: center; }
.fmpl-viewrow .fmpl-opt { flex: 1; }
.fmpl-viewrow .fmpl-x { border: 0; background: none; color: var(--fm-muted, #6b7689); padding: 6px 9px; border-radius: 8px; }
.fmpl-viewrow .fmpl-x:hover { background: #fee2e2; color: #b91c1c; }

.fmpl-viewtoggle { display: inline-flex; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-surface, #fff); padding: 3px; margin-left: auto; }
.fmpl-viewtoggle button { border: 0; background: none; width: 38px; height: 32px; border-radius: 9px; color: var(--fm-muted, #6b7689); }
.fmpl-viewtoggle button.is-on { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary, #0369a1); }

.fmpl-sortrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.fmpl-sortlabel { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--fm-muted, #6b7689); margin-right: 4px; }
.fmpl-sort { border: 1px solid transparent; background: none; border-radius: 999px; padding: 4px 11px; font-size: 13px; color: var(--fm-ink-2, #3a4560); }
.fmpl-sort i { font-size: 10px; margin-left: 5px; opacity: 0; }
.fmpl-sort:hover { background: var(--fm-surface, #fff); border-color: var(--fm-line, #e4e8f0); }
.fmpl-sort.is-on { background: var(--fm-surface, #fff); border-color: var(--fm-primary-100, #c9e8f7); color: var(--fm-primary-600, #075985); font-weight: 600; }
.fmpl-sort.is-on i { opacity: 1; }
.fmpl-sortspacer { flex: 1; }
.fmpl-total { color: var(--fm-muted, #6b7689); font-size: 13px; }

.fmpl-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; align-items: center; }
.fmpl-pills[hidden] { display: none; }
.fmpl-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); border-radius: 999px; padding: 3px 5px 3px 11px; font-size: 13px; font-weight: 500; }
.fmpl-pill button { border: 0; background: rgba(3, 105, 161, .12); color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; line-height: 1; }
.fmpl-pill button:hover { background: rgba(3, 105, 161, .25); }
.fmpl-link { border: 0; background: none; color: var(--fm-primary, #0369a1); font-weight: 600; padding: 0 4px; font-size: 13px; }
.fmpl-link:hover { text-decoration: underline; }

/* ---------- card grid ---------- */
.fmpl-results { min-height: 160px; transition: opacity .15s; }
.fmpl-results[aria-busy="true"] { opacity: .55; }
.fmpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 14px; }
.fmpl-card { position: relative; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--fm-shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.fmpl-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(3, 105, 161, .13); border-color: var(--fm-primary-100, #c9e8f7); }
.fmpl-card:focus-visible, .fmpl-row:focus-visible { outline: 3px solid rgba(14, 165, 233, .55); outline-offset: 1px; }
.fmpl-card.is-selected { border-color: var(--fm-primary, #0369a1); box-shadow: 0 0 0 2px var(--fm-primary, #0369a1); }
.fmpl-card.is-archived { opacity: .7; }
.fmpl-pic { position: relative; aspect-ratio: 4 / 3; background: #eef2f7; overflow: hidden; }
.fmpl-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fmpl-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 800 34px 'Plus Jakarta Sans', Inter, sans-serif; letter-spacing: .02em; color: hsl(var(--h, 205) 55% 32%); background: linear-gradient(135deg, hsl(var(--h, 205) 80% 94%), hsl(var(--h, 205) 70% 86%)); }
.fmpl-badges { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.fmpl-badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.fmpl-badge.is-out { background: #fee2e2; color: #991b1b; }
.fmpl-badge.is-low { background: #fef3c7; color: #92400e; }
.fmpl-badge.is-info { background: #e0f2fe; color: #075985; }
.fmpl-badge.is-archived { background: #e2e8f0; color: #475569; }
.fmpl-body { padding: 11px 14px 13px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.fmpl-name { margin: 0; font: 650 14.5px/1.3 'Plus Jakarta Sans', Inter, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.fmpl-sub { color: var(--fm-muted, #6b7689); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmpl-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.fmpl-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; min-width: 0; }
.fmpl-price b { font: 750 17px 'Plus Jakarta Sans', Inter, sans-serif; font-variant-numeric: tabular-nums; }
.fmpl-price small { color: var(--fm-muted, #6b7689); font-size: 12px; }
.fmpl-margin { display: inline-block; border-radius: 6px; padding: 0 6px; font-size: 11.5px; font-weight: 700; background: var(--fm-neutral-bg, #eef1f6); color: var(--fm-ink-2, #3a4560); }
.fmpl-margin.is-good { background: #dcfce7; color: #166534; }
.fmpl-margin.is-ok { background: #e0f2fe; color: #075985; }
.fmpl-margin.is-thin { background: #fef3c7; color: #92400e; }
.fmpl-margin.is-neg { background: #fee2e2; color: #991b1b; }

/* stock-health ring */
.fmpl-ring { position: relative; flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.fmpl-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fmpl-ring circle { fill: none; stroke-width: 3.6; }
.fmpl-ring .bg { stroke: #e5e9f0; }
.fmpl-ring .fg { stroke: var(--fmpl-ok); stroke-linecap: round; transition: stroke-dasharray .4s; }
.fmpl-ring.is-low .fg { stroke: #f59e0b; }
.fmpl-ring.is-out .fg { stroke: var(--fmpl-out); stroke-opacity: 0; }
.fmpl-ring b { position: relative; font: 700 11px Inter, sans-serif; font-variant-numeric: tabular-nums; max-width: 30px; overflow: hidden; text-overflow: ellipsis; }
.fmpl-ring.is-out b { color: var(--fmpl-out); }
.fmpl-ring.is-na b { color: var(--fmpl-na); font-size: 15px; }

/* selection check */
.fmpl-check { position: absolute; z-index: 3; top: 8px; left: 8px; margin: 0; cursor: pointer; opacity: 0; transition: opacity .12s; }
.fmpl-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.fmpl-check span { display: inline-block; width: 24px; height: 24px; border-radius: 8px; background: rgba(255, 255, 255, .96); border: 2px solid #b6c1d1; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); position: relative; }
.fmpl-check input:checked + span { background: var(--fm-primary, #0369a1); border-color: var(--fm-primary, #0369a1); }
.fmpl-check input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.fmpl-check input:focus-visible + span { outline: 3px solid rgba(14, 165, 233, .55); }
.fmpl-card:hover .fmpl-check, .fmpl-card:focus-within .fmpl-check, .fmpl-card.is-selected .fmpl-check, .fmpl.has-sel .fmpl-check, .fmpl-check:has(input:checked) { opacity: 1; }
@media (hover: none) { .fmpl-check { opacity: 1; } }

/* ---------- table ---------- */
.fmpl-tablewrap { background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; overflow-x: auto; box-shadow: var(--fm-shadow-sm); }
.fmpl-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.fmpl-table th { text-align: left; font: 600 11.5px Inter, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--fm-muted, #6b7689); padding: 12px 12px; border-bottom: 1px solid var(--fm-line, #e4e8f0); background: #fbfcfe; position: sticky; top: 0; white-space: nowrap; }
.fmpl-table th[data-sort] { cursor: pointer; user-select: none; }
.fmpl-table th[data-sort]:hover { color: var(--fm-primary, #0369a1); }
.fmpl-table th.is-sorted { color: var(--fm-primary, #0369a1); }
.fmpl-table th.is-sorted::after { content: " \2193"; }
.fmpl-table th.is-sorted.is-asc::after { content: " \2191"; }
.fmpl-table td { padding: 10px 12px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.fmpl-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fmpl-table th.num { text-align: right; }
.fmpl-row { cursor: pointer; }
.fmpl-row:hover { background: var(--fm-primary-50, #e9f6fd); }
.fmpl-row.is-selected { background: #dff1fb; }
.fmpl-row.is-archived .fm-cell-main { color: var(--fm-muted, #6b7689); }
.fmpl-table .fmpl-c-sel { width: 44px; padding-right: 0; }
.fmpl-table .fmpl-check { position: static; opacity: 1; display: inline-block; }
.fmpl-table .fmpl-check span { box-shadow: none; }
.fmpl-table .fm-thumb-fallback { background: hsl(var(--h, 205) 70% 90%); color: hsl(var(--h, 205) 55% 30%); }
.fmpl-edit { cursor: text; }
.fmpl-edit:hover { background: rgba(14, 165, 233, .09); box-shadow: inset 0 -2px 0 var(--fm-accent, #0ea5e9); }
.fmpl-edit input { width: 96px; text-align: right; border: 1px solid var(--fm-accent, #0ea5e9); border-radius: 8px; padding: 4px 8px; font: inherit; box-shadow: 0 0 0 3px rgba(14, 165, 233, .18); }
.fmpl-edit.is-saving { opacity: .5; }
.fmpl-edit.is-flash { animation: fmpl-flash 1.2s; }
@keyframes fmpl-flash { 0% { background: #bbf7d0; } 100% { background: transparent; } }
.fmpl-bar { display: inline-block; width: 46px; height: 7px; background: #e5e9f0; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.fmpl-bar i { display: block; height: 100%; background: var(--fmpl-ok); border-radius: 99px; }
.fmpl-bar.is-low i { background: #f59e0b; }
.fmpl-bar.is-out i { background: var(--fmpl-out); }
.fmpl-qty.is-out { color: var(--fmpl-out); }
.fmpl-qty.is-low { color: var(--fmpl-low); }
.fmpl-more { border: 0; background: none; width: 30px; height: 30px; border-radius: 8px; color: var(--fm-muted, #6b7689); }
.fmpl-more:hover { background: var(--fm-surface, #fff); color: var(--fm-primary, #0369a1); box-shadow: 0 0 0 1px var(--fm-line, #e4e8f0); }
.fmpl-c-act { width: 40px; text-align: right; }

.fmpl-loadmore { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 18px 0; }
.fmpl-loadmore[hidden] { display: none; }
.fmpl-sentinel { height: 1px; width: 1px; }
.fmpl-empty[hidden] { display: none; }
.fmpl-hint { text-align: center; color: var(--fm-muted, #6b7689); font-size: 12.5px; margin-top: 18px; }
@media (max-width: 760px) { .fmpl-hint { display: none; } }

/* skeleton cards while the first answer is on its way */
.fmpl-sk { height: 270px; border-radius: 16px; }

/* ---------- floating bulk bar ---------- */
.fmpl-bulk { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1050; display: flex; align-items: center; gap: 14px; background: #0c2d44; color: #fff; border-radius: 18px; padding: 10px 12px 10px 18px; box-shadow: 0 18px 48px rgba(8, 47, 73, .45); max-width: calc(100vw - 24px); animation: fmpl-up .18s ease-out; }
.fmpl-bulk[hidden] { display: none; }
@keyframes fmpl-up { from { opacity: 0; transform: translate(-50%, 14px); } }
.fmpl-bulk-count { white-space: nowrap; font-size: 14px; }
.fmpl-bulk-count .fmpl-link { color: #7dd3fc; }
.fmpl-bulk-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.fmpl-bulk-actions button { border: 0; background: rgba(255, 255, 255, .08); color: #fff; border-radius: 11px; padding: 8px 12px; font-size: 13.5px; display: inline-flex; gap: 7px; align-items: center; }
.fmpl-bulk-actions button:hover { background: rgba(255, 255, 255, .18); }
.fmpl-bulk-actions button[hidden] { display: none; }
.fmpl-bulk-actions button.is-danger:hover { background: #b91c1c; }
.fmpl-bulk-x { border: 0; background: none; color: #bfd6e6; width: 34px; height: 34px; border-radius: 50%; }
.fmpl-bulk-x:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* ---------- onboarding ---------- */
.fmpl-onboard { background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 20px; padding: 34px 28px; box-shadow: var(--fm-shadow-sm); }
.fmpl-onboard-hero { text-align: center; max-width: 560px; margin: 0 auto 26px; }
.fmpl-onboard-icon { display: inline-flex; width: 64px; height: 64px; border-radius: 20px; align-items: center; justify-content: center; font-size: 28px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary, #0369a1); margin-bottom: 12px; }
.fmpl-onboard-hero h2 { font: 750 24px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 6px; }
.fmpl-onboard-hero p { color: var(--fm-muted, #6b7689); margin: 0; }
.fmpl-onboard-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.fmpl-step { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--fm-bg, #f2f7fb); border: 1px solid var(--fm-line-2, #eef1f6); border-radius: 16px; padding: 18px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; font: inherit; }
.fmpl-step:hover { transform: translateY(-2px); border-color: var(--fm-primary-100, #c9e8f7); box-shadow: 0 10px 24px rgba(3, 105, 161, .12); color: inherit; }
.fmpl-step > i { font-size: 22px; color: var(--fm-primary, #0369a1); margin-bottom: 6px; }
.fmpl-step b { font: 700 15px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmpl-step span { color: var(--fm-muted, #6b7689); font-size: 13px; }

/* ---------- small dialogs of the list (category, price change, labels) ---------- */
.fmx-modal__box.fmpl-dlg { width: min(520px, 100%); }
.fmpl-dlg .fmpl-field { margin: 0 0 12px; }
.fmpl-dlg label.lbl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.fmpl-dlg .fmpl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fmpl-preview { background: var(--fm-bg, #f2f7fb); border-radius: 12px; padding: 10px 12px; font-size: 13px; min-height: 44px; }
.fmpl-preview table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.fmpl-preview td { padding: 3px 0; }
.fmpl-preview td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fmpl-preview .arrow { color: var(--fm-muted, #6b7689); padding: 0 6px; }
.fmpl-dlg .fmx-modal__actions { margin-top: 6px; }
.fmpl-dlg-help { color: var(--fm-muted, #6b7689); font-size: 12.5px; margin: 4px 0 0; }

/* actions menu of a table row */
.fmpl-menu { position: fixed; z-index: 1060; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; box-shadow: var(--fm-shadow-lg); padding: 5px; min-width: 190px; }
.fmpl-menu button, .fmpl-menu a { display: flex; gap: 9px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px 11px; border-radius: 8px; font-size: 14px; color: var(--fm-ink, #1b2437); text-decoration: none; }
.fmpl-menu button:hover, .fmpl-menu a:hover { background: var(--fm-primary-50, #e9f6fd); }
.fmpl-menu i { width: 16px; text-align: center; color: var(--fm-muted, #6b7689); }

/* drawer additions: prev / next product */
.fmx-drawer__panel > header .fmpl-nav { display: inline-flex; gap: 6px; margin-right: auto; margin-left: 12px; }
.fmx-drawer__panel > header .fmpl-nav button { background: #f1f5f9; border: 0; width: 32px; height: 32px; border-radius: 9px; color: #334155; }
.fmx-drawer__panel > header .fmpl-nav button:disabled { opacity: .35; }

/* ---------- small screens ---------- */
@media (max-width: 900px) { .fmpl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
	.fmpl { padding-bottom: 120px; }
	.fmpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.fmpl-body { padding: 9px 10px 11px; }
	.fmpl-name { font-size: 13.5px; }
	.fmpl-initials { font-size: 26px; }
	.fmpl-price b { font-size: 15px; }
	.fmpl-search { max-width: none; flex-basis: 100%; }
	.fmpl-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -2px; flex-basis: 100%; scrollbar-width: none; }
	.fmpl-chips::-webkit-scrollbar { display: none; }
	.fmpl-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; max-width: none; max-height: 70vh; }
	.fmpl-viewtoggle { margin-left: 0; }
	.fmpl-bulk { left: 8px; right: 8px; bottom: 8px; transform: none; border-radius: 16px; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
	@keyframes fmpl-up { from { opacity: 0; transform: translateY(14px); } }
	.fmpl-bulk-actions { flex: 1 1 100%; }
	.fmpl-bulk-actions button span { display: none; }
	.fmpl-bulk-actions button { padding: 10px 14px; }
	.fmpl-bulk-x { position: absolute; top: 6px; right: 6px; }
	.fmpl-onboard { padding: 24px 16px; }
	.fmpl-stat b { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .fmpl-card, .fmpl-stat, .fmpl-step, .fmpl-results, .fmpl-ring .fg { transition: none !important; } .fmpl-bulk { animation: none; } .fmpl-search.is-busy > i { animation: none; } }

/* the "..." button on a card */
.fmpl-card-more { position: absolute; z-index: 3; top: 8px; right: 8px; background: rgba(255, 255, 255, .96); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .12s; }
.fmpl-card:hover .fmpl-card-more, .fmpl-card:focus-within .fmpl-card-more { opacity: 1; }
@media (hover: none) { .fmpl-card-more { opacity: 1; } }

/* a card / row that was just refreshed after an edit */
.fmpl-flash { animation: fmpl-flashbg 1.4s ease-out; }
@keyframes fmpl-flashbg { 0% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { .fmpl-flash { animation: none; } }

/* ---------- import wizard (drawer) ---------- */
.fmimp { padding: 20px 24px 28px; }
.fmimp-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 22px; padding: 0; }
.fmimp-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fm-muted, #6b7689); font-weight: 600; }
.fmimp-steps li span { width: 24px; height: 24px; border-radius: 50%; background: #e5e9f0; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #475569; }
.fmimp-steps li.is-on { color: var(--fm-primary, #0369a1); }
.fmimp-steps li.is-on span { background: var(--fm-primary, #0369a1); color: #fff; }
.fmimp-steps li.is-done span { background: #22c55e; color: #fff; }
.fmimp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 38px 20px; border: 2px dashed var(--fm-primary-100, #c9e8f7); background: var(--fm-primary-50, #e9f6fd); border-radius: 18px; cursor: pointer; margin: 0 0 16px; transition: border-color .15s, background .15s; }
.fmimp-drop i { font-size: 34px; color: var(--fm-primary, #0369a1); }
.fmimp-drop b { font: 700 16px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmimp-drop span, .fmimp-drop em { color: var(--fm-muted, #6b7689); font-size: 13px; font-style: normal; }
.fmimp-drop:hover, .fmimp-drop.is-over { border-color: var(--fm-accent, #0ea5e9); background: #dff1fb; }
.fmimp-tips { color: var(--fm-ink-2, #3a4560); font-size: 13.5px; padding-left: 18px; margin: 0 0 14px; }
.fmimp-tips li { margin: 3px 0; }
.fmimp-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; margin-bottom: 14px; }
.fmimp-file > i { font-size: 26px; color: var(--fm-primary, #0369a1); }
.fmimp-file div { flex: 1; min-width: 0; }
.fmimp-file b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmimp-file span { color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmimp-note { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin: 0 0 14px; }
.fmimp-note.is-warn { background: #fef3c7; color: #92400e; }
.fmimp-mode { display: grid; gap: 8px; margin-bottom: 16px; }
.fmimp-mode label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; padding: 10px 12px; cursor: pointer; margin: 0; }
.fmimp-mode label:has(input:checked) { border-color: var(--fm-primary, #0369a1); background: var(--fm-primary-50, #e9f6fd); }
.fmimp-mode small { display: block; color: var(--fm-muted, #6b7689); }
.fmimp-map { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fmimp-map th { text-align: left; font: 600 11.5px Inter, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--fm-muted, #6b7689); padding: 8px 6px; border-bottom: 1px solid var(--fm-line, #e4e8f0); }
.fmimp-map td { padding: 6px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.fmimp-map td:nth-child(2) { width: 44%; }
.fmimp-ex { color: var(--fm-muted, #6b7689); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmimp-sep td { font-weight: 700; padding-top: 14px; color: var(--fm-ink-2, #3a4560); border-bottom: 0; }
.fmimp-map abbr { color: var(--fm-danger, #b91c1c); text-decoration: none; }
.fmimp-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding-top: 14px; }
.fmimp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fmimp-tile { background: var(--fm-bg, #f2f7fb); border-radius: 14px; padding: 14px; text-align: center; }
.fmimp-tile b { display: block; font: 800 26px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmimp-tile span { color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmimp-tile.is-ok b { color: #15803d; }
.fmimp-tile.is-warn b { color: #b45309; }
.fmimp-h { font: 700 14px 'Plus Jakarta Sans', Inter, sans-serif; margin: 16px 0 6px; }
.fmimp-errs { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow: auto; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; }
.fmimp-errs li { padding: 8px 12px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); font-size: 13px; }
.fmimp-errs li:last-child { border-bottom: 0; }
.fmimp-done { text-align: center; padding: 18px 0 6px; }
.fmimp-doneicon { display: inline-flex; width: 60px; height: 60px; border-radius: 50%; background: #dcfce7; color: #15803d; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 8px; }
.fmimp-done h3 { font: 750 22px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 4px; }
@media (max-width: 640px) { .fmimp { padding: 14px 14px 24px; } .fmimp-steps li { font-size: 0; gap: 0; justify-content: center; } .fmimp-steps li span { font-size: 12px; } .fmimp-map td:nth-child(3), .fmimp-map th:nth-child(3) { display: none; } .fmimp-map td:nth-child(2) { width: 55%; } }

/* phones: everything fits the screen width, nothing runs off the right edge.
   The numbers sit two per row, the filter buttons and sort options wrap onto extra lines; search and layout toggle share a line. */
@media (max-width: 720px) {
	.fmpl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 12px; }
	.fmpl-stat { min-width: 0; padding: 10px 12px; }
	.fmpl-stat small { font-size: 10.5px; }
	.fmpl-stat > span { font-size: 11.5px; line-height: 1.35; }
	.fmpl-stat--attn { grid-column: 1 / -1; }
	.fmpl-search { flex: 1 1 0; min-width: 0; order: 1; }
	.fmpl-viewtoggle { order: 2; margin-left: 0; }
	.fmpl-chips { order: 3; flex-wrap: wrap; overflow: visible; margin: 0; padding-bottom: 0; gap: 6px; }
	.fmpl-chip { height: 34px; padding: 0 11px; font-size: 13px; }
	.fmpl-toolbar { gap: 8px; }
	.fmpl-sortrow { flex-wrap: wrap; overflow: visible; gap: 4px; }
	.fmpl-sort, .fmpl-sortlabel { white-space: nowrap; }
	.fmpl-sortspacer { flex-basis: 100%; height: 0; }
	.fmpl-total { white-space: nowrap; }
}

/* ---------- dark theme: surfaces above use var(--fm-surface); the text on them must follow the theme too ---------- */
.fmpl-card, .fmpl-stat, .fmpl-chip, .fmpl-pop, .fmpl-viewtoggle, .fmpl-tablewrap, .fmpl-onboard, .fmpl-menu, .fmpl-search input { color: var(--fm-ink, #1b2437); }
.fmpl-badge { color: #1f2937; } /* the badges sit on the product picture, so they stay light in both themes */
.fmpl-card-more { color: #334155; }
:root[data-theme="dark"] .fmpl { --fmpl-ok: #4ade80; --fmpl-low: #fbbf24; --fmpl-out: #f87171; } /* stock-state text tones that read on the dark surface */
:root[data-theme="dark"] .fmpl-pic { background: #1b2b3f; }
:root[data-theme="dark"] .fmpl-table th { background: #0f1c2c; }
:root[data-theme="dark"] .fmpl-row.is-selected { background: rgba(56, 189, 248, .16); }
:root[data-theme="dark"] .fmpl-bar, :root[data-theme="dark"] .fmpl-ring .bg { background: #26374b; stroke: #26374b; }
:root[data-theme="dark"] .fmpl-bar { background: #26374b; }
:root[data-theme="dark"] .fmpl-opt.is-on, :root[data-theme="dark"] .fmpl-chip.is-on, :root[data-theme="dark"] .fmpl-sort.is-on { background: var(--fm-primary-50); color: var(--fm-primary-600); }
:root[data-theme="dark"] .fmpl-margin.is-good { background: var(--fm-success-bg); color: var(--fm-success); }
:root[data-theme="dark"] .fmpl-margin.is-ok { background: var(--fm-info-bg); color: var(--fm-info); }
:root[data-theme="dark"] .fmpl-margin.is-thin { background: var(--fm-warning-bg); color: var(--fm-warning); }
:root[data-theme="dark"] .fmpl-margin.is-neg { background: var(--fm-danger-bg); color: var(--fm-danger); }
:root[data-theme="dark"] .fmpl-stat.is-warn b { color: var(--fm-warning); }
:root[data-theme="dark"] .fmpl-stat.is-bad b { color: var(--fm-danger); }
:root[data-theme="dark"] .fmpl-qty.is-out { color: var(--fm-danger); }
:root[data-theme="dark"] .fmpl-qty.is-low { color: var(--fm-warning); }
:root[data-theme="dark"] .fmpl-nav button, :root[data-theme="dark"] .fmx-drawer__panel > header .fmpl-nav button { background: var(--fm-neutral-bg); color: var(--fm-ink-2); }
:root[data-theme="dark"] .fmimp-foot { background: linear-gradient(transparent, var(--fm-surface) 30%); }
:root[data-theme="dark"] .fmimp-steps li span { background: #26374b; color: var(--fm-ink-2); }
:root[data-theme="dark"] .fmimp-drop:hover, :root[data-theme="dark"] .fmimp-drop.is-over { background: var(--fm-primary-100); }


/* 21-contacts-import.css */
/* Customer / vendor import wizard - it reuses the .fmimp-* styles of 20-products.css; this file only keeps the warning notes readable in the dark theme. */
:root[data-theme="dark"] .fmimp-note.is-warn { background: var(--fm-warning-bg); color: var(--fm-warning); }
:root[data-theme="dark"] .fmimp-note a { color: inherit; text-decoration: underline; }
:root[data-theme="dark"] .fmimp-tile.is-ok b { color: var(--fm-success); }
:root[data-theme="dark"] .fmimp-tile.is-warn b { color: var(--fm-warning); }
:root[data-theme="dark"] .fmimp-doneicon { background: var(--fm-success-bg); color: var(--fm-success); }
.fmimp-note a { font-weight: 600; }


/* 22-custom-fields.css */
/*
 * Custom fields - the inputs on the product / customer / vendor / order / purchase order forms (.fmcf)
 * and the designer in Options > Global > Custom fields (.fmcf-row ...).
 * Markup comes from includes/functions/custom_fields.php, behaviour from includes/scripts/ux/22-custom-fields.js.
 */

/* ---------- the inputs on a record form ---------- */
.fmcf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.fmcf-field { min-width: 0; }
.fmcf-field.fmcf-wide { grid-column: 1 / -1; }
.fmcf-field > label { display: block; margin: 0 0 4px; font-weight: 600; font-size: 13px; color: var(--fm-ink-2, #3a4560); }
.fmcf-req { color: var(--fm-danger, #b91c1c); margin-left: 3px; text-decoration: none; cursor: help; }
.fmcf-help { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--fm-muted, #6b7689); }
.fmcf-checks { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.fmcf-check { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 11px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 999px; background: #fff; font-weight: 500; font-size: 13px; cursor: pointer; }
.fmcf-check:has(input:checked) { background: var(--fm-primary-50, #e9f6fd); border-color: var(--fm-primary-100, #c9e8f7); color: var(--fm-primary-600, #075985); }
.fmcf-check input { margin: 0; }
.fmcf .is-invalid, .fmcf-field.is-invalid .form-control { border-color: var(--fm-danger, #b91c1c); }
.fmcf-empty { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 0 0 10px; }
@media (max-width: 640px) { .fmcf { grid-template-columns: 1fr; } }

/* ---------- the designer dialog ---------- */
#company_fm_custom_fields_Modal .modal-dialog { max-width: 760px; }
#company_fm_custom_fields_Modal .fm_custom_fields_list { margin-top: 18px !important; }
.fmcf-lead { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 6px 0 0; }
.fmcf-rows { display: grid; gap: 10px; }
.fmcf-empty-state { text-align: center; padding: 26px 16px; border: 2px dashed var(--fm-primary-100, #c9e8f7); border-radius: 14px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); }
.fmcf-empty-state b { display: block; font-size: 15px; margin-bottom: 4px; }

.fmcf-row { background: var(--fm-bg, #f2f7fb); border: 1px solid var(--fm-line-2, #eef1f6) !important; border-radius: 14px; padding: 10px 12px !important; margin: 0 !important; transition: box-shadow .15s, opacity .15s; }
.fmcf-row.is-dragging { opacity: .45; }
.fmcf-row.is-new { box-shadow: 0 0 0 2px var(--fm-accent, #0ea5e9); }
.fmcf-row-main { display: grid; grid-template-columns: 24px minmax(0, 1fr) 150px auto auto auto; gap: 8px; align-items: center; }
.fmcf-handle { cursor: grab; color: var(--fm-muted, #6b7689); text-align: center; padding: 8px 0; user-select: none; }
.fmcf-handle:active { cursor: grabbing; }
.fmcf-move { display: inline-flex; flex-direction: column; gap: 1px; }
.fmcf-move button, .fmcf-more { border: 1px solid var(--fm-line, #e4e8f0); background: #fff; color: var(--fm-ink-2, #3a4560); border-radius: 8px; width: 32px; height: 32px; line-height: 1; font-size: 12px; }
.fmcf-move button { height: 17px; border-radius: 5px; font-size: 9px; width: 28px; }
.fmcf-move button:hover, .fmcf-more:hover { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary, #0369a1); }
.fmcf-more.is-on { color: var(--fm-primary, #0369a1); border-color: var(--fm-primary-100, #c9e8f7); background: var(--fm-primary-50, #e9f6fd); }
.fmcf-row-extra { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--fm-line, #e4e8f0); display: grid; gap: 10px; }
.fmcf-row-extra[hidden], .fmcf-opts[hidden] { display: none; }
.fmcf-row-extra label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 3px; }
.fmcf-row-extra label small { font-weight: 400; color: var(--fm-muted, #6b7689); }
.fmcf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fmcf-flags { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fmcf-flags label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: 0; }
.fmcf-add { margin-top: 12px; }

@media (max-width: 640px) {
	.fmcf-row-main { grid-template-columns: 24px minmax(0, 1fr) auto auto; }
	.fmcf-row-main .fmcf-type { grid-column: 2 / 5; grid-row: 2; }
	.fmcf-two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .fmcf-row { transition: none; } }


/* 26-party-terms.css */
/* "Defaults for new documents" card on the customer / vendor forms (includes/scripts/ux/26-party-terms.js). Uses the --fm-* tokens of fm-ui.css. */
.ptc { padding: 18px 20px; border-radius: 14px; font-size: 14px; }
.ptc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ptc-head h4 { margin: 0; font-size: 16px; font-weight: 700; }
.ptc-help { color: var(--fm-muted, #667085); font-size: 12.5px; margin: 4px 0 12px; }
.ptc-state { font-size: 12px; color: var(--fm-muted, #667085); }
.ptc-state.is-ok { color: #15803d; } .ptc-state.is-bad { color: #b91c1c; }
.ptc-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.ptc-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ptc-field > span { font-size: 12px; font-weight: 600; color: var(--fm-muted, #667085); }
.ptc-field small { color: var(--fm-muted, #667085); font-size: 11.5px; }
.ptc-pct { display: flex; align-items: center; gap: 6px; }
.ptc-exempt { grid-column: 1 / -1; border: 1px dashed var(--fm-line, #d0d5dd); border-radius: 12px; padding: 10px 12px; }
.ptc-exempt.is-on { background: #fffbeb; border-color: #f59e0b; border-style: solid; }
.ptc-check { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.ptc-check small { color: var(--fm-muted, #667085); }
.ptc-exempt-in { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.ptc-warn { grid-column: 1 / -1; color: #92400e; font-size: 12.5px; }
.ptc-loading { color: var(--fm-muted, #667085); grid-column: 1 / -1; }
@media (max-width: 640px) { .ptc-body, .ptc-exempt-in { grid-template-columns: 1fr; } }


/* 26-price-lists.css */
/* Options > Orders > Price lists and pricing drawer (includes/scripts/ux/26-price-lists*.js). Uses the --fm-* tokens and the .fo-* helpers of the orders UI. */
.fmpr-wrap { padding: 4px 2px 24px; font-size: 14px; }
.fmpr-sec { margin-bottom: 26px; }
.fmpr-sec h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.fmpr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.fmpr-help, .fmpr-hint { color: var(--fm-muted, #667085); font-size: 12.5px; }
.fmpr-switch { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--fm-line, #e4e7ec); border-radius: 14px; cursor: pointer; margin: 0; }
.fmpr-switch small { display: block; color: var(--fm-muted, #667085); font-size: 12.5px; margin-top: 2px; }
.fmpr-row, .fmpr-term { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--fm-line, #e4e7ec); border-radius: 12px; margin-bottom: 8px; background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); flex-wrap: wrap; }
.fmpr-row small, .fmpr-term small { display: block; color: var(--fm-muted, #667085); font-size: 12.5px; }
.fmpr-row.is-off { opacity: .6; }
.fmpr-tag { background: #eef2f6; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.fmpr-act { display: flex; gap: 6px; }
.fmpr-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 22px; border: 1px dashed var(--fm-line, #d0d5dd); border-radius: 14px; color: var(--fm-muted, #667085); }
.fmpr-empty i { font-size: 22px; color: var(--fm-primary, #0369a1); }
.fmpr-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fmpr-inline .form-control { width: 70px; }
.fmpr-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin: 12px 0; }
.fmpr-box { border: 1px solid var(--fm-line, #e4e7ec); border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.fmpr-box h4 { font-size: 14px; margin: 0 0 8px; }
.fmpr-erow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; padding: 8px 0; border-top: 1px solid var(--fm-line, #eef0f3); }
.fmpr-erow[data-brk] { grid-template-columns: 1fr 1fr auto; }
.fmpr-erow[data-cat] { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; }
.fmpr-erow label { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 12px; font-weight: 600; color: var(--fm-muted, #667085); }
.fmpr-ename small { display: block; color: var(--fm-muted, #667085); font-size: 12px; }
.fmpr-check { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.fmpr-loading { padding: 30px; text-align: center; color: var(--fm-muted, #667085); }
@media (max-width: 640px) { .fmpr-two { grid-template-columns: 1fr; } .fmpr-erow, .fmpr-erow[data-cat], .fmpr-erow[data-brk] { grid-template-columns: 1fr 1fr; } .fmpr-ename { grid-column: 1 / -1; } }


/* 26-stock-count.css */
/* Stock > Count sheet (includes/scripts/ux/26-stock-count.js) and the stock levels import drawer (27-stock-import.js).
   Colours come from the --fm-* tokens only, so the dark theme needs no extra rules. */
.fmsc-new { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; align-items: end; }
.fmsc-new label { font-size: 12px; font-weight: 600; color: var(--fm-muted); margin-bottom: 4px; display: block; }
.fmsc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--fm-ink); grid-column: 1 / -1; }
.fmsc-check small { display: block; color: var(--fm-muted); }
.fmsc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.fmsc-bar .form-control { max-width: 260px; }
.fmsc-bar .fmsc-grow { flex: 1 1 auto; }
.fmsc-state { font-size: 12.5px; color: var(--fm-muted); }
.fmsc-state.is-err { color: var(--fm-danger); font-weight: 600; }
.fmsc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--fm-ink-2); margin-bottom: 12px; }
.fmsc-meta b { color: var(--fm-ink); }
.fmsc-note { background: var(--fm-warning-bg); color: var(--fm-warning); border-radius: var(--fm-radius-sm); padding: 9px 12px; font-size: 13px; margin-bottom: 12px; white-space: pre-line; }
.fmsc-grid { width: 100%; border-collapse: collapse; background: var(--fm-surface); color: var(--fm-ink); }
.fmsc-grid th { text-align: left; font-size: 12px; color: var(--fm-muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--fm-line); position: sticky; top: 0; background: var(--fm-surface); z-index: 1; }
.fmsc-grid td { padding: 6px 10px; border-bottom: 1px solid var(--fm-line-2); vertical-align: middle; font-size: 14px; }
.fmsc-grid .r { text-align: right; }
.fmsc-grid small { color: var(--fm-muted); }
.fmsc-grid tr.is-hit td { background: var(--fm-primary-50); }
.fmsc-grid tr.is-done td { opacity: .6; }
.fmsc-grid tr.is-err td { background: var(--fm-danger-bg); }
.fmsc-in { width: 110px; text-align: right; background: var(--fm-surface); color: var(--fm-ink); border: 1px solid var(--fm-line); border-radius: var(--fm-radius-sm); padding: 6px 8px; font-variant-numeric: tabular-nums; }
.fmsc-in:focus { outline: 2px solid var(--fm-accent); border-color: var(--fm-accent); }
.fmsc-in.is-bad { border-color: var(--fm-danger); background: var(--fm-danger-bg); color: var(--fm-ink); }
.fmsc-diff.up { color: var(--fm-success); font-weight: 600; }
.fmsc-diff.down { color: var(--fm-danger); font-weight: 600; }
.fmsc-msg { display: block; font-size: 12px; color: var(--fm-danger); }
.fmsc-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.fmsc-tile { background: var(--fm-surface); color: var(--fm-ink); border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 10px 16px; min-width: 130px; }
.fmsc-tile b { display: block; font-size: 20px; }
.fmsc-tile span { font-size: 12px; color: var(--fm-muted); }
.fmsc-tile.is-up b { color: var(--fm-success); }
.fmsc-tile.is-down b { color: var(--fm-danger); }
.fmsc-post { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 14px 0; }
.fmsc-post > div { min-width: 200px; }
.fmsc-result { background: var(--fm-surface); color: var(--fm-ink); border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 16px; margin-bottom: 14px; }
.fmsc-result ul { margin: 8px 0 0; padding-left: 18px; color: var(--fm-danger); }
.fmsi-hint { font-size: 12.5px; color: var(--fm-muted); margin: 4px 0 0; }
.fmsi-opts { display: grid; gap: 10px; margin: 0 0 14px; }
.fmsi-opts label { font-size: 12px; font-weight: 600; color: var(--fm-muted); display: block; margin-bottom: 3px; }
.fmsi-sample { width: 100%; font-size: 13px; border-collapse: collapse; margin: 8px 0 14px; color: var(--fm-ink); }
.fmsi-sample th, .fmsi-sample td { padding: 5px 8px; border-bottom: 1px solid var(--fm-line-2); text-align: left; }
.fmsi-sample .r { text-align: right; }


/* 27-doc-pricing.css */
/* Pricing / tax additions of the document form (price list chip, early-payment note, tax-exempt box) - behaviour in includes/scripts/orders/docs-form.js */
.fo-listp { display: block; margin-top: 3px; }
.fo-listp .fo-chip { font-size: 11px; }
.fo-termnote { color: #92400e; background: #fffbeb; border-radius: 10px; padding: 6px 10px; margin: -2px 0 8px; font-size: 12.5px; }
#foFreightTax { max-width: 190px; }
#foCert { margin-top: 6px; }


/* 28-doc-fix.css */
/* Options > Orders > "Fix old purchase orders" drawer (includes/scripts/ux/28-doc-fix.js) + the "re-price lines" dialog and banner of the document form (28-reprice.js). Uses the --fm-* tokens. */
.fm-opt-tile.fm-opt-attn { border-color: var(--fm-warning, #b45309); box-shadow: 0 0 0 3px var(--fm-warning-bg, #fef3dc); }
.fx-wrap { padding: 2px 2px 28px; font-size: 14px; }
.fx-intro { color: var(--fm-ink-2, #3a4560); background: var(--fm-primary-50, #e9f6fd); border-radius: 12px; padding: 12px 14px; margin: 0 0 20px; line-height: 1.5; }
.fx-sec { margin-bottom: 26px; }
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.fx-head h3, .fx-ptitle { font-size: 16px; font-weight: 700; margin: 0; }
.fx-ptitle { margin: 10px 0 12px; }
.fx-count { display: inline-block; min-width: 22px; text-align: center; background: var(--fm-neutral-bg, #eef1f6); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; color: var(--fm-ink-2, #3a4560); }
.fx-help { color: var(--fm-muted, #6b7689); font-size: 12.5px; margin: 6px 0 0; }
.fx-scroll { overflow-x: auto; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-surface, #fff); }
.fx-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.fx-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--fm-muted, #6b7689); padding: 9px 10px; border-bottom: 1px solid var(--fm-line, #e4e8f0); background: var(--fm-line-2, #eef1f6); white-space: nowrap; }
.fx-table td { padding: 9px 10px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: top; }
.fx-table tr:last-child td { border-bottom: 0; }
.fx-table small { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; }
.fx-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-c { width: 34px; text-align: center; }
.fx-up { color: var(--fm-success, #15803d); font-weight: 600; }
.fx-down { color: var(--fm-danger, #b91c1c); font-weight: 600; }
.fx-why { min-width: 200px; }
.fx-skip { color: var(--fm-warning, #b45309) !important; margin-top: 3px; }
.fx-sum td { background: var(--fm-line-2, #f7f9fc); font-weight: 600; }
.fx-tag { display: inline-block; background: var(--fm-neutral-bg, #eef1f6); border-radius: 999px; padding: 1px 8px; font-size: 11px; color: var(--fm-ink-2, #3a4560); }
.fx-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 24px; border: 1px dashed var(--fm-line, #d0d5dd); border-radius: 14px; color: var(--fm-muted, #6b7689); }
.fx-empty i { font-size: 24px; color: var(--fm-success, #15803d); }
.fx-loading, .fx-busy { padding: 26px; text-align: center; color: var(--fm-muted, #6b7689); }
.fx-effects { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 10px; }
.fx-effects li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-surface, #fff); }
.fx-effects li > i { color: var(--fm-primary, #0369a1); font-size: 18px; width: 22px; text-align: center; margin-top: 2px; }
.fx-effects b { display: block; }
.fx-effects span { color: var(--fm-ink-2, #3a4560); line-height: 1.45; }
.fx-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; position: sticky; bottom: 0; background: linear-gradient(to top, var(--fm-surface, #fff) 70%, transparent); padding: 12px 0 4px; }
.fx-back { margin-bottom: 4px; }
details > summary { cursor: pointer; }

/* ---- re-price lines with a price list (document form: includes/scripts/ux/28-reprice.js) ---- */
.rp-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--fm-primary, #0369a1); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.rp-link:hover { text-decoration: underline; }
.rp-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 12px; border-radius: 12px; background: var(--fm-warning-bg, #fef3dc); color: var(--fm-ink, #1b2437); font-size: 13px; }
.rp-banner > i { color: var(--fm-warning, #b45309); }
.rp-banner span { flex: 1 1 220px; }
.rp-banner .btn { white-space: nowrap; }
.rp-wrap { padding: 2px 2px 24px; font-size: 14px; }
.rp-wrap h4 { font-size: 15px; margin: 0 0 4px; }
.rp-listpick { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 14px; }
.rp-listpick label { font-size: 12px; font-weight: 600; color: var(--fm-muted, #6b7689); margin: 0; }
.rp-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.rp-tot div { border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; padding: 10px 12px; background: var(--fm-surface, #fff); }
.rp-tot small { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; }
.rp-tot b { font-size: 16px; font-variant-numeric: tabular-nums; }
.rp-check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; font-size: 13px; }
.rp-row-skip td { color: var(--fm-muted, #6b7689); }
.rp-old { text-decoration: line-through; color: var(--fm-muted, #6b7689); margin-right: 6px; }
.rp-locked { padding: 14px; border-radius: 12px; background: var(--fm-danger-bg, #fdeaea); color: var(--fm-danger, #b91c1c); margin: 12px 0; }
.rp-wrap .fx-table { min-width: 0; } .rp-wrap .fx-table td, .rp-wrap .fx-table th { padding: 8px 6px; } .rp-wrap .fo-chip { white-space: normal; }
@media (max-width: 640px) {
	.rp-tot { grid-template-columns: 1fr; } .fx-foot { flex-direction: column-reverse; } .fx-foot .btn { width: 100%; }
	/* the repair tables turn into one card per document on a phone (cells carry their column name in data-l) */
	.fx-wrap .fx-table { min-width: 0; } .fx-wrap .fx-table thead { display: none; } .fx-wrap .fx-table tr { display: block; padding: 8px 10px; border-bottom: 1px solid var(--fm-line, #e4e8f0); }
	.fx-wrap .fx-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; text-align: right; } .fx-wrap .fx-table td::before { content: attr(data-l); color: var(--fm-muted, #6b7689); font-size: 11.5px; text-align: left; flex: none; }
	.fx-wrap .fx-table td.fx-c::before, .fx-wrap .fx-table td:not([data-l])::before { content: none; } .fx-wrap .fx-table td.fx-c { width: auto; text-align: left; } .fx-wrap .fx-why { text-align: left; min-width: 0; flex-direction: column; gap: 2px; } .fx-wrap .fx-table small { text-align: right; }
	.fx-wrap .fx-sum td { background: none; }
}


/* 30-orders.css */
/* Orders area - global part: the "new order / quote" dialog (script: includes/scripts/ux/30-orders.js). Page styles are in css/orders/docs.css. */
.fn-modal { position: fixed; inset: 0; z-index: 650000; background: rgba(8, 25, 40, .5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.fn-box { position: relative; background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); border-radius: 18px; padding: 24px; width: min(520px, 100%); box-shadow: 0 30px 80px rgba(8, 47, 73, .35); }
.fn-box h3 { font-size: 20px; margin: 0 0 4px; }
.fn-box p { color: var(--fm-muted, #5b6b7d); margin: 0 0 14px; }
.fn-x { position: absolute; right: 14px; top: 12px; border: 0; background: var(--fm-neutral-bg, #f1f5f9); color: var(--fm-ink-2, #3a4560); width: 34px; height: 34px; border-radius: 10px; font-size: 20px; line-height: 1; cursor: pointer; }
.fn-input { min-height: 46px; border-radius: 12px; font-size: 15px; border-width: 2px; border-color: #c9e8f7; }
.fn-list { margin-top: 10px; max-height: 320px; overflow: auto; }
.fn-list.is-busy { opacity: .5; pointer-events: none; }
.fn-opt { padding: 10px 12px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; }
.fn-opt b { font-size: 14.5px; }
.fn-opt span { font-size: 12px; color: var(--fm-muted, #6b7689); }
.fn-opt.is-active, .fn-opt:hover { background: var(--fm-primary-50, #e9f6fd); }
.fn-add { flex-direction: row; gap: 8px; align-items: center; color: #0369a1; font-weight: 600; border-top: 1px solid var(--fm-line-2, #eef1f6); border-radius: 0 0 10px 10px; margin-top: 4px; }
.fn-none { padding: 14px 6px; color: var(--fm-muted, #6b7689); }


/* 40-pickwave.css */
/* PICK WAVES - list drawer, order picker, full-screen wave screen (pick / sort / ship). Scripts: includes/scripts/ux/40-pickwave-*.js. Calm workspace: ocean blue accent, rounded cards. */
.pw-grow{flex:1}
.pw-badge{display:inline-block;min-width:20px;padding:0 6px;border-radius:99px;background:#0369a1;color:#fff;font:700 11px Inter,sans-serif;line-height:20px;text-align:center;margin-left:4px}
.pw-pill{display:inline-block;border-radius:99px;padding:2px 10px;font:700 11.5px Inter,sans-serif;vertical-align:middle;margin-left:6px}
.pw-pill.is-info{background:#e0f2fe;color:#075985}.pw-pill.is-warn{background:#fef3c7;color:#92400e}.pw-pill.is-ok{background:#dcfce7;color:#166534}.pw-pill.is-neutral{background:#eef1f6;color:#475467}
.pw-empty{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;color:#667085;padding:34px 16px}.pw-empty i{font-size:30px;color:#7dd3fc}.pw-empty b{color:#0f2a3d}
.pw-stagebar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#f0f9ff;border:1px solid #bae6fd;border-radius:14px;padding:10px 14px;margin:0 0 12px;color:#075985}.pw-stagebar span{flex:1;min-width:200px}
/* modal + drawer parts */
.pw-modal{position:fixed;inset:0;z-index:100000;background:rgba(15,42,61,.5);display:flex;align-items:center;justify-content:center;padding:14px}
.pw-box{background:#fff;border-radius:18px;max-width:640px;width:100%;max-height:92vh;overflow:auto;padding:20px 22px;box-shadow:0 24px 70px rgba(8,47,73,.3);color:#1b2437}
.pw-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px}.pw-head h3{margin:0;font:800 19px "Plus Jakarta Sans",Inter,sans-serif}.pw-head small{color:#667085}
.pw-head-act{display:flex;gap:8px;align-items:center}.pw-head-act a{text-decoration:none}
.pw-x{border:0;background:#eef1f6;border-radius:12px;width:40px;height:40px;color:#475467;font-size:16px;cursor:pointer}.pw-x:hover{background:#e0f2fe;color:#075985}
.pw-field{display:block;margin:0 0 12px}.pw-field span{display:block;font-size:12.5px;color:#667085;margin-bottom:3px}
.pw-check{display:flex;gap:10px;align-items:flex-start;margin:6px 0 4px;cursor:pointer}.pw-check input{margin-top:4px}
.pw-foot{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px}
.pw-state{font-size:12.5px;color:#667085}
/* list drawer */
.pw-list{display:flex;flex-direction:column;gap:12px;min-height:100%}.pw-tabs{display:flex;gap:6px;flex-wrap:wrap}
.pw-tabs button{border:1px solid #d6e4ee;background:#fff;border-radius:99px;padding:6px 14px;font:600 13px Inter,sans-serif;color:#475467;cursor:pointer}.pw-tabs button.is-on{background:#0369a1;border-color:#0369a1;color:#fff}
.pw-listbody{display:flex;flex-direction:column;gap:10px;flex:1}.pw-card{border:1px solid #e4e8f0;border-radius:14px;padding:12px 14px;background:#fff}
.pw-card-top{display:flex;align-items:center;gap:6px}.pw-card-top b{font:800 16px "Plus Jakarta Sans",Inter,sans-serif}.pw-card-top small,.pw-card-meta{color:#667085;font-size:12.5px}
.pw-card-note{font-size:13px;margin-top:4px}.pw-card-act{display:flex;gap:8px;margin-top:10px}.pw-card-act a{text-decoration:none}
.pw-listfoot{position:sticky;bottom:0;background:#fff;padding:10px 0}
/* order picker */
.pw-pk-tools{display:flex;gap:8px;flex-wrap:wrap;margin:6px 0 10px}.pw-pk-tools input{flex:2;min-width:160px}.pw-pk-tools select{flex:1;min-width:140px}
.pw-pk-list{max-height:44vh;overflow:auto;border:1px solid #e4e8f0;border-radius:14px;margin-bottom:12px}
.pw-ord{display:flex;align-items:center;gap:12px;padding:11px 14px;border-top:1px solid #eef1f6;cursor:pointer;margin:0}.pw-ord:first-child{border-top:0}.pw-ord.is-on{background:#f0f9ff}
.pw-ord input{width:20px;height:20px;flex:0 0 auto}.pw-ord-main{flex:1;min-width:0}.pw-ord-main b{display:block}.pw-ord-main span{color:#667085;font-size:13px}
.pw-ord-meta{text-align:right;font-size:13px}.pw-ord-meta small{display:block;color:#667085}
#pwPkCount.is-bad{color:#b91c1c;font-weight:700}
/* full-screen wave */
.pw-full{padding:0;align-items:stretch;background:#f4f8fb}
.pw-full .pw-box{max-width:none;max-height:none;height:100%;border-radius:0;box-shadow:none;background:#f4f8fb;padding:12px 14px;display:flex;flex-direction:column;gap:10px;overflow:hidden}
.pw-steps{display:flex;gap:6px;border-bottom:2px solid #dbe7f0}.pw-steps button{flex:1;border:0;background:none;padding:10px 6px;font:700 14px Inter,sans-serif;color:#667085;border-bottom:3px solid transparent;margin-bottom:-2px;cursor:pointer;min-height:46px}
.pw-steps button b{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#dbe7f0;color:#475467;align-items:center;justify-content:center;font-size:12px;margin-right:4px}
.pw-steps button.is-on{color:#0369a1;border-bottom-color:#0369a1}.pw-steps button.is-on b{background:#0369a1;color:#fff}
.pw-full .pw-body{flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px;min-height:0}
.pw-full .pw-foot{margin:0;padding-top:8px;border-top:1px solid #dbe7f0}.pw-full .pw-foot .btn{min-height:48px;padding:0 18px;font-weight:700;border-radius:13px}
.pw-note{background:#fff;border:1px solid #e4e8f0;border-radius:13px;padding:10px 14px;color:#475467;font-size:13.5px}.pw-note i{color:#0369a1;margin-right:6px}.pw-note.is-ok{background:#f3fbf5;border-color:#bbf7d0}
.pw-scan{position:relative}.pw-scan i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#0369a1;font-size:19px}
.pw-scan input{height:54px;padding-left:46px;font-size:17px;border-radius:14px;border:2px solid #0369a1}
.pw-progress{height:8px;border-radius:99px;background:#dbe7f0;overflow:hidden;flex:0 0 auto}.pw-progress span{display:block;height:100%;width:0;background:#16a34a;transition:width .25s}
.pw-sum{font-size:13px;color:#667085}
.pw-callout{background:#ecfdf3;border:1px solid #86efac;border-radius:13px;padding:11px 14px;font-size:16px;color:#14532d}.pw-callout.is-bad{background:#fef2f2;border-color:#fecaca;color:#7f1d1d}.pw-callout.is-warn{background:#fffbeb;border-color:#fde68a;color:#78350f}
.pw-callout-t{opacity:.8}.pw-callout-s{display:block;font-size:12.5px;opacity:.75;margin-top:2px}
/* the consolidated pick list */
.pw-lines{background:#fff;border:1px solid #e4e8f0;border-radius:14px;overflow:hidden}
.pw-aisle{padding:6px 14px;background:#0f2a3d;color:#fff;font:700 12px Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;position:sticky;top:0;z-index:1}
.pw-line{border-top:1px solid #e4e8f0;transition:background .3s}.pw-aisle+.pw-line{border-top:0}.pw-line.is-done{background:#f3fbf5}.pw-line.is-part{background:#fffbeb}.pw-line.pw-flash{background:#dcfce7}
.pw-line-main{display:flex;align-items:center;gap:12px;padding:12px 14px;flex-wrap:wrap}
.pw-bin{flex:0 0 auto;min-width:70px;text-align:center;background:#e0f2fe;color:#075985;border-radius:11px;padding:7px 10px;font:800 15px "Plus Jakarta Sans",Inter,sans-serif;letter-spacing:.02em}.pw-bin.is-none{background:#f1f5f9;color:#94a3b8;font-weight:600;font-size:12px}
.pw-name{flex:1;min-width:150px}.pw-name b{display:block;font-size:15.5px}.pw-name small{color:#667085}
.pw-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}.pw-chip{display:inline-flex;align-items:center;gap:4px;background:#f1f5f9;color:#475467;border-radius:99px;padding:1px 9px;font-size:11.5px}.pw-chip.is-bad{background:#fee2e2;color:#991b1b}.pw-chip i{color:#0369a1}
.pw-sn{background:#e0f2fe;color:#075985;font-weight:600}.pw-sn button{border:0;background:none;color:inherit;font-size:14px;line-height:1;padding:0 0 0 2px;cursor:pointer}
.pw-qty{display:flex;align-items:center;gap:6px}.pw-qty .btn{height:48px;min-width:48px;font-size:20px;line-height:1;border-radius:12px}.pw-qty input{width:74px;height:48px;text-align:center;font:700 18px Inter,sans-serif;border-radius:12px}
.pw-of{color:#667085;font-size:13px;white-space:nowrap;min-width:46px}
.pw-exp{border:0;background:#f1f5f9;border-radius:11px;min-height:40px;padding:0 12px;color:#475467;font:600 12.5px Inter,sans-serif;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.pw-split{background:#f8fbfd;border-top:1px dashed #d6e4ee;padding:6px 14px 10px 96px}
.pw-split-row{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;padding:5px 0;font-size:14px}.pw-split-row b{min-width:92px}.pw-split-n em{color:#b45309;font-style:normal;font-weight:600;margin-left:6px}.pw-split-row.is-full b::after{content:" \2713";color:#16a34a}
/* sort step */
.pw-totes{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.pw-tote{background:#fff;border:2px solid #e4e8f0;border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}.pw-tote.is-sorted{border-color:#86efac;background:#f6fef9}.pw-tote.is-shipped,.pw-tote.is-released{opacity:.7}
.pw-tote-head{display:flex;gap:10px;align-items:center}.pw-tote-no{flex:0 0 auto;width:38px;height:38px;border-radius:12px;background:#0f2a3d;color:#fff;display:flex;align-items:center;justify-content:center;font:800 17px "Plus Jakarta Sans",Inter,sans-serif}
.pw-tote-t{flex:1;min-width:0}.pw-tote-t b{display:block;font-size:16px}.pw-tote-t span{color:#667085;font-size:13px}.pw-tote-head small{color:#667085;text-align:right}
.pw-tote-items{list-style:none;margin:0;padding:0}.pw-tote-items li{display:flex;flex-wrap:wrap;gap:8px;padding:5px 0;border-top:1px solid #eef1f6;font-size:14.5px}.pw-tote-items li b{min-width:32px;font-size:16px}.pw-tote-items li.is-short{color:#92400e}.pw-tote-items li em{font-style:normal;font-weight:700}
.pw-tote-short{display:flex;gap:8px;align-items:flex-start;background:#fffbeb;border:1px solid #fde68a;border-radius:11px;padding:8px 10px;font-size:13px;color:#78350f}
.pw-tote-note{font-size:12.5px;color:#667085;font-style:italic}.pw-tote-done{color:#667085;font-size:13.5px}
.pw-tote-btn{min-height:50px;border-radius:13px;font-weight:700}
/* ship step */
.pw-shipform{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#fff;border:1px solid #e4e8f0;border-radius:14px;padding:12px 14px}.pw-shipform .pw-field{margin:0}
.pw-shiplist{background:#fff;border:1px solid #e4e8f0;border-radius:14px;overflow:hidden}
.pw-ship-row{display:flex;gap:10px 14px;align-items:center;flex-wrap:wrap;padding:11px 14px;border-top:1px solid #eef1f6}.pw-ship-row:first-child{border-top:0}
.pw-ship-main{flex:1;min-width:150px}.pw-ship-main b{display:block}.pw-ship-main span{color:#667085;font-size:13px}.pw-ship-meta{font-size:13.5px}.pw-ship-meta em{color:#b45309;font-style:normal;font-weight:700}.pw-ship-row a{text-decoration:none}
/* wave menu */
.pw-menu{display:flex;flex-direction:column;gap:6px;margin:8px 0}.pw-menu-row{display:flex;gap:10px;align-items:center;justify-content:space-between;border:1px solid #e4e8f0;border-radius:12px;padding:8px 12px}
@media (max-width:700px){
	.pw-full .pw-box{padding:10px}.pw-head h3{font-size:17px}.pw-head-act a span{display:none}
	.pw-line-main{gap:10px;padding:12px}.pw-qty{width:100%;justify-content:space-between}.pw-qty input{flex:1;width:auto}.pw-exp{width:100%;justify-content:center}
	.pw-split{padding-left:14px}.pw-shipform{grid-template-columns:1fr}.pw-full .pw-foot .btn{flex:1 1 44%}.pw-steps button{font-size:12.5px;padding:8px 2px}
}
@media (max-width:700px){
	.pw-full .pw-foot{gap:8px}.pw-full .pw-foot .pw-state{order:-1;flex:1 0 100%;font-size:11.5px;margin-bottom:-2px}.pw-full .pw-foot .pw-grow{display:none}
	.pw-full .pw-foot .btn{flex:1 1 0;min-width:0;padding:0 8px;font-size:14px;min-height:48px}
	.pw-scan input{height:50px;font-size:16px}.pw-head small{display:block;line-height:1.3}.pw-steps button b{display:none}
	.pw-line-main{padding:10px 12px}.pw-bin{min-width:58px;font-size:14px}.pw-name b{font-size:15px}
	.pw-totes{grid-template-columns:1fr}.pw-ship-row .btn{flex:1 1 40%}
}


/* 40-receivables.css */
/*
 * Receivables UI (statement tab, reminder dialogs, settings drawer) - see includes/scripts/ux/40-receivables.js.
 * Uses the design tokens of fm-ui.css (--fm-*); the fallbacks keep it readable on pages that do not define them (customer form iframe).
 */
/* ---- statement tab ---- */
#csPanel{--rc-ink:var(--fm-ink,#1b2437);--rc-muted:var(--fm-muted,#667085);--rc-line:var(--fm-line,#e4e8f0);--rc-brand:var(--fm-primary,#0369a1);--rc-soft:#f3f8fc}
.cs-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:18px 0 14px}
.cs-toolbar label{display:flex;flex-direction:column;font-size:12px;color:var(--rc-muted);gap:3px}
.cs-toolbar .form-control{height:38px;min-width:150px}
.cs-sep{flex:1 1 20px}
.cs-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:14px}
.cs-card{background:var(--fm-surface,#fff);color:var(--fm-ink,#1b2437);border:1px solid var(--rc-line);border-radius:14px;padding:12px 14px;box-shadow:0 1px 2px rgba(15,42,61,.04)}
.cs-card small,.cs-age small{display:block;color:var(--rc-muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.05em}
.cs-card b{font-size:19px;color:var(--rc-ink);font-variant-numeric:tabular-nums}
.cs-card.is-owed{border-color:#fecaca;background:#fff7f7}.cs-card.is-owed b{color:#b91c1c}
.cs-card.is-clear{border-color:#bbf7d0;background:#f6fff9}.cs-card.is-clear b{color:#15803d}
.cs-ageing{background:var(--fm-surface,#fff);color:var(--fm-ink,#1b2437);border:1px solid var(--rc-line);border-radius:14px;padding:12px 14px;margin-bottom:14px}
.cs-ageing h4,.cs-foot h4{margin:0 0 8px;font-size:13px;color:var(--rc-muted);text-transform:uppercase;letter-spacing:.06em}
.cs-bar{display:flex;height:10px;border-radius:99px;overflow:hidden;background:#eef2f7;margin-bottom:10px}
.cs-seg{display:block;height:100%}
.cs-current{--c:#22c55e}.cs-d1{--c:#f59e0b}.cs-d31{--c:#f97316}.cs-d61{--c:#ef4444}.cs-d90{--c:#991b1b}
.cs-seg{background:var(--c)}
.cs-ages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.cs-age{border-left:4px solid var(--c);padding:2px 0 2px 8px}.cs-age b{font-variant-numeric:tabular-nums}
.cs-note{margin:8px 0 0;color:var(--rc-muted);font-size:12.5px}
.cs-tablewrap{background:var(--fm-surface,#fff);color:var(--fm-ink,#1b2437);border:1px solid var(--rc-line);border-radius:14px;overflow:auto}
.cs-table{width:100%;border-collapse:collapse;font-size:13.5px}
.cs-table th{background:var(--rc-soft);color:var(--rc-muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;text-align:left;padding:9px 12px;white-space:nowrap}
.cs-table td{padding:9px 12px;border-top:1px solid var(--rc-line);vertical-align:top}
.cs-table .r{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.cs-table tr.cs-open td{background:var(--rc-soft);font-weight:700}
.cs-t-payment td:nth-child(2),.cs-t-credit td:nth-child(2){color:#15803d;font-weight:600}.cs-t-refund td:nth-child(2){color:#b45309;font-weight:600}
.cs-empty{padding:22px;text-align:center;color:var(--rc-muted)}
.cs-body.is-loading{opacity:.5;pointer-events:none}
.cs-skel{height:220px;border-radius:14px;background:linear-gradient(90deg,#eef2f7,#f8fafc,#eef2f7);background-size:200% 100%;animation:csSkel 1.2s infinite linear}
@keyframes csSkel{to{background-position:-200% 0}}
.cs-foot{margin-top:16px}
.cs-optout{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.cs-log{list-style:none;margin:0;padding:0;font-size:13px}.cs-log li{padding:6px 0;border-top:1px solid var(--rc-line)}
.cs-tag{display:inline-block;border-radius:99px;padding:1px 9px;font-size:11.5px;background:#eef2f7}.cs-tag-sent{background:#dcfce7;color:#166534}.cs-tag-failed{background:#fee2e2;color:#991b1b}.cs-tag-pending{background:#fef3c7;color:#92400e}
@media (max-width:760px){
	.cs-cards{grid-template-columns:1fr 1fr}.cs-ages{grid-template-columns:1fr 1fr}
	.cs-table thead{display:none}.cs-table,.cs-table tbody,.cs-table tr,.cs-table td{display:block;width:100%}
	.cs-table tr{border-top:1px solid var(--rc-line);padding:6px 0}.cs-table td{border:0;padding:3px 12px;display:flex;justify-content:space-between;gap:12px;text-align:right}
	.cs-table td[data-label]::before{content:attr(data-label);color:var(--rc-muted);font-size:12px;text-align:left}
	.cs-table tr.cs-open td[colspan]{display:block;text-align:left}
}
/* ---- dialogs + settings drawer ---- */
.rc-modal{position:fixed;inset:0;z-index:100000;background:rgba(15,42,61,.45);display:flex;align-items:center;justify-content:center;padding:14px}
.rc-box{background:#fff;border-radius:18px;max-width:560px;width:100%;max-height:92vh;overflow:auto;padding:22px 24px;box-shadow:0 24px 70px rgba(8,47,73,.3);color:#1b2437}
.rc-box h3,.rc-settings h4{margin:0 0 6px}.rc-settings h4{font-size:13px;color:#667085;text-transform:uppercase;letter-spacing:.06em;margin:18px 0 8px}
.rc-muted,.rc-settings small{color:#667085;font-size:13px}.rc-settings small{display:block;margin-top:3px}
.rc-field{display:block;margin:0 0 12px}.rc-field span{display:block;font-size:12.5px;color:#667085;margin-bottom:3px}
.rc-check{display:flex;gap:8px;align-items:center;margin:6px 0;cursor:pointer}
.rc-actions{display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-top:16px}.rc-actions .rc-muted{margin-right:auto}
.rc-docs{max-height:260px;overflow:auto;border:1px solid #e4e8f0;border-radius:12px;margin:10px 0 14px}
.rc-doc{display:flex;gap:10px;align-items:baseline;padding:9px 12px;border-top:1px solid #e4e8f0;margin:0;cursor:pointer}.rc-doc:first-child{border-top:0}
.rc-doc span{color:#667085;font-size:12.5px;flex:1}.rc-doc em{font-style:normal;font-weight:700;font-variant-numeric:tabular-nums}.rc-doc.is-off{opacity:.55}
.rc-warn{background:#fffbeb;border:1px solid #fde68a;color:#78350f;border-radius:10px;padding:8px 12px;margin:8px 0}
.rc-three{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.rc-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rc-lvl{border:1px solid #e4e8f0;border-radius:12px;padding:8px 12px;margin:0 0 8px}.rc-lvl summary{cursor:pointer;font-weight:600}
@media (max-width:560px){.rc-three{grid-template-columns:1fr}}


/* 40-shipping.css */
/*
 * Shipping card + pick screen of a sales order (see includes/scripts/ux/40-shipping.js). Reuses the .fo-* card styles of orders/docs.css.
 */
#foShipCard .sp-lines small{display:block;color:#667085;font-size:11.5px}
#foShipCard .sp-lines tr.is-done td{opacity:.5}
#foShipCard .sp-lines input.form-control{width:84px;text-align:right;margin-left:auto}
#foShipCard .sp-picked{display:inline-block;background:#e0f2fe;color:#075985;border-radius:99px;padding:0 9px;font-weight:700}
#foShipCard .sp-tools{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
#foShipCard .sp-ship{align-items:flex-start;gap:10px;flex-wrap:wrap}
#foShipCard .sp-actions{display:flex;gap:6px;flex-wrap:wrap}
#foShipCard .sp-ship a.btn{text-decoration:none}
/* modal + pick screen */
.sp-modal{position:fixed;inset:0;z-index:100000;background:rgba(15,42,61,.5);display:flex;align-items:center;justify-content:center;padding:14px}
.sp-box{background:#fff;border-radius:18px;max-width:520px;width:100%;max-height:92vh;overflow:auto;padding:22px 24px;box-shadow:0 24px 70px rgba(8,47,73,.3);color:#1b2437}
.sp-box h3{margin:0 0 8px}
.sp-field{display:block;margin:0 0 12px}.sp-field span{display:block;font-size:12.5px;color:#667085;margin-bottom:3px}
.sp-foot{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:14px;flex-wrap:wrap}.sp-grow{flex:1}
.sp-fullscreen{padding:0;align-items:stretch;background:#f4f8fb}
.sp-fullscreen .sp-box{max-width:none;max-height:none;height:100%;border-radius:0;box-shadow:none;background:#f4f8fb;padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.sp-pick-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.sp-pick-head h3{margin:0}.sp-pick-head small{color:#667085}
.sp-scan{position:relative}.sp-scan i{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#0369a1;font-size:18px}
.sp-scan input{height:52px;padding-left:44px;font-size:17px;border-radius:14px;border:2px solid #0369a1}
.sp-progress{height:8px;border-radius:99px;background:#dbe7f0;overflow:hidden}.sp-progress span{display:block;height:100%;width:0;background:#16a34a;transition:width .25s}
.sp-sum{font-size:13px;color:#667085}
.sp-group{flex:1;overflow:auto;background:var(--fm-surface,#fff);color:var(--fm-ink,#1b2437);border:1px solid #e4e8f0;border-radius:14px}
.sp-group h4{margin:0;padding:10px 14px;background:#f3f8fc;font-size:12.5px;letter-spacing:.06em;text-transform:uppercase;color:#667085;position:sticky;top:0}
.sp-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-top:1px solid #e4e8f0;transition:background .3s}
.sp-row.is-done{background:#f3fbf5;color:#1b2437}.sp-row.is-part{background:#fffbeb;color:#1b2437}.sp-row.sp-flash{background:#dcfce7;color:#1b2437}
.sp-tick{font-size:22px;color:#cbd5e1}.sp-row.is-done .sp-tick{color:#16a34a}.sp-row.is-part .sp-tick{color:#f59e0b}
.sp-name{flex:1;min-width:0}.sp-name b{display:block}.sp-name small{color:#667085}
.sp-qty{display:flex;align-items:center;gap:6px}.sp-qty input{width:64px;text-align:center;height:38px}.sp-qty .btn{height:38px;min-width:38px}.sp-of{color:#667085;font-size:12.5px;white-space:nowrap}
.sp-bin{flex:0 0 auto;min-width:64px;text-align:center;background:#e0f2fe;color:#075985;border-radius:10px;padding:5px 9px;font:800 14px "Plus Jakarta Sans",Inter,sans-serif;letter-spacing:.02em}.sp-bin.is-none{background:#f1f5f9;color:#94a3b8;font-weight:600;font-size:12px}
.sp-aisle{padding:6px 14px;background:#0f2a3d;color:#fff;font:700 12px Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase}
@media (max-width:560px){.sp-row{flex-wrap:wrap}.sp-qty{width:100%;justify-content:flex-end}.sp-foot .btn{flex:1 1 40%}}
#foShipCard .sp-wave{margin-bottom:10px}#foShipCard .sp-wave a{font-weight:600}


/* 42-online-pay.css */
/*
 * Options > Selling setup > Online payments panel (includes/scripts/ux/42-online-pay.js + 43-online-pay-panel.js).
 * Builds on the .fi-* panel classes of 70-integrations.css (wrap, field, note, pill, table, actions); only the extras live here. Tokens: fm-ui.css (--fm-*).
 */
.fop-sec { border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 14px 16px 12px; margin: 0 0 14px; background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); }
.fop-sec > h4 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.fop-sec > h4 i { color: var(--fm-primary, #0369a1); width: 18px; text-align: center; }
.fop-sub { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--fm-line, #e4e8f0); }
.fop-switch { display: flex !important; gap: 12px; align-items: flex-start; margin: 0 !important; cursor: pointer; font-weight: 500 !important; }
.fop-sw { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; margin-top: 1px; }
.fop-sw input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fop-sw span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.fop-sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.fop-sw input:checked + span { background: var(--fm-primary, #0369a1); }
.fop-sw input:checked + span::after { transform: translateX(18px); }
.fop-sw input:focus-visible + span { outline: 2px solid var(--fm-accent, #0ea5e9); outline-offset: 2px; }
.fop-swtext b { display: block; font-weight: 650; color: var(--fm-ink, #101828); }
.fop-swtext small { display: block; font-weight: 400; color: var(--fm-muted, #6b7689); line-height: 1.4; margin-top: 1px; }
.fop-rules { display: grid; gap: 12px; margin: 0 0 16px; }
.fop-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 6px; }
.fop-help { margin: 6px 0 0; line-height: 1.5; }
.fop-inline { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 500 !important; margin: 0 0 0 6px !important; }
.fop-ok { color: var(--fm-success, #15803d); font-weight: 600; }
.fop-bad { color: var(--fm-danger, #b91c1c); font-weight: 600; }
.fop code { font-size: 12.5px; background: var(--fm-bg, #f2f7fb); padding: 1px 5px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .fop-sw span, .fop-sw span::after { transition: none; } }
@media (max-width: 560px) { .fop-sec { padding: 12px; } }

/* "Paid online" badge in the payments list of an order (includes/scripts/orders/docs-form.js) */
.fo-online { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); font-size: 11px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.fo-online i { font-size: 10px; }


/* 44-online-store.css */
/*
 * Online store in the signed-in app (includes/scripts/ux/44-online-store.js): Options > Online store panel extras, the web-order bar of the order form,
 * the "Online" badge of the products list. Builds on .fi-* (70-integrations.css) and .fop-* (42-online-pay.css). Tokens: fm-ui.css (--fm-*), so both themes read well.
 */
.fos-slug { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fos-slug .fi-muted { font-size: 12.5px; word-break: break-all; }
.fos-slug input { flex: 1 1 160px; min-width: 0; }
.fos-link { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--fm-bg, #f2f7fb); }
.fos-qr { width: 96px; height: 96px; flex: none; background: #fff; border-radius: 8px; padding: 4px; } /* QR codes need a light background to scan, in both themes */
.fos-qr svg { width: 100%; height: 100%; display: block; }
.fos-url { display: block; font-size: 13px; word-break: break-all; margin-bottom: 6px; color: var(--fm-ink, #1b2437); background: transparent !important; padding: 0 !important; }
.fos-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.fos-img-lbl, .fos-lbl { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--fm-ink, #1b2437); }
.fos-img-box { height: 90px; border: 1px dashed var(--fm-line, #e4e8f0); border-radius: 12px; display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; background: var(--fm-bg, #f2f7fb); }
.fos-img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fos-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.fos-sw { position: relative; cursor: pointer; margin: 0 !important; }
.fos-sw input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.fos-sw span:first-of-type { display: block; width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.fos-sw input:checked + span { outline: 3px solid var(--fm-ink, #1b2437); outline-offset: 2px; }
.fos-sw input:focus-visible + span { outline: 3px solid var(--fm-accent, #0ea5e9); outline-offset: 2px; }
.fos-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.fos .fi-line { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 4px 0; color: var(--fm-ink, #1b2437); }

/* web-order bar at the top of the order form */
.fos-webbar { margin: 0 0 14px; }
.fos-wb { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--fm-line, #e4e8f0); background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); }
.fos-wb--pending { border-color: var(--fm-warning, #b45309); background: var(--fm-warning-bg, #fef3dc); }
.fos-wb--approved { border-color: var(--fm-success, #15803d); background: var(--fm-success-bg, #e7f6ec); }
.fos-wb--declined { background: var(--fm-neutral-bg, #eef1f6); }
.fos-wb-main { display: flex; gap: 12px; min-width: 0; flex: 1 1 320px; }
.fos-wb-main b { color: var(--fm-ink, #1b2437); font-size: 15px; }
.fos-wb-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--fm-surface, #fff); color: var(--fm-primary, #0369a1); flex: none; }
.fos-wb-sub { font-size: 13px; color: var(--fm-ink, #1b2437); margin-top: 4px; line-height: 1.55; word-break: break-word; }
.fos-wb-sub a { color: var(--ii-primary-ink, var(--fm-primary, #0369a1)); }
.fos-wb-flag { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--fm-danger, #b91c1c); }
.fos-wb-flag ul { margin: 4px 0; padding-left: 18px; font-weight: 500; }
.fos-wb-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fos-danger { color: var(--fm-danger, #b91c1c) !important; }
.fmx-modal__box textarea { margin: 0 0 14px; }

/* products list badge */
.fmpl-badge.is-online { background: var(--fm-info-bg, #e6eeff); color: var(--fm-info, #1d4ed8); }

/* dark theme: the warning / success tints are dark there, so the text keeps the light ink */
html[data-theme="dark"] .fos-wb--pending, html[data-theme="dark"] .fos-wb--approved { color: var(--fm-ink); }
html[data-theme="dark"] .fos-qr { background: #fff; }
html[data-theme="dark"] .fos code { color: var(--fm-ink); }


/* 50-tracking.css */
/*
 * Product tracking screens: variants (option sets in Options > Products, the Variants card of the product form, the stock matrix), batches / expiry, serial numbers.
 * Loaded automatically (templates/boot-material/css/ux/*.css). Markup: includes/functions/tracking_ui.php + includes/scripts/ux/50-tracking-*.js.
 * Uses the design tokens of fm-ui.css (--fm-*). Everything is mobile first: the variant matrix turns into stacked cards below 700px.
 */

/* ---------- shared bits ---------- */
.fmtv-muted { color: var(--fm-muted, #6b7689); }
.fmtv-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--fm-line, #e4e8f0); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; line-height: 1.3; user-select: none; transition: background .12s, border-color .12s; }
.fmtv-chip:hover { border-color: var(--fm-primary-100, #c9e8f7); background: var(--fm-primary-50, #e9f6fd); }
.fmtv-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fmtv-chip.is-on { background: var(--fm-primary-50, #e9f6fd); border-color: var(--fm-accent, #0ea5e9); color: var(--fm-primary-600, #075985); font-weight: 600; }
.fmtv-chip:focus-within { outline: 3px solid rgba(14, 165, 233, .35); outline-offset: 1px; }
.fmtv-sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); flex: 0 0 14px; }
.fmtv-count { font-size: 12px; font-weight: 600; color: var(--fm-primary-600, #075985); background: var(--fm-primary-50, #e9f6fd); border-radius: 999px; padding: 1px 9px; margin-left: 6px; vertical-align: middle; }
.fmpl-vchip { display: inline-flex; align-items: center; gap: 4px; color: var(--fm-primary-600, #075985); background: var(--fm-primary-50, #e9f6fd); border-radius: 999px; padding: 0 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }

/* ---------- Variants card ---------- */
.fmtv-intro { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--fm-bg, #f2f7fb); border-radius: 14px; padding: 14px 16px; }
.fmtv-intro p { margin: 0; flex: 1 1 260px; color: var(--fm-ink-2, #3a4560); }
.fmtv-opt { border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.fmtv-opt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.fmtv-opt-head .form-select { max-width: 220px; }
.fmtv-opt-head .fmtv-all { margin-left: auto; font-size: 12.5px; }
.fmtv-vals { display: flex; flex-wrap: wrap; gap: 6px; }
.fmtv-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.fmtv-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 10px 0; padding: 10px 12px; background: var(--fm-bg, #f2f7fb); border-radius: 12px; }
.fmtv-bulk label { font-size: 12px; font-weight: 600; color: var(--fm-ink-2, #3a4560); display: block; }
.fmtv-bulk .form-control { width: 110px; padding: 5px 8px; }
.fmtv-dirty { color: var(--fm-warning, #b45309); font-size: 12.5px; font-weight: 600; }

.fmtv-matrix { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fmtv-matrix th { text-align: left; color: var(--fm-muted, #6b7689); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 6px 6px; border-bottom: 1px solid var(--fm-line, #e4e8f0); white-space: nowrap; }
.fmtv-matrix td { padding: 6px 6px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.fmtv-matrix .form-control { padding: 5px 8px; min-width: 70px; font-size: 13px; }
.fmtv-matrix input[data-f=sku] { min-width: 130px; }
.fmtv-matrix input[data-f=barcode] { min-width: 120px; }
.fmtv-matrix tr.is-off td { opacity: .55; }
.fmtv-matrix tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--fm-accent, #0ea5e9); }
.fmtv-lab { font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.fmtv-lab small { font-weight: 500; color: var(--fm-muted, #6b7689); }
.fmtv-stock { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fmtv-imgbtn { border: 1px dashed var(--fm-line, #e4e8f0); border-radius: 8px; width: 34px; height: 34px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--fm-muted, #6b7689); cursor: pointer; padding: 0; overflow: hidden; }
.fmtv-imgbtn img { width: 100%; height: 100%; object-fit: cover; }
.fmtv-imgpop { position: absolute; z-index: 80; background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; box-shadow: var(--fm-shadow-lg, 0 12px 32px rgba(20, 30, 60, .16)); padding: 8px; display: flex; flex-wrap: wrap; gap: 6px; max-width: 260px; }
.fmtv-imgpop button { border: 2px solid transparent; border-radius: 8px; padding: 0; width: 48px; height: 48px; overflow: hidden; background: #f3f4f6; cursor: pointer; }
.fmtv-imgpop button img { width: 100%; height: 100%; object-fit: cover; }
.fmtv-imgpop button:hover { border-color: var(--fm-accent, #0ea5e9); }

/* stock matrix in the Inventory card */
.fmtv-stock .is-zero, .fmtv-matrix .is-zero { color: var(--fm-muted, #6b7689); }
.fmtv-stock tr.fmtv-total td { border-top: 2px solid var(--fm-line, #e4e8f0); background: var(--fm-bg, #f2f7fb); }
.fmtv-stock tr.is-off td { opacity: .65; }

/* ---------- phone: the matrix becomes one card per variant ---------- */
@media (max-width: 700px) {
	.fmtv-matrix thead { display: none; }
	.fmtv-matrix, .fmtv-matrix tbody { display: block; }
	.fmtv-matrix tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; background: #fff; }
	.fmtv-matrix td { display: block; border: 0; padding: 0; }
	.fmtv-matrix td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--fm-muted, #6b7689); margin-bottom: 3px; }
	.fmtv-matrix td.fmtv-c-label { grid-column: 1 / -1; }
	.fmtv-matrix .form-control { width: 100%; min-width: 0; }
	.fmtv-matrix td.fmtv-c-wide { grid-column: 1 / -1; }
	.fmtv-bulk .form-control { width: 90px; }
	.fmtv-stock { font-size: 13px; }
}

/* ---------- Options > Products (option sets) ---------- */
.fmto-wrap { max-width: 980px; margin: 0 auto 40px; }
.fmto-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--fm-shadow-sm, 0 1px 2px rgba(20, 30, 60, .06)); }
.fmto-card h2 { font: 700 18px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.fmto-card > p { color: var(--fm-muted, #6b7689); margin: 0 0 14px; }
.fmto-set { border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; background: var(--fm-bg, #f2f7fb); }
.fmto-set-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fmto-set-head h3 { font: 700 15px Inter, sans-serif; margin: 0; }
.fmto-set-head .fmto-sp { margin-left: auto; display: flex; gap: 6px; }
.fmto-vals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fmto-val { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 999px; padding: 3px 11px; font-size: 13px; }
.fmto-edit-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 90px 56px 34px; gap: 8px; align-items: center; margin-bottom: 6px; }
.fmto-edit-row .form-control { padding: 6px 9px; }
.fmto-edit-row input[type=color] { width: 56px; height: 34px; padding: 2px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 8px; background: #fff; }
.fmto-edit-row .fmto-grip { color: var(--fm-muted, #6b7689); text-align: center; cursor: grab; }
.fmto-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fmto-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.fmto-field { margin-bottom: 14px; }
.fmto-field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--fm-ink-2, #3a4560); }
.fmto-field small { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; margin-top: 4px; }
.fmto-empty { text-align: center; padding: 26px 12px; color: var(--fm-muted, #6b7689); }
@media (max-width: 700px) {
	.fmto-grid2 { grid-template-columns: 1fr; }
	.fmto-edit-row { grid-template-columns: minmax(0, 1fr) 70px 50px 32px; }
	.fmto-edit-row .fmto-grip { display: none; }
}

/* ---------- batches / expiry ---------- */
.fmtb-chip { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.fmtb-ok { background: var(--fm-success-bg, #e7f6ec); color: var(--fm-success, #15803d); }
.fmtb-soon { background: var(--fm-warning-bg, #fef3dc); color: var(--fm-warning, #b45309); }
.fmtb-exp { background: var(--fm-danger-bg, #fdeaea); color: var(--fm-danger, #b91c1c); }
.fmtb-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fmtb-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.fmtb-stats > div { background: var(--fm-bg, #f2f7fb); border-radius: 12px; padding: 8px 14px; }
.fmtb-stats small { display: block; color: var(--fm-muted, #6b7689); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.fmtb-stats b { font: 700 18px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmtb-h { font: 700 14px Inter, sans-serif; margin: 16px 0 6px; }
.fmtt-sw { margin-bottom: 8px; }
.fmtt-sub { margin: 0 0 8px 56px; }
.fmtt-table td small { font-size: 11.5px; }
.fmtd-extra { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-bg, #f2f7fb); }
.fmtd-extra .form-label { font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }

/* ---------- document form: receive drawer batches, batch picker on a line ---------- */
.fo-trk { margin-top: 6px; max-width: 260px; }
.fo-recv-trk > td { background: var(--fm-bg, #f2f7fb); padding: 8px 12px !important; }
.fo-rtb { margin-bottom: 8px; }
.fo-rtb-title { font-size: 12.5px; font-weight: 600; color: var(--fm-ink-2, #3a4560); margin-bottom: 4px; }
.fo-rtb-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 90px 32px; gap: 6px; margin-bottom: 4px; align-items: center; }
.fo-rtb-row .form-control { padding: 5px 8px; font-size: 13px; }
@media (max-width: 700px) { .fo-rtb-row { grid-template-columns: 1fr 1fr; } .fo-rtb-row [data-rtb=qty] { grid-column: 1 / 2; } }

/* ---------- serial numbers ---------- */
.fo-ser { margin: 6px 0 10px; }
.fo-ser-title { font-size: 12.5px; font-weight: 600; color: var(--fm-ink-2, #3a4560); margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
.fo-ser-count { margin-left: auto; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--fm-neutral-bg, #eef1f6); color: var(--fm-muted, #6b7689); }
.fo-ser-count.is-ok { background: var(--fm-success-bg, #e7f6ec); color: var(--fm-success, #15803d); }
.fo-ser-count.is-bad { background: var(--fm-warning-bg, #fef3dc); color: var(--fm-warning, #b45309); }
.fo-ser textarea { font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.fo-ser-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.fo-ser-tools .form-control { max-width: 220px; padding: 5px 8px; font-size: 13px; }
.fmts-row { cursor: pointer; }
.fmts-row:hover, .fmts-row:focus-visible { background: var(--fm-primary-50, #e9f6fd); outline: none; }

/* dark theme: the image picker, the phone-width matrix cards and the colour well sit on white above */
:root[data-theme="dark"] .fmtv-imgbtn, :root[data-theme="dark"] .fmtv-imgpop, :root[data-theme="dark"] .fmtv-matrix tr { background: var(--fm-surface); color: var(--fm-ink); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmtv-imgpop button { background: var(--fm-neutral-bg); }
:root[data-theme="dark"] .fmto-edit-row input[type=color] { background: var(--fm-surface); border-color: var(--fm-line); }


/* 60-billing.css */
/*
 * Subscription & billing screens ("calm workspace"): plan banners, plan chooser extras, checkout, order-success page and the Billing tab.
 * Loaded automatically on every app page (templates/boot-material/css/ux/*.css). Tokens come from fm-ui.css (--fm-*).
 *
 *   .fm-sub-banner   the strip at the top of every app page (trial / renewal / read-only / over limits)
 *   .fmpl-cycle      monthly / yearly switch on the plan chooser
 *   .fmco-*          checkout + order-success
 *   .bl-*            the Billing tab (templates/boot-material/options/billing.php)
 */

/* ------------------------------------------------------------------ banners */
.fm-sub-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 11px 16px; border-radius: 14px; border: 1px solid; font-size: 13.5px; line-height: 1.45; }
.fm-sub-banner__icon { flex: 0 0 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.fm-sub-banner__text { flex: 1 1 auto; min-width: 0; }
.fm-sub-banner__text strong { margin-right: 4px; }
.fm-sub-banner__actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.fm-sub-banner__btn { display: inline-block; padding: 7px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; text-decoration: none !important; white-space: nowrap; }
.fm-sub-banner__x { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; opacity: .55; color: inherit; }
.fm-sub-banner__x:hover { opacity: 1; }
/* suspended account (read-only mode, includes/scripts/ux/61-readonly.js): write buttons are dimmed and explain themselves when clicked */
.fm-readonly .fm-ro-locked { opacity: .45 !important; cursor: not-allowed !important; filter: grayscale(.6); }
.fm-sub-banner--info { background: #eff8ff; border-color: #bfe3f8; color: #0c4a6e; }
.fm-sub-banner--info .fm-sub-banner__icon { background: #d6eefc; color: #0369a1; }
.fm-sub-banner--info .fm-sub-banner__btn { background: #0369a1; color: #fff !important; }
.fm-sub-banner--warn { background: #fffaeb; border-color: #fde6a8; color: #78350f; }
.fm-sub-banner--warn .fm-sub-banner__icon { background: #fdeabf; color: #b45309; }
.fm-sub-banner--warn .fm-sub-banner__btn { background: #b45309; color: #fff !important; }
.fm-sub-banner--danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fm-sub-banner--danger .fm-sub-banner__icon { background: #fee2e2; color: #b91c1c; }
.fm-sub-banner--danger .fm-sub-banner__btn { background: #b91c1c; color: #fff !important; }
/* dark theme: tinted strips instead of the light pastel ones */
:root[data-theme="dark"] .fm-sub-banner--info   { background: rgba(14, 165, 233, .1);  border-color: rgba(56, 189, 248, .3); color: #bae6fd; }
:root[data-theme="dark"] .fm-sub-banner--info .fm-sub-banner__icon   { background: rgba(14, 165, 233, .18); color: #7dd3fc; }
:root[data-theme="dark"] .fm-sub-banner--warn   { background: rgba(245, 158, 11, .1);  border-color: rgba(251, 191, 36, .3); color: #fde68a; }
:root[data-theme="dark"] .fm-sub-banner--warn .fm-sub-banner__icon   { background: rgba(245, 158, 11, .18); color: #fbbf24; }
:root[data-theme="dark"] .fm-sub-banner--danger { background: rgba(239, 68, 68, .1);   border-color: rgba(248, 113, 113, .3); color: #fecaca; }
:root[data-theme="dark"] .fm-sub-banner--danger .fm-sub-banner__icon { background: rgba(239, 68, 68, .18);  color: #f87171; }
/* tablets and phones: the title gets its own line so the message never breaks in the middle of a sentence */
@media (max-width: 991.98px) { .fm-sub-banner__text strong { display: block; margin: 0 0 2px; } }
@media (max-width: 640px) {
	/* phones: icon | message | close on the first row, the button underneath the message; the title gets its own line */
	.fm-sub-banner { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 10px; align-items: start; padding: 12px 14px; }
	.fm-sub-banner__icon { grid-column: 1; grid-row: 1; width: 32px; height: 32px; }
	.fm-sub-banner__text { grid-column: 2; grid-row: 1; }
	.fm-sub-banner__text strong { display: block; margin: 0 0 2px; }
	.fm-sub-banner__actions { display: contents; }
	.fm-sub-banner__x { grid-column: 3; grid-row: 1; align-self: start; margin: -2px -4px 0 0; }
	.fm-sub-banner__btn { grid-column: 2 / 4; grid-row: 2; justify-self: start; }
}

/* ------------------------------------------------------------------ plan chooser: cycle switch */
.fmpl-cycle { display: inline-flex; margin-top: 18px; padding: 4px; background: #fff; border: 1px solid #dbe4ee; border-radius: 999px; box-shadow: 0 2px 8px rgba(8, 47, 73, .06); }
.fmpl-cycle button { border: 0; background: transparent; padding: 8px 20px; border-radius: 999px; font: 700 14px Inter, sans-serif; color: #475569; cursor: pointer; transition: background .15s, color .15s; }
.fmpl-cycle button em { font-style: normal; font-size: 11.5px; background: #d1fae5; color: #047857; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.fmpl-cycle button[aria-pressed="true"] { background: #0369a1; color: #fff; }
.fmpl-cycle button[aria-pressed="true"] em { background: rgba(255, 255, 255, .22); color: #fff; }
.fmpl-save[hidden] { display: none !important; }
.pl-feat li.pl-pos.is-off { opacity: .6; border-style: solid; border-color: #cbd5e1; background: #f8fafc; }
.pl-card.is-hot .pl-feat li.pl-pos.is-off { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); }

/* ------------------------------------------------------------------ checkout */
.fmco { max-width: 1120px; margin: 0 auto; padding: 22px 18px 64px; color: var(--fm-ink, #1b2437); }
.fmco *, .fmco *::before, .fmco *::after { box-sizing: border-box; }
.fmco-head { margin-bottom: 20px; }
.fmco-back { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--fm-primary, #0369a1); text-decoration: none; padding: 4px 0; }
.fmco-back:hover { text-decoration: underline; }
.fmco-head h2 { font: 800 clamp(26px, 3.4vw, 34px)/1.15 'Plus Jakarta Sans', Inter, sans-serif; letter-spacing: -.02em; margin: 6px 0 8px; color: #082f49; }
.fmco-head h2 span { color: #0284c7; }
.fmco-lead { font-size: 15px; line-height: 1.6; color: var(--fm-muted, #6b7689); margin: 0; max-width: 720px; }
.fmco-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.fmco-main { display: grid; gap: 18px; }
.fmco-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(8, 47, 73, .04), 0 12px 30px rgba(8, 47, 73, .05); }
.fmco-card h3 { display: flex; align-items: center; gap: 10px; font: 800 17px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 16px; color: #082f49; }
.fmco-card h3 small { font: 500 12.5px Inter, sans-serif; color: var(--fm-muted, #6b7689); margin-left: 2px; }
.fmco-n { width: 26px; height: 26px; border-radius: 50%; background: #e0f2fe; color: #0369a1; font: 800 13px Inter, sans-serif; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }

.fmco-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fmco-seg label { margin: 0; cursor: pointer; }
.fmco-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fmco-seg span { display: block; padding: 14px 16px; border: 2px solid var(--fm-line, #e4e8f0); border-radius: 14px; transition: border-color .15s, background .15s; }
.fmco-seg b { display: block; font-size: 15px; }
.fmco-seg small { color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmco-seg input:checked + span { border-color: #0284c7; background: #f0f9ff; box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.fmco-seg input:focus-visible + span { outline: 2px solid #0369a1; outline-offset: 2px; }

.fmco-addons { display: grid; gap: 10px; }
.fmco-addon { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; transition: border-color .15s, background .15s; }
.fmco-addon.is-on { border-color: #0284c7; background: #f0f9ff; }
.fmco-addon__info b { display: block; font-size: 14.5px; }
.fmco-addon__info small { color: var(--fm-muted, #6b7689); }
.fmco-step { display: inline-flex; align-items: center; background: #fff; border: 1px solid #dbe4ee; border-radius: 12px; padding: 3px; flex: 0 0 auto; }
.fmco-step__b { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #e0f2fe; color: #0369a1; font: 700 18px/1 Inter, sans-serif; cursor: pointer; }
.fmco-step__b:hover { background: #bae6fd; }
.fmco-step input { width: 48px; border: 0; text-align: center; font: 700 15px Inter, sans-serif; background: transparent; -moz-appearance: textfield; }
.fmco-step input::-webkit-outer-spin-button, .fmco-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.fmco-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fmco-f { display: block; margin: 0; }
.fmco-f--wide { grid-column: 1 / -1; }
.fmco-f span { display: block; font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); margin-bottom: 5px; }
.fmco-f input, .fmco-f select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; background: #fff; font-size: 14.5px; }
.fmco-f input:focus, .fmco-f select:focus { outline: 0; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .2); }
.fmco-f.has-error input, .fmco-f.has-error select { border-color: #dc2626; background: #fff7f7; }
.fmco-f .fmco-err { display: none; color: #b91c1c; font-size: 12px; margin-top: 4px; font-weight: 500; }
.fmco-f.has-error .fmco-err { display: block; }

.fmco-side { position: sticky; top: 76px; }
.fmco-sum { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(8, 47, 73, .05), 0 16px 38px rgba(8, 47, 73, .08); }
.fmco-sum > h3 { margin: 0; padding: 15px 22px; font: 800 12.5px Inter, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #082f49, #0369a1); }
.fmco-sum__body { padding: 18px 22px 6px; }
.fmco-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.fmco-line small { display: block; color: var(--fm-muted, #6b7689); font-size: 12.5px; }
.fmco-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fmco-line--sub { color: #047857; }
.fmco-line--total { border-top: 1px dashed #cbd5e1; margin-top: 8px; padding-top: 14px; font: 800 17px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmco-line--total b { font-size: 26px; color: #082f49; }
.fmco-when { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: #f0f9ff; color: #0c4a6e; font-size: 13px; line-height: 1.5; }
/* a refused choice (locked plan, too many team members): the reasons as a list */
.fmco-when--bad { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }
.fmco-when--bad ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-weight: 600; }
.fmco-when--bad ul i { font-size: 11px; opacity: .8; margin-right: 4px; }
.fmco-when--bad a { color: inherit; font-weight: 600; text-decoration: underline; display: inline-block; margin-top: 6px; }
.fmco-skel { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7); background-size: 200% 100%; animation: fmcoSkel 1.2s infinite; margin: 12px 0; }
@keyframes fmcoSkel { to { background-position: -200% 0; } }
.fmco-coupon { padding: 6px 22px 4px; }
.fmco-coupon label { font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); margin: 0 0 5px; display: block; }
.fmco-coupon__row { display: flex; gap: 8px; }
.fmco-coupon__row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; text-transform: uppercase; }
.fmco-coupon__msg { min-height: 20px; font-size: 12.5px; margin-top: 5px; }
.fmco-coupon__msg.is-ok { color: #047857; }
.fmco-coupon__msg.is-bad { color: #b91c1c; }
.fmco-pay { padding: 8px 22px 6px; display: grid; gap: 10px; }
.fmco-note { padding: 0 22px; font-size: 12.5px; color: var(--fm-muted, #6b7689); margin: 4px 0 0; }
.fmco-trust { list-style: none; margin: 10px 0 0; padding: 14px 22px 18px; display: grid; gap: 7px; background: #f8fafc; border-top: 1px solid var(--fm-line-2, #eef1f6); font-size: 12.5px; color: #475569; }
.fmco-trust i { width: 18px; color: #0369a1; }
.fmco-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: #0369a1; color: #fff !important; font: 700 15px Inter, sans-serif; padding: 12px 20px; cursor: pointer; text-decoration: none !important; transition: filter .15s, transform .15s; }
.fmco-btn:hover { filter: brightness(1.08); }
.fmco-btn:disabled { opacity: .55; cursor: not-allowed; }
.fmco-btn--ghost { background: #fff; color: #0369a1 !important; border: 1.5px solid #bae6fd; }
.fmco-btn--block { width: 100%; }
.fmco-paypal { min-height: 46px; }
.fmco-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: fmcoSpin .7s linear infinite; }
@keyframes fmcoSpin { to { transform: rotate(360deg); } }

/* order success */
.fmco--done { display: flex; justify-content: center; }
.fmco-done { max-width: 640px; width: 100%; text-align: center; background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 22px; padding: 38px 32px; box-shadow: 0 16px 44px rgba(8, 47, 73, .08); margin-top: 20px; }
.fmco-done h2 { font: 800 28px 'Plus Jakarta Sans', Inter, sans-serif; margin: 14px 0 8px; color: #082f49; }
.fmco-done .fmco-lead { margin: 0 auto 20px; }
.fmco-done__icon { width: 68px; height: 68px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; }
.fmco-done__icon.is-ok { background: #d1fae5; color: #047857; }
.fmco-done__icon.is-wait { background: #fef3c7; color: #b45309; }
.fmco-done__icon.is-bad { background: #fee2e2; color: #b91c1c; }
.fmco-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; text-align: left; }
.fmco-facts div { background: #f8fafc; border: 1px solid var(--fm-line-2, #eef1f6); border-radius: 12px; padding: 10px 14px; }
.fmco-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted, #6b7689); font-weight: 700; }
.fmco-facts dd { margin: 2px 0 0; font-weight: 700; }
.fmco-how { text-align: left; margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 14px; }
.fmco-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 920px) {
	.fmco-grid { grid-template-columns: 1fr; }
	.fmco-side { position: static; order: -1; }
}
@media (max-width: 560px) {
	.fmco-fields { grid-template-columns: 1fr; }
	.fmco-card { padding: 18px 16px; }
	.fmco-addon { flex-direction: column; align-items: flex-start; }
	.fmco-facts { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ billing tab */
.bl { max-width: none; margin: 4px 0 56px; padding: 0; } /* lines up with the settings tabs and the other settings pages (it used to sit 16px further in, in a narrower column) */
.bl-plan { background: linear-gradient(135deg, #082f49, #0369a1 65%, #0ea5e9); color: #e0f2fe; border-radius: 22px; padding: 28px 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; box-shadow: 0 18px 40px rgba(8, 47, 73, .25); position: relative; overflow: hidden; }
.bl-plan::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.bl-plan--bad { background: linear-gradient(135deg, #450a0a, #b91c1c 70%, #ef4444); }
.bl-plan--warn { background: linear-gradient(135deg, #451a03, #b45309 70%, #f59e0b); }
.bl-plan small { display: block; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; font-size: 11.5px; opacity: .85; }
.bl-plan h2 { font: 800 32px/1.1 'Plus Jakarta Sans', Inter, sans-serif; color: #fff; margin: 4px 0 10px; }
.bl-plan h2 em { font-style: normal; font-size: 15px; font-weight: 600; opacity: .85; margin-left: 8px; }
.bl-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.bl-pill { display: inline-flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 13.5px; }
.bl-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; justify-content: flex-end; }
.bl-btn { display: inline-flex; gap: 8px; align-items: center; padding: 11px 20px; border-radius: 12px; font-weight: 700; text-decoration: none !important; border: 0; cursor: pointer; font-size: 14.5px; }
.bl-btn--w { background: #fff; color: #075985 !important; }
.bl-btn--g { border: 1px solid rgba(255, 255, 255, .5); color: #fff !important; background: transparent; }
.bl-btn--p { background: #0369a1; color: #fff !important; }
.bl-btn--o { background: #fff; color: #0369a1 !important; border: 1.5px solid #bae6fd; }
.bl-btn--d { background: #fff; color: #b91c1c !important; border: 1.5px solid #fecaca; }
.bl-h { font: 800 18px 'Plus Jakarta Sans', Inter, sans-serif; margin: 34px 0 6px; color: #082f49; }
.bl-sub { color: var(--fm-muted, #6b7689); margin: 0 0 14px; font-size: 13.5px; }

.bl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.bl-tile { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 16px 18px; }
.bl-tile small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted, #6b7689); font-weight: 700; margin-bottom: 4px; }
.bl-tile b { font: 800 20px 'Plus Jakarta Sans', Inter, sans-serif; color: #082f49; }
.bl-tile p { margin: 4px 0 0; font-size: 13px; color: var(--fm-muted, #6b7689); }
.bl-note { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: #fffaeb; border: 1px solid #fde6a8; color: #78350f; font-size: 13.5px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bl-note > span { flex: 1 1 260px; }
.bl-note--info { background: #eff8ff; border-color: #bfe3f8; color: #0c4a6e; }

.bl-usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bl-use { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 16px 18px; text-decoration: none !important; color: inherit; display: block; transition: box-shadow .15s, transform .15s; }
.bl-use:hover { box-shadow: 0 10px 26px rgba(8, 47, 73, .1); transform: translateY(-2px); }
.bl-use header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-weight: 650; }
.bl-use header i { width: 32px; height: 32px; border-radius: 10px; background: #e0f2fe; color: #0369a1; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.bl-use b { font: 800 22px 'Plus Jakarta Sans', Inter, sans-serif; }
.bl-use b span { font: 600 14px Inter, sans-serif; color: var(--fm-muted, #6b7689); }
.bl-bar { height: 8px; border-radius: 999px; background: #e2e8f0; margin-top: 10px; overflow: hidden; }
.bl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #0369a1); }
.bl-use.is-warn .bl-bar i { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bl-use.is-full .bl-bar i { background: linear-gradient(90deg, #f87171, #dc2626); }
.bl-use small { color: var(--fm-muted, #6b7689); font-size: 12.5px; display: block; margin-top: 6px; }

.bl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bl-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; padding: 20px 22px; }
.bl-card h4 { font: 800 16px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 4px; color: #082f49; }
.bl-card > p { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 0 0 14px; }
.bl-form { display: grid; gap: 12px; }
.bl-form label { display: block; margin: 0; font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); }
.bl-form input[type=text], .bl-form input[type=email] { display: block; width: 100%; height: 42px; margin-top: 5px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; font-size: 14.5px; }
.bl-form input:focus { outline: 0; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .2); }
.bl-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.bl-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: #0369a1; }
.bl-row { display: flex; gap: 8px; }
.bl-row input { flex: 1; min-width: 0; }
.bl-msg { font-size: 12.5px; min-height: 18px; }
.bl-msg.is-ok { color: #047857; }
.bl-msg.is-bad { color: #b91c1c; }
.bl-chip { display: inline-flex; align-items: center; gap: 8px; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.bl-chip button { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }

.bl-inv { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; overflow: auto; }
.bl-inv table { margin: 0; width: 100%; border-collapse: collapse; min-width: 640px; }
.bl-inv th { background: var(--fm-bg, #f2f7fb); color: var(--fm-muted, #6b7689); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; text-align: left; white-space: nowrap; }
.bl-inv td { padding: 13px 16px; border-top: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.bl-inv td.r, .bl-inv th.r { text-align: right; }
.bl-inv .bl-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bl-empty { text-align: center; color: var(--fm-muted, #6b7689); padding: 34px 16px; }
.bl-mail li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--fm-line-2, #eef1f6); font-size: 13.5px; list-style: none; }
.bl-mail { padding: 0; margin: 0; }
.bl-mail li:first-child { border-top: 0; }
.bl-mail time { color: var(--fm-muted, #6b7689); white-space: nowrap; }

@media (max-width: 860px) {
	.bl-plan { grid-template-columns: 1fr; }
	.bl-actions { justify-content: flex-start; }
	.bl-cols { grid-template-columns: 1fr; }
	.bl-two { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ dark theme
   The cards above use a white background and the headings a dark navy; on <html data-theme="dark"> that made light text sit on white and navy on near-black.
   The tokens (--fm-surface, --fm-ink ...) swap in dark mode, so the surfaces and headings follow them. Coloured notes / banners keep their own light
   background AND dark text (self-contained), so they stay readable. */
:root[data-theme="dark"] .fmco-card, :root[data-theme="dark"] .fmco-sum, :root[data-theme="dark"] .fmco-done, :root[data-theme="dark"] .bl-tile, :root[data-theme="dark"] .bl-use,
:root[data-theme="dark"] .bl-card, :root[data-theme="dark"] .bl-inv, :root[data-theme="dark"] .fmco-step, :root[data-theme="dark"] .fmpl-cycle { background: var(--fm-surface); border-color: var(--fm-line); color: var(--fm-ink); }
:root[data-theme="dark"] .fmco-head h2, :root[data-theme="dark"] .fmco-card h3, :root[data-theme="dark"] .fmco-done h2, :root[data-theme="dark"] .bl-h, :root[data-theme="dark"] .bl-card h4,
:root[data-theme="dark"] .bl-tile b, :root[data-theme="dark"] .fmco-line--total b { color: var(--fm-ink); }
:root[data-theme="dark"] .fmco-head h2 span { color: var(--fm-primary); }
:root[data-theme="dark"] .fmco-f input, :root[data-theme="dark"] .fmco-f select, :root[data-theme="dark"] .fmco-coupon__row input, :root[data-theme="dark"] .bl-form input[type=text],
:root[data-theme="dark"] .bl-form input[type=email], :root[data-theme="dark"] .fmco-step input { background: var(--fm-bg); border-color: var(--fm-line); color: var(--fm-ink); }
:root[data-theme="dark"] .fmco-f.has-error input, :root[data-theme="dark"] .fmco-f.has-error select { border-color: var(--fm-danger); background: var(--fm-danger-bg); }
:root[data-theme="dark"] .fmco-f .fmco-err, :root[data-theme="dark"] .fmco-coupon__msg.is-bad, :root[data-theme="dark"] .bl-msg.is-bad { color: var(--fm-danger); }
:root[data-theme="dark"] .fmco-coupon__msg.is-ok, :root[data-theme="dark"] .bl-msg.is-ok, :root[data-theme="dark"] .fmco-line--sub { color: var(--fm-success); }
:root[data-theme="dark"] .fmco-seg input:checked + span, :root[data-theme="dark"] .fmco-addon.is-on { background: var(--fm-primary-50); border-color: var(--fm-primary); }
:root[data-theme="dark"] .fmco-when { background: var(--fm-primary-50); color: var(--fm-ink); }
:root[data-theme="dark"] .fmco-when--bad { background: rgba(239, 68, 68, .12); color: #fecaca; border-color: rgba(248, 113, 113, .35); }
/* a locked plan on the checkout page (plans.css .pl-lock); the plan cards themselves stay light on purpose */
:root[data-theme="dark"] .fmco .pl-lock { background: rgba(239, 68, 68, .12); border-color: rgba(248, 113, 113, .35); color: #fecaca; }
:root[data-theme="dark"] .fmco .pl-lock li b { color: #fca5a5; }
:root[data-theme="dark"] .fmco-trust, :root[data-theme="dark"] .fmco-facts div { background: var(--fm-bg); border-color: var(--fm-line-2); color: var(--fm-ink-2); }
:root[data-theme="dark"] .fmco-line--total { border-top-color: var(--fm-line); }
:root[data-theme="dark"] .fmco-skel { background: linear-gradient(90deg, var(--fm-line-2), var(--fm-line), var(--fm-line-2)); background-size: 200% 100%; }
:root[data-theme="dark"] .fmpl-cycle button { color: var(--fm-ink-2); }
:root[data-theme="dark"] .fmpl-cycle button[aria-pressed="true"] { color: #fff; }
:root[data-theme="dark"] .fmco-btn--ghost, :root[data-theme="dark"] .bl-btn--o, :root[data-theme="dark"] .bl-btn--d { background: transparent; }
:root[data-theme="dark"] .bl-btn--o { color: var(--fm-primary-600) !important; border-color: var(--fm-primary-100); }
:root[data-theme="dark"] .fmco-btn--ghost { color: var(--fm-primary-600) !important; border-color: var(--fm-primary-100); }
:root[data-theme="dark"] .bl-btn--d { color: var(--fm-danger) !important; border-color: var(--fm-danger-bg); }
:root[data-theme="dark"] .bl-bar { background: var(--fm-line); }
:root[data-theme="dark"] .bl-inv td { border-top-color: var(--fm-line-2); }
:root[data-theme="dark"] .bl-use:hover { box-shadow: var(--fm-shadow); }

/* ---- Your extras card (paid extras that renew, free grants, Buy extras) ---- */
.bl-extras { margin: 22px 0 6px; }
.bl-extras > h4 { margin: 0 0 12px; }
.bl-extras > .bl-auto__a { margin: 0 0 8px; }
.bl-ex { list-style: none; margin: 8px 0 10px; padding: 0; display: grid; gap: 8px; }
.bl-ex li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); }
.bl-ex li.is-off { opacity: .75; border-style: dashed; }
.bl-ex li b { display: block; }
.bl-ex li small { display: block; color: var(--fm-muted, #6b7689); }
.bl-ex__t, .bl-ex__n, .bl-ex__g { margin: 6px 0; color: var(--fm-muted, #6b7689); font-size: 13px; line-height: 1.55; }
.bl-ex__t b { color: var(--fm-ink, #1b2437); }
.bl-ex__g i { color: #0369a1; margin-right: 4px; }
.bl-ex__g.is-off { text-decoration: line-through; }

/* setup hours used up (Billing meter) */
.bl-hours-over { display: block; margin: 8px 0 4px; padding: 7px 10px; border-radius: 10px; font-weight: 700; background: #fffbeb; color: #78350f; border: 1px solid #fde68a; }
:root[data-theme="dark"] .bl-hours-over { background: rgba(245, 158, 11, .14); color: #fcd34d; border-color: rgba(245, 158, 11, .4); }


/* 61-billing-auto.css */
/*
 * Automatic renewal ("Pay automatically") styles - the checkout checkbox, the PayPal subscribe button, the Billing tab card.
 * Loaded automatically on app pages (templates/boot-material/css/ux/*.css); tokens from fm-ui.css (--fm-*). Behaviour: includes/scripts/ux/61-billing-auto.js.
 */

/* ------------------------------------------------------------------ checkout */
.fmco-auto { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 12px; padding: 12px 14px; border: 1px solid #bfe3f8; background: #f0f9ff; border-radius: 14px; cursor: pointer; }
.fmco-auto input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--fm-primary, #0369a1); }
.fmco-auto b { display: block; font-size: 14px; color: #082f49; }
.fmco-auto small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--fm-muted, #6b7689); }
.fmco-auto:focus-within { outline: 2px solid var(--fm-primary, #0369a1); outline-offset: 2px; }
.fmco-auto-note { display: flex; gap: 10px; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: #fffaeb; border: 1px solid #fde6a8; color: #78350f; font-size: 13px; line-height: 1.5; }
.fmco-auto-note i { margin-top: 3px; }
.fmco-pay.is-auto #fmcoPaypal { display: none; }
.fmco-btn--paypal { background: #ffc439; color: #111827 !important; border-color: #ffc439; }
.fmco-btn--paypal:hover { background: #f5b82e; }
.fmco-btn--paypal .fa-paypal { color: #003087; margin-right: 6px; }
.fmco-auto-hint { padding: 0; margin: 8px 0 0; }

/* ------------------------------------------------------------------ Billing tab card */
.bl-auto { margin: 22px 0 6px; border-radius: 18px; border-left: 5px solid #0369a1; }
.bl-auto h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 800 17px 'Plus Jakarta Sans', Inter, sans-serif; color: #082f49; }
.bl-auto p { margin: 0 0 12px; color: var(--fm-muted, #6b7689); line-height: 1.6; max-width: 760px; }
.bl-auto p b { color: var(--fm-ink, #1b2437); }
.bl-auto__a { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bl-auto__f { margin: 12px 0 0 !important; font-size: 12.5px; }
.bl-auto--on { border-left-color: #059669; }
.bl-auto--on h4 i { color: #059669; }
.bl-auto--failed, .bl-auto--suspended { border-left-color: #dc2626; background: #fffafa; }
.bl-auto--failed h4 i, .bl-auto--suspended h4 i { color: #dc2626; }
.bl-auto--pending { border-left-color: #d97706; }
@media (max-width: 640px) {
	.bl-auto__a .bl-btn { width: 100%; justify-content: center; text-align: center; }
}

/* ------------------------------------------------------------------ dark theme (see the end of 60-billing.css) */
:root[data-theme="dark"] .fmco-auto { background: var(--fm-primary-50); border-color: var(--fm-primary-100); }
:root[data-theme="dark"] .fmco-auto b, :root[data-theme="dark"] .bl-auto h4 { color: var(--fm-ink); }
:root[data-theme="dark"] .bl-auto--failed, :root[data-theme="dark"] .bl-auto--suspended { background: var(--fm-danger-bg); }


/* 70-integrations.css */
/*
 * Options > Integrations (scheduled reports, API keys, webhooks): the drawer panels, cards, pills and the one-time key box.
 * Markup is drawn by includes/scripts/ux/70-integrations.js and 71-integrations-api.js; tokens come from fm-ui.css (--fm-*).
 */
.fi-wrap { padding: 4px 2px 40px; }
.fi-lead { color: var(--fm-ink-2, #3a4560); margin: 0 0 14px; line-height: 1.55; }
.fi-muted { color: var(--fm-muted, #6b7689); font-size: 13px; }
.fi-h { margin: 8px 0 14px; font-size: 18px; }
.fi-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.fi-back { padding-left: 0; margin-bottom: 4px; }
.fi-danger { color: var(--fm-danger, #b91c1c) !important; }
.fi-bad { color: var(--fm-danger, #b91c1c); font-weight: 600; }

/* cards */
.fi-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 16px 18px; margin: 0 0 12px; box-shadow: var(--fm-shadow-sm, 0 1px 2px rgba(20,30,60,.06)); }
.fi-card.is-off { background: var(--fm-bg, #f2f7fb); }
.fi-card.is-off h4 { color: var(--fm-muted, #6b7689); }
.fi-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fi-card h4 { margin: 0 0 2px; font-size: 16px; }
.fi-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.fi-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); font-size: 12px; font-weight: 600; }
.fi-chip--alt { background: var(--fm-neutral-bg, #eef1f6); color: var(--fm-ink-2, #3a4560); }
.fi-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; font-size: 13px; color: var(--fm-ink-2, #3a4560); }
.fi-meta i { color: var(--fm-muted, #6b7689); margin-right: 4px; }
.fi-card > footer { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--fm-line-2, #eef1f6); }
.fi-key code, .fi-code { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--fm-bg, #f2f7fb); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* pills */
.fi-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.6; }
.fi-pill--ok { background: var(--fm-success-bg, #e7f6ec); color: var(--fm-success, #15803d); }
.fi-pill--warn { background: var(--fm-warning-bg, #fef3dc); color: var(--fm-warning, #b45309); }
.fi-pill--bad { background: var(--fm-danger-bg, #fdeaea); color: var(--fm-danger, #b91c1c); }
.fi-pill--off { background: var(--fm-neutral-bg, #eef1f6); color: var(--fm-muted, #6b7689); }

/* switch */
.fi-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; margin: 0; cursor: pointer; }
.fi-switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fi-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.fi-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.fi-switch input:checked + span { background: var(--fm-primary, #0369a1); }
.fi-switch input:checked + span::after { transform: translateX(18px); }
.fi-switch input:focus-visible + span { outline: 2px solid var(--fm-accent, #0ea5e9); outline-offset: 2px; }

/* notes + empty + skeleton */
.fi-note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.fi-note--warn { background: var(--fm-warning-bg, #fef3dc); color: #7c3a06; }
.fi-note--info { background: var(--fm-info-bg, #e6eeff); color: #1e3a8a; }
.fi-note--ok { background: var(--fm-success-bg, #e7f6ec); color: #14532d; }
.fi-note i { margin-top: 3px; }
.fi-empty { text-align: center; padding: 34px 18px; border: 2px dashed var(--fm-primary-100, #c9e8f7); border-radius: 16px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); }
.fi-empty > i { font-size: 30px; margin-bottom: 8px; display: block; }
.fi-empty b { display: block; font-size: 16px; margin-bottom: 4px; }
.fi-empty p { margin: 0 0 12px; color: var(--fm-ink-2, #3a4560); }
.fi-skel { height: 92px; border-radius: 16px; margin: 0 0 12px; background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%); background-size: 400% 100%; animation: fi-shimmer 1.3s ease infinite; }
.fi-skel--s { height: 52px; }
@keyframes fi-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .fi-skel { animation: none; } .fi-switch span, .fi-switch span::after { transition: none; } }

/* forms */
.fi-form .fi-field { margin: 0 0 16px; }
.fi-form label { font-weight: 600; font-size: 13px; color: var(--fm-ink-2, #3a4560); margin: 0 0 5px; display: block; }
.fi-form label small { font-weight: 400; color: var(--fm-muted, #6b7689); }
.fi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }
.fi-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.fi-check { display: flex !important; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; cursor: pointer; background: #fff; margin: 0 !important; font-weight: 500 !important; }
.fi-check:has(input:checked) { border-color: var(--fm-accent, #0ea5e9); background: var(--fm-primary-50, #e9f6fd); }
.fi-check input { margin-top: 4px; }
.fi-check span { display: block; }
.fi-check i { color: var(--fm-primary, #0369a1); margin-right: 6px; }
.fi-check b { font-weight: 650; }
.fi-check small { display: block; font-weight: 400; color: var(--fm-muted, #6b7689); line-height: 1.4; margin-top: 2px; }
.fi-seg { display: inline-flex; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.fi-seg label { margin: 0 !important; }
.fi-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fi-seg span { display: block; padding: 8px 16px; cursor: pointer; font-weight: 600; font-size: 13px; background: #fff; }
.fi-seg input:checked + span { background: var(--fm-primary, #0369a1); color: #fff; }
.fi-seg input:focus-visible + span { outline: 2px solid var(--fm-accent, #0ea5e9); outline-offset: -2px; }
.fi-line { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; margin: 0 0 8px !important; }
.fi-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; position: sticky; bottom: 0; background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); padding: 14px 0 4px; }
.fi-preview { width: 100%; min-height: 520px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; margin-top: 12px; background: #f1f5f9; }

/* tables */
.fi-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fi-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--fm-muted, #6b7689); padding: 6px 8px; border-bottom: 1px solid var(--fm-line, #e4e8f0); }
.fi-table td { padding: 8px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: top; }
.fi-scroll { overflow-x: auto; }

/* one-time secret box */
.fi-secret { border: 2px solid var(--fm-accent, #0ea5e9); background: var(--fm-primary-50, #e9f6fd); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; }
.fi-secret code { display: block; font: 600 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; background: #fff; border-radius: 10px; border: 1px solid var(--fm-primary-100, #c9e8f7); word-break: break-all; margin: 8px 0; user-select: all; }
.fi-scopes { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 14px; align-items: center; }
.fi-scopes > span { font-weight: 600; font-size: 13px; }
.fi-scopes label { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 500 !important; margin: 0 !important; }
.fi-scopes .fi-hd { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--fm-muted, #6b7689); font-weight: 700; }

@media (max-width: 560px) {
	.fi-card > header { flex-direction: row; }
	.fi-actions { justify-content: stretch; }
	.fi-actions .btn { flex: 1; }
	.fi-scopes { grid-template-columns: 1fr 1fr; }
	.fi-scopes > span { grid-column: 1 / -1; margin-top: 6px; }
}

/* per-report options (catalogue 'options', e.g. Expiry alerts: warning window + "only send when something is expiring"): a full-width strip under the ticked report */
.fi-opts { grid-column: 1 / -1; margin: -4px 0 2px; padding: 12px 14px; border: 1px dashed var(--fm-line, #e4e8f0); border-radius: 14px; background: var(--fm-primary-50, #e9f6fd); }
.fi-opts[hidden] { display: none; }
.fi-field .fi-opt, .fi-opt { display: flex !important; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 8px !important; font-weight: 500 !important; }
.fi-opt__in { display: inline-flex; align-items: center; gap: 8px; }
.fi-opt__in .form-control { width: 92px; }
.fi-opt small { flex-basis: 100%; }
.fi-opt__help { display: block; margin: -4px 0 0 24px; }

/* ------------------------------------------------------------------ dark theme: white cards and the dark note text would be unreadable on the dark surface */
:root[data-theme="dark"] .fi-card, :root[data-theme="dark"] .fi-check, :root[data-theme="dark"] .fi-seg span, :root[data-theme="dark"] .fi-secret code { background: var(--fm-surface); color: var(--fm-ink); }
:root[data-theme="dark"] .fi-card.is-off { background: var(--fm-bg); }
:root[data-theme="dark"] .fi-seg input:checked + span { background: var(--fm-primary); color: #06263b; }
:root[data-theme="dark"] .fi-switch span { background: #3a4f66; }
:root[data-theme="dark"] .fi-switch input:checked + span { background: var(--fm-primary); }
:root[data-theme="dark"] .fi-note--warn { color: #fde68a; }
:root[data-theme="dark"] .fi-note--info { color: #bfdbfe; }
:root[data-theme="dark"] .fi-note--ok { color: #bbf7d0; }
:root[data-theme="dark"] .fi-actions { background: linear-gradient(to top, var(--fm-surface) 70%, rgba(18, 32, 50, 0)); }
:root[data-theme="dark"] .fi-preview { background: #f1f5f9; } /* an e-mail preview is a white page of its own */
:root[data-theme="dark"] .fi-skel { background: linear-gradient(90deg, var(--fm-line-2) 25%, var(--fm-line) 37%, var(--fm-line-2) 63%); background-size: 400% 100%; }


/* 80-inflow.css */
/* ==========================================================================================================
   inFlow-style additions in OInventory's own look: product page record + tabs, bill of materials,
   movement history, attachments panels (.fma), manufacturing page (.fmb-*), currencies. Colours come from
   the theme tokens (--fm-primary ...), so the oinventory purple and dark mode follow automatically.
   ========================================================================================================== */

/* ---------------------------------------------------------------- product page: one column, record on top */
.fmp--tabs .fmp-body--tabs { display: block; max-width: 1240px; }
.fmp--tabs .fmp-body--tabs > .fmp-card, .fmp--tabs .fmp-pane > .fmp-card, .fmp--tabs .fmp-pane > .fmp-cols { margin-bottom: 16px; }
.fmp-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.fmp-muted { color: var(--fm-muted, #6b7689); font-weight: 500; }
.fmp-title-note { font-size: 12.5px; margin-left: 4px; }
.fmp-title-btn { margin-left: auto; }
.fmp-nowrap { white-space: nowrap; }
.fmp-pos { color: var(--fm-success, #15803d); font-weight: 700; font-variant-numeric: tabular-nums; }
.fmp-neg { color: var(--fm-danger, #b91c1c); font-weight: 700; font-variant-numeric: tabular-nums; }

/* record card: picture | name, codes, category, description */
.fmp-hero { padding-bottom: 8px; }
.fmp-hero-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.fmp-hero-media .fmp-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fmp-hero-media .fmp-gallery .fmp-thumb.is-cover { grid-column: span 3; aspect-ratio: 4 / 3; }
.fmp-hero-media .fmp-dropzone { min-height: 0; padding: 18px 12px; }
.fmp-hero-media .fmp-gallery:empty + .fmp-dropzone { min-height: 190px; display: flex; flex-direction: column; justify-content: center; }
.fmp-hero-hint { margin: 6px 0 0; font-size: 12px; }
.fmp-field--last { margin-bottom: 4px; }

/* details row: size & weight | how it is sold | custom fields */
.fmp-hero-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--fm-line-2, #eef1f6); }
.fmp-detail { min-width: 0; }
.fmp-detail .fmp-subtitle.first { margin-top: 0; }
.fmp-detail .fmp-switchbox { margin-bottom: 4px; }
.fmp-detail .product-custom-fields .fmcf-empty { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 0 0 10px; }

/* customs info */
.fmp-customs { margin-top: 10px; border-top: 1px solid var(--fm-line-2, #eef1f6); padding-top: 10px; }
.fmp-customs > summary { cursor: pointer; font-weight: 650; color: var(--fm-ink-2, #3a4560); list-style: none; padding: 4px 0 8px; }
.fmp-customs > summary::-webkit-details-marker { display: none; }
.fmp-customs > summary::before { content: '\25B8'; display: inline-block; width: 14px; color: var(--fm-muted, #6b7689); transition: transform .15s; }
.fmp-customs[open] > summary::before { transform: rotate(90deg); }
.fmp-customs > summary i { color: var(--fm-primary, #0369a1); margin-right: 4px; }
.fmp-customs .fmp-hint { display: block; margin: -6px 0 6px; color: var(--fm-muted, #6b7689); font-size: 12px; }

/* tab strip (pill tabs, like inFlow; colours from the theme) */
.fmp-tabs { position: sticky; top: var(--fmp-head-h, 63px); z-index: 20; display: flex; gap: 4px; flex-wrap: wrap; overflow: visible; padding: 6px; margin: 0 0 16px; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; box-shadow: 0 1px 2px rgba(20, 30, 60, .04); }
.fmp-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--fm-ink-2, #3a4560); font-weight: 600; font-size: 13px; padding: 7px 10px; border-radius: 999px; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.fmp-tab i { color: var(--fm-muted, #6b7689); }
.fmp-tab:hover { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); }
.fmp-tab:focus-visible { outline: 2px solid var(--fm-primary, #0369a1); outline-offset: 1px; }
.fmp-tab.is-active { background: var(--fm-primary, #0369a1); color: #fff; }
.fmp-tab.is-active i { color: #fff; }
.fmp-tab.is-active .fmp-count { background: rgba(255, 255, 255, .25); color: #fff; }
.fmp-tabs::-webkit-scrollbar { display: none; }
.fmp-pane[hidden] { display: none !important; }
.fmp-pane { animation: fmpPaneIn .16s ease-out; }
@keyframes fmpPaneIn { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* two cards side by side inside a tab */
.fmp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.fmp-stack { display: grid; gap: 16px; min-width: 0; }
.fmp-cols > .fmp-card { min-width: 0; }
.fmp-cols #fmpInventory .fmp-stock { grid-template-columns: 1fr; }
.fmp-stock-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fmp-reorder .fmp-subtitle { margin-top: 18px; }
/* the full movement history has its own tab: the short list under the locations is not repeated there */
.fmp--hasmoves #fmpStockPanel > .fmp-subtitle, .fmp--hasmoves #fmpStockPanel > .fmp-subtitle ~ .fmp-empty, .fmp--hasmoves #fmpStockPanel > .fmp-subtitle ~ .table-responsive { display: none; }

/* movement history */
.fmp-moves-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: -4px 0 10px; color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmp-moves-sum b { color: var(--fm-ink, #1b2437); }
.fmp-moves-sum .is-in b { color: var(--fm-success, #15803d); }
.fmp-moves-sum .is-out b { color: var(--fm-danger, #b91c1c); }
.fmp-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmp-chip.fmp-k-build { background: var(--fm-warning-bg, #fef3dc); color: var(--fm-warning, #b45309); }

/* ---------------------------------------------------------------- bill of materials */
.fmb-table .fmb-qty { width: 96px; display: inline-block; text-align: right; }
.fmb-table .fmb-note { min-width: 140px; }
.fmb-table tfoot td { border-top: 1px solid var(--fm-line, #e4e8f0); padding: 9px 8px; }
.fmb-add { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; }
.fmb-search { position: relative; flex: 1 1 320px; }
.fmb-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--fm-muted, #6b7689); }
.fmb-search > .form-control { padding-left: 34px; }
.fmb-pop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--fm-surface, #fff); border: 1px solid var(--fm-line, #e4e8f0); border-radius: 12px; box-shadow: 0 12px 30px rgba(20, 30, 60, .14); max-height: 300px; overflow: auto; padding: 4px; }
.fmb-opt { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; color: var(--fm-ink, #1b2437); }
.fmb-opt small { display: block; color: var(--fm-muted, #6b7689); }
.fmb-opt:hover, .fmb-opt:focus { background: var(--fm-primary-50, #e9f6fd); outline: 0; }
.fmb-none { padding: 10px; color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmb-extra { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--fm-line-2, #eef1f6); }
.fmb-can-n { font: 700 26px/1.1 'Plus Jakarta Sans', Inter, system-ui, sans-serif; color: var(--fm-primary, #0369a1); }

/* ---------------------------------------------------------------- attachments panel (any record) */
.fma-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.fma-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; grid-template-areas: "ico name dl del" "ico meta dl del"; column-gap: 10px; row-gap: 1px; align-items: center; padding: 9px 12px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 10px; background: var(--fm-surface, #fff); }
.fma-item.is-busy { opacity: .7; }
.fma-ico { grid-area: ico; font-size: 20px; color: var(--fm-primary, #0369a1); text-align: center; }
.fma-name { grid-area: name; font-weight: 600; color: var(--fm-ink, #1b2437); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fma-meta { grid-area: meta; color: var(--fm-muted, #6b7689); font-size: 12px; }
.fma-item > a.btn { grid-area: dl; width: auto; }
.fma-item > .fma-del { grid-area: del; width: auto; }
.fma-empty { color: var(--fm-muted, #6b7689); margin: 0 0 12px; }
.fma-drop { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 18px; border: 2px dashed var(--fm-line, #e4e8f0); border-radius: 12px; color: var(--fm-muted, #6b7689); cursor: pointer; text-align: center; margin: 0; transition: border-color .15s, background .15s; }
.fma-drop i { font-size: 20px; color: var(--fm-primary, #0369a1); }
.fma-drop b { color: var(--fm-ink-2, #3a4560); }
.fma-drop span { font-size: 12px; }
.fma-drop:hover, .fma-drop.is-over { border-color: var(--fm-primary, #0369a1); background: var(--fm-primary-50, #e9f6fd); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
	.fmp-hero-grid { grid-template-columns: 1fr; }
	.fmp-hero-details { grid-template-columns: 1fr 1fr; }
	.fmp-hero-details > #fmpCustom { grid-column: 1 / -1; }
	.fmp-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.fmp-hero-details { grid-template-columns: 1fr; }
	.fmp-hero-main .fmp-grid--3 { grid-template-columns: 1fr; }
	.fmp-tabs { top: var(--fmp-head-h, 58px); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.fmp-hide-sm span { display: none; }
}

/* ---------------------------------------------------------------- dark mode */
:root[data-theme="dark"] .fmp-tabs, :root[data-theme="dark"] .fma-item, :root[data-theme="dark"] .fmb-pop { background: var(--fm-surface); border-color: var(--fm-line); }

/* ---------------------------------------------------------------- manufacturing page (fm-manufacturing.php) */
.fmmo-h { display: flex; align-items: center; gap: 9px; font: 700 15px 'Plus Jakarta Sans', Inter, system-ui, sans-serif; margin: 0 0 14px; }
.fmmo-h i { color: var(--fm-primary, #0369a1); }
.fmmo-form { margin-bottom: 16px; }
.fmmo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; }
.fmmo-grid .fm-field { margin-bottom: 10px; }
.fmmo-grid .fm-field > label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.fmmo-grid .fm-field small { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; margin-top: 4px; }
.fmmo-grid .fm-field small.text-danger { color: var(--fm-danger, #b91c1c); }
.fmmo-wide { grid-column: 1 / -1; }
.fmmo-check { display: flex !important; gap: 8px; align-items: center; font-weight: 500 !important; }
.fmmo-est { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-ink-2, #3a4560); border-radius: 10px; padding: 10px 14px; margin: 4px 0 12px; }
.fmmo-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.fmmo-summary { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.fmmo-summary > div { min-width: 0; }
.fmmo-summary small { display: block; color: var(--fm-muted, #6b7689); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-bottom: 3px; }
.fmmo-note { margin: 14px 0 0; color: var(--fm-ink-2, #3a4560); }
.fmmo-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.fmmo-spacer { flex: 1; }
.fmmo-warn { color: var(--fm-danger, #b91c1c); font-weight: 600; }
.fmmo-okmsg { color: var(--fm-success, #15803d); font-weight: 600; }
.fmmo-n { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); font-size: 11px; font-weight: 700; text-align: center; }
.fmmo .fm-table tfoot td { border-top: 1px solid var(--fm-line, #e4e8f0); }
@media (max-width: 900px) { .fmmo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .fmmo-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- options cards (currencies, approvals & controls) + order currency */
.fmx-ifl .fm-table-wrap { margin: 0 0 14px; }
.fmx-ifl .fm-cal-row label { color: var(--fm-muted, #6b7689); }
.fmx-ifl .fm-cal-row .form-control, .fmx-ifl .fm-cal-row .form-select { background: var(--fm-surface); color: var(--fm-ink); }
.fmx-inline-check { flex-direction: row !important; align-items: center; max-width: none !important; min-width: 0 !important; flex: 0 0 auto !important; }
.fmx-inline-check span { display: inline-flex; align-items: center; gap: 8px; color: var(--fm-ink, #1b2437); font-size: 13.5px; padding-bottom: 9px; }
.fmx-ctl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 12px; }
.fmx-ctl { border: 1px solid var(--fm-line, #e4e8f0); border-radius: var(--fm-radius-sm, 10px); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fmx-ctl small { color: var(--fm-muted, #6b7689); font-size: 12.5px; }
.fmx-ctl label:not(.fmx-inline-check) { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fm-muted, #6b7689); margin-top: 4px; }
.fmx-ctl .fmx-inline-check span { padding-bottom: 0; }
@media (max-width: 900px) { .fmx-ctl-grid { grid-template-columns: 1fr; } }
.fo-fx-rate { display: flex; align-items: center; gap: 6px; }
.fo-fx-rate span { white-space: nowrap; color: var(--fm-muted, #6b7689); font-size: 12.5px; }
.fo-fx-rate .form-control { min-width: 0; }

/* ---------------------------------------------------------------- reports: "More reports" menu */
.fm-rm-drop { padding: 8px; min-width: 520px; max-height: 70vh; overflow: auto; column-count: 2; column-gap: 8px; }
.fm-rm-group { break-inside: avoid; margin-bottom: 6px; }
.fm-rm-drop .dropdown-header { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fm-muted, #6b7689); padding: 6px 10px 4px; }
.fm-rm-drop .dropdown-item { border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.fm-rm-drop .dropdown-item i { color: var(--fm-primary, #0369a1); margin-right: 4px; }
.fm-rm-drop .dropdown-item.active, .fm-rm-drop .dropdown-item:active { background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); }
@media (max-width: 640px) { .fm-rm-drop { min-width: 260px; column-count: 1; } }

/* ---------------------------------------------------------------- order form: approval / credit-limit / closed-period notices, split dialog (80-inflow-docs.js) */
.fo-ifl-wrap:empty { display: none; }
.fo-ifl-wrap { display: grid; gap: 8px; margin-bottom: 12px; }
.fo-ifl { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--fm-line, #e5e7eb); background: var(--fm-surface, #fff); font-size: 13.5px; line-height: 1.45; }
.fo-ifl > i { font-size: 16px; flex: 0 0 auto; }
.fo-ifl > div { flex: 1 1 auto; min-width: 0; }
.fo-ifl-btns { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; }
.fo-ifl--wait { border-color: #f5d48a; background: var(--fm-warning-bg, #fff8e6); }
.fo-ifl--wait > i { color: var(--fm-warning, #b7791f); }
.fo-ifl--ok { border-color: #a7dcb9; background: #effaf3; }
.fo-ifl--ok > i { color: var(--fm-success, #15803d); }
.fo-ifl--bad { border-color: #f3b4b4; background: #fff3f3; }
.fo-ifl--bad > i { color: var(--fm-danger, #c0392b); }
.fo-ifl--lock { border-color: #c9ced6; background: #f4f5f7; }
.fo-ifl--lock > i { color: var(--fm-ink-2, #475569); }
.fo-ifl--info > i { color: var(--fm-primary, #2563eb); }
.fo-ifl--info a { font-weight: 600; }
.fo-ifl-modal .fmx-modal__box { max-width: 560px; width: calc(100% - 32px); }
.fo-ifl-modal p { color: var(--fm-ink-2, #475569); margin: 0 0 10px; }
.fo-ifl-note { display: block; font-weight: 600; font-size: 13px; }
.fo-ifl-note small { font-weight: 400; color: var(--fm-muted, #6b7280); }
.fo-ifl-note textarea { margin-top: 4px; }
.fo-split-list { max-height: 46vh; overflow: auto; border: 1px solid var(--fm-line, #e5e7eb); border-radius: 8px; }
.fo-split-row { display: grid; grid-template-columns: 22px 1fr auto 90px; gap: 10px; align-items: center; padding: 8px 12px; margin: 0; border-bottom: 1px solid var(--fm-line, #e5e7eb); cursor: pointer; font-weight: 400; }
.fo-split-row:last-child { border-bottom: 0; }
.fo-split-row:hover { background: var(--fm-primary-50, #eff6ff); }
.fo-split-row.is-off { opacity: .6; cursor: default; }
.fo-split-name small { color: var(--fm-muted, #6b7280); }
.fo-split-why { font-style: italic; }
.fo-split-qty { color: var(--fm-ink-2, #475569); white-space: nowrap; }
.fo-split-amt { text-align: right; font-variant-numeric: tabular-nums; }
.fma-tabcount:not(:empty) { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 9px; background: var(--fm-primary, #2563eb); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
#foFilesCard .fma-drop { padding: 12px; }
@media (max-width: 640px) { .fo-ifl { flex-wrap: wrap; } .fo-split-row { grid-template-columns: 22px 1fr auto; } .fo-split-amt { display: none; } }
:root[data-theme="dark"] .fo-ifl { background: var(--fm-surface); }
:root[data-theme="dark"] .fo-ifl--wait { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
:root[data-theme="dark"] .fo-ifl--ok { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .35); }
:root[data-theme="dark"] .fo-ifl--bad { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); }
:root[data-theme="dark"] .fo-ifl--lock { background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .35); }

/* ---------------------------------------------------------------- costing method + labour rates (Options > Inventory) */
.fmx-inv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-top: 16px; }
.fmx-cost-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.fmx-cost-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 10px; cursor: pointer; background: var(--fm-surface, #fff); }
.fmx-cost-opt input { margin-top: 3px; accent-color: var(--fm-primary, #0369a1); }
.fmx-cost-opt b { display: block; font-size: 13.5px; }
.fmx-cost-opt small { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.fmx-cost-opt.is-on { border-color: var(--fm-primary, #0369a1); background: var(--fm-primary-50, #e9f6fd); }
.fmx-labour .fmx-rate { max-width: 130px; margin-left: auto; text-align: right; }
.fmx-labour td { vertical-align: middle; }

/* ---------------------------------------------------------------- build order labour lines */
.fmmo-lab-rows { display: grid; gap: 6px; margin-bottom: 6px; }
.fmmo-lab-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px auto; gap: 8px; align-items: center; }
.fmmo-lab-amt { text-align: right; font-weight: 600; color: var(--fm-ink-2, #3a4560); }
.fmmo-labrow td { color: var(--fm-ink-2, #3a4560); font-size: 13px; }
@media (max-width: 600px) { .fmmo-lab-row { grid-template-columns: 1fr 80px auto; } .fmmo-lab-amt { display: none; } }

/* ---------------------------------------------------------------- product page: cost hint + FIFO / LIFO layers */
.fmp-costhint { display: block; margin-top: 4px; color: var(--fm-muted, #6b7689); font-size: 12px; }
.fmp-layers { margin: 12px 0; }
.fmp-layers .fmp-table tr.is-used td { color: var(--fm-muted, #6b7689); text-decoration: line-through; text-decoration-color: rgba(107, 118, 137, .5); }
.fmp-layers > small { display: block; margin-top: 6px; color: var(--fm-muted, #6b7689); }

/* ---------------------------------------------------------------- purchase order receive: freight split + costing note */
.fo-rcv-basis { margin-top: 6px; }
.fo-rcv-costnote { margin: 8px 0; color: var(--fm-ink-2, #3a4560); font-size: 13px; }

/* ---------------------------------------------------------------- multi-line stock adjustments & transfers (fm-stock-doc.php) */
.fmsd-search { padding: 14px 16px 6px; }
.fmsd-search .fmb-search { max-width: 560px; }
.fmsd-lines td { vertical-align: middle; }
.fmsd-lines .sd-qty { width: 96px; display: inline-block; text-align: right; }
.fmsd-lines .sd-mode { min-width: 150px; }
.fmsd-lines .sd-batch { min-width: 110px; }
.fmsd-lines .sd-note { min-width: 140px; }
.fmsd-empty { margin: 0; padding: 18px 16px 22px; color: var(--fm-muted, #6b7689); text-align: center; }
.fmsd-no { margin: 4px 0 0; font-size: 13px; }
.fmb-opt.is-off { opacity: .6; cursor: not-allowed; }
.fmsd-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--fm-line-2, #eef1f6); }
.fmsd-src { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; }
.fmsd-src .rs-qty { width: 90px; text-align: right; }
.fmsd-new { display: flex; gap: 8px; flex-wrap: wrap; }
.fmx-reorder-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.fm-table-click tbody tr { cursor: pointer; }

:root[data-theme="dark"] .fmx-cost-opt { background: var(--fm-surface); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmx-cost-opt.is-on { background: rgba(56, 189, 248, .12); border-color: var(--fm-primary); }
:root[data-theme="dark"] .fmsd-bar { border-color: var(--fm-line); }

/* ---------------------------------------------------------------- automatic closing (Options > Orders > Approvals & controls) */
.fmx-days { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.fmx-days .form-control { width: 80px; flex: 0 0 80px; text-align: right; }

/* ---------------------------------------------------------------- boxes of a sales order (More > Boxes...) */
.fo-box-modal .fmx-modal__box { width: min(1040px, 96vw); max-width: 96vw; }
.fo-box-tools, .fo-box-print { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.fo-box-print { border-top: 1px solid var(--fm-line-2, #eef1f6); padding-top: 10px; }
.fo-box-print > span { color: var(--fm-muted, #6b7689); font-weight: 600; }
.fo-box-wrap { overflow: auto; max-height: 56vh; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 10px; }
.fo-box-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.fo-box-grid th, .fo-box-grid td { padding: 6px 8px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.fo-box-grid thead th { position: sticky; top: 0; background: var(--fm-surface, #fff); z-index: 1; font-size: 12px; color: var(--fm-muted, #6b7689); text-align: left; white-space: nowrap; }
.fo-box-grid td small { display: block; color: var(--fm-muted, #6b7689); }
.fo-box-grid .r { text-align: right; white-space: nowrap; }
.fo-box-col { min-width: 92px; }
.fo-box-col .form-control { text-align: right; }
.fo-box-grid tfoot td { background: var(--fm-bg-soft, #f7f9fc); }
.fo-box-meta { text-align: right; font-weight: 600; color: var(--fm-ink-2, #3a4560); }
.fo-box-left.is-left { color: #b45309; font-weight: 700; }
.fo-box-left.is-over { color: var(--fm-danger, #b91c1c); font-weight: 700; }
.fo-box-del { border: 0; background: transparent; color: var(--fm-muted, #6b7689); font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer; }
.fo-box-del:hover { color: var(--fm-danger, #b91c1c); }

/* ---------------------------------------------------------------- document & e-mail designer (fm-doc-designer.php) */
.fmdd-tabs { margin-bottom: 14px; }
.fmdd-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.fmdd-panel[hidden] { display: none; }
.fmdd-h { font-size: 15px; margin: 0 0 10px; }
.fmdd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.fmdd-row > label, .fmdd-full { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.fmdd-full { margin-bottom: 10px; }
.fmdd-check { flex-direction: row !important; align-items: center; align-self: end; padding-bottom: 8px; }
.fmdd-color { display: flex; gap: 6px; align-items: center; }
.fmdd-color input[type=color] { width: 46px; height: 34px; padding: 2px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 8px; background: var(--fm-surface, #fff); cursor: pointer; }
.fmdd-hint { display: block; color: var(--fm-muted, #6b7689); font-size: 12px; margin-top: 4px; }
.fmdd-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 6px; font-size: 13px; }
.fmdd-parts > b { grid-column: 1 / -1; margin-bottom: 2px; }
.fmdd-parts .fmx-inline-check { display: flex; gap: 6px; align-items: center; font-weight: 400; }
.fmdd-ph { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; margin-bottom: 4px; }
.fmdd-chip { border: 1px solid var(--fm-line, #e4e8f0); background: var(--fm-primary-50, #e9f6fd); color: var(--fm-primary-600, #075985); border-radius: 999px; padding: 2px 9px; font: 600 12px ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.fmdd-preview { position: sticky; top: 12px; overflow: hidden; }
.fmdd-pv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--fm-line-2, #eef1f6); }
.fmdd-pv-bar small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.fmdd-frame { display: block; width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 0; background: #eef2f7; }
.fmdd-frame[hidden] { display: none; }
.fmdd-empty { padding: 60px 24px; text-align: center; color: var(--fm-muted, #6b7689); }
@media (max-width: 1000px) { .fmdd-grid { grid-template-columns: 1fr; } .fmdd-preview { position: static; } }
:root[data-theme="dark"] .fo-box-grid thead th { background: var(--fm-surface); }
:root[data-theme="dark"] .fo-box-grid tfoot td { background: rgba(148, 163, 184, .08); }
:root[data-theme="dark"] .fmdd-chip { background: rgba(56, 189, 248, .12); border-color: var(--fm-line); color: inherit; }

/* ---- customer showroom logins in the Online store panel (80-inflow-showroom.js) ---- */
.fmsr-logins { margin-top: 10px; }
.fmsr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.fmsr-table-wrap { overflow-x: auto; margin-bottom: 6px; }
.fmsr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fmsr-table th, .fmsr-table td { padding: 7px 8px; border-bottom: 1px solid var(--fm-line, #e5e7eb); text-align: left; vertical-align: top; }
.fmsr-table th { font-weight: 600; color: var(--fm-muted, #64748b); white-space: nowrap; }
.fmsr-acts { white-space: nowrap; text-align: right; }
.fmsr-acts .btn { margin-left: 4px; }
.fmsr-state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #f1f5f9; color: #334155; }
.fmsr-state.is-on { background: #dcfce7; color: #166534; }
.fmsr-state.is-wait { background: #fef3c7; color: #92400e; }
.fmsr-state.is-off { background: #fee2e2; color: #991b1b; }
.fmsr-form { border: 1px solid var(--fm-line, #e5e7eb); border-radius: 10px; padding: 12px; margin: 0 0 10px; background: var(--fm-soft, #f8fafc); }
.fmsr-btns { display: flex; gap: 8px; margin-top: 8px; }
.fmsr-pick { position: relative; }
.fmsr-results { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 220px; overflow-y: auto; background: #fff; border: 1px solid var(--fm-line, #e5e7eb); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.fmsr-res { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: transparent; }
button.fmsr-res:hover, button.fmsr-res:focus { background: #f1f5f9; }
.fmsr-cats { max-height: 180px; overflow-y: auto; }
:root[data-theme="dark"] .fmsr-form { background: rgba(255, 255, 255, .04); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmsr-results { background: var(--fm-surface); border-color: var(--fm-line); }
:root[data-theme="dark"] button.fmsr-res:hover, :root[data-theme="dark"] button.fmsr-res:focus { background: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .fmsr-state { background: rgba(255, 255, 255, .08); color: inherit; }
:root[data-theme="dark"] .fmsr-table th, :root[data-theme="dark"] .fmsr-table td { border-color: var(--fm-line); }

/* ---- part 5: Options > Global side panels (rename fields, single sign-on, AI assistant, add-ons) and Reports > Ask AI (80-inflow-more.js) ---- */
.fmm-wrap{ display:flex; flex-direction:column; gap:12px; padding:16px 20px 20px; color:var(--fm-ink); }
.fmm-muted{ color:var(--fm-muted); font-size:13px; margin:0; }
.fmm-warn{ color:var(--fm-danger,#b91c1c); font-size:13px; margin:0; }
.fmm-note{ background:var(--fm-surface-2,#f1f5f9); border:1px solid var(--fm-line); border-radius:10px; padding:10px 12px; font-size:13px; margin:0; color:var(--fm-ink); }
.fmm-f{ display:flex; flex-direction:column; gap:4px; margin:0; }
.fmm-f > span{ font-size:12.5px; font-weight:600; color:var(--fm-muted); }
.fmm-f small{ color:var(--fm-muted); font-size:12px; }
.fmm-check{ display:flex; gap:8px; align-items:flex-start; font-size:14px; margin:0; }
.fmm-check input{ margin-top:3px; }
.fmm-actions{ display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:4px; }
.fmm-box{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; background:var(--fm-surface-2,#f1f5f9); border-radius:10px; padding:10px 12px; font-size:13px; }
.fmm-box code{ flex:1 1 260px; word-break:break-all; color:var(--fm-ink); background:transparent; }
.fmm-rn-table td, .fmm-rn-table th{ vertical-align:middle; }
.fmm-rn-table td small{ display:block; color:var(--fm-muted); font-size:11.5px; }
.fmm-addons{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.fmm-addon{ display:flex; gap:12px; align-items:center; border:1px solid var(--fm-line); border-radius:12px; padding:10px 12px; background:var(--fm-surface); }
.fmm-addon-ico{ flex:0 0 36px; height:36px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; background:var(--fm-surface-2,#f1f5f9); color:var(--fm-primary,#0369a1); }
.fmm-addon-body{ flex:1 1 auto; min-width:0; }
.fmm-addon-body b{ display:block; }
.fmm-addon-body small{ color:var(--fm-muted); }
.fmm-switch{ display:flex; gap:6px; align-items:center; margin:0; font-size:13px; white-space:nowrap; }
.fmm-ai-log{ display:flex; flex-direction:column; gap:10px; max-height:60vh; overflow:auto; padding-right:4px; }
.fmm-ai-q{ align-self:flex-end; max-width:85%; background:var(--fm-primary,#0369a1); color:#fff; border-radius:14px 14px 4px 14px; padding:8px 12px; white-space:pre-wrap; }
.fmm-ai-a{ align-self:flex-start; max-width:100%; background:var(--fm-surface-2,#f1f5f9); color:var(--fm-ink); border-radius:14px 14px 14px 4px; padding:10px 14px; }
.fmm-ai-a p{ margin:0 0 6px; } .fmm-ai-a ul{ margin:0 0 6px; padding-left:18px; }
.fmm-ai-a.is-busy{ color:var(--fm-muted); }
.fmm-ai-a.is-error{ background:var(--fm-danger-bg,#fee2e2); color:var(--fm-danger,#b91c1c); }
.fmm-ai-rep{ margin-top:8px; font-size:13px; }
.fmm-ai-rep summary{ cursor:pointer; font-weight:600; }
.fmm-ai-tw{ max-height:260px; overflow:auto; margin:6px 0; background:var(--fm-surface); border-radius:8px; }
.fmm-ai-tw table{ margin:0; font-size:12.5px; }
.fmm-ai-form{ display:flex; gap:8px; align-items:flex-end; }
.fmm-ai-form textarea{ flex:1 1 auto; resize:vertical; }
:root[data-theme="dark"] .fmm-note, :root[data-theme="dark"] .fmm-box, :root[data-theme="dark"] .fmm-ai-a, :root[data-theme="dark"] .fmm-addon-ico{ background:rgba(255,255,255,.06); }

/* ---- part 6: connection panels (ux/81-connectors.js) ---- */
.fmc .fmc-h{ font-size:14px; font-weight:700; margin:8px 0 0; padding-top:10px; border-top:1px solid var(--fm-line); color:var(--fm-ink); }
.fmc .fmc-sub{ margin-left:26px; display:flex; flex-direction:column; gap:10px; }
.fmc .fmc-inline{ display:inline-flex; margin-right:14px; }
.fmc-status{ display:flex; flex-direction:column; gap:2px; border-radius:10px; padding:10px 12px; font-size:13px; border:1px solid var(--fm-line); background:var(--fm-surface-2,#f1f5f9); color:var(--fm-ink); }
.fmc-status b{ font-size:14px; }
.fmc-status.fmc-on{ border-color:#86efac; background:#f0fdf4; }
.fmc-status.fmc-warn{ border-color:#fcd34d; background:#fffbeb; }
.fmc-status .fmc-err{ color:var(--fm-danger,#b91c1c); }
.fmc-help summary{ cursor:pointer; font-size:13px; color:var(--fm-accent,#6d28d9); }
.fmc-help p{ font-size:13px; margin:6px 0 0; color:var(--fm-muted); }
.fmc-log{ font-size:12.5px; margin:0; }
.fmc-log td{ padding:5px 6px; vertical-align:top; border-color:var(--fm-line); }
.fmc-log .fmc-t{ white-space:nowrap; color:var(--fm-muted); width:1%; }
.fmc-okc{ color:#16a34a; } .fmc-badc{ color:#d97706; }
:root[data-theme="dark"] .fmc-status.fmc-on{ background:rgba(22,163,74,.12); border-color:rgba(22,163,74,.45); }
:root[data-theme="dark"] .fmc-status.fmc-warn{ background:rgba(217,119,6,.12); border-color:rgba(217,119,6,.45); }
.fmm-actions.fmc-left{ justify-content:flex-start; }

/* ---------------------------------------------------------------- part 8: carrier labels in the order's Shipping card (40-shipping.js) */
.sp-modal.sp-wide .sp-box{ max-width:780px; width:calc(100% - 32px); }
.sp-sub{ font-weight:700; margin:10px 0 6px; }
.sp-pk input{ max-width:96px; margin-left:auto; text-align:right; }
.sp-tools .sp-inline{ display:inline-flex; align-items:center; gap:6px; margin:0 8px; }
.sp-tools .sp-inline span{ white-space:nowrap; }
.sp-addr{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0; font-size:13px; }
.sp-addr small{ display:block; color:var(--fm-muted, #6b7689); font-weight:700; text-transform:uppercase; font-size:11px; }
.sl-rates{ display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto; margin-bottom:10px; }
.sl-rate{ display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; padding:9px 12px; border:1px solid var(--fm-line, #e2e8f0); border-radius:10px; cursor:pointer; margin:0; }
.sl-rate:has(input:checked){ border-color:var(--fm-primary, #6d28d9); box-shadow:0 0 0 2px var(--fm-primary-50, #ede9fe); }
.sl-rate small{ display:block; font-size:11.5px; color:var(--fm-muted, #6b7689); }
.sl-svc small{ margin-top:2px; }
.sl-days{ text-align:right; white-space:nowrap; font-size:13px; }
.sl-amt{ text-align:right; font-weight:800; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sl-prob{ font-size:12.5px; margin-bottom:8px; }
.sp-err{ color:var(--fm-danger, #b91c1c); }
.sp-label{ margin-top:6px; font-size:12.5px; display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.sp-label.is-void{ color:var(--fm-muted, #6b7689); text-decoration:line-through; }
@media (max-width:640px){ .sp-addr{ grid-template-columns:1fr; } .sl-rate{ grid-template-columns:auto minmax(0,1fr) auto; } .sl-days{ display:none; } }
:root[data-theme="dark"] .sl-rate{ border-color:var(--fm-line); background:var(--fm-surface); }
.fmc .fmm-row2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.fmc .fmm-row3{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
@media (max-width:560px){ .fmc .fmm-row2{ grid-template-columns:1fr; } }

/* ---------------------------------------------------------------- Options pages: setting cards on every tab (2026-11-25 layout fix)
   The base .fm-cal-card rules used to live only in options/global.php, so the Costing, Labour rates (Options > Inventory)
   and Approvals & controls (Options > Orders) cards had no card frame, giant headings and a left-hanging Save button. */
.fm-cal-card { background: var(--fm-surface, #fff); color: var(--fm-ink, #1b2437); border: 1px solid var(--fm-line, #e4e8f0); border-radius: var(--fm-radius, 14px); padding: 16px 18px; margin: 18px 0; min-width: 0; }
.fm-cal-card h3 { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 6px; color: var(--fm-ink, #1b2437); display: flex; align-items: center; gap: 8px; }
.fm-cal-card h3 > i { font-size: 15px; color: var(--fm-primary, #0369a1); }
.fm-cal-card p { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 0 0 12px; }
.fm-cal-card .fm-cal-now { margin: 12px 0 0; }
.fm-cal-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fm-cal-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--fm-muted, #6b7689); min-width: 200px; flex: 1 1 200px; max-width: 340px; margin: 0; }
.fm-cal-row select { width: 100%; min-width: 0; }
.fm-cal-card .fm-table-wrap { overflow-x: auto; }
.fm-cal-card .fmx-ctl b { color: var(--fm-ink, #1b2437); }
/* the tab strip scrolled sideways AND showed a 1px vertical scrollbar */
.fx-tabs { overflow-y: hidden; scrollbar-width: thin; }
/* Options > Inventory: Costing + Labour rates side by side, each a full card, top-aligned */
.fmx-inv-cards { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); align-items: start; margin-top: 18px; }
.fmx-inv-cards > .fm-cal-card { margin: 0; }
.fmx-inv-cards #fmCost .fmx-ctl-grid { grid-template-columns: 1fr; }  /* Landed cost was squeezed into a third of the card */
.fmx-inv-cards #fmCost .fmx-ctl label:not(.fmx-inline-check) { max-width: 280px; }
.fmx-cost-opts { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.fmx-cost-opt { margin: 0; font-weight: 400; }
.fmx-cost-opt b { color: var(--fm-ink, #1b2437); }
.fmx-labour .fmx-rate { min-width: 90px; }
/* Options > Orders: Approvals & controls card sits under the tiles */
.fm-opt-wrap > .fm-opt-grid + .fm-cal-card { margin-top: 22px; }
.fmx-ctl .fmx-days { flex-wrap: wrap; }
@media (max-width: 1100px) { .fmx-ctl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .fmx-ctl-grid { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) {
	.fm-cal-card { padding: 14px; }
	.fm-cal-row label { min-width: 0; max-width: none; flex: 1 1 100%; }
	.fm-cal-row[style*="flex-end"] .btn, .fm-cal-row .btn-theme { width: 100%; }
	.fmx-inv-cards #fmCost .fmx-ctl label:not(.fmx-inline-check) { max-width: none; }
}
:root[data-theme="dark"] .fm-cal-card { background: var(--fm-surface); border-color: var(--fm-line); }
:root[data-theme="dark"] .fmx-ctl { border-color: var(--fm-line); }
/* Options > Products > Bins & pick waves: fields were indented, the two inputs had different widths and the hint text of
   each checkbox was pushed into its own column next to the label */
#fmbOpt label { margin: 0; padding: 0; font-weight: 400; }
#fmbOpt .fmb-f input { width: 100%; }
#fmbOpt .fmb-f small { margin-top: 4px; font-size: 12px; }
#fmbOpt .fmb-c { display: block; position: relative; padding-left: 26px; line-height: 1.45; color: var(--fm-ink, #1b2437); }
#fmbOpt .fmb-c input { position: absolute; left: 0; top: 0; margin: 3px 0 0; }
#fmbOpt .fmb-c small { display: inline; color: var(--fm-muted, #6b7689); font-size: 12px; }
:root[data-theme="dark"] #fmbOpt .fmb-f small, :root[data-theme="dark"] #fmbOpt .fmb-c small { color: var(--fm-muted); }
#fmbOpt { display: grid; gap: 14px; max-width: 560px; padding: 0; }
#fmbOpt .fmb-f { display: block; }
#fmbOpt .fmb-f input { max-width: none; }
/* Options > Account > Team & access: the column titles were centred over left-aligned cells */
.fm-team-table thead th { text-align: left; }
.fm-team-table thead th:last-child, .fm-team-table tbody td:last-child { text-align: right; }


/* 90-theme-fixes.css */
/*
 * Light / dark theme corrections found by scanning every screen for text that is hard to read (contrast below 2.2:1).
 * Loaded last (90-), so these only repair single spots; the real colours still come from the --fm-* tokens (fm-ui.css, 10-shell.css).
 * Rule of thumb for new CSS: a surface that sets its own light background must set its own dark text, or use var(--fm-surface) + var(--fm-ink).
 */

/* ---- both themes ---- */
.btn-outline-info { color: #0b6f85; border-color: #0b6f85; }                       /* bootstrap's cyan is under 2:1 on white */
.btn-outline-info:hover, .btn-outline-info:focus { background: #0b6f85; border-color: #0b6f85; color: #fff; }
.bl-pill { background: rgba(8, 47, 73, .38); color: #fff; }                          /* pills on the blue plan banner */

/* ---- dark theme ---- */
/* the light theme's deep-cyan outline button is too dark on the dark surface */
:root[data-theme="dark"] .btn-outline-info { color: #67e8f9; border-color: #22d3ee; }
:root[data-theme="dark"] .btn-outline-info:hover, :root[data-theme="dark"] .btn-outline-info:focus { background: #0e7490; border-color: #0e7490; color: #fff; }
/* buttons that were white-on-light-blue because the dark primary is a pale blue */
:root[data-theme="dark"] .fm-au-btn:not(.ghost), :root[data-theme="dark"] .fmp-cover { background: #0284c7; color: #fff; }
/* the plans page sits on a white page-builder section: its monthly / yearly switch must stay a light control */
:root[data-theme="dark"] .fmpl-cycle { background: #fff; border-color: #dbe4ee; }
:root[data-theme="dark"] .fmpl-cycle button { color: #475569; }
:root[data-theme="dark"] .fmpl-cycle button[aria-pressed="true"] { background: #0369a1; color: #fff; }
/* old customer / vendor / product form pieces with hard-coded pale backgrounds */
:root[data-theme="dark"] .fm-light-box { background: var(--fm-neutral-bg); color: var(--fm-ink); }
:root[data-theme="dark"] .bottom-customer-setting-ul li:hover, :root[data-theme="dark"] .bottom-customer-setting-ul li.active,
:root[data-theme="dark"] .bottom-vendor-setting-ul li:hover, :root[data-theme="dark"] .bottom-vendor-setting-ul li.active,
:root[data-theme="dark"] .bottom-product-setting-ul li:hover, :root[data-theme="dark"] .bottom-product-setting-ul li.active { background-color: var(--fm-neutral-bg) !important; color: var(--fm-primary) !important; } /* the forms carry their own inline styles after this file */
:root[data-theme="dark"] .fmp-dropzone { background: var(--fm-neutral-bg); border-color: var(--fm-line); color: var(--fm-ink-2); }
:root[data-theme="dark"] .fmp-dropzone b { color: var(--fm-ink); }
:root[data-theme="dark"] li.product_settings.active, :root[data-theme="dark"] li.product_settings:hover { background-color: var(--fm-neutral-bg) !important; color: var(--fm-primary) !important; }
:root[data-theme="dark"] .pw-empty b { color: var(--fm-ink); }
:root[data-theme="dark"] .pw-empty { color: var(--fm-muted); }

/* ---- dark theme: dark / mid text colours hard-coded in feature stylesheets, mapped to the theme tokens (found with a CSS audit) ---- */
/* headings and body text that were navy */
:root[data-theme="dark"] .fmb-pop-t, :root[data-theme="dark"] .pw-empty b, :root[data-theme="dark"] .bl-h, :root[data-theme="dark"] .bl-tile b,
:root[data-theme="dark"] .bl-card h4, :root[data-theme="dark"] .bl-auto h4 { color: var(--fm-ink); }
:root[data-theme="dark"] .fmx-modal__box p { color: var(--fm-ink-2); }
/* greys */
:root[data-theme="dark"] .fmb-cell.is-empty, :root[data-theme="dark"] .fmb-pop-g label, :root[data-theme="dark"] .fmb-prev, :root[data-theme="dark"] .fmb-bulk-top label,
:root[data-theme="dark"] .fmb-bulk-note, :root[data-theme="dark"] .fmb-bulk-table .fmb-nm small, :root[data-theme="dark"] .fmb-f small, :root[data-theme="dark"] .fmb-c small,
:root[data-theme="dark"] .pw-empty, :root[data-theme="dark"] .pw-head small, :root[data-theme="dark"] .pw-field span, :root[data-theme="dark"] .pw-state, :root[data-theme="dark"] .pw-card-top small,
:root[data-theme="dark"] .pw-card-meta, :root[data-theme="dark"] .pw-ord-main span, :root[data-theme="dark"] .pw-ord-meta small, :root[data-theme="dark"] .pw-sum, :root[data-theme="dark"] .pw-name small,
:root[data-theme="dark"] .pw-of, :root[data-theme="dark"] .pw-tote-t span, :root[data-theme="dark"] .pw-tote-head small, :root[data-theme="dark"] .pw-tote-note, :root[data-theme="dark"] .pw-tote-done,
:root[data-theme="dark"] .pw-ship-main span, :root[data-theme="dark"] .rc-settings h4, :root[data-theme="dark"] .rc-muted, :root[data-theme="dark"] .rc-settings small, :root[data-theme="dark"] .rc-field span,
:root[data-theme="dark"] .rc-doc span, :root[data-theme="dark"] #foShipCard .sp-lines small, :root[data-theme="dark"] .sp-field span, :root[data-theme="dark"] .sp-pick-head small,
:root[data-theme="dark"] .sp-sum, :root[data-theme="dark"] .sp-name small, :root[data-theme="dark"] .sp-of { color: var(--fm-muted); }
/* blues */
:root[data-theme="dark"] .fmb-prev b, :root[data-theme="dark"] .fn-add, :root[data-theme="dark"] .pw-steps button.is-on, :root[data-theme="dark"] .pw-note i, :root[data-theme="dark"] .pw-scan i,
:root[data-theme="dark"] .pw-chip i, :root[data-theme="dark"] .sp-scan i, :root[data-theme="dark"] .bl-ex__g i, :root[data-theme="dark"] .fl-h-new { color: var(--fm-primary); }
/* greens */
:root[data-theme="dark"] .fmimp-tile.is-ok b, :root[data-theme="dark"] .ptc-state.is-ok, :root[data-theme="dark"] .cs-card.is-clear b, :root[data-theme="dark"] .cs-t-payment td:nth-child(2),
:root[data-theme="dark"] .cs-t-credit td:nth-child(2), :root[data-theme="dark"] .bl-msg.is-ok, :root[data-theme="dark"] .fl-h-active { color: var(--fm-success); }
/* reds */
:root[data-theme="dark"] .ptc-state.is-bad, :root[data-theme="dark"] #pwPkCount.is-bad, :root[data-theme="dark"] .cs-card.is-owed b, :root[data-theme="dark"] .bl-msg.is-bad,
:root[data-theme="dark"] .bl-auto--failed h4 i, :root[data-theme="dark"] .bl-auto--suspended h4 i, :root[data-theme="dark"] .fl-neg, :root[data-theme="dark"] .fl-h-overdue { color: var(--fm-danger); }
/* ambers */
:root[data-theme="dark"] .fmimp-tile.is-warn b, :root[data-theme="dark"] .ptc-warn, :root[data-theme="dark"] .pw-split-n em, :root[data-theme="dark"] .pw-tote-items li.is-short,
:root[data-theme="dark"] .pw-ship-meta em, :root[data-theme="dark"] .cs-t-refund td:nth-child(2), :root[data-theme="dark"] .fl-h-quiet { color: var(--fm-warning); }

/* ---- dark theme: pale panels that had no dark counterpart ---- */
:root[data-theme="dark"] .pw-listfoot, :root[data-theme="dark"] .pw-lines, :root[data-theme="dark"] .pw-shipform, :root[data-theme="dark"] .pw-shiplist { background: var(--fm-surface); color: var(--fm-ink); }
:root[data-theme="dark"] .pw-full, :root[data-theme="dark"] .pw-full .pw-box, :root[data-theme="dark"] .sp-fullscreen, :root[data-theme="dark"] .sp-fullscreen .sp-box { background: var(--fm-bg); color: var(--fm-ink); }
:root[data-theme="dark"] .pw-progress, :root[data-theme="dark"] .sp-progress, :root[data-theme="dark"] .cs-bar { background: var(--fm-line); }
:root[data-theme="dark"] .pw-line.is-done { background: var(--fm-success-bg); color: var(--fm-ink); }
:root[data-theme="dark"] .pw-line.is-part, :root[data-theme="dark"] .ptc-exempt.is-on { background: var(--fm-warning-bg); color: var(--fm-ink); }
:root[data-theme="dark"] .pw-line.pw-flash { background: rgba(74, 222, 128, .28); }
:root[data-theme="dark"] .cs-tag, :root[data-theme="dark"] .fmpr-tag { background: var(--fm-neutral-bg); color: var(--fm-ink-2); }
:root[data-theme="dark"] .fop-sw span { background: var(--fm-line); }

/* ---- dark theme: the sticky action bars of the embedded forms (customer / vendor / product / documents) were semi-transparent white ---- */
:root[data-theme="dark"] .customer-form-wrapper-top-menu, :root[data-theme="dark"] .vendor-form-wrapper-top-menu, :root[data-theme="dark"] .product-form-wrapper-top-menu,
:root[data-theme="dark"] [class$="-form-wrapper-top-menu"] { background: rgba(18, 32, 50, .95) !important; border-color: var(--fm-line) !important; color: var(--fm-ink); }

/* ---- dark theme: the "Add new address" dialog on the vendor and customer forms ---- */
/* its .modal-body has an inline pale-grey background (#f8f9fa), so the light dark-theme text sat on a near-white panel; the inline style needs !important */
:root[data-theme="dark"] #addressModal .modal-body { background-color: var(--fm-surface) !important; color: var(--fm-ink); }
:root[data-theme="dark"] #addressModal .modal-body .address_title, :root[data-theme="dark"] #addressModal .modal-body label { color: var(--fm-ink); }

/* ---- both themes: Options > Inventory > Product categories dialog (#company_categories_Modal) ---- */
/* the "..." menu (Add Sub Category / Move To / Delete) was a white box with inherited text, so in dark mode its items were near-white on white */
.fm-category-right-menu { background: var(--fm-surface); color: var(--fm-ink); border: 1px solid var(--fm-line); border-radius: var(--fm-radius-sm); box-shadow: var(--fm-shadow-lg); overflow: hidden; min-width: 170px; }
.fm-category-right-menu-ul { box-shadow: none; }
.fm-category-right-menu-ul li { color: var(--fm-ink); border-bottom-color: var(--fm-line); font-size: 14px; }
.fm-category-right-menu-ul li:last-child { border-bottom: 0; }
.fm-category-right-menu-ul li:hover { background: var(--fm-primary-50); color: var(--fm-primary); }
.fm-category-right-menu-ul li.delete_company_category { color: var(--fm-danger); }
.fm-category-right-menu-ul li.delete_company_category:hover { background: var(--fm-danger-bg); color: var(--fm-danger); }
/* rows: space between the inputs, sub-categories indented with a guide line, icons centred on the input */
#company_categories_Modal .categories_wrapper { margin-top: 20px; }
#company_categories_Modal .fm-company-category-row-main > .row { margin: 0 0 8px; align-items: center; flex-wrap: nowrap; }
#company_categories_Modal .fm-company-category-row-main > .row > .col-9 { flex: 1 1 auto; width: auto; padding-left: 0; }
#company_categories_Modal .fm-company-category-row-main > .row > .col-1 { flex: 0 0 34px; width: 34px; padding: 0; text-align: center; color: var(--fm-muted); }
#company_categories_Modal .fm-company-category-row-child { padding-left: 14px; margin-left: 10px; border-left: 2px solid var(--fm-line); }
#company_categories_Modal .fm-company-category-row-child:empty { display: none; }
#company_categories_Modal .company-category-row-default-active { color: #e0a800; }
:root[data-theme="dark"] #company_categories_Modal .fm-company-category-input { color: var(--fm-ink) !important; -webkit-text-fill-color: var(--fm-ink); caret-color: var(--fm-ink); }
:root[data-theme="dark"] #company_categories_Modal .fm-company-category-input::placeholder { color: var(--fm-muted); }
:root[data-theme="dark"] #company_categories_Modal .company-category-row-default-active { color: #fbbf24; }

/* ---- both themes: Options > Orders > Payment terms / Payment methods / Carriers dialogs ---- */
/* each row is one line: name (and days) inputs, then the delete button at the end. fm-ui.css placed the icon with position:absolute, but bootstrap's
   ".row > *" gives it width:100%, so the icon ended up stretched over the whole row with the glyph on top of the left edge of the inputs,
   and its #fee2e2 hover turned into a pale pink bar in dark mode */
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .fm-opt-line { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0; padding: 0; }
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) :is(.fm-company-payment-term-row-main, .fm-company-payment-method-row-main, .fm-company-carrier-row-main) { margin: 0 0 10px; }
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .fm-opt-line > [class*="col-"] { flex: 1 1 0; width: auto; min-width: 0; padding: 0; }
#company_payment-terms_Modal .fm-opt-line > .fm-opt-line__days { flex: 0 0 170px; }
#company_payment-terms_Modal .fm-opt-line__days .input-group-text { background: var(--fm-neutral-bg); color: var(--fm-muted); border-color: var(--fm-line); font-size: 13px; }
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .fm-opt-row-delete { position: static; flex: 0 0 36px; width: 36px; max-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: var(--fm-radius-sm, 8px); background: transparent; color: var(--fm-muted); font-size: 15px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .fm-opt-row-delete:hover,
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .fm-opt-row-delete:focus-visible { background: var(--fm-danger-bg); border-color: var(--fm-danger); color: var(--fm-danger); outline: 0; }
:is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) :is(.payment-terms_wrapper, .payment-methods_wrapper, .carriers_wrapper) { width: 100%; margin-top: 20px; }
/* the number box: no spinner arrows (typing is quicker), red border when a value is refused */
#company_payment-terms_Modal .fm-company-payment-term-days { -moz-appearance: textfield; }
#company_payment-terms_Modal .fm-company-payment-term-days::-webkit-outer-spin-button,
#company_payment-terms_Modal .fm-company-payment-term-days::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#company_payment-terms_Modal .fm-company-payment-term-input.is-invalid { border-color: var(--fm-danger) !important; box-shadow: 0 0 0 3px var(--fm-danger-bg); background-image: none; }
:root[data-theme="dark"] :is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .form-control { color: var(--fm-ink) !important; -webkit-text-fill-color: var(--fm-ink); caret-color: var(--fm-ink); }
:root[data-theme="dark"] :is(#company_payment-terms_Modal, #company_payment-methods_Modal, #company_carriers_Modal) .form-control::placeholder { color: var(--fm-muted); -webkit-text-fill-color: var(--fm-muted); }


/* 95-theme-oinventory.css */
/* =====================================================================
   "OInventory" colour scheme - customer app + public website
   The brand palette of the OInventory theme kit (purple -> magenta, lilac surfaces). Chosen from the back office's sidebar
   "Color scheme" switch (or kept from the account's preference) and applied as <html data-theme="oinventory">:
   - app pages: by the inline script in menu_after_login.php, saved per user through ajax.php page=uipref (10-shell.js)
   - public pages: by the inline script in afterheader.php (site chrome), from the same localStorage choice
   The back office has its own copy of the palette: backoffice/adm_templates/themes/boot-material/css/theme-oinventory.css
   ===================================================================== */

/* ---------- 1. App tokens ---------------------------------------------- */
:root[data-theme="oinventory"] {
	--fm-primary: #6d28d9;
	--fm-primary-600: #5b21b6;
	--fm-primary-50: #f3eefe;
	--fm-primary-100: #e4d9fc;
	--fm-accent: #e51278;
	--fm-ink: #150f26;
	--fm-ink-2: #4b4566;
	--fm-muted: #6e6889;
	--fm-line: #e2def4;
	--fm-line-2: #efeefb;
	--fm-bg: #f8f7fd;
	--fm-surface: #ffffff;
	--fm-success: #1c9a6c;
	--fm-success-bg: #e6f6ef;
	--fm-warning: #b7791f;
	--fm-warning-bg: #fbf0da;
	--fm-danger: #d23d5c;
	--fm-danger-bg: #fceaee;
	--fm-info: #6d28d9;
	--fm-info-bg: #f3eefe;
	--fm-neutral-bg: #efeefb;
	--fm-shadow-sm: 0 1px 2px rgba(21, 15, 38, .06);
	--fm-shadow: 0 6px 18px -8px rgba(44, 16, 101, .2);
	--fm-shadow-lg: 0 24px 60px -20px rgba(44, 16, 101, .35);
	--fm-oi-gradient: linear-gradient(115deg, #2c1065 0%, #6d28d9 46%, #e51278 100%);
	--fm-oi-gradient-soft: linear-gradient(135deg, #6423c9 0%, #a626c9 55%, #e51278 100%);
}
:root[data-theme="oinventory"] body.bg-light { background-color: var(--fm-bg) !important; }
:root[data-theme="oinventory"] a:hover { color: #5b21b6; }
:root[data-theme="oinventory"] ::selection { background: rgba(229, 18, 120, .18); }

/* ---------- 2. App shell: white sidebar, topbar, loader --------------- */
:root[data-theme="oinventory"] .fm-sidebar { background: #fff; color: #4b4566; border-right: 1px solid var(--fm-line); box-shadow: 1px 0 0 rgba(44, 16, 101, .02); }
:root[data-theme="oinventory"] .fm-sidebar-brand, :root[data-theme="oinventory"] .fm-sidebar-brand:hover { color: #150f26; border-bottom-color: var(--fm-line); }
:root[data-theme="oinventory"] .fm-nav-label { color: #9c97b5; }
:root[data-theme="oinventory"] .fm-nav a, :root[data-theme="oinventory"] .fm-nav .fm-nav-btn { color: #4b4566; }
:root[data-theme="oinventory"] .fm-nav a > i, :root[data-theme="oinventory"] .fm-nav .fm-nav-btn > i { color: #7d7799; }
:root[data-theme="oinventory"] .fm-nav a:hover, :root[data-theme="oinventory"] .fm-nav .fm-nav-btn:hover { background: #f5f2fd; color: #150f26; }
:root[data-theme="oinventory"] .fm-nav a:hover > i { color: #6d28d9; }
:root[data-theme="oinventory"] .fm-nav a.active { background: #f3eefe; color: #6d28d9; font-weight: 600; box-shadow: inset 3px 0 0 #e51278; }
:root[data-theme="oinventory"] .fm-nav a.active > i { color: #6d28d9; }
:root[data-theme="oinventory"] .fm-nav a.fm-nav-add { color: #6d28d9; }
:root[data-theme="oinventory"] .fm-nav a.fm-nav-add:hover { background: #e4d9fc; color: #5b21b6; }
:root[data-theme="oinventory"] .fm-sidebar .fm-nav-pos { background: linear-gradient(135deg, rgba(109, 40, 217, .1), rgba(229, 18, 120, .12)); color: #5b21b6 !important; }
:root[data-theme="oinventory"] .fm-sidebar .fm-nav-pos:hover { background: linear-gradient(135deg, rgba(109, 40, 217, .16), rgba(91, 33, 182, .22)); }
:root[data-theme="oinventory"] .fm-sidebar .fm-nav-pos i { color: #e51278 !important; }
:root[data-theme="oinventory"] .fm-nav-count { background: #fbf0da; color: #b7791f; }
:root[data-theme="oinventory"] .fm-nav a:hover .fm-nav-count, :root[data-theme="oinventory"] .fm-nav a.active .fm-nav-count { background: #f7e3bb; }
:root[data-theme="oinventory"] .fm-sidebar a:focus-visible, :root[data-theme="oinventory"] .fm-sidebar button:focus-visible { outline-color: #6d28d9; }
:root[data-theme="oinventory"] .fm-sidebar-foot { border-top: 1px solid var(--fm-line); }
:root[data-theme="oinventory"] .fm-sidebar-company strong { color: #150f26; }
:root[data-theme="oinventory"] .fm-sidebar-company span { color: #6e6889; }
:root[data-theme="oinventory"] .fm-collapse-btn { background: #f5f2fd; color: #6d28d9; }
:root[data-theme="oinventory"] .fm-collapse-btn:hover { background: #e4d9fc; color: #5b21b6; }
:root[data-theme="oinventory"] .fm-sidebar-scroll { scrollbar-color: #d9d3f0 transparent; }
@media (min-width: 992px) { :root[data-theme="oinventory"] body.fm-nav-collapsed .fm-nav + .fm-nav { border-top-color: var(--fm-line); } }
:root[data-theme="oinventory"] .fm-avatar { background: var(--fm-oi-gradient-soft); color: #fff; }
:root[data-theme="oinventory"] .fm-topbar { background: rgba(255, 255, 255, .9); border-bottom-color: var(--fm-line); }
:root[data-theme="oinventory"] .fm-progress { background: linear-gradient(90deg, #a626c9, #e51278); box-shadow: 0 0 8px rgba(229, 18, 120, .5); }
:root[data-theme="oinventory"] .fm-skip { background: #6d28d9; }

/* sign-in, sign-up and password pages (.fm-auth) */
:root[data-theme="oinventory"] .fm-auth-card { border-color: var(--fm-line); box-shadow: 0 24px 60px -24px rgba(44, 16, 101, .3); }
:root[data-theme="oinventory"] .fm-auth-card a:not(.btn) { color: #6d28d9; }
:root[data-theme="oinventory"] .fm-auth-card a:not(.btn):hover { color: #5b21b6; }

/* ---------- 3. Buttons: every variant takes the brand colours ---------- */
:root[data-theme="oinventory"] .btn:focus, :root[data-theme="oinventory"] .btn:focus-visible { box-shadow: 0 0 0 3px rgba(109, 40, 217, .25) !important; }
:root[data-theme="oinventory"] .btn-theme, :root[data-theme="oinventory"] .btn-primary {
	background: var(--fm-oi-gradient-soft) !important; background-origin: border-box !important; border-color: transparent !important; color: #fff !important;
	box-shadow: 0 6px 16px -6px rgba(229, 18, 120, .55);
}
:root[data-theme="oinventory"] .btn-theme:hover, :root[data-theme="oinventory"] .btn-primary:hover,
:root[data-theme="oinventory"] .btn-theme:active, :root[data-theme="oinventory"] .btn-primary:active {
	background: var(--fm-oi-gradient) !important; background-origin: border-box !important; border-color: transparent !important; color: #fff !important;
}
:root[data-theme="oinventory"] .qty-wrapper .btn-theme { background: #fff !important; color: var(--fm-primary) !important; border-color: #fff !important; box-shadow: none; }
:root[data-theme="oinventory"] .btn-success, :root[data-theme="oinventory"] .btn-info { background: #6d28d9; border-color: #6d28d9; color: #fff; }
:root[data-theme="oinventory"] .btn-success:hover, :root[data-theme="oinventory"] .btn-info:hover { background: #5b21b6; border-color: #5b21b6; color: #fff; }
:root[data-theme="oinventory"] .btn-warning { background: #e51278; border-color: #e51278; color: #fff; }
:root[data-theme="oinventory"] .btn-warning:hover { background: #c40f66; border-color: #c40f66; color: #fff; }
:root[data-theme="oinventory"] .btn-danger { background: #d23d5c; border-color: #d23d5c; color: #fff; }
:root[data-theme="oinventory"] .btn-danger:hover { background: #b52f4c; border-color: #b52f4c; color: #fff; }
:root[data-theme="oinventory"] .btn-default, :root[data-theme="oinventory"] .btn-light, :root[data-theme="oinventory"] .btn-secondary,
:root[data-theme="oinventory"] .btn-outline-primary, :root[data-theme="oinventory"] .btn-outline-secondary {
	background: #fff; border-color: #cfc8ed; color: #5b21b6;
}
:root[data-theme="oinventory"] .btn-default:hover, :root[data-theme="oinventory"] .btn-light:hover, :root[data-theme="oinventory"] .btn-secondary:hover,
:root[data-theme="oinventory"] .btn-outline-primary:hover, :root[data-theme="oinventory"] .btn-outline-secondary:hover {
	background: #f5f0ff; border-color: #6d28d9; color: #6d28d9;
}
:root[data-theme="oinventory"] .btn-outline-danger { border-color: #d23d5c; color: #d23d5c; }
:root[data-theme="oinventory"] .btn-outline-danger:hover { background: #d23d5c; color: #fff; }

/* ---------- 4. Forms and small parts ----------------------------------- */
:root[data-theme="oinventory"] .form-control:focus, :root[data-theme="oinventory"] .form-select:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(109, 40, 217, .15); }
:root[data-theme="oinventory"] .form-check-input:checked { background-color: #6d28d9; border-color: #6d28d9; }
:root[data-theme="oinventory"] .form-check-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(109, 40, 217, .18); }
:root[data-theme="oinventory"] .nav-tabs .nav-link.active, :root[data-theme="oinventory"] .nav-pills .nav-link.active { color: #6d28d9; }
:root[data-theme="oinventory"] .nav-pills .nav-link.active { background: #f3eefe; }
:root[data-theme="oinventory"] .page-item.active .page-link { background: #6d28d9; border-color: #6d28d9; color: #fff; }
:root[data-theme="oinventory"] .badge.bg-primary { background: #6d28d9 !important; }
:root[data-theme="oinventory"] .progress-bar { background: var(--fm-oi-gradient-soft); }
:root[data-theme="oinventory"] .dropdown-item:active { background: #6d28d9; color: #fff; }
:root[data-theme="oinventory"] .fm-sub-banner--info { background: #f5f0ff; border-color: #dccbfd; color: #4c1d95; }
:root[data-theme="oinventory"] .fm-sub-banner--info .fm-sub-banner__btn { background: var(--fm-oi-gradient-soft); }
:root[data-theme="oinventory"] .fm-sub-banner--info .fm-sub-banner__icon { background: #ede4fe; color: #6d28d9; }

/* ---------- 5. Public website (body.oi-site) ---------------------------- */
:root[data-theme="oinventory"] {
	--oi-950: #150a2e;
	--oi-900: #2c1065;
	--oi-800: #4c1d95;
	--oi-700: #6d28d9;
	--oi-600: #7c3aed;
	--oi-500: #e51278;
	--oi-400: #f5317f;
	--oi-300: #ff8dbe;
	--oi-200: #e4d9fc;
	--oi-100: #efeefb;
	--oi-50:  #f8f7fd;
	--oi-aqua: #ff5fa3;
	--oi-ink: #150f26;
	--oi-ink-2: #2e2547;
	--oi-muted: #6e6889;
	--oi-line: #e2def4;
	--oi-sand: #f8f7fd;
	--oi-shadow-sm: 0 1px 2px rgba(21, 15, 38, .06), 0 2px 8px rgba(44, 16, 101, .05);
	--oi-shadow: 0 10px 30px -12px rgba(44, 16, 101, .28);
	--oi-shadow-lg: 0 24px 60px -20px rgba(44, 16, 101, .35);
}
/* the few public-site colours that are written out instead of using the --oi-* tokens */
:root[data-theme="oinventory"] .oi-btn--primary { background: linear-gradient(135deg, #6423c9 0%, #a626c9 55%, #e51278 100%); box-shadow: 0 8px 22px -6px rgba(229, 18, 120, .5); }
:root[data-theme="oinventory"] .oi-btn--primary:hover { background: linear-gradient(115deg, #2c1065 0%, #6d28d9 46%, #e51278 100%); box-shadow: 0 12px 28px -8px rgba(229, 18, 120, .6); }
:root[data-theme="oinventory"] .oi-header.is-stuck { box-shadow: 0 6px 24px rgba(44, 16, 101, .1); }
:root[data-theme="oinventory"] .oi-hero__blob--1 { background: radial-gradient(circle, #f9c4de, transparent 70%); }
:root[data-theme="oinventory"] .oi-hero__blob--2 { background: radial-gradient(circle, #ddd0fd, transparent 70%); }
:root[data-theme="oinventory"] .oi-hero__grid { background-image: linear-gradient(rgba(109, 40, 217, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(109, 40, 217, .05) 1px, transparent 1px); }
:root[data-theme="oinventory"] .oi-hero__float .oi-mock { box-shadow: 0 28px 70px rgba(44, 16, 101, .3); }
:root[data-theme="oinventory"] .oi-fcard__icon { background: linear-gradient(135deg, #a626c9, #6d28d9); box-shadow: 0 10px 22px -6px rgba(109, 40, 217, .45); }
:root[data-theme="oinventory"] .oi-cta { background: linear-gradient(115deg, #2c1065 0%, #6d28d9 46%, #e51278 100%); }
:root[data-theme="oinventory"] .oi-cta__glow { background: radial-gradient(circle, rgba(255, 141, 190, .5), transparent 65%); }
:root[data-theme="oinventory"] .oi-el--oi-page-hero { background: radial-gradient(900px 380px at 80% -20%, rgba(229, 18, 120, .14), transparent 60%), linear-gradient(180deg, var(--oi-50), #fff); }
:root[data-theme="oinventory"] .oi-el--oi-pos-showcase { background: radial-gradient(1000px 500px at 15% 0%, rgba(109, 40, 217, .45), transparent 60%), radial-gradient(800px 500px at 100% 100%, rgba(229, 18, 120, .3), transparent 60%), #150a2e; }
:root[data-theme="oinventory"] .oi-poss__head .oi-lead, :root[data-theme="oinventory"] .oi-poss__item p { color: #c9bfe6; }
:root[data-theme="oinventory"] .oi-poss__stage::before { background: radial-gradient(closest-side, rgba(229, 18, 120, .4), transparent); }
:root[data-theme="oinventory"] .oi-plan.is-hot { border-color: #e51278; box-shadow: 0 24px 60px -16px rgba(109, 40, 217, .35); }
:root[data-theme="oinventory"] .oi-plan__ribbon { background: linear-gradient(135deg, #6d28d9, #e51278); }
:root[data-theme="oinventory"] .oi-cycle button[aria-pressed="true"] { box-shadow: 0 3px 10px rgba(44, 16, 101, .15); }
:root[data-theme="oinventory"] .oi-form input:focus, :root[data-theme="oinventory"] .oi-form select:focus, :root[data-theme="oinventory"] .oi-form textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 4px rgba(109, 40, 217, .16); }
:root[data-theme="oinventory"] .oi-footer { background: radial-gradient(1200px 500px at 85% -10%, rgba(229, 18, 120, .22), transparent 60%), linear-gradient(180deg, #1f1145, #120826); color: #c9bfe6; }
:root[data-theme="oinventory"] .oi-footer a, :root[data-theme="oinventory"] .oi-footer__legal button { color: #c9bfe6 !important; }
:root[data-theme="oinventory"] .oi-footer a:hover { color: #fff !important; }
/* product mock-ups drawn in CSS (hero, feature splits) */
:root[data-theme="oinventory"] .oi-mock__side { background: linear-gradient(180deg, #1f1145, #2c1065); color: #a99bd6; }
:root[data-theme="oinventory"] .oi-mock__side i.is-on { background: rgba(229, 18, 120, .3); }
:root[data-theme="oinventory"] .oi-mock__bars i { background: linear-gradient(180deg, #c4a6fb, #7c3aed); }
:root[data-theme="oinventory"] .oi-mock__bars i.is-hot { background: linear-gradient(180deg, #f5317f, #6d28d9); }
:root[data-theme="oinventory"] .oi-mock__tile.is-picked { box-shadow: 0 0 0 2px rgba(229, 18, 120, .22); }
:root[data-theme="oinventory"] .oi-mock__pay { background: linear-gradient(135deg, #6423c9, #e51278); }
:root[data-theme="oinventory"] .oi-mock__meter i { background: linear-gradient(90deg, #a626c9, #e51278); }
/* cookie banner */
:root[data-theme="oinventory"] .oi-consent { color: #150f26; }
:root[data-theme="oinventory"] .oi-consent__banner, :root[data-theme="oinventory"] .oi-consent__reopen { border-color: #e2def4; }
:root[data-theme="oinventory"] .oi-consent__icon, :root[data-theme="oinventory"] .oi-consent__gpc { background: #f3eefe; }
:root[data-theme="oinventory"] .oi-consent__text a, :root[data-theme="oinventory"] .oi-consent__gpc,
:root[data-theme="oinventory"] .oi-consent__btn--link, :root[data-theme="oinventory"] .oi-consent__close { color: #6d28d9; }
:root[data-theme="oinventory"] .oi-consent__btn--primary { background: linear-gradient(135deg, #6423c9 0%, #a626c9 55%, #e51278 100%); box-shadow: 0 6px 16px -4px rgba(229, 18, 120, .45); }
:root[data-theme="oinventory"] .oi-consent__btn--secondary { color: #5b21b6; border-color: #6d28d9; }
:root[data-theme="oinventory"] .oi-consent__btn--secondary:hover, :root[data-theme="oinventory"] .oi-consent__close { background: #f5f0ff; }
:root[data-theme="oinventory"] .oi-switch input:checked + .oi-switch__track { background: #6d28d9; }

/* cookie banner text, and the till mock-up's product tiles that were drawn in sky blues */
:root[data-theme="oinventory"] .oi-consent__title { color: #150f26; }
:root[data-theme="oinventory"] .oi-consent__text { color: #4b4566; }
:root[data-theme="oinventory"] .oi-consent__text a { color: #6d28d9; }
:root[data-theme="oinventory"] .oi-mock__tile:nth-child(1) > span { background: rgba(109, 40, 217, .1) !important; color: #6d28d9 !important; }
:root[data-theme="oinventory"] .oi-mock__tile:nth-child(3) > span { background: rgba(166, 38, 201, .1) !important; color: #a626c9 !important; }
:root[data-theme="oinventory"] .oi-mock__tile:nth-child(6) > span { background: rgba(91, 33, 182, .1) !important; color: #5b21b6 !important; }
:root[data-theme="oinventory"] .oi-mock__tile:nth-child(7) > span { background: rgba(229, 18, 120, .1) !important; color: #e51278 !important; }
:root[data-theme="oinventory"] .oi-mock__tile:nth-child(9) > span { background: rgba(192, 38, 211, .1) !important; color: #c026d3 !important; }

/* ---------- 6. Screens with their own banners ---------------------------
   Most hard-coded blues are swapped in 96-theme-oinventory-colors.css; the big
   banners take the brand gradient here. */
:root[data-theme="oinventory"] .fm-opt-hero { --tone: #e51278 !important; background: linear-gradient(115deg, #2c1065 0%, #4c1d95 45%, #a626c9 100%); color: #f3eefe; box-shadow: 0 18px 40px -12px rgba(44, 16, 101, .45); }
:root[data-theme="oinventory"] .fm-opt-hero p, :root[data-theme="oinventory"] .fm-setup summary small { color: #e4dcfb; }
:root[data-theme="oinventory"] .fm-setup { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
:root[data-theme="oinventory"] .fm-ring { background: conic-gradient(#ff5fa3 calc(var(--p) * 1%), rgba(255, 255, 255, .22) 0); }
:root[data-theme="oinventory"] .fm-ring::before { background: #3b1585; }
:root[data-theme="oinventory"] .fm-me-banner,
:root[data-theme="oinventory"] .fm-company-banner { background: linear-gradient(115deg, #2c1065 0%, #6d28d9 50%, #e51278 100%); }
:root[data-theme="oinventory"] .fm-me-avatar { background: linear-gradient(135deg, #6423c9 0%, #a626c9 55%, #e51278 100%); box-shadow: 0 12px 26px -8px rgba(109, 40, 217, .5); }
:root[data-theme="oinventory"] .fm-company-logo { box-shadow: 0 8px 24px rgba(44, 16, 101, .18); }
:root[data-theme="oinventory"] .fm-fact > i { color: #6d28d9; }
:root[data-theme="oinventory"] .bl-plan { background: linear-gradient(115deg, #2c1065 0%, #6d28d9 55%, #e51278 120%); color: #f3eefe; box-shadow: 0 18px 40px -12px rgba(44, 16, 101, .45); }
:root[data-theme="oinventory"] .bl-plan--bad { background: linear-gradient(135deg, #450a0a, #b91c1c 70%, #ef4444); }
:root[data-theme="oinventory"] .bl-plan--warn { background: linear-gradient(135deg, #451a03, #b45309 70%, #f59e0b); }
:root[data-theme="oinventory"] .bl-btn--w { color: #5b21b6 !important; }
:root[data-theme="oinventory"] .bl-btn--p, :root[data-theme="oinventory"] .fmco-btn:not(.fmco-btn--ghost) { background: linear-gradient(135deg, #6423c9 0%, #a626c9 55%, #e51278 100%); }
:root[data-theme="oinventory"] .fmpl-cycle button[aria-pressed="true"] { background: #6d28d9; }
:root[data-theme="oinventory"] .ca-tag.is-default { border-color: #6d28d9; color: #6d28d9; }
:root[data-theme="oinventory"] .fm-sidebar-company span, :root[data-theme="oinventory"] .fm-sidebar-foot { color: #7d7799; }
:root[data-theme="oinventory"] .bl-empty > i { color: #c4b5fd !important; }

/* ---------- 7. Gradient edges ------------------------------------------
   Paint every gradient under its (transparent) border too; otherwise the gradient
   repeats inside the 1px border and shows as a second edge around the button.
   Kept last so it wins over the background shorthands above. */
:root[data-theme="oinventory"] .btn, :root[data-theme="oinventory"] button, :root[data-theme="oinventory"] [class*="btn"],
:root[data-theme="oinventory"] .oi-btn, :root[data-theme="oinventory"] .fm-avatar,
:root[data-theme="oinventory"] .oi-fcard, :root[data-theme="oinventory"] .oi-plan { background-origin: border-box !important; }


/* 96-theme-oinventory-colors.css */
/* ===========================================================================
   OInventory scheme - brand colours for the app screens
   Generated from the screen stylesheets: every hard-coded sky / blue colour
   is swapped for the matching OInventory violet / magenta, only while
   <html data-theme="oinventory">. Light and Dark are untouched.
   Hand-written OInventory rules live in 95-theme-oinventory.css.
   =========================================================================== */

/* ---- fm-ui.css ---- */
:root:where([data-theme="oinventory"]) { --fm-primary: #6d28d9; --fm-primary-600: #5b21b6; --fm-primary-50: #f3eefe; --fm-primary-100: #e4dcfb; --fm-accent: #a626c9; --fm-info: #5b21b6; --fm-info-bg: #f0e6ff; }
:where(:root[data-theme="oinventory"]) .fm-search input:focus { box-shadow: 0 0 0 3px rgba(166, 38, 201,.18); }
:where(:root[data-theme="oinventory"]) .fm-avatar { background: linear-gradient(135deg, var(--fm-primary), #a626c9); }
:where(:root[data-theme="oinventory"]) .btn:focus, :where(:root[data-theme="oinventory"]) .btn:focus-visible { box-shadow: 0 0 0 3px rgba(166, 38, 201,.28) !important; }
:where(:root[data-theme="oinventory"]) .form-control:focus, :where(:root[data-theme="oinventory"]) .form-select:focus { box-shadow: 0 0 0 3px rgba(166, 38, 201,.18); }
:where(:root[data-theme="oinventory"]) .fm-bar { background: linear-gradient(180deg, #f5317f, var(--fm-primary)); }
:where(:root[data-theme="oinventory"]) .qty-wrapper { background: linear-gradient(135deg, #1f0b47, #6d28d9) !important; }
:where(:root[data-theme="oinventory"]) .qty-wrapper .table th { color: #ebe4fd; }
:where(:root[data-theme="oinventory"]) .fm-type-card input:focus-visible + span { outline: 3px solid rgba(166, 38, 201,.5); }
:where(:root[data-theme="oinventory"]) .fm-opt-hero { --tone: #a626c9; color: #f3eefe; background: linear-gradient(120deg,#2c1065 0%,#3b1585 55%,#6d28d9 120%); box-shadow: 0 18px 40px rgba(44, 16, 101,.22); }
:where(:root[data-theme="oinventory"]) .fm-opt-hero p { color: #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fm-setup summary small { color: #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fm-ring { background: conic-gradient(#f5317f calc(var(--p)*1%),rgba(255,255,255,.2) 0); }
:where(:root[data-theme="oinventory"]) .fm-ring::before { background: #3b1585; }
:where(:root[data-theme="oinventory"]) .fm-setup li a { color: #f3eefe; }
:where(:root[data-theme="oinventory"]) .fm-opt-tile { --c: #a626c9; --c2: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fm-opt-tile:hover { box-shadow: 0 16px 36px rgba(44, 16, 101,.12); border-color: #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fm-opt-tile:focus-visible { outline: 3px solid rgba(166, 38, 201,.5); }
:where(:root[data-theme="oinventory"]) .fm-tone-sky { --c: #f5317f; --c2: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fm-opt-note i { color: var(--fm-accent,#a626c9); }
:where(:root[data-theme="oinventory"]) .fm-me-ico { background: linear-gradient(135deg,#f5317f,#6d28d9); }
:where(:root[data-theme="oinventory"]) .fm-me-banner { background: linear-gradient(120deg,#2c1065,#6d28d9 60%,#f5317f); }
:where(:root[data-theme="oinventory"]) .fm-me-avatar { background: linear-gradient(135deg,#a626c9,#6d28d9); box-shadow: 0 12px 26px rgba(44, 16, 101,.25); }
:where(:root[data-theme="oinventory"]) .fm-chip-role { background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary-600,#5b21b6); }
:where(:root[data-theme="oinventory"]) .modal-content { box-shadow: 0 30px 80px rgba(44, 16, 101,.3); }
:where(:root[data-theme="oinventory"]) .modal-footer { background: var(--fm-primary-50,#f3eefe)!important; }
:where(:root[data-theme="oinventory"]) .fm-plan-chip { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary, #6d28d9); }

/* ---- ux/00-core.css ---- */
:where(:root[data-theme="oinventory"]) .fmx-toast { background: #24104f; box-shadow: 0 14px 36px rgba(44, 16, 101,.35); }
:where(:root[data-theme="oinventory"]) .fmx-toast--info i { color: #f9a8d4; }
:where(:root[data-theme="oinventory"]) .fmx-modal { background: rgba(21, 8, 40,.5); }
:where(:root[data-theme="oinventory"]) .fmx-modal__box { box-shadow: 0 30px 80px rgba(44, 16, 101,.35); }
:where(:root[data-theme="oinventory"]) .fmx-drawer__scrim { background: rgba(21, 8, 40,.45); }
:where(:root[data-theme="oinventory"]) .fmx-drawer__panel { box-shadow: -20px 0 60px rgba(44, 16, 101,.25); }

/* ---- ux/10-shell.css ---- */
:where(:root[data-theme="oinventory"]) .fm-collapse-btn { color: #c4b5fd; }
:where(:root[data-theme="oinventory"]) .fmx-pal { background: rgba(21, 8, 40,.5); }
:where(:root[data-theme="oinventory"]) .fmx-pal__box { box-shadow: 0 30px 80px rgba(44, 16, 101,.4); }
:where(:root[data-theme="oinventory"]) .fmx-pal mark { background: rgba(166, 38, 201,.22); }
:where(:root[data-theme="oinventory"]) .fm-progress { background: linear-gradient(90deg, #f5317f, var(--fm-primary)); box-shadow: 0 0 8px rgba(166, 38, 201,.6); }

/* ---- ux/12-dashboard.css ---- */
:where(:root[data-theme="oinventory"]) .fmd-toplist .bar i { background: linear-gradient(90deg, #f5317f, var(--fm-primary)); }

/* ---- ux/20-bins.css ---- */
:where(:root[data-theme="oinventory"]) .fmb-cell { color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .fmb-cell:hover, :where(:root[data-theme="oinventory"]) .fmb-cell:focus-visible { background: #f3eefe; border-color: #f9a8d4; }
:where(:root[data-theme="oinventory"]) .fmb-label { background: #f8f7fd; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .fmb-cell .fmb-label { background: #f8f7fd; }
:where(:root[data-theme="oinventory"]) .fmb-pop { box-shadow: 0 18px 50px rgba(44, 16, 101,.28); }
:where(:root[data-theme="oinventory"]) .fmb-pop-t { color: #24104f; }
:where(:root[data-theme="oinventory"]) .fmb-prev b { color: #5b21b6; }

/* ---- ux/20-products.css ---- */
:where(:root[data-theme="oinventory"]) .fmpl-stat.is-link:hover { border-color: var(--fm-primary-100, #e4dcfb); box-shadow: 0 6px 18px rgba(109, 40, 217,.1); }
:where(:root[data-theme="oinventory"]) .fmpl-attn button:not(:disabled):hover { background: var(--fm-primary-50, #f3eefe); border-color: var(--fm-primary-100, #e4dcfb); }
:where(:root[data-theme="oinventory"]) .fmpl-search input:focus { border-color: var(--fm-accent, #a626c9); box-shadow: 0 0 0 3px rgba(166, 38, 201,.18); }
:where(:root[data-theme="oinventory"]) .fmpl-search.is-busy > i { color: var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fmpl-chip:hover { border-color: var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmpl-chip.is-on { background: var(--fm-primary-50, #f3eefe); border-color: var(--fm-primary-100, #e4dcfb); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmpl-chip.is-on > i:first-child { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-opt:hover { background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmpl-opt.is-on { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmpl-viewtoggle button.is-on { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-sort.is-on { border-color: var(--fm-primary-100, #e4dcfb); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmpl-pill { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmpl-pill button { background: rgba(109, 40, 217,.12); }
:where(:root[data-theme="oinventory"]) .fmpl-pill button:hover { background: rgba(109, 40, 217,.25); }
:where(:root[data-theme="oinventory"]) .fmpl-link { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-card:hover { box-shadow: 0 10px 26px rgba(109, 40, 217,.13); border-color: var(--fm-primary-100, #e4dcfb); }
:where(:root[data-theme="oinventory"]) .fmpl-card:focus-visible, :where(:root[data-theme="oinventory"]) .fmpl-row:focus-visible { outline: 3px solid rgba(166, 38, 201,.55); }
:where(:root[data-theme="oinventory"]) .fmpl-card.is-selected { border-color: var(--fm-primary, #6d28d9); box-shadow: 0 0 0 2px var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-badge.is-info { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .fmpl-margin.is-ok { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .fmpl-check input:checked + span { background: var(--fm-primary, #6d28d9); border-color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-check input:focus-visible + span { outline: 3px solid rgba(166, 38, 201,.55); }
:where(:root[data-theme="oinventory"]) .fmpl-table th[data-sort]:hover { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-table th.is-sorted { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-row:hover { background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmpl-row.is-selected { background: #ebdffb; }
:where(:root[data-theme="oinventory"]) .fmpl-edit:hover { background: rgba(166, 38, 201,.09); box-shadow: inset 0 -2px 0 var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fmpl-edit input { border: 1px solid var(--fm-accent, #a626c9); box-shadow: 0 0 0 3px rgba(166, 38, 201,.18); }
:where(:root[data-theme="oinventory"]) .fmpl-more:hover { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-bulk { background: #24104f; box-shadow: 0 18px 48px rgba(44, 16, 101,.45); }
:where(:root[data-theme="oinventory"]) .fmpl-bulk-count .fmpl-link { color: #f9a8d4; }
:where(:root[data-theme="oinventory"]) .fmpl-bulk-x { color: #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fmpl-onboard-icon { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-step:hover { border-color: var(--fm-primary-100, #e4dcfb); box-shadow: 0 10px 24px rgba(109, 40, 217,.12); }
:where(:root[data-theme="oinventory"]) .fmpl-step > i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmpl-menu button:hover, :where(:root[data-theme="oinventory"]) .fmpl-menu a:hover { background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmimp-steps li.is-on { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmimp-steps li.is-on span { background: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmimp-drop { border: 2px dashed var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmimp-drop i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmimp-drop:hover, :where(:root[data-theme="oinventory"]) .fmimp-drop.is-over { border-color: var(--fm-accent, #a626c9); background: #ebdffb; }
:where(:root[data-theme="oinventory"]) .fmimp-file > i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmimp-note { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmimp-mode label:has(input:checked) { border-color: var(--fm-primary, #6d28d9); background: var(--fm-primary-50, #f3eefe); }

/* ---- ux/22-custom-fields.css ---- */
:where(:root[data-theme="oinventory"]) .fmcf-check:has(input:checked) { background: var(--fm-primary-50, #f3eefe); border-color: var(--fm-primary-100, #e4dcfb); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmcf-empty-state { border: 2px dashed var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmcf-row.is-new { box-shadow: 0 0 0 2px var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fmcf-move button:hover, :where(:root[data-theme="oinventory"]) .fmcf-more:hover { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmcf-more.is-on { color: var(--fm-primary, #6d28d9); border-color: var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); }

/* ---- ux/26-price-lists.css ---- */
:where(:root[data-theme="oinventory"]) .fmpr-empty i { color: var(--fm-primary, #6d28d9); }

/* ---- ux/28-doc-fix.css ---- */
:where(:root[data-theme="oinventory"]) .fx-intro { background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fx-effects li > i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .rp-link { color: var(--fm-primary, #6d28d9); }

/* ---- ux/30-orders.css ---- */
:where(:root[data-theme="oinventory"]) .fn-modal { background: rgba(21, 8, 40,.5); }
:where(:root[data-theme="oinventory"]) .fn-box { box-shadow: 0 30px 80px rgba(44, 16, 101,.35); }
:where(:root[data-theme="oinventory"]) .fn-input { border-color: #e4dcfb; }
:where(:root[data-theme="oinventory"]) .fn-opt.is-active, :where(:root[data-theme="oinventory"]) .fn-opt:hover { background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fn-add { color: #6d28d9; }

/* ---- ux/40-pickwave.css ---- */
:where(:root[data-theme="oinventory"]) .pw-badge { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-pill.is-info { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .pw-empty i { color: #f9a8d4; }
:where(:root[data-theme="oinventory"]) .pw-empty b { color: #24104f; }
:where(:root[data-theme="oinventory"]) .pw-stagebar { background: #f8f7fd; border: 1px solid #ddd6fe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .pw-modal { background: rgba(34, 15, 61,.5); }
:where(:root[data-theme="oinventory"]) .pw-box { box-shadow: 0 24px 70px rgba(44, 16, 101,.3); }
:where(:root[data-theme="oinventory"]) .pw-x:hover { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .pw-tabs button.is-on { background: #6d28d9; border-color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-ord.is-on { background: #f8f7fd; }
:where(:root[data-theme="oinventory"]) .pw-steps button.is-on { color: #6d28d9; border-bottom-color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-steps button.is-on b { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-note i { color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-scan i { color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-scan input { border: 2px solid #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-aisle { background: #24104f; }
:where(:root[data-theme="oinventory"]) .pw-bin { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .pw-chip i { color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .pw-sn { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .pw-tote-no { background: #24104f; }

/* ---- ux/40-receivables.css ---- */
:where(:root[data-theme="oinventory"]) #csPanel { --rc-brand: var(--fm-primary,#6d28d9); }
:where(:root[data-theme="oinventory"]) .cs-card { box-shadow: 0 1px 2px rgba(34, 15, 61,.04); }
:where(:root[data-theme="oinventory"]) .rc-modal { background: rgba(34, 15, 61,.45); }
:where(:root[data-theme="oinventory"]) .rc-box { box-shadow: 0 24px 70px rgba(44, 16, 101,.3); }

/* ---- ux/40-shipping.css ---- */
:where(:root[data-theme="oinventory"]) #foShipCard .sp-picked { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .sp-modal { background: rgba(34, 15, 61,.5); }
:where(:root[data-theme="oinventory"]) .sp-box { box-shadow: 0 24px 70px rgba(44, 16, 101,.3); }
:where(:root[data-theme="oinventory"]) .sp-scan i { color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .sp-scan input { border: 2px solid #6d28d9; }
:where(:root[data-theme="oinventory"]) .sp-bin { background: #f3eefe; color: #5b21b6; }
:where(:root[data-theme="oinventory"]) .sp-aisle { background: #24104f; }

/* ---- ux/42-online-pay.css ---- */
:where(:root[data-theme="oinventory"]) .fop-sec > h4 i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fop-sw input:checked + span { background: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fop-sw input:focus-visible + span { outline: 2px solid var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fo-online { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }

/* ---- ux/50-tracking.css ---- */
:where(:root[data-theme="oinventory"]) .fmtv-chip:hover { border-color: var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmtv-chip.is-on { background: var(--fm-primary-50, #f3eefe); border-color: var(--fm-accent, #a626c9); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fmtv-chip:focus-within { outline: 3px solid rgba(166, 38, 201,.35); }
:where(:root[data-theme="oinventory"]) .fmtv-count { color: var(--fm-primary-600, #5b21b6); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmpl-vchip { color: var(--fm-primary-600, #5b21b6); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fmtv-matrix tr.is-new td:first-child { box-shadow: inset 3px 0 0 var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fmtv-imgpop button:hover { border-color: var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fmts-row:hover, :where(:root[data-theme="oinventory"]) .fmts-row:focus-visible { background: var(--fm-primary-50, #f3eefe); }

/* ---- ux/60-billing.css ---- */
:where(:root[data-theme="oinventory"]) .fm-sub-banner--info { background: #f6efff; border-color: #e4dcfb; color: #3b1585; }
:where(:root[data-theme="oinventory"]) .fm-sub-banner--info .fm-sub-banner__icon { background: #ebe4fd; color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fm-sub-banner--info .fm-sub-banner__btn { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmpl-cycle { box-shadow: 0 2px 8px rgba(44, 16, 101,.06); }
:where(:root[data-theme="oinventory"]) .fmpl-cycle button[aria-pressed="true"] { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-back { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmco-head h2 { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .fmco-head h2 span { color: #7c3aed; }
:where(:root[data-theme="oinventory"]) .fmco-card { box-shadow: 0 1px 2px rgba(44, 16, 101,.04), 0 12px 30px rgba(44, 16, 101,.05); }
:where(:root[data-theme="oinventory"]) .fmco-card h3 { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .fmco-n { background: #f3eefe; color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-seg input:checked + span { border-color: #7c3aed; background: #f8f7fd; box-shadow: 0 0 0 3px rgba(166, 38, 201,.15); }
:where(:root[data-theme="oinventory"]) .fmco-seg input:focus-visible + span { outline: 2px solid #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-addon.is-on { border-color: #7c3aed; background: #f8f7fd; }
:where(:root[data-theme="oinventory"]) .fmco-step__b { background: #f3eefe; color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-step__b:hover { background: #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fmco-f input:focus, :where(:root[data-theme="oinventory"]) .fmco-f select:focus { border-color: #a626c9; box-shadow: 0 0 0 3px rgba(166, 38, 201,.2); }
:where(:root[data-theme="oinventory"]) .fmco-sum { box-shadow: 0 1px 2px rgba(44, 16, 101,.05), 0 16px 38px rgba(44, 16, 101,.08); }
:where(:root[data-theme="oinventory"]) .fmco-sum > h3 { background: linear-gradient(135deg, #2c1065, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmco-line--total b { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .fmco-when { background: #f8f7fd; color: #3b1585; }
:where(:root[data-theme="oinventory"]) .fmco-trust i { color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-btn { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .fmco-btn--ghost { background: #fff; color: #6d28d9 !important; border: 1.5px solid #ddd6fe; }
:where(:root[data-theme="oinventory"]) .fmco-done { box-shadow: 0 16px 44px rgba(44, 16, 101,.08); }
:where(:root[data-theme="oinventory"]) .fmco-done h2 { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .bl-plan { background: linear-gradient(135deg, #2c1065, #6d28d9 65%, #a626c9); color: #f3eefe; box-shadow: 0 18px 40px rgba(44, 16, 101,.25); }
:where(:root[data-theme="oinventory"]) .bl-btn--w { color: #5b21b6 !important; }
:where(:root[data-theme="oinventory"]) .bl-btn--p { background: #6d28d9; }
:where(:root[data-theme="oinventory"]) .bl-btn--o { color: #6d28d9 !important; border: 1.5px solid #ddd6fe; }
:where(:root[data-theme="oinventory"]) .bl-h { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .bl-tile b { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .bl-note--info { background: #f6efff; border-color: #e4dcfb; color: #3b1585; }
:where(:root[data-theme="oinventory"]) .bl-use:hover { box-shadow: 0 10px 26px rgba(44, 16, 101,.1); }
:where(:root[data-theme="oinventory"]) .bl-use header i { background: #f3eefe; color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .bl-bar i { background: linear-gradient(90deg, #f5317f, #6d28d9); }
:where(:root[data-theme="oinventory"]) .bl-card h4 { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .bl-form input:focus { border-color: #a626c9; box-shadow: 0 0 0 3px rgba(166, 38, 201,.2); }
:where(:root[data-theme="oinventory"]) .bl-check input { accent-color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .bl-ex__g i { color: #6d28d9; }

/* ---- ux/61-billing-auto.css ---- */
:where(:root[data-theme="oinventory"]) .fmco-auto { border: 1px solid #e4dcfb; background: #f8f7fd; }
:where(:root[data-theme="oinventory"]) .fmco-auto input { accent-color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fmco-auto b { color: #2c1065; }
:where(:root[data-theme="oinventory"]) .fmco-auto:focus-within { outline: 2px solid var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .bl-auto { border-left: 5px solid #6d28d9; }
:where(:root[data-theme="oinventory"]) .bl-auto h4 { color: #2c1065; }

/* ---- ux/70-integrations.css ---- */
:where(:root[data-theme="oinventory"]) .fi-chip { background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fi-switch input:checked + span { background: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fi-switch input:focus-visible + span { outline: 2px solid var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fi-note--info { background: var(--fm-info-bg, #f0e6ff); color: #2c1065; }
:where(:root[data-theme="oinventory"]) .fi-empty { border: 2px dashed var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary-600, #5b21b6); }
:where(:root[data-theme="oinventory"]) .fi-check:has(input:checked) { border-color: var(--fm-accent, #a626c9); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fi-check i { color: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fi-seg input:checked + span { background: var(--fm-primary, #6d28d9); }
:where(:root[data-theme="oinventory"]) .fi-seg input:focus-visible + span { outline: 2px solid var(--fm-accent, #a626c9); }
:where(:root[data-theme="oinventory"]) .fi-secret { border: 2px solid var(--fm-accent, #a626c9); background: var(--fm-primary-50, #f3eefe); }
:where(:root[data-theme="oinventory"]) .fi-secret code { border: 1px solid var(--fm-primary-100, #e4dcfb); }
:where(:root[data-theme="oinventory"]) .fi-opts { background: var(--fm-primary-50, #f3eefe); }

/* ---- ux/90-theme-fixes.css ---- */
:where(:root[data-theme="oinventory"]) .btn-outline-info { color: #6d28d9; border-color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .btn-outline-info:hover, :where(:root[data-theme="oinventory"]) .btn-outline-info:focus { background: #6d28d9; border-color: #6d28d9; }
:where(:root[data-theme="oinventory"]) .bl-pill { background: rgba(44, 16, 101,.38); }

/* ---- orders/docs.css ---- */
:root[data-theme="oinventory"] .fo-doc, :root[data-theme="oinventory"] .fl-wrap { --fo-info: #6d28d9; --fo-info-bg: #f3eefe; }
:root[data-theme="oinventory"] .fo-link { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-check input { accent-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-empty-mini i { color: #94a3b8; }
:root[data-theme="oinventory"] .fo-menu { box-shadow: 0 18px 50px rgba(44, 16, 101,.22); }
:root[data-theme="oinventory"] .fo-menu-item { background: none; }
:root[data-theme="oinventory"] .fo-menu-item i { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fo-menu-item:hover:not(:disabled) { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fo-menu-item.is-danger, :root[data-theme="oinventory"] .fo-menu-item.is-danger i { color: var(--fo-bad); }
:root[data-theme="oinventory"] .fo-card-head h2 i { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-pop { box-shadow: 0 18px 50px rgba(44, 16, 101,.2); }
:root[data-theme="oinventory"] .fo-opt:hover { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fo-opt-add { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-addr summary i { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-addr summary::after { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fo-addr-grid input[readonly] { background: #f3f6fa; }
:root[data-theme="oinventory"] .fo-search { border-color: var(--fm-primary-100, #e4dcfb) !important; }
:root[data-theme="oinventory"] .fo-search:focus { border-color: var(--fm-accent, #a626c9) !important; }
:root[data-theme="oinventory"] .fo-res.is-active, :root[data-theme="oinventory"] .fo-res:hover { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fo-stepper input { background: transparent; }
:root[data-theme="oinventory"] .fo-stepper input:focus { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fo-disc input { background: transparent; }
:root[data-theme="oinventory"] .fo-disc input:focus { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fo-seg { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-empty i { color: #b6c4d4; }
:root[data-theme="oinventory"] .fo-undo { background: #24104f; }
:root[data-theme="oinventory"] .fo-undo .fo-link { color: #f9a8d4; }
:root[data-theme="oinventory"] .fo-progress span { background: var(--fm-accent, #a626c9); }
:root[data-theme="oinventory"] .fo-progress.is-full span { background: #22c55e; }
:root[data-theme="oinventory"] .fo-refund summary { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fo-timeline li i { color: var(--fo-info); }
:root[data-theme="oinventory"] .fo-modal { background: rgba(21, 8, 40,.5); }
:root[data-theme="oinventory"] .fo-modal-box { box-shadow: 0 30px 80px rgba(44, 16, 101,.35); }
:root[data-theme="oinventory"] .fl-tab { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fl-tab:hover { color: var(--fm-ink, #1b2437); }
:root[data-theme="oinventory"] .fl-tab.is-active { color: var(--fm-primary, #6d28d9); border-bottom-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-kpi-ico { background: #eef1f6; color: #4a5568; }
:root[data-theme="oinventory"] .fl-tone-blue .fl-kpi-ico { background: #f3eefe; color: #6d28d9; }
:root[data-theme="oinventory"] .fl-tone-amber .fl-kpi-ico { background: #fef3dc; color: #b45309; }
:root[data-theme="oinventory"] .fl-tone-green .fl-kpi-ico { background: #e7f6ec; color: #15803d; }
:root[data-theme="oinventory"] .fl-tone-red .fl-kpi-ico { background: #fdeaea; color: #b91c1c; }
:root[data-theme="oinventory"] .fl-chip { background: var(--fm-surface, #fff); }
:root[data-theme="oinventory"] .fl-chip:hover { border-color: #b9cbe0; }
:root[data-theme="oinventory"] .fl-chip.is-active { background: var(--fm-primary, #6d28d9); border-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-search i { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fl-sort { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fl-sort.is-active { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-badge { background: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] #flFilterBtn.is-on { border-color: var(--fm-primary, #6d28d9); color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-row:hover { background: var(--fm-primary-50, #f3eefe); }
:root[data-theme="oinventory"] .fl-row.is-selected { background: #f0f8fe; }
:root[data-theme="oinventory"] .fl-c-chk input { accent-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-pg { background: var(--fm-surface, #fff); }
:root[data-theme="oinventory"] .fl-pg.is-active { background: var(--fm-primary, #6d28d9); border-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-bulk { background: #24104f; box-shadow: 0 18px 50px rgba(44, 16, 101,.4); }
:root[data-theme="oinventory"] .fl-bulk .btn-link { color: #f9a8d4; }
:root[data-theme="oinventory"] .fl-h-new { color: #6d28d9; }
:root[data-theme="oinventory"] .fl-ava { background: linear-gradient(135deg, #f5317f, #7c3aed); }
:root[data-theme="oinventory"] .fl-links a { color: var(--fm-muted, #6b7689); }
:root[data-theme="oinventory"] .fl-links a:hover { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fl-sub a { color: inherit; }
:root[data-theme="oinventory"] .fl-bulk { background: var(--fm-surface, #fff); }

/* ---- plans.css ---- */
:root[data-theme="oinventory"] .pl { --pl-navy: #2c1065; --pl-navy2: #3b1585; --pl-pri: #6d28d9; --pl-pri2: #7c3aed; --pl-sky: #a626c9; --pl-50: #f8f7fd; --pl-100: #f3eefe; }
:root[data-theme="oinventory"] .pl-head h2 { color: var(--pl-navy); }
:root[data-theme="oinventory"] .pl-trial { box-shadow: 0 2px 8px rgba(44, 16, 101,.06); }
:root[data-theme="oinventory"] .pl-trial i { color: var(--pl-sky); }
:root[data-theme="oinventory"] .pl-trial.is-over i { color: #dc2626; }
:root[data-theme="oinventory"] .pl-card { box-shadow: 0 1px 2px rgba(44, 16, 101,.05),0 14px 34px rgba(44, 16, 101,.06); }
:root[data-theme="oinventory"] .pl-card:hover { box-shadow: 0 22px 50px rgba(44, 16, 101,.14); border-color: #ddd6fe; }
:root[data-theme="oinventory"] .pl-card h3 { color: var(--pl-ink); }
:root[data-theme="oinventory"] .pl-tag { color: var(--pl-mut); }
:root[data-theme="oinventory"] .pl-price sup { color: var(--pl-mut); }
:root[data-theme="oinventory"] .pl-price span { color: var(--pl-mut); }
:root[data-theme="oinventory"] .pl-sub { color: var(--pl-mut); }
:root[data-theme="oinventory"] .pl-cta--hot { box-shadow: 0 12px 26px rgba(109, 40, 217,.4); }
:root[data-theme="oinventory"] .pl-feat li { color: #334155; }
:root[data-theme="oinventory"] .pl-feat li i { color: var(--pl-pri); }
:root[data-theme="oinventory"] .pl-feat li.pl-pos { border: 1px dashed #f9a8d4; }
:root[data-theme="oinventory"] .pl-feat li.pl-pos i { color: #fff; }
:root[data-theme="oinventory"] .pl-card.is-hot { border-color: transparent; color: #f3eefe; box-shadow: 0 30px 64px rgba(44, 16, 101,.35); }
:root[data-theme="oinventory"] .pl-card.is-hot h3, :root[data-theme="oinventory"] .pl-card.is-hot .pl-price b, :root[data-theme="oinventory"] .pl-card.is-hot .pl-feat li b { color: #fff; }
:root[data-theme="oinventory"] .pl-card.is-hot .pl-tag, :root[data-theme="oinventory"] .pl-card.is-hot .pl-sub, :root[data-theme="oinventory"] .pl-card.is-hot .pl-price span, :root[data-theme="oinventory"] .pl-card.is-hot .pl-price sup { color: #ddd6fe; }
:root[data-theme="oinventory"] .pl-card.is-hot .pl-feat li { color: #f3eefe; }
:root[data-theme="oinventory"] .pl-card.is-hot .pl-feat li i { color: #f9a8d4; }
:root[data-theme="oinventory"] .pl-card.is-hot .pl-feat li.pl-pos { border-color: rgba(249, 168, 212,.55); }
:root[data-theme="oinventory"] .pl-card.is-hot .pl-feat li.pl-pos i { color: #fff; }
:root[data-theme="oinventory"] .pl-ribbon { background: linear-gradient(135deg,#f5317f,#7c3aed); box-shadow: 0 8px 18px rgba(124, 58, 237,.45); }
:root[data-theme="oinventory"] .pl-card.is-mine { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18),0 14px 34px rgba(44, 16, 101,.06); }
:root[data-theme="oinventory"] .pl-addons { border: 1px solid #ddd6fe; }
:root[data-theme="oinventory"] .pl-addons h3 { color: var(--pl-navy); }
:root[data-theme="oinventory"] .pl-addons h3 i { color: var(--pl-sky); }
:root[data-theme="oinventory"] .pl-trust li { color: #475569; }
:root[data-theme="oinventory"] .pl-trust li i { color: var(--pl-pri); }
:root[data-theme="oinventory"] .co-back { color: #6d28d9; }
:root[data-theme="oinventory"] .co-head h2 { color: #2c1065; }
:root[data-theme="oinventory"] .co-head h2 span { color: #7c3aed; }
:root[data-theme="oinventory"] .co-steps li { background: #fff; color: #64748b; }
:root[data-theme="oinventory"] .co-steps li b { background: #e2e8f0; }
:root[data-theme="oinventory"] .co-steps li.is-now { border-color: #7c3aed; color: #5b21b6; background: #f8f7fd; }
:root[data-theme="oinventory"] .co-steps li.is-now b { background: #7c3aed; }
:root[data-theme="oinventory"] .co-steps li.is-done { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
:root[data-theme="oinventory"] .checkout_wrapper_inner form>.col-sm-12.row>.col-sm-8>div { box-shadow: 0 1px 2px rgba(44, 16, 101,.05),0 14px 34px rgba(44, 16, 101,.06); }
:root[data-theme="oinventory"] .checkout_wrapper h3 { color: #2c1065; }
:root[data-theme="oinventory"] .checkout_wrapper .form-group-payment .form-control, :root[data-theme="oinventory"] .checkout_wrapper .form-group-payment .form-select { border-color: #dbe4ee; }
:root[data-theme="oinventory"] .checkout_wrapper .form-group-payment .form-control:focus, :root[data-theme="oinventory"] .checkout_wrapper .form-group-payment .form-select:focus { border-color: #a626c9; box-shadow: 0 0 0 3px rgba(166, 38, 201,.2); }
:root[data-theme="oinventory"] .checkout_wrapper_inner form>.col-sm-12.row>.col-sm-4 { box-shadow: 0 1px 2px rgba(44, 16, 101,.05),0 14px 34px rgba(44, 16, 101,.08); }
:root[data-theme="oinventory"] .checkout_wrapper .box-top-header { background: linear-gradient(135deg,#2c1065,#6d28d9); }
:root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_row:hover { border-color: #f9a8d4; }
:root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_row_active { border-color: #7c3aed; background: #f8f7fd; }
:root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_row input[type=checkbox] { accent-color: #6d28d9; }
:root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_feature_qty_plus, :root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_feature_qty_minus { background: #f3eefe; color: #6d28d9; }
:root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_feature_qty_plus:hover, :root[data-theme="oinventory"] .checkout_wrapper .package_feature_addon_feature_qty_minus:hover { background: #ddd6fe; }
:root[data-theme="oinventory"] .checkout_wrapper_inner form>.col-sm-12.row>.col-sm-4>.box-top-header:nth-of-type(2) { background: #ecfdf5; }
:root[data-theme="oinventory"] .checkout_wrapper .form-group-package-row { background: #f8f7fd; }
:root[data-theme="oinventory"] .checkout_wrapper .grand_total_amount { color: #2c1065; }

/* ---- product-form.css ---- */
:root[data-theme="oinventory"] .fmp-close { background: #fff; color: var(--fm-ink-2,#3a4560); }
:root[data-theme="oinventory"] .fmp-close:hover { background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary,#6d28d9); border-color: var(--fm-primary-100,#e4dcfb); }
:root[data-theme="oinventory"] .fmp-chip { background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary-600,#5b21b6); }
:root[data-theme="oinventory"] .fmp-card-title i { color: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-note { background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary-600,#5b21b6); }
:root[data-theme="oinventory"] .fmp-mini { background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-mini:hover { background: var(--fm-primary-100,#e4dcfb); }
:root[data-theme="oinventory"] .fmp-margin { background: linear-gradient(135deg,var(--fm-primary-50,#f3eefe),#fff); border: 1px solid var(--fm-primary-100,#e4dcfb); }
:root[data-theme="oinventory"] .fmp-onhand { background: linear-gradient(135deg,#3b1585,#6d28d9); }
:root[data-theme="oinventory"] .fm-order-row-nc:hover { background: var(--fm-primary-50,#f3eefe); }
:root[data-theme="oinventory"] .fmp-slider { background: #cbd5e1; }
:root[data-theme="oinventory"] .fmp-slider::after { background: #fff; }
:root[data-theme="oinventory"] .fmp-switch input:checked~.fmp-slider { background: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-switch input:focus-visible~.fmp-slider { outline: 3px solid rgba(166, 38, 201,.5); }
:root[data-theme="oinventory"] .fmp-thumb:hover { border-color: var(--fm-accent,#a626c9); }
:root[data-theme="oinventory"] .fmp-thumb.is-cover { border-color: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-cover { background: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-add { border: 2px dashed var(--fm-primary-100,#e4dcfb); background: var(--fm-primary-50,#f3eefe); color: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-add:hover { border-color: var(--fm-accent,#a626c9); }
:root[data-theme="oinventory"] .fmp-tip { background: var(--fm-primary-50,#f3eefe); border-color: var(--fm-primary-100,#e4dcfb); }
:root[data-theme="oinventory"] .fmp-subtitle i { color: var(--fm-primary,#6d28d9); }
:root[data-theme="oinventory"] .fmp-newcat { background: var(--fm-primary-50, #f3eefe); border: 1px solid var(--fm-primary-100, #e4dcfb); }
:root[data-theme="oinventory"] .fmp-margin-bar i { background: #94a3b8; }
:root[data-theme="oinventory"] .fmp-margin.tone-good .fmp-margin-bar i { background: #22c55e; }
:root[data-theme="oinventory"] .fmp-margin.tone-ok { background: linear-gradient(135deg, #f6efff, #fff); }
:root[data-theme="oinventory"] .fmp-margin.tone-ok .fmp-margin-bar i { background: #a626c9; }
:root[data-theme="oinventory"] .fmp-margin.tone-thin .fmp-margin-bar i { background: #f59e0b; }
:root[data-theme="oinventory"] .fmp-margin.tone-neg .fmp-margin-bar i { background: #ef4444; }
:root[data-theme="oinventory"] .fmp-tools summary { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-pace { background: var(--fm-primary-50, #f3eefe); border: 1px solid var(--fm-primary-100, #e4dcfb); }
:root[data-theme="oinventory"] .fmp-drop.is-over .fmp-dropzone { border-color: var(--fm-accent, #a626c9); background: #ebdffb; }
:root[data-theme="oinventory"] .fmp-gallery .fmp-thumb.is-cover { border-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-gallery .fmp-thumb.is-target { box-shadow: 0 0 0 3px var(--fm-accent, #a626c9); }
:root[data-theme="oinventory"] .fmp-thumb-star { background: rgba(15, 23, 42, .7); }
:root[data-theme="oinventory"] .fmp-thumb.is-cover .fmp-thumb-star { background: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-thumb.is-uploading::after { border-top-color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-dropzone { border: 2px dashed var(--fm-primary-100, #e4dcfb); background: var(--fm-primary-50, #f3eefe); color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-dropzone:hover { border-color: var(--fm-accent, #a626c9); }
:root[data-theme="oinventory"] .fmp-pv-tile-price { color: var(--fm-primary, #6d28d9); }
:root[data-theme="oinventory"] .fmp-danger .fmp-card-title i { color: var(--fm-danger, #b91c1c); }


