/* ---- copied from FF client-management-dashboard.html line 17 ---- */

.section .tab-group { position: static !important; }
.section > div:first-child { position: static !important; }
input[type="number"] { text-align: left !important; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
:root.dark {
}
/* Dark mode: force table cell text to use theme color */
:root.dark .table td,
:root.dark .data-table td,
:root.dark #invoices-table td,
:root.dark #ff-income-tbody td,
:root.dark #ff-outgoing-tbody td,
:root.dark #ff-peter-reimb-tbody td,
:root.dark #ff-pnl-tbody td {
color: var(--text-primary);
}
:root.dark .table td a[style*="color:#334155"],
:root.dark #invoices-table a[style*="color:#334155"] {
color: var(--text-primary) !important;
}
:root.dark svg[style*="color:#64748b"] {
color: var(--text-secondary) !important;
}
:root.dark .status-badge[style*="background: #e8f5e9"] {
background: #065f46 !important;
color: #6ee7b7 !important;
}
:root.dark .status-badge[style*="background: #e3f2fd"] {
background: #1e3a5f !important;
color: #93c5fd !important;
}
:root.dark .status-badge[style*="background: #fff8e1"] {
background: #78350f !important;
color: #fcd34d !important;
}
:root.dark #invoices-table td span[style*="color:#2e7d32"] {
color: #6ee7b7 !important;
}
:root.dark #invoices-table td span[style*="color:#1565c0"] {
color: #93c5fd !important;
}
:root.dark #invoices-table td svg[stroke="#2e7d32"] {
stroke: #6ee7b7;
}
:root.dark #invoices-table td svg[stroke="#1565c0"] {
stroke: #93c5fd;
}
:root.dark span[style*="color:#6b7280"] {
color: var(--text-secondary) !important;
}
:root.dark span[style*="background:#f3f4f6"][style*="color:#6b7280"] {
background: var(--bg-hover) !important;
color: var(--text-secondary) !important;
}
:root.dark td[style*="color:#22c55e"] { color: #4ade80 !important; }
:root.dark td[style*="color:#ef4444"] { color: #f87171 !important; }
:root.dark td[style*="color:#f59e0b"] { color: #fbbf24 !important; }
:root.dark .card[style*="border-top"] div[style*="color:var(--text-muted)"] { color: var(--text-muted); }
:root.dark .alert-row.alert-danger { background: #3b1a1a; color: #fca5a5; border-color: #7f1d1d; }
:root.dark .alert-row.alert-warning { background: #3b2f1a; color: #fcd34d; border-color: #78350f; }
:root.dark .alert-row.alert-success { background: #1a3b2a; color: #6ee7b7; border-color: #065f46; }
:root.dark .alert-row.alert-info { background: #1a2a3b; color: #93c5fd; border-color: #1e3a5f; }
:root.dark .btn { background: #4a4a4a; color: #f9fafb; }
:root.dark .btn:hover { opacity: 0.9; }
:root.dark .btn-success { background: var(--success); color: #fff; }
:root.dark .btn-danger { background: var(--danger); color: #fff; }
:root.dark .btn-sm { color: #f9fafb; }
:root.dark select, :root.dark input[type="text"], :root.dark input[type="number"], :root.dark input[type="date"], :root.dark textarea {
background: #3a3a3a; color: #f9fafb; border-color: #4a4a4a;
}
:root.dark .client-selector { background: var(--bg-card); }
:root.dark .client-selector select { background: #3a3a3a; color: #f9fafb; border-color: #4a4a4a; }
:root.dark .draft-banner { background: #78350f; color: #fcd34d; }
:root.dark .status-paused { background: #78350f; color: #fbbf24; }
:root.dark .status-inactive { background: #7f1d1d; color: #fca5a5; }
:root.dark .metric-change.down { background: #3b1a1a; }
:root.dark .metric-change.up { background: #1a3b2a; }
:root.dark .stage-step.completed { background: #1a3b2a; border-color: var(--success); color: var(--success); }
:root.dark .stage-step.current { background: #1a2a3b; border-color: var(--info); color: var(--info); }
:root.dark .stage-step.pending { background: var(--bg-card); }
:root.dark .category-badge-bundle { background: #1e3a5f !important; color: #93c5fd !important; }
:root.dark .category-badge-product { background: #3a3a3a !important; color: #d1d5db !important; }
:root.dark .category-badge-packaging { background: #831843 !important; color: #f9a8d4 !important; }
.export-btn-group { display: inline-flex; gap: 4px; margin-left: 8px; }
.export-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 11px; font-weight: 500; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-family: Inter, sans-serif; transition: all 0.15s; white-space: nowrap; }
.export-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent); }
.export-btn svg { flex-shrink: 0; }
:root.dark .export-btn { background: #3a3a3a; color: #d1d5db; border-color: #4a4a4a; }
:root.dark .export-btn:hover { background: #4a4a4a; color: #f9fafb; border-color: var(--accent); }
.missing-data-card {
display: flex;
align-items: flex-start;
gap: 14px;
padding: 16px 18px;
background: var(--bg-card);
border: 1px solid var(--border);
border-left: 4px solid var(--warning);
border-radius: var(--radius);
box-shadow: var(--shadow);
transition: box-shadow 0.15s ease;
}
.missing-data-card:hover { box-shadow: var(--shadow-hover); }
.missing-data-card .mda-icon { flex-shrink: 0; margin-top: 2px; }
.missing-data-card .mda-body { flex: 1; min-width: 0; }
.missing-data-card .mda-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.missing-data-card .mda-link {
display: inline-flex; align-items: center; gap: 5px;
font-size: 12px; font-weight: 600; color: var(--warning);
cursor: pointer; text-decoration: none; border: none; background: none; padding: 0;
}
.missing-data-card .mda-link:hover { text-decoration: underline; }
:root.dark .missing-data-card { border-left-color: #fbbf24; }
:root.dark .missing-data-card .mda-link { color: #fbbf24; }
.sh-item {
display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
background: var(--bg-body); min-width: 0;
}
.sh-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.sh-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.sh-dot {
width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
margin-bottom: 2px;
}
.sh-dot-green { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.4); }
.sh-dot-red { background: #ef4444; box-shadow: 0 0 4px rgba(239,68,68,0.4); }
.sh-dot-yellow { background: #f59e0b; box-shadow: 0 0 4px rgba(245,158,11,0.4); }
.sh-dot-neutral { background: var(--text-muted); opacity: 0.4; }
:root.dark .sh-item { background: var(--bg-secondary); }
.table td, .data-table td, #crm-table td, #crm-table-body td, .peter-table td {
color: var(--text-primary) !important;
font-size: 13px;
white-space: nowrap;
}
.table th, .data-table th {
position: static !important;
white-space: nowrap;
}
#crm-table td[style*="color:var(--success)"], #crm-table td[style*="color:var(--danger)"],
#crm-table td[style*="color: var(--success)"], #crm-table td[style*="color: var(--danger)"] {
color: inherit !important;
}
#crm-table select, #crm-table-body select, .peter-table select {
border: 1px solid var(--border);
border-radius: 999px;
padding: 6px 10px;
font-family: 'Inter', sans-serif;
font-size: 13px;
background: var(--bg-card) url("data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>") no-repeat right 8px center;
color: var(--text-primary);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-right: 28px;
cursor: pointer;
}
#crm-table input[type="date"], #crm-table-body input[type="date"], .peter-table input[type="date"] {
border: 1px solid var(--border);
border-radius: 8px;
padding: 6px 10px;
font-family: 'Inter', sans-serif;
font-size: 13px;
background: var(--bg-card);
color: var(--text-primary);
cursor: pointer;
}
.inv-pill { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; display: inline-block; white-space: nowrap; }
.inv-pill-healthy { background: #dcfce7; color: #166534; }
.inv-pill-low { background: #fef3c7; color: #92400e; }

/* FFUI3 item7: FC-style Fulfilment pill + clean thumbnail placeholder */
select.ff-fs-pill { -webkit-appearance:none; appearance:none; border:none; border-radius:999px; padding:4px 26px 4px 12px; font-size:12px; font-weight:500; line-height:1.4; font-family:inherit; cursor:pointer; min-height:28px; background-repeat:no-repeat; background-position:right 10px center; background-size:10px 10px; background-image:url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2712%27%20height%3D%2712%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%236b7280%27%20stroke-width%3D%272.5%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpolyline%20points%3D%276%209%2012%2015%2018%209%27%2F%3E%3C%2Fsvg%3E); }
select.ff-fs-pill.ff-fs-live { background-color:#DCFCE7; color:#166534; }
select.ff-fs-pill.ff-fs-trans { background-color:#FEF3C7; color:#92400E; }
:root.dark select.ff-fs-pill.ff-fs-live { background-color:rgba(16,185,129,.15); color:#6EE7B7; }
:root.dark select.ff-fs-pill.ff-fs-trans { background-color:rgba(245,158,11,.15); color:#FCD34D; }
select.ff-fs-pill:focus-visible { outline:2px solid #1a1a1a; outline-offset:2px; }
#products-table td > div[style*="bg-secondary"], #products-table td > div[title="No image"] { background:#F3F4F6 !important; border-color:#E5E7EB !important; }
:root.dark #products-table td > div[style*="bg-secondary"] { background:#2a2a2a !important; border-color:#404040 !important; }
.inv-pill-critical { background: #fee2e2; color: #991b1b; }
.inv-pill-void { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
:root.dark .inv-pill-void { background: #3a3a3a; color: #9ca3af; text-decoration: line-through; }
.inv-pill-oos { background: #7f1d1d; color: #fecaca; }
.inv-pill-draft { background: var(--bg-hover); color: var(--text-muted); }
.inv-pill-submitted { background: #dbeafe; color: #1e40af; }
.inv-pill-confirmed { background: #fed7aa; color: #9a3412; }
.inv-pill-transit { background: #e9d5ff; color: #6b21a8; }
.inv-pill-delivered { background: #dcfce7; color: #166534; }
.inv-pill-cancelled { background: #fee2e2; color: #991b1b; }
:root.dark .inv-pill-healthy { background: #065f46; color: #6ee7b7; }
:root.dark .inv-pill-low { background: #78350f; color: #fcd34d; }
:root.dark .inv-pill-critical { background: #7f1d1d; color: #fca5a5; }
:root.dark .inv-pill-oos { background: #450a0a; color: #fca5a5; }
:root.dark .inv-pill-draft { background: #3a3a3a; color: #9ca3af; }
:root.dark .inv-pill-submitted { background: #1e3a5f; color: #93c5fd; }
:root.dark .inv-pill-confirmed { background: #7c2d12; color: #fdba74; }
:root.dark .inv-pill-transit { background: #4c1d95; color: #c4b5fd; }
:root.dark .inv-pill-delivered { background: #065f46; color: #6ee7b7; }
:root.dark .inv-pill-cancelled { background: #7f1d1d; color: #fca5a5; }
.inv-bundle-row { background: transparent; }
:root.dark .inv-bundle-row { background: transparent; }
.inv-client-header { background: var(--bg-card); cursor: pointer; }
.inv-client-header:hover { background: var(--bg-hover); }
.inv-client-header td { font-weight: 600; padding: 10px 12px !important; }
.inv-totals-row { font-weight: 600; border-top: 2px solid var(--border); }
.inv-totals-row td { padding: 8px 12px !important; }
.inv-product-img { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; border: 1px solid var(--border); }
.discovery-brand-row { background: var(--bg-card); font-weight: 600; cursor: pointer; }
.discovery-brand-row:hover { background: var(--bg-card); }
.discovery-brand-row td { padding: 10px 12px; }
.discovery-toggle { cursor: pointer; display: inline-block; transition: transform 0.2s ease; user-select: none; font-size: 12px; color: var(--text-muted); width: 20px; text-align: center; }
.discovery-toggle.expanded { transform: rotate(90deg); }
.discovery-product-row td { padding: 6px 12px; font-size: 12px; text-align: left; }
.discovery-product-row:hover { background: transparent !important; }
:root.dark .discovery-brand-row { background: var(--bg-card); }
:root.dark .discovery-brand-row:hover { background: var(--bg-card); }
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
background: var(--bg-body);
color: var(--text-primary);
height: 100vh;
display: flex;
font-size: 14px;
overflow: hidden;
line-height: 1.5;
}
/* FFUI3 item8 (msg2092): removed the global `* { transition: bg/color/border 0.3s }` - it made every
   element (thousands of table cells) animate on theme toggle, which is why dark mode was extremely slow.
   Theme switches are now instant; .ff-theme-switching kills any remaining per-component transitions for one frame. */
html.ff-theme-switching, html.ff-theme-switching *, html.ff-theme-switching *::before, html.ff-theme-switching *::after { transition: none !important; animation-duration: 0s !important; }
.sidebar::-webkit-scrollbar { display:none; }
.sidebar {
width: var(--sidebar-width);
background: var(--bg-sidebar);
scrollbar-width: none;
-ms-overflow-style: none;
border-right: 1px solid var(--border-light);
display: flex;
flex-direction: column;
overflow-y: auto;
position: relative;
transition: width 0.22s ease;
}
:root.dark .sidebar { background: var(--bg-light); }
/* Sidebar logo - gold pattern from admin.freedomclub.com (Austin msg 37688/37799). */
.sidebar .logo, .sidebar-logo { padding: 24px 20px 32px 20px; text-align: left; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--header-height); box-sizing: border-box; }
22px168px; transition: opacity 0.18s ease; }
.sidebar-logo .ff-sidebar-logo-mark { display: none; width: 36px; height: 36px; flex-shrink: 0; }
/* Dark-mode logo swap (Austin msg65176 item 7): black logo in light mode, white logo in dark mode. */
.ff-logo-light { display: block; }
.ff-logo-dark { display: none; }
:root.dark .ff-logo-light { display: none !important; }
:root.dark .ff-logo-dark { display: block !important; }
/* Sidebar nav fills available height so version badge is pinned to bottom (FC gold, FC line 470). */
.sidebar-nav { flex: 1; padding: 0 0 0; }
/* Nav sections - collapsible groupings (Services/Business/System). */
.nav-section { margin-bottom: 0; }
.nav-section-header { padding: 10px 16px; margin: 2px 12px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-secondary); cursor: pointer; user-select: none; transition: all 0.2s; }
.nav-section-header:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-section-header > svg:first-child { width: 16px; height: 16px; flex-shrink: 0; }
.nav-section-header .nav-label { flex: 1; }
.nav-section-header .chevron { width: 14px; height: 14px; flex-shrink: 0; transition: transform 0.2s ease; opacity: 0.7; margin-left: auto; }
.nav-section.collapsed .chevron { transform: rotate(-90deg); }
.nav-section-body { display: flex; flex-direction: column; max-height: 800px; overflow: hidden; transition: max-height 0.25s ease, opacity 0.2s ease; opacity: 1; }
.nav-section.collapsed .nav-section-body { max-height: 0; opacity: 0; }
.nav-section-body .nav-item { padding: 8px 16px 8px 44px; margin: 1px 12px; font-size: 13px; gap: 0; }
.nav-section-body .nav-item > svg { display: none; }
/* Collapsed sidebar state - icons only. */
.sidebar.collapsed { width: var(--sidebar-width-collapsed); }
.sidebar.collapsed .logo svg, .sidebar.collapsed .sidebar-logo svg.ff-sidebar-logo-svg { display: none; }
.sidebar.collapsed .sidebar-logo .ff-sidebar-logo-mark { display: block; margin: 0 auto; }
.sidebar.collapsed .logo, .sidebar.collapsed .sidebar-logo { padding: 18px 0 24px; justify-content: center; }
.sidebar.collapsed .nav-section-header { padding: 10px 0; margin: 2px 8px; justify-content: center; font-size: 0; gap: 0; }
.sidebar.collapsed .nav-section-header .chevron,
.sidebar.collapsed .nav-section-header .nav-label { display: none; }
.sidebar.collapsed .nav-section-header > svg:first-child { width: 18px; height: 18px; }
.sidebar.collapsed .nav-section-body { display: none; }
.sidebar.collapsed .nav-item { padding: 10px 0; margin: 2px 8px; justify-content: center; font-size: 0; line-height: 0; gap: 0; }
.sidebar.collapsed .nav-item svg { width: 18px; height: 18px; display: block !important; }
.sidebar.collapsed .nav-section-label { padding: 8px 12px 2px; font-size: 0; height: 14px; position: relative; }
.sidebar.collapsed .nav-section-label::after { content: ''; display: block; position: absolute; left: 50%; transform: translateX(-50%); top: 6px; width: 24px; height: 1px; background: var(--border-light); }
.sidebar.collapsed .sidebar-version-container { display: none; }
/* m2246 (Austin msg 2222): collapsed sidebar shows every tab icon (not just section headers) + FF three-square mark */
.sidebar.collapsed .sidebar-logo img.ff-sidebar-logo-svg { display: none !important; }
.sidebar.collapsed .sidebar-logo .ff-sidebar-logo-mark { display: block !important; width: 32px; height: 32px; object-fit: contain; }
/* m2261logo (Austin msg 2261): expanded = logo only, no icon; collapsed = icon only */
.sidebar:not(.collapsed) .sidebar-logo .ff-sidebar-logo-mark { display: none !important; }
.sidebar.collapsed .sidebar-logo .ff-sidebar-logo-svg { display: none !important; }
.sidebar.collapsed .nav-section-header { display: none !important; }
.sidebar.collapsed .nav-section-body, .sidebar.collapsed .nav-section.collapsed .nav-section-body { display: block !important; max-height: none !important; opacity: 1 !important; overflow: visible !important; }
.sidebar.collapsed .nav-section + .nav-section { border-top: 1px solid var(--border-light, #eef0f3); margin-top: 6px; padding-top: 6px; }
.sidebar.collapsed .nav-item { min-height: 40px; }
.nav-item[data-archived] { display: none !important; }
/* m2246 (Austin msg 2222): icon dots (exclamation, info, eye) are 0.01px lines; round caps make them visible */
svg[stroke], svg [stroke], svg line, svg polyline, svg path { stroke-linecap: round; stroke-linejoin: round; }
/* Main content collapse toggle - lives next to page title, NOT in sidebar. */
.main-collapse-btn { background: none; border: none; padding: 6px; border-radius: 6px; cursor: pointer; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; flex-shrink: 0; margin-left: -6px; }
.main-collapse-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.main-collapse-btn svg { width: 16px; height: 16px; }
/* Page header - gold pattern: 60px height + full-width 1px #eef0f3 divider. */
.page-header { padding: 10px 40px 10px 40px; margin: 0 -40px; min-height: var(--header-height); height: var(--header-height); box-sizing: border-box; background: var(--bg-light); border-bottom: 1px solid #eef0f3; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; position: sticky; top: 0; z-index: 10; }
.page-header h2 { font-size: 14px; font-weight: 500; color: var(--text-secondary); margin: 0; line-height: 1.2; }
:root.dark .page-header { background: var(--bg-body); border-bottom-color: var(--border); }
/* M2483V_PH: .page-header bleeds -40px but tablet/mobile .content padding is 20/12px -> sideways page scroll */
@media screen and (max-width:1023px){.page-header{margin:0 -20px;padding-left:20px;padding-right:20px}}
@media screen and (max-width:767px){.page-header{margin:0 -12px;padding-left:12px;padding-right:12px}}
.header-icon-btn { background: none; border: none; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; justify-content: center; transition: background-color 0.3s ease; overflow: visible; }
.header-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
/* refresh-spin-20260515 (Austin msg 38539) */
@keyframes refreshSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.header-icon-btn.spinning svg { animation: refreshSpin 0.7s linear infinite; transform-origin: 50% 50%; }

.hidden { display: none !important; }
.sidebar-version-container {
position: sticky;
bottom: 0;
left: 0;
right: 0;
z-index: 5;
pointer-events: none;
}
.sidebar-version-gradient {
height: 60px;
background: linear-gradient(to bottom, transparent, var(--bg-sidebar) 70%);
}
.sidebar-version-badge {
background: var(--bg-sidebar);
padding: 8px 20px 12px;
font-size: 11px;
color: var(--text-muted);
font-weight: 500;
}

/* FFUI3 item2: sidebar user profile block */
.sidebar-version-container { pointer-events: auto; }
.sidebar-version-gradient { pointer-events: none; height: 24px; }
.ff-sb-user { display:flex; align-items:center; gap:10px; background: var(--bg-sidebar); padding: 10px 12px 14px 16px; border-top: 1px solid var(--border-light); }
:root.dark .ff-sb-user { background: var(--bg-light); }
.ff-sb-avatar { width:32px; height:32px; min-width:32px; border-radius:50%; background:#1a1a1a; color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600; letter-spacing:0.3px; }
:root.dark .ff-sb-avatar { background:#fff; color:#1a1a1a; }
.ff-sb-meta { flex:1; min-width:0; line-height:1.25; }
.ff-sb-name { font-size:13px; font-weight:600; color: var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ff-sb-sub { font-size:11px; color: var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ff-sb-logout { background:none; border:none; color: var(--text-muted); cursor:pointer; width:44px; height:44px; margin-right:-10px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.ff-sb-logout:hover { background: var(--bg-hover); color: var(--text-primary); }
/* m2246 (Austin msg 2222): FC dash profile chip, rounded rectangle, opens profile lightbox */
.ff-sb-user { padding: 10px 12px 14px 12px; gap: 6px; }
.ff-sb-chip { flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:6px 10px 6px 6px; border-radius:12px; background: var(--bg-hover,#f3f4f6); border:1px solid var(--border,#e5e7eb); cursor:pointer; transition: background-color .15s; }
.ff-sb-chip:hover { background: var(--border-light,#e5e7eb); }
.ff-sb-chip .ff-sb-avatar { width:30px; height:30px; min-width:30px; overflow:hidden; }
:root.dark .ff-sb-chip { background:#313337; border-color:#3a3b40; }
.ff-sb-logout { margin-right:-6px; }
.sidebar.collapsed .ff-sb-user { display:none; }
.ff-plb-ov { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:10050; display:flex; align-items:center; justify-content:center; padding:20px; }
.ff-plb { background:var(--bg-card,#fff); border-radius:16px; width:min(420px,100%); box-shadow:0 20px 50px rgba(0,0,0,.2); overflow:hidden; }
.ff-plb-h { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); }
.ff-plb-h h3 { margin:0; font-size:15px; font-weight:600; }
.ff-plb-x { width:44px; height:44px; border:none; background:none; font-size:22px; color:var(--text-muted); cursor:pointer; border-radius:999px; margin-right:-10px; }
.ff-plb-b { padding:24px 20px; text-align:center; }
.ff-plb-av { width:96px; height:96px; border-radius:999px; background:#111; color:#fff; margin:0 auto 14px; display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:700; overflow:hidden; }
.ff-plb-av img { width:100%; height:100%; object-fit:cover; }
.ff-plb-btns { display:flex; gap:8px; justify-content:center; margin-top:18px; flex-wrap:wrap; }
.ff-plb-btns button { min-height:44px; padding:0 18px; border-radius:999px; font-size:13px; font-weight:500; cursor:pointer; border:1px solid var(--border); background:var(--bg-card,#fff); color:var(--text-primary); }
.ff-plb-btns button.pri { background:#111; color:#fff; border-color:#111; }
/* m2246 (Austin msg 2223): Settings subtabs share one style: 14px/600 section headers, pill selects/inputs/buttons */
#settings .tab-content h2, #settings .tab-content h3, #settings .tab-content h4, #settings [id^=settings-] h2, #settings [id^=settings-] h3 { font-size:14px !important; font-weight:600 !important; color:var(--text-primary); letter-spacing:0; }
#settings [id^=settings-] select, #settings [id^=settings-] input[type=text], #settings [id^=settings-] input[type=search], #settings [id^=settings-] input[type=date], #settings [id^=settings-] input[type=email] { border-radius:999px !important; min-height:40px; padding:8px 14px; }
#settings [id^=settings-] .btn, #settings [id^=settings-] button.btn { border-radius:999px !important; min-height:40px; }
.logo {
padding: 28px 10px 22px 16px;
text-align: left;
}
.logo svg { display: block; width: 100%; height: auto; }
.logo h1 { font-size: 18px; font-weight: 700; margin-bottom: 0; color: var(--text-primary); letter-spacing: -0.3px; }
.logo .subtitle { font-size: 12px; color: var(--text-secondary); font-weight: 400; }
.nav-section-label {
padding: 18px 24px 6px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-muted);
}
.nav-item {
padding: 10px 16px;
cursor: pointer;
transition: all 0.15s ease;
display: flex;
align-items: center;
gap: 10px;
font-weight: 500;
color: var(--text-secondary);
border-radius: 10px;
margin: 2px 12px;
font-size: 14px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: #ebebeb; color: var(--text-primary); font-weight: 600; }
/* m2223: no blue focus box on sidebar clicks */ .nav-item, .nav-item:focus, .nav-item:focus-visible, .nav-item:active, .nav-section-header:focus, .nav-section-header:focus-visible { outline: none !important; box-shadow: none !important; -webkit-tap-highlight-color: transparent; }
:root.dark .nav-item.active { background: #2b2b2b; color: #ffffff; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; background: var(--bg-body) !important; }
.header {
padding: 24px 0 16px;
background: var(--bg-light);
border-bottom: 1px solid var(--border-light);
display: flex;
justify-content: space-between;
align-items: center;
}
.header h2 { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.draft-banner {
background: #fff3cd;
color: #856404;
padding: 6px 14px;
border-radius: 6px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
#dark-mode-toggle:hover, #global-refresh-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.client-hover-card {
position: fixed;
z-index: 1000;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px;
min-width: 300px;
box-shadow: 0 8px 32px rgba(0,0,0,0.12);
pointer-events: none;
opacity: 0;
transform: translateY(10px);
transition: opacity 0.2s ease, transform 0.2s ease;
}
.client-hover-card.visible {
opacity: 1;
transform: translateY(0);
}
.client-hover-card h4 {
margin: 0 0 12px 0;
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
}
.client-hover-card .hover-metric {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-size: 13px;
}
.client-hover-card .hover-metric-label {
color: var(--text-secondary);
}
.client-hover-card .hover-metric-value {
color: var(--text-primary);
font-weight: 600;
}
.client-hover-card .hover-stages {
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border-light);
}
.client-hover-card .hover-stages-title {
font-size: 12px;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 6px;
}
.client-hover-card .hover-stage-item {
display: flex;
justify-content: space-between;
font-size: 12px;
margin-bottom: 4px;
}
.content { flex: 1; padding: 0 40px 24px; overflow-y: auto; overflow-x: hidden; background: var(--bg-light); min-width: 0; max-width: 100%; min-height: 0; }
.welcome-section { margin-bottom: 24px; }
.welcome-text { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; letter-spacing: -0.5px; }
.welcome-subtitle { font-size: 15px; color: var(--text-muted); font-weight: 400; }
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
margin-bottom: 24px;
}
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px;
transition: all 0.2s ease;
box-shadow: var(--shadow);
}
.card:hover { box-shadow: none; }
.card h3 {
color: var(--text-secondary);
margin-bottom: 14px;
font-size: 13px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
letter-spacing: 0.01em;
}
.metric { font-size: 30px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1; letter-spacing: -0.5px; }
.metric-label { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

/* FFUI3 item6 (msg2092): KPI subtext small + consistent on every Overview card */
#dashboard .metrics-grid .card .metric-label { font-size: 12px !important; line-height: 1.35 !important; color: var(--text-muted) !important; font-weight: 400 !important; margin-bottom: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-change { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; }
.metric-change.up { color: var(--accent-dark); background: var(--accent-light); }
.metric-change.down { color: var(--danger); background: #fef2f2; }
.metric-change.flat { color: var(--text-muted); background: var(--bg-hover); }
.btn {
background: var(--primary); color: white; border: none; padding: 10px 20px;
border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px;
transition: all 0.15s ease; margin-right: 6px;
display: inline-flex; align-items: center; gap: 6px;
}
.btn svg, .btn img { vertical-align: middle; flex-shrink: 0; }
.btn:hover { opacity: 0.85; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-success { background: var(--success); }
.btn-danger { background: var(--danger); }
.section { display: none; max-width: 100%; box-sizing: border-box; min-width: 0; padding: 0 0 24px 0; margin-top: 0; background: var(--bg-primary, #fff); }
.section.active { display: block; }
.section .card { min-width: 0; overflow: hidden; word-break: break-word; overflow-wrap: break-word; }
/* Fix 1: Supplier product name ellipsis */
#supp-products-table td:nth-child(4) { max-width: 250px; overflow: hidden; white-space: nowrap; }
#supp-mapping-table td:nth-child(3) { max-width: 250px; overflow: hidden; white-space: nowrap; }
/* Fix 1: Supplier tab scrolling */
#suppliers .tab-content { overflow-y: auto; max-height: calc(100vh - 180px); }
/* Fix 3: Replacements tab - reduce inner spacing */
#returns > div { padding-top: 0 !important; }
#returns .welcome-section { margin-bottom: 4px; }
/* Fix 4: PO Lifecycle tab compact spacing */
#po-lifecycle > .card:first-child { margin-bottom: 10px; }
#po-lifecycle #po-alerts-panel { margin-bottom: 10px; }
#po-lifecycle #po-table-container { margin-top: 0; }
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.data-table th { background: #FFFFFF; color: #374151; font-weight: 500; font-size: 14px; text-transform: none; letter-spacing: normal; border-bottom: 1px solid #EAEAEA; font-variant-numeric: tabular-nums; }
.data-table tr:hover { background: transparent; }
/* Task 1: Ensure no sticky table headers */
thead, thead th, .table thead th, .data-table thead th { position: static !important; }

.table-container { overflow-x: auto; width: 100%; scrollbar-width: none; -ms-overflow-style: none; }
.table-container::-webkit-scrollbar { display: none; height: 0; width: 0; }
.table {
width: 100%; border-collapse: collapse; margin-top: 15px;
background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
}
.table th, .table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.table th { background: #FFFFFF; color: #374151; font-weight: 500; font-size: 14px; text-transform: none; letter-spacing: normal; position: static; border-bottom: 1px solid #EAEAEA; font-variant-numeric: tabular-nums; }
.table tr:hover { background: transparent; }
.table select, #crm-table-body select, .discovery-brand-row select, .crm-table select {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
font-size: 13px;
border: 1px solid var(--border);
border-radius: 999px;
padding: 6px 10px;
background: var(--bg-card);
color: var(--text-primary, var(--text));
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 8px center;
padding-right: 28px;
}
.status-badge { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status-active { background: var(--accent-light); color: var(--accent-dark); }
.status-paused { background: #fef3c7; color: #d97706; }
.status-inactive { background: #fef2f2; color: var(--danger); }
.status-archived { background: var(--bg-hover); color: var(--text-muted); }
.info-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.info-card h4 { margin-bottom: 12px; color: var(--text-primary); font-size: 15px; font-weight: 600; }
.info-item { margin-bottom: 8px; color: var(--text-secondary); font-size: 13px; }
.info-item strong { color: var(--text-primary); }
.engine-card {
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px;
background: var(--bg-card);
transition: all 0.15s;
}
.engine-card:hover { box-shadow: var(--shadow-hover); }
.engine-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text-primary); }
.engine-status { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 8px; }
.engine-dot { width: 8px; height: 8px; border-radius: 50%; }
.engine-dot.green { background: var(--success); }
.engine-dot.yellow { background: var(--warning); }
.engine-dot.red { background: var(--danger); }
.engine-dot.gray { background: #ccc; }
.mini-metric { font-size: 22px; font-weight: 700; margin: 4px 0; }
.mini-label { font-size: 11px; color: var(--text-muted); }
.alert-row {
display: flex; align-items: flex-start; gap: 12px;
padding: 14px 16px; border-radius: 10px; margin-bottom: 8px; font-size: 13px; line-height: 1.5;
}
.alert-row.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-row.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-row.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-row.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-row strong { font-weight: 400; }
.progress-bar { width: 100%; height: 6px; background: var(--border-light); border-radius: 3px; margin: 8px 0; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.3s ease; }
.lifecycle-stage {
display: flex; align-items: center; gap: 0; margin: 15px 0;
}
.stage-step {
flex: 1; text-align: center; padding: 10px 8px;
font-size: 11px; font-weight: 600; position: relative;
border: 2px solid var(--border); background: var(--bg-light);
}
.stage-step:first-child { border-radius: 8px 0 0 8px; }
.stage-step:last-child { border-radius: 0 8px 8px 0; }
.stage-step.completed { background: #e8f5e9; border-color: var(--success); color: var(--success); }
.stage-step.current { background: #e3f2fd; border-color: var(--info); color: var(--info); }
.stage-step.pending { background: var(--bg-light); border-color: var(--border); color: var(--text-muted); }
.client-selector {
margin-bottom: 20px; padding: 12px;
background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border);
}
.client-selector select {
padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px;
background: var(--bg-light); color: var(--text-primary); font-size: 14px;
}
.loading { text-align: center; padding: 40px; color: var(--text-secondary); }
.current-version { background: var(--bg-card); border: 2px solid var(--success); border-radius: 12px; padding: 22px; margin-bottom: 25px; }
.current-version h3 { color: var(--text-primary); font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.version-status { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.version-date { color: var(--text-secondary); font-size: 13px; }
.version-description h4 { color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.version-description p { color: var(--text-secondary); line-height: 1.5; }
.version-history h3 { color: var(--text-primary); font-size: 16px; font-weight: 600; margin-bottom: 18px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.changelog-entry-expandable { margin-bottom:12px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:0; 
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 10px;
margin-bottom: 10px;
overflow: hidden;
}
.changelog-entry-expandable:last-child { margin-bottom: 0; }
.changelog-summary {
display:flex;align-items:center;gap:10px;padding:12px 16px;cursor:pointer;font-size:14px;font-weight:500;color:var(--text-primary);border-radius:10px;transition:background 0.15s;}
.changelog-summary:hover {
background: var(--bg-hover);
}
.changelog-arrow {
font-size: 10px;
color: var(--text-muted);
width: 14px;
text-align: center;
transition: transform 0.2s ease;
display: inline-block;
}
.changelog-entry-expandable.expanded .changelog-arrow {
transform: rotate(90deg);
}
.version-title {
flex: 1;
font-weight: 600;
color: var(--text-primary);
}
.changelog-summary .version-date {
font-size: 12px;
color: var(--text-muted);
margin-right: 8px;
}
.changelog-details {
display: none;
padding: 4px 16px 16px 40px;
border-top: 1px solid var(--border-light);
}
.changelog-entry-expandable.expanded .changelog-details {
display: block;
}
.changelog-details ul {
margin: 8px 0 0 0;
padding-left: 16px;
}
.changelog-details li {
color: var(--text-secondary);
font-size: 13px;
line-height: 1.6;
margin-bottom: 5px;
}
.changelog-details li:last-child {
margin-bottom: 0;
}
.changelog-entry { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; padding: 14px 16px; }
.changelog-entry:last-child { margin-bottom: 0; }
.changelog-entry h4 { color: var(--text-primary); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.version-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.changelog-entry p { margin-bottom: 6px; color: var(--text-secondary); line-height: 1.5; font-size: 13px; }
.tab-group { display: flex; gap: 6px; align-items: center; border-bottom: none; margin-bottom: 20px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
.section h1 { margin-bottom: 4px; }
.section > .card-wrapper { margin-top: 8px; }
.tab-btn {
padding: 8px 16px; font-size: 13px; font-weight: 500; cursor: pointer;
border: 1px solid transparent; background: transparent; color: var(--text-primary);
border-radius: 18px; transition: all 0.15s;
}
/* Austin msg2067 (2026-09-27, supersedes msg65103): tab headers black, active = FC 2px underline (width from admin-components.css) */
.tab-btn.active { color: var(--text-primary); background: transparent; border-bottom-color: var(--text-primary); box-shadow: none; font-weight: 600; }
.tab-btn:hover { color: var(--text-primary); background: transparent; }
.tab-btn { white-space: nowrap; flex-shrink: 0; }
.tab-content { display: none; }
.tab-content.active { display: block !important; }
.agent-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1024px) { .agent-cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .agent-cards-grid { grid-template-columns: 1fr; } }
.agent-card {
background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
padding: 20px; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s;
display: flex; flex-direction: column; gap: 10px; position: relative;
}
.agent-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.agent-card-header { display: flex; align-items: center; gap: 12px; }
.agent-card-icon {
width: 44px; height: 44px; border-radius: 10px; background: var(--bg-body);
display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.agent-card-name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.agent-card-role { font-size: 12px; color: var(--accent); font-weight: 500; }
.agent-card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.agent-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.agent-card-status { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.agent-card-status .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.agent-card-freq { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.agent-card-detail {
display: none; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
font-size: 12px; color: var(--text-secondary); line-height: 1.6;
}
.agent-card-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agent-card-detail-grid > div > .detail-label { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.agent-card-detail-grid > div > .detail-value { font-size: 12px; color: var(--text-primary); }
.agent-card.expanded { box-shadow: var(--shadow-hover); }
.agent-card-expand-hint { font-size: 11px; color: var(--text-muted); text-align: center; padding-top: 4px; }
.editable-cell { cursor: text; transition: background 0.15s; }
.editable-cell:hover { background: var(--bg-hover); }
:root.dark .editable-cell:hover { background: #3a3a3a; }
.editable-cell[contenteditable="true"] { background: var(--bg-card); outline: 2px solid var(--info); border-radius: 4px; padding: 8px 10px; }
.activity-timeline { display: flex; flex-direction: column; gap: 0; }
.activity-item {
display: flex; align-items: flex-start; gap: 12px; padding: 12px 0;
border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
width: 32px; height: 32px; border-radius: 50%; display: flex;
align-items: center; justify-content: center; flex-shrink: 0;
font-size: 14px; color: white; margin-top: 2px;
}
.activity-icon.billing { background: var(--info); }
.activity-icon.package { background: var(--success); }
.activity-icon.arrow { background: var(--warning); }
.activity-icon.warning { background: var(--danger); }
.activity-icon.gear { background: var(--text-muted); }
.activity-content { flex: 1; }
.activity-description { color: var(--text-primary); font-size: 13px; line-height: 1.5; margin-bottom: 4px; }
.activity-timestamp { color: var(--text-muted); font-size: 11px; font-weight: 500; }
.hamburger-menu {
display: none;
background: none;
border: none;
cursor: pointer;
padding: 8px;
border-radius: 6px;
transition: background 0.15s;
}
.hamburger-menu:hover { background: var(--bg-hover); }
.hamburger-menu svg { stroke: var(--text-primary); }
@media screen and (max-width: 767px) {
body { font-size: 13px; }
.sidebar::-webkit-scrollbar { display:none; }
.sidebar {
position: fixed;
left: 0;
top: 0;
height: 100vh;
height: 100dvh;
width: var(--sidebar-width) !important;
max-width: 86vw;
z-index: 1000;
transform: translateX(-100%);
visibility: hidden;
transition: transform 0.3s ease, visibility 0s linear 0.3s;
box-shadow: none;
}
/* ffui 2026-09-27: was left:-240px on a 280px sidebar -> 40px peek over every page (P1-1). FC pattern: translateX(-100%). */
.sidebar.open { transform: translateX(0); visibility: visible; transition: transform 0.3s ease, visibility 0s; box-shadow: 2px 0 8px rgba(0,0,0,0.1); }
.sidebar.collapsed { width: var(--sidebar-width) !important; }
.sidebar-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
z-index: 999;
}
.sidebar-overlay.open { display: block; }
.header {
padding: 12px 16px;
position: relative;
}
.header h2 { font-size: 14px; }
.hamburger-menu { display: block; }
.content { padding: 0 12px 16px; }
.welcome-text { font-size: 20px; }
.welcome-subtitle { font-size: 13px; }
.metrics-grid {
grid-template-columns: 1fr;
gap: 12px;
margin-bottom: 20px;
}
.card { padding: 14px; border-radius: 10px; }
.card h3 { font-size: 12px; }
.metric { font-size: 20px !important; }
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { min-width: 600px; font-size: 12px; }
.table th, .table td { padding: 8px 6px; }
.data-table { min-width: 500px; font-size: 12px; }
.data-table th, .data-table td { padding: 8px 6px; }
#supp-grid, #ci-grid { grid-template-columns: 1fr !important; }
.supplier-compare { grid-template-columns: 1fr !important; }
.tab-group { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; padding-bottom: 4px; }
.tab-btn { flex-shrink: 0; padding: 8px 12px; font-size: 11px; }
.modal-content { width: 95% !important; margin: 5% auto !important; max-height: 90vh; overflow-y: auto; }
.activity-icon { width: 28px; height: 28px; font-size: 12px; }
.activity-description { font-size: 12px; }
.activity-timestamp { font-size: 10px; }
}
@media screen and (max-width: 374px) {
.content { padding: 0 8px 12px; }
.card { padding: 12px; }
.welcome-text { font-size: 18px; }
.tab-btn { padding: 6px 10px; font-size: 10px; }
}
@media screen and (min-width: 768px) and (max-width: 1023px) {
.metrics-grid { grid-template-columns: repeat(2, 1fr); }
.content { padding: 0 20px 20px; }
.data-table { font-size: 12px; }
.data-table th, .data-table td { padding: 10px 8px; }
}
@media screen and (max-width: 1023px) {
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#crm-table { min-width: 1400px; }
}
.client-totals-row td { background: var(--bg-card) !important; }
.peter-client-group-header td {
background: transparent;
font-weight: 600; font-size: 13px;
padding: 10px 12px 6px 12px;
border-top: 2px solid var(--border);
border-bottom: none;
color: var(--text-primary);
}
:root.dark .peter-client-group-header td { background: transparent; }
#peter-sm-table th { text-align: left; font-size: 14px; padding: 13px 16px; background: #FFFFFF; color: #374151; font-weight: 500; text-transform: none; letter-spacing: normal; border-bottom: 1px solid #EAEAEA; white-space: nowrap; font-variant-numeric: tabular-nums; }
#peter-sm-table td { text-align: left; font-size: 13px; padding: 10px 14px; color: var(--text-primary); border-bottom: 1px solid var(--border-light); }
#peter-sm-table tbody tr:hover { background: #FAFBFC; box-shadow: none; }
#peter-sourcing-table th { text-align: left; font-size: 14px; padding: 14px 20px; background: var(--bg-body); color: #374151; font-weight: 600; text-transform: none; letter-spacing: normal; border-bottom: 1px solid var(--border-light); }
#peter-sourcing-table td { text-align: left; font-size: 13px; padding: 10px 14px; color: var(--text-primary); border-bottom: 1px solid var(--border-light); white-space: nowrap; }
#peter-sourcing-table td:nth-child(2) { max-width: 220px; overflow: hidden; }
#crm-table td:nth-child(2), .inv-table td:nth-child(2), .supp-table td:nth-child(2) { max-width: 220px; overflow: hidden; }
#peter-sourcing-table th { white-space: nowrap; }
.peter-lang-toggle {
display: inline-flex;
align-items: center;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
padding: 2px;
font-family: 'Inter', sans-serif;
font-size: 12px;
font-weight: 500;
cursor: pointer;
user-select: none;
gap: 0;
}
.peter-lang-toggle .lang-opt {
padding: 4px 12px;
border-radius: 16px;
color: var(--text-muted);
transition: all 0.2s ease;
white-space: nowrap;
}
.peter-lang-toggle .lang-opt.active {
background: var(--accent);
color: #fff;
font-weight: 600;
}
.peter-lang-toggle .lang-opt:not(.active):hover {
color: var(--text-primary);
}
.peter-costopt-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.peter-costopt-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; }
.peter-costopt-card .card-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 6px; }
.peter-costopt-card .card-value { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.peter-costopt-card .card-value.green { color: var(--success); }
.peter-costopt-card .card-value.warning { color: var(--warning); }
.peter-costopt-row-green { background: rgba(34,197,94,0.04); }
.peter-costopt-row-yellow { background: rgba(234,179,8,0.06); }
.peter-costopt-row-red { background: rgba(239,68,68,0.04); }
.peter-costopt-motivational { background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(59,130,246,0.06)); border: 1px solid var(--border-light); border-radius: 10px; padding: 14px 20px; margin-bottom: 16px; font-size: 14px; font-weight: 500; color: var(--text-primary); }
.peter-costopt-history { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 12px; margin-top: 20px; overflow: hidden; }
.peter-costopt-history-header { padding: 14px 20px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text-primary); }
.peter-costopt-history-header:hover { background: var(--bg-hover); }
.peter-costopt-history-body { padding: 0 20px 16px; }
.peter-priority-high { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: #ef4444; background: #fef2f2; }
.peter-priority-med { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: #eab308; background: #fefce8; }
.peter-priority-low { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--text-secondary); background: var(--bg-secondary); }
#peter-sourcing-table tbody tr:hover { background: #FAFBFC; box-shadow: none; }
#peter-sourcing-table tbody tr:not(.peter-client-group-header):not(.peter-client-group-spacer) td:first-child { padding-left: 16px; }
#peter-sourcing-table select { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: var(--bg-card); color: var(--text-primary); cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 28px; }
#peter-sourcing-table input[type="date"] { font-family: 'Inter', sans-serif; font-size: 13px; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; background: var(--bg-card); color: var(--text-primary); }
.peter-currency-cell { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; }
.peter-currency-cell .prefix { color: var(--text-muted); font-weight: 500; font-size: 11px; pointer-events: none; user-select: none; }
.peter-currency-cell .cell-value { cursor: text; min-width: 40px; padding: 2px 4px; border-radius: 4px; }
.peter-currency-cell .cell-value:hover { background: rgba(34,197,94,0.05); }
.peter-currency-cell .cell-value[contenteditable="true"] { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--bg-card); }
.btn-peter-sourced {
background: var(--accent); color: white; border-radius: 6px;
padding: 6px 14px; font-size: 12px; font-weight: 500;
border: none; cursor: pointer; font-family: inherit;
transition: opacity 0.15s, transform 0.1s;
}
.btn-peter-sourced:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-peter-return {
background: transparent; border: 1px solid var(--danger);
color: var(--danger); border-radius: 6px;
padding: 6px 14px; font-size: 12px; font-weight: 500;
cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.btn-peter-return:hover { background: var(--danger); color: white; }
/* Split Test Columns */
.st-peter-col { background: rgba(59,130,246,0.06) !important; }
.st-xiaofu-col { background: rgba(234,179,8,0.06) !important; }
.st-peter-hdr { background: rgba(59,130,246,0.12) !important; color: #2563eb !important; }
.st-xiaofu-hdr { background: rgba(234,179,8,0.12) !important; color: #b45309 !important; }
.st-winner-badge { display:inline-block;padding:2px 8px;border-radius:10px;font-size:10px;font-weight:600;letter-spacing:0.3px; }
.st-winner-peter { background:rgba(59,130,246,0.15);color:#2563eb; }
.st-winner-xiaofu { background:rgba(234,179,8,0.15);color:#b45309; }
.st-winner-tie { background:rgba(107,114,128,0.15);color:#6b7280; }
.st-mark-done { padding:4px 10px;border-radius:6px;font-size:11px;font-weight:500;cursor:pointer;border:1px solid var(--border);background:var(--bg-card);color:var(--text-secondary); }
.st-mark-done:hover { background:var(--accent);color:#fff;border-color:var(--accent); }
.st-mark-done.done { background:#10b981;color:#fff;border-color:#10b981;cursor:default; }
/* Peter Help Guide Modal */
.peter-help-btn { display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:1.5px solid var(--border);background:var(--bg-card);color:var(--text-muted);cursor:pointer;font-size:14px;font-weight:600;transition:all 0.15s;margin-left:8px;flex-shrink:0; }
.peter-help-btn:hover { border-color:var(--accent);color:var(--accent);background:rgba(99,102,241,0.06); }
.peter-help-overlay { position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);z-index:9999;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all 0.2s; }
.peter-help-overlay.active { opacity:1;visibility:visible; }
.peter-help-modal { background:var(--bg-card);border-radius:16px;width:640px;max-width:92vw;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.2);padding:0;transform:translateY(10px);transition:transform 0.2s; }
.peter-help-overlay.active .peter-help-modal { transform:translateY(0); }
.peter-help-modal-header { padding:24px 28px 16px;border-bottom:1px solid var(--border-light);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--bg-card);z-index:1;border-radius:16px 16px 0 0; }
.peter-help-modal-header h2 { font-size:18px;font-weight:700;color:var(--text-primary);margin:0;display:flex;align-items:center;gap:10px; }
.peter-help-modal-close { width:32px;height:32px;border-radius:8px;border:none;background:var(--bg-hover);color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:18px;transition:all 0.15s; }
.peter-help-modal-close:hover { background:var(--danger);color:white; }
.peter-help-modal-body { padding:20px 28px 28px; }
.peter-help-section { margin-bottom:20px; }
.peter-help-section:last-child { margin-bottom:0; }
.peter-help-section h3 { font-size:14px;font-weight:600;color:var(--accent);margin:0 0 8px;display:flex;align-items:center;gap:6px; }
.peter-help-section p, .peter-help-section li { font-size:13px;color:var(--text-primary);line-height:1.65;margin:0; }
.peter-help-section ul { padding-left:18px;margin:4px 0 0; }
.peter-help-section li { margin-bottom:4px; }
.peter-help-tip { background:var(--bg-hover);border:1px solid var(--border);border-radius:10px;padding:12px 16px;margin-top:12px;font-size:12px;color:var(--text-primary);line-height:1.6; }
.peter-help-tip strong { color:var(--text-primary); }
.peter-help-field-grid { display:grid;grid-template-columns:140px 1fr;gap:6px 12px;margin-top:8px;font-size:12px; }
.peter-help-field-label { font-weight:600;color:var(--text-primary); }
.peter-help-field-desc { color:var(--text-primary); }
.btn-bundle-mapped {
background: var(--accent); color: white; border-radius: 6px;
padding: 5px 12px; font-size: 11px; font-weight: 500;
border: none; cursor: pointer; font-family: inherit;
transition: opacity 0.15s, transform 0.1s; white-space: nowrap;
}
.btn-bundle-mapped:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-bundle-unmap {
background: transparent; border: 1px solid var(--danger);
color: var(--danger); border-radius: 6px;
padding: 5px 12px; font-size: 11px; font-weight: 500;
cursor: pointer; font-family: inherit; transition: all 0.15s; white-space: nowrap;
}
.btn-bundle-unmap:hover { background: var(--danger); color: white; }
#orders-purchase-orders td { white-space: nowrap; }
/* ── Unified Login Styling ── */
@keyframes loginFadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.unified-login {
position:fixed; inset:0; z-index:10000;
display:flex; align-items:center; justify-content:center; flex-direction:column;
background: var(--bg-body);
font-family:'Inter','Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,sans-serif;
min-height:100vh;
}
.unified-login .login-card {
width:100%; max-width:400px; padding:48px 40px 36px;
background:transparent; backdrop-filter:none; -webkit-backdrop-filter:none;
border:none; border-radius:16px;
box-shadow:none;
animation: loginFadeIn 0.6s ease-out both;
}
.unified-login .login-logo { text-align:center; margin-bottom:36px; display:flex; justify-content:center; }
.unified-login .login-logo .logo-main {
font-size:28px; font-weight:700; color:var(--text-primary); letter-spacing:-0.5px;
font-family:'Plus Jakarta Sans','Inter',sans-serif;
}
.unified-login .login-logo .logo-sub { font-weight:300; color:#6b7280; }
.unified-login .login-label {
display:block; font-size:13px; font-weight:500;
color:var(--text-secondary); margin-bottom:6px; text-align:left;
}
.unified-login .login-input {
width:100%; padding:12px 16px; font-size:16px;
background:var(--bg-card); border:1px solid var(--border);
border-radius:12px; color:var(--text-primary); outline:none; transition:all 0.2s ease;
font-family:inherit; box-sizing:border-box;
}
.unified-login .login-input::placeholder { color:#9ca3af; }
.unified-login .login-input:focus {
border-color:#6b9ee8; background:var(--bg-card);
box-shadow:0 0 0 3px rgba(107,158,232,0.15);
}
.unified-login .login-field { margin-bottom:20px; }
.unified-login .login-remember {
display:none; align-items:center; gap:8px; margin-bottom:24px;
font-size:13px; color:#6b7280; cursor:pointer;
}
.unified-login .login-remember input[type=checkbox] {
accent-color:var(--accent); width:16px; height:16px; cursor:pointer;
}
.unified-login .login-btn {
width:100%; padding:14px; font-size:15px; font-weight:600;
background:var(--primary); color:var(--bg-card); border:none; border-radius:999px;
cursor:pointer; transition:all 0.2s ease; font-family:inherit;
}
.unified-login .login-btn:hover { background:var(--primary-light); transform:translateY(-1px); box-shadow:0 4px 16px rgba(0,0,0,0.2); }
.unified-login .login-btn:active { transform:translateY(0); }
.unified-login .login-error-toast {
display:none; padding:12px 16px; font-size:13px;
background:#fef2f2; border:1px solid #fecaca;
color:#dc2626; border-radius:10px; margin-bottom:20px; text-align:left;
}
.unified-login .login-forgot {
display:block; text-align:center; margin-top:20px;
font-size:12px; color:#9ca3af; text-decoration:none;
}
.unified-login .login-forgot:hover { color:#6b7280; }
.unified-login .login-footer { display:none;
text-align:center; margin-top:32px; font-size:11px; color:#d1d5db;
animation: loginFadeIn 0.8s ease-out 0.3s both;
}
@media screen and (max-width:480px) {
.unified-login .login-card { max-width:100%; margin:0 16px; padding:36px 24px 28px; border-radius:12px; }
.unified-login .login-logo .logo-main { font-size:24px; }
}
#login-screen, #app-container { display: none !important; }
.has-token #app-container { display: flex !important; }
.has-token #login-screen { display: none !important; }
.no-token #login-screen { display: flex !important; }
.no-token #app-container { display: none !important; }
/* ── Mobile responsiveness enhancements ── */
/* Touch-friendly minimum sizes */
@media screen and (max-width: 767px) {
.btn, .btn-sm, .tab-btn, button { min-height: 44px; min-width: 44px; }
.nav-item { min-height: 44px; display: flex; align-items: center; }
input, select, textarea { min-height: 44px; font-size: 16px !important; }
/* Peter tables responsive */
#peter-sm-table, #peter-sourcing-table { min-width: 600px; font-size: 12px; }
#orders-purchase-orders { min-width: 700px; }
/* Stack header controls */
.header { flex-wrap: wrap; gap: 8px; }
.header-controls { width: 100%; justify-content: flex-end; }
/* Finance view buttons wrap */
div[style*="display:flex"][style*="gap"] { flex-wrap: wrap !important; }
/* Mobile table horizontal scroll — billing and all tables */
html, body { overflow-x: auto; }
.content { overflow-x: auto !important; padding: 0 12px 24px !important; }
.section { overflow-x: auto !important; }
#billing { overflow-x: visible; }
#billing .card { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
#billing table, #billing .table, #billing .data-table { min-width: 700px; }
.card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { min-width: 600px; }
.table-container { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; max-width: 100vw; }
}
/* Desktop: prevent horizontal overflow */
@media screen and (min-width: 768px) {
html, body { overflow-x: hidden; }
.content { overflow-x: hidden; }
}
/* Extra-small screens (≤480px) */
@media screen and (max-width: 480px) {
body { font-size: 12px; }
.content { padding: 0 12px 12px; }
.card { padding: 12px; }
.welcome-text { font-size: 18px; }
.welcome-subtitle { font-size: 13px; }
.header h2 { font-size: 13px; }
.tab-btn { padding: 8px 10px; font-size: 11px; }
.modal-content { width: 98% !important; margin: 2% auto !important; padding: 12px !important; }
.table, .data-table { font-size: 11px; }
.table th, .table td, .data-table th, .data-table td { padding: 6px 4px; }
.metrics-grid { gap: 8px; }
}
/* ── Enhanced Mobile Optimisation (2026-03-18) ── */
/* iOS text size adjust fix */
html { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
/* Make ALL tables scrollable on mobile via parent overflow */
@media screen and (max-width: 767px) {
/* Cards containing tables should scroll */
.card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Inline tables in modals */
.modal table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Ensure no horizontal body overflow */
html, body { max-width: 100vw; }
/* Touch-friendly: links and interactive elements */
a, .clickable, [onclick] { min-height: 44px; }
/* Prevent zoom on input focus (iOS) */
input[type="text"], input[type="email"], input[type="password"], 
input[type="number"], input[type="search"], input[type="tel"],
input[type="url"], select, textarea {
font-size: 16px !important;
}
/* Login page: full-width on mobile */
.unified-login .login-card { 
max-width: 100% !important; 
margin: 0 12px !important; 
padding: 32px 20px 24px !important;
}
.unified-login .login-input {
min-height: 48px;
font-size: 16px !important;
padding: 12px 16px;
}
.unified-login .login-btn, .unified-login button[type="submit"] {
min-height: 48px;
font-size: 16px;
}
/* Sticky header on mobile for context */
.header {
position: sticky;
top: 0;
z-index: 50;
background: var(--bg-light);
}
}
@media screen and (max-width: 374px) {
.unified-login .login-card {
margin: 0 8px !important;
padding: 24px 16px 20px !important;
}
}

/* Orders tab spacing fix */
#orders .metrics-grid { margin-bottom: 20px; }
#orders .card { margin-bottom: 20px; }
#orders .tab-content { margin-top: 12px; }
#orders .tab-group { margin-bottom: 12px; }
#orders #po-lifecycle-action-bar { margin-top: 8px; }
#orders h3 { margin-top: 12px; margin-bottom: 8px; }
/* Consistent spacing for all sections */
.section .metrics-grid { margin-bottom: 12px; }
.section > .card { margin-bottom: 20px; }






/* Fix 5: All finance numbers black */
#profit .metric, #profit .card .metric,
#finance-pl .metric, #finance-pl .card .metric,
#fin-pl .metric, #fin-pl .card .metric,
#profit td, #finance-pl td, #fin-pl td {
  color: var(--text-primary) !important;
}
#profit span[style*="color:#22c55e"], #profit span[style*="color:#ef4444"],
#profit span[style*="color:var(--success)"], #profit span[style*="color:var(--danger)"],
#finance-pl span[style*="color:#22c55e"], #finance-pl span[style*="color:#ef4444"],
#finance-pl span[style*="color:var(--success)"], #finance-pl span[style*="color:var(--danger)"],
#fin-pl span[style*="color:#22c55e"], #fin-pl span[style*="color:#ef4444"],
#fin-pl span[style*="color:var(--success)"], #fin-pl span[style*="color:var(--danger)"] {
  color: var(--text-primary) !important;
}
/* Peter lang toggle in header */
#peter-lang-toggle-header {
  margin-right: 4px;
}





/* New Replacement button should be black not green */
#returns .btn-success, #returns [style*="background:#22c55e"],
#returns [style*="background:var(--accent)"] {
}




/* === ALFIE CLEAN CSS FIX v2 === */
/* Consistent spacing: content starts 16px below header, no excessive gaps */

.section .tab-group { margin-bottom: 12px; }
.section > .card { margin-bottom: 16px; }
#returns > div:first-child { margin-top: 0; }








/* Consistent section spacing */
.content > .section { padding-top: 24px; }
.header { padding: 24px 0 16px; }
#profit .tab-group { margin-bottom: 12px; }
#profit > div:first-child { margin-bottom: 0; }

/* Match content padding for sections outside .content */
.main-content > .section:not(.content .section) { padding-left: 40px; padding-right: 40px; }
/* ===== DARK MODE COMPREHENSIVE AUDIT FIX — 2026-03-19 ===== */

/* 1. Define missing CSS variables for both modes */
:root {
--bg-primary: #ffffff;
--bg-main: #f9fafb;
}
:root.dark {
--bg-primary: #262626;
--bg-main: #1a1a1a;
}

/* 2. Clara & Flo sections have hardcoded background:#fff — override */
:root.dark #clara,
:root.dark #emails {
background: var(--bg-primary) !important;
}

/* 3. Invoice preview — hardcoded white bg and #1a1a1a text */
:root.dark #invoice-preview-content {
background: #262626 !important;
color: #f9fafb !important;
border-color: #3a3a3a !important;
}
:root.dark #invoice-preview-content div[style*="color:#1a1a1a"],
:root.dark #invoice-preview-content span[style*="color:#1a1a1a"] {
color: #f9fafb !important;
}
:root.dark #invoice-preview-content span[style*="color:#9ca3af"] {
color: #9ca3af !important;
}
:root.dark #invoice-preview-content span[style*="color:#6b7280"] {
color: var(--text-secondary) !important;
}
:root.dark #invoice-preview-content th[style*="background:#f9fafb"] {
background: #3a3a3a !important;
color: #d1d5db !important;
border-color: #4a4a4a !important;
}
:root.dark #invoice-preview-content td {
color: #f9fafb !important;
border-color: #3a3a3a !important;
}
:root.dark #invoice-preview-content div[style*="border-top:2px solid #1a1a1a"] {
border-color: #d1d5db !important;
}
:root.dark #invoice-preview-content div[style*="background:#f9fafb"] {
background: #3a3a3a !important;
}
:root.dark #invoice-preview-content div[style*="color:#1a1a1a"] {
color: #f9fafb !important;
}

/* 4. Invite accept screen — hardcoded #ffffff bg */
:root.dark #invite-accept-screen {
background: var(--bg-body) !important;
}
:root.dark #invite-accept-screen > div {
background: var(--bg-card) !important;
color: var(--text-primary) !important;
}
:root.dark #invite-accept-screen input {
background: #3a3a3a !important;
color: #f9fafb !important;
border-color: #4a4a4a !important;
}
:root.dark #invite-accept-screen button {
background: var(--accent) !important;
}

/* 5. Planned status badges — hardcoded #fff3cd / #856404 */
:root.dark .status-badge[style*="background: #fff3cd"] {
background: #78350f !important;
color: #fcd34d !important;
}

/* 6. #fc-out hardcoded color:#111 */
:root.dark #fc-out {
color: var(--text-primary) !important;
}

/* 7. Editable cell contenteditable — hardcoded bg:#fff */
:root.dark .editable-cell[contenteditable="true"] {
background: #3a3a3a !important;
color: #f9fafb !important;
}

/* 8. Flo wizard steps — hardcoded bg:#111 for active step */
:root.dark .ef-step[style*="background:#111"] {
background: var(--accent) !important;
}
:root.dark .ef-step.active {
background: var(--accent) !important;
color: #fff !important;
}

/* 9. Flo wizard buttons — hardcoded bg:#111 */
:root.dark button[style*="background:#111"] {
background: var(--accent) !important;
}
:root.dark button[style*="background:#0f172a"] {
background: #3a3a3a !important;
}

/* 10. Login page dark mode */
:root.dark .unified-login {
background: var(--bg-body) !important;
}
:root.dark .unified-login .login-card {
background: var(--bg-card) !important;
border-color: var(--border) !important;
}
:root.dark .unified-login .login-input {
background: #3a3a3a !important;
color: #f9fafb !important;
border-color: #4a4a4a !important;
}
:root.dark .unified-login .login-input::placeholder {
color: #6b7280 !important;
}
:root.dark .unified-login .login-btn {
background: var(--accent) !important;
color: #fff !important;
}
:root.dark .unified-login .login-btn:hover {
background: var(--accent-dark) !important;
}
:root.dark .unified-login .login-logo .logo-sub {
color: var(--text-secondary) !important;
}
:root.dark .unified-login .login-forgot {
color: var(--text-muted) !important;
}
:root.dark .unified-login .login-remember {
color: var(--text-secondary) !important;
}

/* 11. Modals — ensure dark backgrounds */
:root.dark .modal-content,
:root.dark [class*="modal"] > div[style*="background:white"],
:root.dark [class*="modal"] > div[style*="background:#fff"] {
background: var(--bg-card) !important;
color: var(--text-primary) !important;
border-color: var(--border) !important;
}

/* 12. Tab buttons — ensure visible in dark mode */
:root.dark .tab-btn {
color: var(--text-secondary);
border-bottom-color: transparent;
}
:root.dark .tab-btn.active {
color: var(--text-primary);
border-bottom-color: transparent;
background: transparent;
box-shadow: none;
font-weight: 700;
}
:root.dark .tab-btn:hover {
color: var(--text-primary);
}

/* 13. Section backgrounds — the fallback #fff in .section */
:root.dark .section {
background: var(--bg-primary) !important;
}

/* 14. Card styling in dark mode */
:root.dark .card {
background: var(--bg-card);
border-color: var(--border);
}

/* 15. Table headers */
:root.dark .table th,
:root.dark .data-table th {
background: var(--bg-body);
color: var(--text-secondary);
border-color: var(--border);
}

/* 16. PO form modal + supplier modals */
:root.dark #po-create-modal,
:root.dark #po-qc-modal {
background: rgba(0,0,0,0.7);
}
:root.dark #po-create-modal > div,
:root.dark #po-qc-modal > div {
background: var(--bg-card) !important;
color: var(--text-primary) !important;
}

/* 17. Changelog section */
:root.dark #changelog .card {
#changelog-content { margin-top: 0; padding-top: 0; }
#changelog .card { padding: 16px; }
background: var(--bg-card);
}

/* 18. App management section */
:root.dark #app {
background: var(--bg-primary) !important;
}

/* 19. Flo email stats boxes with bg-main */
:root.dark div[style*="background:var(--bg-main)"] {
background: var(--bg-main) !important;
}

/* 20. Transition section hardcoded colors */
:root.dark #transition .card {
background: var(--bg-card);
color: var(--text-primary);
}

/* 21. Yun topup modal */
:root.dark #yun-topup-modal {
background: var(--bg-card) !important;
color: var(--text-primary) !important;
}

/* 22. PO document viewer dark mode */
:root.dark #po-doc-container {
background: var(--bg-card) !important;
color: var(--text-primary) !important;
}
:root.dark #po-doc-content {
color: var(--text-primary) !important;
}
:root.dark #po-doc-content h2,
:root.dark #po-doc-content h3 {
color: var(--text-primary) !important;
}

/* 23. Finance P&L cards generated by core.js */
:root.dark #fc-out div[style*="background:var(--bg-card)"] {
background: var(--bg-card) !important;
border-color: var(--border) !important;
}
:root.dark #fc-out th {
background: var(--bg-body) !important;
color: var(--text-secondary) !important;
border-color: var(--border) !important;
}
:root.dark #fc-out td {
color: var(--text-primary) !important;
border-color: var(--border-light) !important;
}

/* 24. Approve button in Yun topup */
:root.dark button[style*="background:#0f172a"] {
background: var(--accent) !important;
}

/* 25. Mark as Processing button dark mode */
:root.dark button[style*="background:#1D1D1D"] {
background: #60a5fa !important;
}

/* 26. Login error/success toasts in unified-login */
:root.dark .unified-login .login-error-toast {
background: #3b1a1a !important;
color: #fca5a5 !important;
border-color: #7f1d1d !important;
}

/* 27. Peter priority badges */
:root.dark .peter-priority-high {
background: #3b1a1a !important;
color: #f87171 !important;
}
:root.dark .peter-priority-med {
background: #3b2f1a !important;
color: #fbbf24 !important;
}
:root.dark .peter-priority-low {
background: var(--bg-hover) !important;
color: var(--text-muted) !important;
}

/* 28. Editable cell hover */
:root.dark .editable-cell:hover {
background: #1e3a5f !important;
}

/* 29. Warning banner in finance (fffbeb) */
:root.dark div[style*="background:#fffbeb"],
:root.dark div[style*="background:var(--bg-body)"][style*="border:1px solid"] {
border-color: var(--border) !important;
}

/* 30. Dim pill unmapped button */
:root.dark .dim-pill[data-val="missing"] {
background: #78350f !important;
color: #fcd34d !important;
border-color: #fbbf24 !important;
}

/* 32. Inventory status pills dark mode */
:root.dark .inv-pill-healthy { background: #065f46 !important; color: #6ee7b7 !important; }
:root.dark .inv-pill-submitted { background: #1e3a5f !important; color: #93c5fd !important; }
:root.dark .inv-pill-delivered { background: #065f46 !important; color: #6ee7b7 !important; }
:root.dark .inv-pill-oos { background: #7f1d1d !important; color: #fecaca !important; }

/* 33. Sourcing table header colors */
:root.dark .st-peter-hdr { background: rgba(59,130,246,0.25) !important; color: #93c5fd !important; }
:root.dark .st-xiaofu-hdr { background: rgba(234,179,8,0.25) !important; color: #fcd34d !important; }
:root.dark .st-winner-peter { background: rgba(59,130,246,0.25) !important; color: #93c5fd !important; }
:root.dark .st-winner-xiaofu { background: rgba(234,179,8,0.25) !important; color: #fcd34d !important; }

/* 34. Engine dot gray */
:root.dark .engine-dot.gray { background: #6b7280 !important; }

/* 35. PO doc icon circles in dark */
:root.dark div[style*="background:#0f172a"][style*="border-radius:10px"] {
background: var(--bg-hover) !important;
}

/* 36. Discovery/transition info boxes */
:root.dark div[style*="background: #f0f9ff"],
:root.dark div[style*="background:#f0f9ff"] {
background: #1e3a5f !important;
color: #93c5fd !important;
}
:root.dark div[style*="background: #fefbeb"],
:root.dark div[style*="background:#fefbeb"] {
background: #3b2f1a !important;
color: #fcd34d !important;
}

/* 37. Invite screen paragraph */
:root.dark p[style*="color:#94a3b8"] {
color: var(--text-muted) !important;
}
/* 31. PO Flo wizard icon circles - keep branded colors but ensure dark bg contrast */
:root.dark .ef-step {
background: var(--bg-hover) !important;
color: var(--text-secondary) !important;
}
:root.dark .ef-step.active {
background: var(--accent) !important;
color: #fff !important;
}
/* ===== END DARK MODE AUDIT FIX ===== */

/* ===== SKELETON LOADING ANIMATIONS ===== */
@keyframes skeleton-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary, #f3f4f6) 25%, var(--bg-hover, #e5e7eb) 37%, var(--bg-secondary, #f3f4f6) 63%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}
:root.dark .skeleton {
  background: linear-gradient(90deg, var(--bg-secondary, #1e1e1e) 25%, var(--bg-hover, #3a3a3a) 37%, var(--bg-secondary, #1e1e1e) 63%);
  background-size: 800px 100%;
}
.skeleton-row {
  width: 100%;
  height: 20px;
  margin: 8px 0;
  border-radius: 4px;
}
.skeleton-card {
  height: 80px;
  border-radius: var(--radius, 8px);
  margin-bottom: 12px;
}
.skeleton-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
}
.skeleton-table .skeleton-row:first-child {
  height: 14px;
  width: 60%;
  margin-bottom: 12px;
}
.skeleton-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
/* ===== END SKELETON ===== */


/* Mobile table fix — allow horizontal scroll on tables */
@media screen and (max-width: 767px) {
  .content { overflow-x: auto !important; padding: 0 12px 24px !important; }
  table { min-width: 600px; }
  .table-container { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; max-width: 100vw; }
  .data-table, .table, #invoices-table { min-width: 600px; }
  .metric-cards, .stats-grid, .kpi-cards { 
    display: flex !important; 
    flex-wrap: wrap !important; 
    gap: 8px !important; 
  }
  .metric-cards > div, .stats-grid > div, .kpi-cards > div, .stat-card, .metric-card {
    min-width: calc(50% - 8px) !important;
    flex: 1 1 calc(50% - 8px) !important;
  }
  .section { overflow-x: auto !important; }
  /* Ensure Approve button on invoices is reachable */
  #pending-invoices-table, #invoices-table { min-width: 500px; }
  .welcome-section { padding: 16px !important; }
  h2 { font-size: 18px !important; }
  .header { padding: 12px 16px !important; flex-wrap: wrap; gap: 8px; }
}


/* === T-PILL: FF UI polish - pill-shaped #1D1D1D buttons (Austin msg62642 2026-06-29) === */
/* Scope: action buttons only. Inputs, cards, KPI tiles, status pills, swatches untouched. */
/* Base .btn family - pill always */
.btn,
.btn-sm,
button.btn,
button.btn-sm,
.bp,
.btn-peter-sourced,
.btn-peter-return,
.btn-bundle-mapped,
.btn-bundle-unmap,
.btn-success,
.btn-danger,
.btn-info,
.btn-outline {
  border-radius: 999px !important;
}
/* Primary action buttons -> #1D1D1D background (semantic variants excluded) */
.btn:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap),
button.btn:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap),
.btn-sm:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap),
.bp,
.btn-peter-sourced,
.btn-bundle-mapped {
  background: #1D1D1D !important;
  color: #fff !important;
}
/* Inline-styled primary buttons - swap to #1D1D1D + pill */
button[style*="background:#000"],
button[style*="background:#111"],
button[style*="background:#0f172a"],
button[style*="background:#0E1A2B"],
button[style*="background:#0e1a2b"],
button[style*="background:#1a1a1a"],
button[style*="background:var(--accent)"],
button[style*="background:var(--primary)"],
button[style*="background:var(--text-primary)"],
a[style*="background:#000"][href]:not([role]),
a[style*="background:#1D1D1D"] {
  background: #1D1D1D !important;
  border-radius: 999px !important;
  color: #fff !important;
}
/* Inline-styled buttons that ALREADY use #1D1D1D - just ensure pill */
button[style*="background:#1D1D1D"],
button[style*="background:#1d1d1d"] {
  border-radius: 999px !important;
}
/* Dark-mode parity: keep #1D1D1D, dont let dark theme override */
:root.dark .btn:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap),
:root.dark button.btn:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap),
:root.dark .btn-sm:not(.btn-success):not(.btn-danger):not(.btn-info):not(.btn-outline):not(.btn-peter-return):not(.btn-bundle-unmap) {
  background: #1D1D1D !important;
  color: #fff !important;
}
/* Login screen logo: match admin.freedomclub.com (width:180px) */
.unified-login .login-logo img,
.unified-login .login-logo .logo-main img {
  max-width: 180px !important;
  width: 180px !important;
  height: auto !important;
}
/* === T-PILL: end === */


/* ---- copied from FF client-management-dashboard.html line 1746 ---- */

/* ============================================================
   Canonical Card-Padding Fix (Austin msg 42679 reply 2026-05-27)
   When a .card contains a .table-container with .table (or .data-table),
   strip the card padding to 0 and re-apply it only to the header text.
   This kills the white-margin/padding-around-table bug.
   Previously this rule existed only inside an email-preview popup; now
   it applies to the actual dashboard page.
   ============================================================ */
.card:has(> .table-container > .table),
.card:has(> .table-container > .data-table),
.card:has(> .table),
.card:has(> .data-table),
.card:has(> .bb-progress-table),
.card:has(> .bb-roadmap-table) {
    padding: 0;
    overflow: hidden;
}
.card:has(> .table-container > .table) > h2,
.card:has(> .table-container > .data-table) > h2,
.card:has(> .table-container > .table) > h3,
.card:has(> .table-container > .data-table) > h3,
.card:has(> .table) > h2,
.card:has(> .table) > h3,
.card:has(> .data-table) > h2,
.card:has(> .data-table) > h3 {
    padding: 16px 20px 0;
    margin-bottom: 0;
}
.card:has(> .table-container > .table) > div:has(> h3),
.card:has(> .table-container > .data-table) > div:has(> h3),
.card:has(> .table) > div:has(> h3),
.card:has(> .data-table) > div:has(> h3) {
    padding: 16px 20px 8px;
    margin: 0;
}
.card:has(> .table-container) > .table-container {
    margin: 0;
}
.card > .table-container > .table,
.card > .table-container > .data-table,
.card > .table,
.card > .data-table {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

/* First/last cell inner padding (Austin msg 42702 - icons too close to edge) */
.card:has(> .table-container > .table) > .table-container > .table > thead > tr > th:first-child,
.card:has(> .table-container > .table) > .table-container > .table > tbody > tr > td:first-child,
.card:has(> .table-container > .data-table) > .table-container > .data-table > thead > tr > th:first-child,
.card:has(> .table-container > .data-table) > .table-container > .data-table > tbody > tr > td:first-child,
.card:has(> .table) > .table > thead > tr > th:first-child,
.card:has(> .table) > .table > tbody > tr > td:first-child {
    padding-left: 24px;
}
.card:has(> .table-container > .table) > .table-container > .table > thead > tr > th:last-child,
.card:has(> .table-container > .table) > .table-container > .table > tbody > tr > td:last-child,
.card:has(> .table-container > .data-table) > .table-container > .data-table > thead > tr > th:last-child,
.card:has(> .table-container > .data-table) > .table-container > .data-table > tbody > tr > td:last-child,
.card:has(> .table) > .table > thead > tr > th:last-child,
.card:has(> .table) > .table > tbody > tr > td:last-child {
    padding-right: 24px;
}

/* ============================================================
   Extension (Austin msg 42707 — App + Orders tabs)
   App + Orders use plain <div style="overflow-x:auto"> wrappers
   instead of <div class="table-container">. Extend canonical
   rules to match ANY direct child div containing a .table.
   ============================================================ */
.card:has(> div > .table),
.card:has(> div > .data-table) {
    padding: 0;
    overflow: hidden;
}
.card:has(> div > .table) > h2,
.card:has(> div > .table) > h3,
.card:has(> div > .data-table) > h2,
.card:has(> div > .data-table) > h3 {
    padding: 16px 20px 0;
    margin-bottom: 0;
}
.card:has(> div > .table) > div,
.card:has(> div > .data-table) > div {
    margin: 0;
}
.card > div > .table,
.card > div > .data-table {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.card:has(> div > .table) > div > .table > thead > tr > th:first-child,
.card:has(> div > .table) > div > .table > tbody > tr > td:first-child,
.card:has(> div > .data-table) > div > .data-table > thead > tr > th:first-child,
.card:has(> div > .data-table) > div > .data-table > tbody > tr > td:first-child {
    padding-left: 24px;
}
.card:has(> div > .table) > div > .table > thead > tr > th:last-child,
.card:has(> div > .table) > div > .table > tbody > tr > td:last-child,
.card:has(> div > .data-table) > div > .data-table > thead > tr > th:last-child,
.card:has(> div > .data-table) > div > .data-table > tbody > tr > td:last-child {
    padding-right: 24px;
}

/* ---- copied from FF client-management-dashboard.html line 1854 ---- */


/* ============================================================
   ADMIN TABLE AESTHETIC OVERLAY (Austin msg63822, 2026-07-05)
   Aesthetic-only pass. NO data / markup / column / logic changes.
   Spec: /Users/alfie/.openclaw/workspace/reference/admin-table-aesthetic-spec-20260705.md
   Palette: #FFFFFF page · #1A1A1A text · #6B7280 secondary
            #F0F0F0 border · #F7F7F7 hover · Inter 14px
   Header:  weight 500 (medium), Title Case (no uppercase / no letter-spacing),
            #374151 text, 1px solid #EAEAEA bottom.
   Rows:    ~48px, 13px 16px padding, 1px #F0F0F0 divider, no zebra.
   Hover:   #F7F7F7 with 120ms ease.
   Numbers: tabular-nums (.num / [data-num] opt-in preserved).
   Status:  .status-active -> green check pill · .status-inactive -> grey x pill.
   Inactive rows: greyed via [data-inactive] / .row-inactive.
   Scope:   .table, .data-table (both HTMLs share these), but only on
            :root:not(.dark) so existing dark-mode styling is untouched.
   ============================================================ */

:root:not(.dark) .table,
:root:not(.dark) .data-table {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #FFFFFF;
  color: #1A1A1A;
}

/* HEADER -- FC Builds-tab standard (msg65103) with corrections:
   header TEXT smaller (11px vs FC 12px) + header ROW shorter (8px vs FC 12px vertical padding) */
:root:not(.dark) .table thead th,
:root:not(.dark) .data-table thead th {
  background: #F5F6FA !important;
  color: #6B7280 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  padding: 8px 16px !important;
  border-bottom: 1px solid #E5E7EB !important;
  border-top: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}

/* small line-icon hook: any TH child <i.th-lead> / <svg.th-lead> gets left-of-label spacing.
   Existing headers that already carry a leading icon inherit alignment; adds gap only. */
:root:not(.dark) .table thead th > i.th-lead,
:root:not(.dark) .data-table thead th > i.th-lead,
:root:not(.dark) .table thead th > svg.th-lead,
:root:not(.dark) .data-table thead th > svg.th-lead {
  color: #9CA3AF;
  margin-right: 6px;
  vertical-align: -2px;
  width: 15px;
  height: 15px;
}

/* ROWS -- FC Builds-tab standard (msg65103) */
:root:not(.dark) .table tbody td,
:root:not(.dark) .data-table tbody td {
  padding: 8px 16px !important;
  border-bottom: 1px solid #E5E7EB !important;
  background: #FFFFFF;
  color: #0F172A;
  font-size: 14px;
  vertical-align: middle;
  transition: background 120ms ease;
}
:root:not(.dark) .table tbody tr,
:root:not(.dark) .data-table tbody tr {
  transition: background 120ms ease;
  /* approximates 48px row height with 13px padding + 14px line-height content */
}
:root:not(.dark) .table tbody tr:last-child td,
:root:not(.dark) .data-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* HOVER -- FC Builds-tab standard: light #FAFBFC, no dark shadow/overlay (msg65103 item 3) */
:root:not(.dark) .table tbody tr:hover td,
:root:not(.dark) .data-table tbody tr:hover td,
:root:not(.dark) .table tbody tr:hover,
:root:not(.dark) .data-table tbody tr:hover {
  background: #FAFBFC !important;
  box-shadow: none !important;
}

/* INACTIVE ROWS (greyed) ----------------------------------- */
:root:not(.dark) .table tbody tr[data-inactive="true"] td,
:root:not(.dark) .data-table tbody tr[data-inactive="true"] td,
:root:not(.dark) .table tbody tr.row-inactive td,
:root:not(.dark) .data-table tbody tr.row-inactive td {
  color: #9CA3AF !important;
  background: #FAFAFA;
}

/* NUMBERS: tabular + right-align ---------------------------- */
:root:not(.dark) .table td.num,
:root:not(.dark) .table th.num,
:root:not(.dark) .table td[data-num],
:root:not(.dark) .table th[data-num],
:root:not(.dark) .data-table td.num,
:root:not(.dark) .data-table th.num,
:root:not(.dark) .data-table td[data-num],
:root:not(.dark) .data-table th[data-num] {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
/* Also make every td that contains only a currency/number look tabular (safe: doesn't affect alignment). */
:root:not(.dark) .table tbody td,
:root:not(.dark) .data-table tbody td {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* STATUS PILLS -------------------------------------------- */
:root:not(.dark) .status-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4;
  border: 0 !important;
  white-space: nowrap;
}
:root:not(.dark) .status-badge.status-active,
:root:not(.dark) .status-active {
  background: #E7F6EC !important;
  color: #1E7B41 !important;
}
:root:not(.dark) .status-badge.status-active::before,
:root:not(.dark) .status-active::before {
  content: "\2713"; /* checkmark */
  color: #22A055;
  font-weight: 700;
  margin-right: 2px;
  font-size: 12px;
}
:root:not(.dark) .status-badge.status-inactive,
:root:not(.dark) .status-inactive,
:root:not(.dark) .status-badge.status-archived,
:root:not(.dark) .status-archived {
  background: #F2F2F2 !important;
  color: #6B7280 !important;
}
:root:not(.dark) .status-badge.status-inactive::before,
:root:not(.dark) .status-inactive::before,
:root:not(.dark) .status-badge.status-archived::before,
:root:not(.dark) .status-archived::before {
  content: "\2715"; /* x */
  color: #9CA3AF;
  font-weight: 700;
  margin-right: 2px;
  font-size: 12px;
}
/* Preserve mid-states (paused / warning / pending) but harmonise shape. */
:root:not(.dark) .status-badge.status-paused,
:root:not(.dark) .status-paused,
:root:not(.dark) .status-badge.status-warning,
:root:not(.dark) .status-warning,
:root:not(.dark) .status-badge.status-pending {
  background: #FEF3C7 !important;
  color: #92400E !important;
  border-radius: 999px !important;
}
:root:not(.dark) .status-badge.status-paused::before,
:root:not(.dark) .status-paused::before,
:root:not(.dark) .status-badge.status-warning::before,
:root:not(.dark) .status-warning::before,
:root:not(.dark) .status-badge.status-pending::before {
  content: "\25CF"; /* filled dot */
  color: #D97706;
  margin-right: 2px;
  font-size: 10px;
}

/* CATEGORY DOTS (low-cardinality). Opt-in via .cat-dot on an element.
   Existing .category-badge-* pills stay untouched (they carry semantic bg). */
:root:not(.dark) .cat-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 400;
  color: #1A1A1A;
}
:root:not(.dark) .cat-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  opacity: 1;
}
:root:not(.dark) .cat-dot.cat-finance     { color: #22A055; }
:root:not(.dark) .cat-dot.cat-hr          { color: #F5871F; }
:root:not(.dark) .cat-dot.cat-marketing   { color: #8B3FE8; }
:root:not(.dark) .cat-dot.cat-sales       { color: #3B82F6; }
:root:not(.dark) .cat-dot.cat-engineering { color: #4B5563; }
/* Label text itself stays dark - only the dot inherits the category colour. */
:root:not(.dark) .cat-dot::before { background: currentColor; }
:root:not(.dark) .cat-dot { color: #1A1A1A; }
:root:not(.dark) .cat-dot.cat-finance::before     { background: #22A055; }
:root:not(.dark) .cat-dot.cat-hr::before          { background: #F5871F; }
:root:not(.dark) .cat-dot.cat-marketing::before   { background: #8B3FE8; }
:root:not(.dark) .cat-dot.cat-sales::before       { background: #3B82F6; }
:root:not(.dark) .cat-dot.cat-engineering::before { background: #4B5563; }

/* LEFT CHECKBOX COL (opt-in via .col-check / <th class="col-check">) */
:root:not(.dark) .table th.col-check,
:root:not(.dark) .data-table th.col-check,
:root:not(.dark) .table td.col-check,
:root:not(.dark) .data-table td.col-check {
  width: 44px !important;
  padding-left: 16px !important;
  padding-right: 8px !important;
  text-align: left !important;
}
:root:not(.dark) .table td.col-check input[type="checkbox"],
:root:not(.dark) .data-table td.col-check input[type="checkbox"],
:root:not(.dark) .table th.col-check input[type="checkbox"],
:root:not(.dark) .data-table th.col-check input[type="checkbox"] {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid #D1D5DB;
  background: #FFFFFF;
  accent-color: #1A1A1A;
  cursor: pointer;
}

/* END TABLE AESTHETIC OVERLAY ---------------------------- */

/* m2297ds (Austin msg 2287/2297): one table-header + row-button standard on every page */
:root:not(.dark) #ops-insights table thead th, :root:not(.dark) #ops-insights table tr:first-child th,
:root:not(.dark) #profit table thead th, :root:not(.dark) #finance-pl table thead th {
  font-size: 13.5px !important; font-weight: 500 !important; color: #374151 !important;
  background: #f9fafb !important; text-transform: none !important; letter-spacing: normal !important;
}
:root.dark #ops-insights table thead th, :root.dark #profit table thead th, :root.dark #finance-pl table thead th {
  font-size: 13.5px !important; font-weight: 500 !important; text-transform: none !important; letter-spacing: normal !important;
}
#issues td button, #issues .data-table button { border-radius: 999px !important; font-weight: 500 !important; padding: 4px 12px !important; }
/* m2311btn (Austin msg 2311): one button system on the Tasks + Calendar tabs (sizes/shape only, no colour or behaviour change).
   Action pill 40px, 13px/500, padding 0 16px | Filter pill 40px, 13px | Icon + close circle 40x40 | Calendar chips pill 24px, 11px/600 | Mobile (<=767px) all 44px. */
#tasks .ff-tk-btn, #tasks .ff-tk-new, #calendar .ff-tk-btn, .ff-tk-pop .ff-tk-btn, .ff-tk-modal:not(#ff-oi-modal) .ff-tk-btn {
  box-sizing:border-box; height:40px; min-height:40px; padding:0 16px; font-size:13px; font-weight:500; line-height:1;
  border-radius:999px; border-width:1px; display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; }
#tasks .ff-tk-icon, #calendar .ff-tk-btn[data-nav="-1"], #calendar .ff-tk-btn[data-nav="1"] {
  box-sizing:border-box; width:40px; height:40px; min-width:40px; min-height:40px; padding:0; border-radius:999px; font-size:16px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; }
.ff-tk-modal:not(#ff-oi-modal) .ff-tk-x {
  box-sizing:border-box; width:40px; height:40px; min-width:40px; min-height:40px; padding:0; border-radius:999px; font-size:24px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; }
#tasks .ff-tk-drop, #calendar .ff-tk-drop { box-sizing:border-box; height:40px; min-height:40px; border-radius:999px; font-size:13px; }
#tasks .ff-tk-assign { box-sizing:border-box; min-height:40px; padding:4px 12px; font-size:13px; border-radius:999px; }
#calendar .ff-cal-ev, #calendar .ff-cal-more { box-sizing:border-box; height:24px; min-height:24px; padding:0 10px; font-size:11px; font-weight:600;
  line-height:24px; border-radius:999px; flex-shrink:0; }
/* m2311btn-svg: keep the + icon in New Task from shrinking to 0 when the button flexes on mobile */
#tasks .ff-tk-new svg, #tasks .ff-tk-btn svg { flex-shrink:0; min-width:12px; }
@media (max-width:767px) {
  #tasks .ff-tk-btn, #tasks .ff-tk-new, #calendar .ff-tk-btn, .ff-tk-pop .ff-tk-btn, .ff-tk-modal:not(#ff-oi-modal) .ff-tk-btn,
  #tasks .ff-tk-drop, #calendar .ff-tk-drop { height:44px; min-height:44px; }
  /* m2311btn-nowrap: global mobile rule sets button white-space normal !important, which split "New Task" over 2 lines */
  #tasks .ff-tk-btn, #tasks .ff-tk-new, #calendar .ff-tk-btn, .ff-tk-pop .ff-tk-btn, .ff-tk-modal:not(#ff-oi-modal) .ff-tk-btn { white-space:nowrap !important; }
  /* m2311btn-minw: global mobile min-width:44px let flex squeeze New Task below its content width */
  #tasks .ff-tk-new, #tasks .ff-tk-btn, #calendar .ff-tk-btn, .ff-tk-pop .ff-tk-btn, .ff-tk-modal:not(#ff-oi-modal) .ff-tk-btn { min-width:max-content; }
  #tasks .ff-tk-icon, #calendar .ff-tk-btn[data-nav="-1"], #calendar .ff-tk-btn[data-nav="1"], .ff-tk-modal:not(#ff-oi-modal) .ff-tk-x {
    width:44px; height:44px; min-width:44px; min-height:44px; }
  #tasks .ff-tk-assign { min-height:44px; }
  #calendar .ff-cal-ev, #calendar .ff-cal-more { height:44px; min-height:44px; line-height:44px; }
  /* m2311btn-chipwrap: keep calendar chips on one line with ellipsis (global mobile rule forces wrapping) */
  #calendar .ff-cal-ev, #calendar .ff-cal-more { white-space:nowrap !important; text-overflow:ellipsis; }
}

/* ---- copied from FF client-management-dashboard.html line 2135 ---- */

/* 2026-09-28 Austin msg 2169: one dropdown style on every surface; chevron with right padding */
select:not([multiple]):not([size]) { -webkit-appearance:none !important; -moz-appearance:none !important; appearance:none !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:right 14px center !important; background-size:12px 12px !important; padding-right:38px !important; cursor:pointer; }
:root.dark select:not([multiple]):not([size]) { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important; }

/* ---- copied from FF client-management-dashboard.html line 2142 ---- */
/* M2536_T1 (Austin msg 2536): smooth admin. Login fields fade in one after another, the app fades in (opacity only)
   after login and on load, sidebar tab switches crossfade (old section fades out over the new one), freshly loaded data fades in. */
@keyframes ffM2536Fade{from{opacity:0}to{opacity:1}}
@keyframes ffM2536Field{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.unified-login .login-card{animation:none!important}
.unified-login .login-card>*{animation:ffM2536Field .5s cubic-bezier(.22,.61,.36,1) both}
.unified-login .login-card>*:nth-child(1){animation-delay:40ms}.unified-login .login-card>*:nth-child(2){animation-delay:90ms}
.unified-login .login-card>*:nth-child(3){animation-delay:150ms}.unified-login .login-card>*:nth-child(4){animation-delay:210ms}
.unified-login .login-card>*:nth-child(5){animation-delay:260ms}.unified-login .login-card>*:nth-child(6){animation-delay:300ms}
.unified-login .login-card>*:nth-child(n+7){animation-delay:360ms}
.unified-login{transition:opacity .2s ease}.unified-login.ff-login-out{opacity:0}
.has-token #app-container{animation:ffM2536Fade .34s cubic-bezier(.22,.61,.36,1) both}
.polish-section-entering{transform:none!important}
.polish-section-entered{transform:none!important;transition:opacity 220ms cubic-bezier(.22,.61,.36,1)!important}
.ff-xfade-out{transition:opacity 210ms ease!important;opacity:0!important}
@media (prefers-reduced-motion: reduce){.unified-login .login-card>*,.has-token #app-container{animation:none!important}.unified-login,.ff-xfade-out,.polish-section-entered{transition:none!important}}

/* ---- copied from FF client-management-dashboard.html line 9913 ---- */

:root{
  --polish-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --polish-ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --polish-dur-out: 130ms;
  --polish-dur-in: 200ms;
  --polish-shift: 6px;
  --polish-stagger: 55ms;
}
.polish-entering-app { opacity: 0; transform: translateY(var(--polish-shift)); }
.polish-app-active   { opacity: 1; transform: none; transition: opacity 280ms var(--polish-ease), transform 320ms var(--polish-ease); }
.polish-shell > *    { opacity: 0; transform: translateY(var(--polish-shift)); }
.polish-shell.polish-shell-in > *          { opacity: 1; transform: none; transition: opacity 260ms var(--polish-ease), transform 300ms var(--polish-ease); }
.polish-shell.polish-shell-in > *:nth-child(1) { transition-delay: 0ms; }
.polish-shell.polish-shell-in > *:nth-child(2) { transition-delay: var(--polish-stagger); }
.polish-shell.polish-shell-in > *:nth-child(3) { transition-delay: calc(var(--polish-stagger) * 2); }
.polish-shell.polish-shell-in > *:nth-child(n+4) { transition-delay: calc(var(--polish-stagger) * 3); }

.polish-section-leaving { opacity: 0 !important; transform: translateY(-4px); transition: opacity var(--polish-dur-out) var(--polish-ease-out), transform var(--polish-dur-out) var(--polish-ease-out); }
.polish-section-entering{ opacity: 0; transform: translateY(var(--polish-shift)); }
.polish-section-entered { opacity: 1; transform: none; transition: opacity var(--polish-dur-in) var(--polish-ease), transform var(--polish-dur-in) var(--polish-ease); }

@media (prefers-reduced-motion: reduce){
  .polish-entering-app, .polish-app-active,
  .polish-shell > *, .polish-shell.polish-shell-in > *,
  .polish-section-leaving, .polish-section-entering, .polish-section-entered {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}

/* ---- copied from FF client-management-dashboard.html line 10028 ---- */

/* ---- 3. Inline uppercase mini stat-card labels (e.g. split-test cards)
        that use inline text-transform:uppercase instead of a label class.
        Catch centrally, kill uppercase only, keep everything else.
        Excludes invoice/billing print docs. ---- */
.card:not(#invoice-preview-content):not(#billing-statement) div[style*="text-transform:uppercase"] {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* QC-F6 2026-09-04 Austin: pill-shaped selectable fields on Clients tab + client breakdown.
   Scoped to controls only - containers/cards/tables keep their existing radius. */
#clients input[type="text"], #clients input[type="search"], #clients input[type="number"],
#clients input[type="date"], #clients select, #clients .filter-pill, #clients .crm-filter,
#order-breakdown-content input[type="text"], #order-breakdown-content input[type="number"],
#order-breakdown-content input[type="date"], #order-breakdown-content select,
#billing-breakdown-content input[type="text"], #billing-breakdown-content input[type="number"],
#billing-breakdown-content input[type="date"], #billing-breakdown-content select {
  border-radius: 999px !important;
}
#clients button.btn-filter, #clients .chip, #clients .tag-select { border-radius: 999px !important; }
/* textareas stay rectangular - a pill textarea is unusable */
#clients textarea, #order-breakdown-content textarea, #billing-breakdown-content textarea {
  border-radius: 10px !important;
}

/* m2169 J Calendar */
.ff-cal-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.ff-cal-title{font-size:15px;font-weight:600;text-align:center;white-space:nowrap;padding:0 2px} /* m2348: smaller month text */
.ff-cal-navgrp{display:inline-flex;align-items:center;gap:0}
.ff-cal-nav{border:0;background:transparent;color:var(--text-primary);font-size:22px;line-height:1;width:28px;height:36px;min-width:28px;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-family:inherit;border-radius:6px}
.ff-cal-nav:hover{color:var(--text-secondary)}
@media (max-width:767px){#calendar .ff-cal-nav{width:36px;min-width:36px;height:44px;min-height:44px}}
.ff-cal-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12px;margin-bottom:12px;color:var(--text-secondary)}
.ff-cal-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;border:1px solid;margin-right:6px;vertical-align:-1px}
.ff-cal-scroll{overflow-x:auto;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}
.ff-cal-grid{display:grid;grid-template-columns:repeat(7,minmax(110px,1fr));min-width:780px}
.ff-cal-wd{padding:8px 10px;font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;border-bottom:1px solid var(--border)}
.ff-cal-cell{min-height:112px;padding:6px;border-right:1px solid var(--border-light,var(--border));border-bottom:1px solid var(--border-light,var(--border));display:flex;flex-direction:column;gap:3px}
.ff-cal-cell:nth-child(7n){border-right:0}
.ff-cal-cell.out{background:var(--bg-hover);opacity:.6}
.ff-cal-d{font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:2px}
.ff-cal-cell.today .ff-cal-d{background:#111;color:#fff;border-radius:999px;width:22px;height:22px;display:flex;align-items:center;justify-content:center}
.ff-cal-ev{display:block;width:100%;text-align:left;border:0;border-radius:6px;padding:3px 6px;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:inherit;min-height:22px}
.ff-cal-more{border:0;background:transparent;color:var(--text-muted);font-size:11px;text-align:left;cursor:pointer;padding:2px 6px;font-family:inherit}
/* m2169 2026-09-28 FF Tasks = FC dash task board */
.ff-tk-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px}
.ff-tk-search{position:relative;flex:1;min-width:220px;max-width:340px}
.ff-tk-search svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);pointer-events:none}
.ff-tk-search input{width:100%;padding:9px 12px 9px 34px;border:1px solid var(--border);border-radius:999px;font-size:13px;background:var(--bg-card);color:var(--text-primary);outline:none;font-family:inherit;min-height:40px;box-sizing:border-box}
.ff-tk-drop{background:var(--bg-card);color:var(--text-primary);border:1px solid var(--border);padding:8px 14px;border-radius:999px;font-size:13px;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:8px;min-height:40px}
.ff-tk-menu{display:none;position:absolute;top:calc(100% + 6px);left:0;min-width:230px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.08);z-index:30;overflow:hidden}
.ff-tk-menu.open{display:block}
.ff-tk-menu button{display:block;width:100%;text-align:left;padding:10px 14px;background:transparent;color:var(--text-primary);border:0;font-size:13px;font-family:inherit;cursor:pointer}
.ff-tk-menu button:hover,.ff-tk-menu button.on{background:var(--bg-hover)}
.ff-tk-count{font-size:12px;color:var(--text-muted);white-space:nowrap}
.ff-tk-new{background:#111;color:#fff;border:1px solid #111;padding:9px 18px;border-radius:999px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:6px;min-height:40px}
.ff-tk-scroll{overflow-x:auto;scrollbar-width:none;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}
.ff-tk-scroll::-webkit-scrollbar{display:none}
.ff-tk-table{width:100%;min-width:880px;margin:0}
.ff-tk-table td{vertical-align:middle}
.ff-tk-title{font-weight:500;color:var(--text-primary)}
.ff-tk-done .ff-tk-title{color:var(--text-muted);text-decoration:line-through}
.ff-tk-icon{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:8px;background:var(--bg-card);color:var(--text-secondary);cursor:pointer}
.ff-tk-icon:hover{color:var(--text-primary);border-color:var(--text-muted)}
.ff-tk-prio{font-size:11px;padding:2px 8px;border-radius:999px;font-weight:600;margin-left:6px;background:#fef3c7;color:#92400e}
.ff-tk-prio.critical{background:#fee2e2;color:#991b1b}
.ff-tk-due{font-size:12px;padding:3px 10px;border-radius:999px;background:var(--bg-hover);color:var(--text-secondary);white-space:nowrap}
.ff-tk-due.today{background:#fef3c7;color:#92400e}
.ff-tk-due.overdue{background:#fee2e2;color:#991b1b;font-weight:600}
.ff-tk-assign{display:flex;flex-wrap:wrap;gap:6px;align-items:center;background:transparent;border:1px dashed transparent;border-radius:10px;padding:4px 6px;cursor:pointer;text-align:left;font-family:inherit;min-height:36px;color:var(--text-primary)}
.ff-tk-assign:hover{border-color:var(--border);background:var(--bg-hover)}
.ff-tk-person{display:inline-flex;align-items:center;gap:6px;font-size:12.5px}
.ff-tk-unas{font-size:12.5px;color:var(--text-muted)}
.ff-tk-av{width:24px;height:24px;border-radius:50%;background:#111;color:#fff;font-size:10px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;vertical-align:middle}
.ff-tk-av img{width:100%;height:100%;object-fit:cover}
.ff-tk-gp{display:inline-block;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:999px;color:var(--gc);background:color-mix(in srgb,var(--gc) 14%,transparent);white-space:nowrap}
@media (max-width:768px){.ff-m2494-pill{min-height:44px!important}} /* M2494 */
.ff-tk-btn{background:#111;color:#fff;border:1px solid #111;padding:8px 16px;border-radius:999px;font-size:12.5px;font-weight:600;cursor:pointer;font-family:inherit;min-height:36px}
.ff-tk-btn.ghost{background:var(--bg-card);color:var(--text-primary);border-color:var(--border)}
.ff-tk-btn.danger{background:var(--bg-card);color:#b91c1c;border-color:#fecaca}
.ff-tk-btn:disabled{opacity:.6;cursor:default}
.ff-tk-pop{position:absolute;z-index:1000;width:280px;max-height:420px;overflow:auto;background:var(--bg-card);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 32px rgba(0,0,0,.12);padding:10px}
.ff-tk-pop label,.ff-tk-chips label{display:flex;align-items:center;gap:8px;padding:6px 4px;font-size:13px;cursor:pointer;color:var(--text-primary)}
.ff-tk-pop-h{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em;margin:8px 4px 2px}
.ff-tk-pop-f{display:flex;justify-content:flex-end;gap:8px;margin-top:10px;position:sticky;bottom:-10px;background:var(--bg-card);padding:8px 0 2px}
.ff-tk-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px}
.ff-tk-box{background:var(--bg-card);color:var(--text-primary);border-radius:16px;width:100%;max-width:620px;max-height:92vh;overflow:auto;padding:24px;box-shadow:0 24px 64px rgba(0,0,0,.2)}
.ff-tk-box-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.ff-tk-box-h h3{margin:0;font-size:18px}
.ff-tk-x{width:40px;height:40px;border:0;background:transparent;font-size:26px;line-height:1;cursor:pointer;color:var(--text-muted)}
.ff-tk-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.ff-tk-pill{font-size:12px;padding:3px 10px;border-radius:999px;background:var(--bg-hover);color:var(--text-secondary)}
.ff-tk-pill.done{background:#dcfce7;color:#166534}
.ff-tk-f{display:block;font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:14px}
.ff-tk-f input,.ff-tk-f textarea,.ff-tk-f select{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;font-size:14px;font-family:inherit;background:var(--bg-card);color:var(--text-primary);font-weight:400;min-height:42px}
/* m2348-css (Austin msg 2348): Tasks board = FC Tasks tab (page icon, one-line titles, cell padding, pill sizes) */
#tasks .ff-tk-table tbody td{padding:12px 14px;font-size:13.5px;vertical-align:middle}
#tasks .ff-tk-table thead th{padding:6px 14px}
#tasks .ff-tk-title{font-weight:400;color:var(--text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tasks .ff-tk-table{min-width:760px} /* m2348: fits 1200px desktop without clipping Complete */
#tasks .ff-tk-client{color:var(--text-secondary) !important;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tasks .ff-tk-doc{width:auto;height:auto;min-width:0;min-height:0;padding:0;border:none;background:none;color:var(--text-muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;font-family:inherit}
#tasks .ff-tk-doc:hover{color:var(--text-primary)}
#tasks .ff-tk-who{font-size:13.5px}
#ff-tk-pop .ff-tk-poprow:hover,#ff-tk-modal .ff-tk-opt:hover{background:var(--bg-hover)}
#ff-tk-modal .ff-tk-lbx{min-width:32px;min-height:32px}
@media (max-width:767px){
  #tasks .ff-tk-doc{min-width:44px;min-height:44px;margin-left:-14px}
  #ff-tk-modal{padding:16px 10px !important}
  #ff-tk-modal .ff-tk-lbbody{padding:22px !important}
  #ff-tk-modal .ff-tk-lbbtn{min-height:44px;white-space:nowrap !important}
  #ff-tk-modal .ff-tk-lbx{min-width:44px;min-height:44px}
}
.ff-tk-prio,.ff-tb-prio{display:none !important} /* m2348: priority hidden in the UI (DB value untouched) */
.ff-tk-row3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.ff-tk-chips{display:flex;flex-wrap:wrap;gap:2px 14px;margin-top:6px;font-weight:400}
.ff-tk-box-f{display:flex;gap:8px;align-items:center;margin-top:8px}
.ff-tk-err{color:#b91c1c;font-size:13px;margin-top:8px;min-height:1em}
@media (max-width:720px){.ff-tk-search{max-width:none;flex-basis:100%}.ff-tk-row3{grid-template-columns:1fr}.ff-tk-new{flex:1;justify-content:center}}
/* QC-F2 2026-09-04 FF Task Hub - card/pill styling mirrored from the FC task board */
.ff-tb-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.ff-tb-pills { display:flex; gap:8px; flex-wrap:wrap; }
.ff-tb-pill { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:999px;
  border:1px solid var(--border); background:var(--bg-card); color:var(--text-secondary);
  font-size:13px; font-weight:500; cursor:pointer; font-family:'Inter',sans-serif; transition:all .15s; }
.ff-tb-pill:hover { border-color:var(--text-muted); }
.ff-tb-pill.active { background:#111; color:#fff; border-color:#111; }
/* M2360_TOOLBAR (Austin msg 2360): one toolbar outside the table card: search left, pill filters, pill sort, grey count right */
.ff-m2360-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.ff-m2360-search{min-width:240px;flex:0 1 320px;padding:8px 14px;border-radius:999px !important;border:1px solid var(--border);background:var(--bg-card);color:var(--text-primary);font-size:13px;font-family:inherit;min-height:36px;box-sizing:border-box}
.ff-m2360-bar select{border-radius:999px !important;border:1px solid var(--border) !important;padding:8px 34px 8px 14px !important;font-size:13px !important;min-height:36px;background-color:var(--bg-card) !important;color:var(--text-primary);font-family:inherit;min-width:0 !important;width:auto}
.ff-m2360-bar input[type=date]{border-radius:999px !important;border:1px solid var(--border);padding:7px 12px;font-size:13px;min-height:36px;background:var(--bg-card);color:var(--text-primary);font-family:inherit;box-sizing:border-box}
.ff-m2360-count{margin-left:auto;font-size:13px;color:var(--text-muted);white-space:nowrap}
#po-lifecycle-action-bar select,#po-lifecycle-action-bar input,#billing-client-filter,#billing-currency-filter,#ret-log select{border-radius:999px !important;padding:8px 34px 8px 14px !important;font-size:13px !important;min-height:36px;border:1px solid var(--border) !important;background-color:var(--bg-card) !important;font-family:inherit}
#po-lifecycle-action-bar input{padding:8px 14px !important;min-width:220px}
#transition button[onclick="loadTransitionData()"],#transition button[onclick="loadOrderProcessingLog()"],#transition label[for="transition-client-filter"]{display:none !important}
#ret-claims #ffpc-note{display:none !important}
#ret-claims .ffpc-bar input[type=search]{order:-1}
#alerts-pager-prev,#alerts-pager-next{border-radius:999px !important}
:root.dark .dim-pill.ff-tb-pill{background:var(--bg-card) !important;color:var(--text-secondary) !important;border-color:var(--border) !important}
:root.dark .dim-pill.ff-tb-pill.active{background:#111 !important;color:#fff !important;border-color:#111 !important}
@media (max-width:767px){.ff-m2360-search,#po-lifecycle-action-bar input{flex:1 1 100%;min-width:0 !important}.ff-m2360-bar select,.ff-m2360-bar input[type=date]{flex:1 1 40%;min-height:44px}.ff-m2360-count{margin-left:0;flex-basis:100%}.ff-m2360-bar .ff-tb-pill{min-height:36px}}

.ff-tb-count { font-size:12px; opacity:.75; }
.ff-tb-search { min-width:260px; padding:8px 14px; border-radius:999px; border:1px solid var(--border);
  background:var(--bg-card); color:var(--text-primary); font-size:13px; font-family:'Inter',sans-serif; }
.ff-tb-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:12px; }
.ff-tb-card { border:1px solid var(--border); border-radius:12px; background:var(--bg-card); padding:14px 16px; }
.ff-tb-card-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.ff-tb-brand { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.ff-tb-prio { font-size:11px; padding:2px 8px; border-radius:999px; font-weight:600; }
.ff-tb-prio-high { background:#fef3c7; color:#92400e; }
.ff-tb-prio-critical { background:#fee2e2; color:#991b1b; }
.ff-tb-prio-low { background:#f1f5f9; color:#475569; }
.ff-tb-title { font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:4px; line-height:1.35; }
.ff-tb-instr { font-size:12.5px; color:var(--text-secondary); line-height:1.45; margin-bottom:10px; }
.ff-tb-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
.ff-tb-avatar { width:24px; height:24px; border-radius:50%; background:#111; color:#fff; font-size:10px;
  font-weight:600; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; }
.ff-tb-who { font-size:12px; color:var(--text-secondary); }
.ff-tb-due { font-size:12px; color:var(--text-muted); padding:2px 8px; border-radius:999px; background:var(--bg-hover); }
.ff-tb-due.overdue { background:#fee2e2; color:#991b1b; font-weight:600; }
.ff-tb-done-badge { font-size:11px; padding:2px 10px; border-radius:999px; background:#dcfce7; color:#166534; font-weight:600; margin-left:auto; }
.ff-tb-done-btn { margin-left:auto; padding:5px 12px; border-radius:999px; border:1px solid var(--border);
  background:var(--bg-card); color:var(--text-secondary); font-size:12px; cursor:pointer; font-family:'Inter',sans-serif; }
.ff-tb-done-btn:hover { background:#111; color:#fff; border-color:#111; }
