/* ==========================================================================
   VendraOS — Business OS for Sellers
   Premium SaaS-style dashboard styling. Scoped entirely under .selleros-app
   so it never leaks into the surrounding theme.
   ========================================================================== */

.selleros-app {
	--selleros-accent: #2563EB;
	--selleros-accent-2: #1D4ED8;
	--selleros-accent-3: #3B82F6;
	--selleros-bg: #F4F8FB;
	--selleros-surface: #FFFFFF;
	--selleros-surface-2: #EFF6FB;
	--selleros-border: #E1E9F0;
	--selleros-text: #12202B;
	--selleros-text-muted: #62758A;
	--selleros-radius: 16px;
	--selleros-radius-sm: 10px;
	--selleros-shadow: 0 4px 24px rgba(15, 60, 90, 0.06);
	--selleros-shadow-lg: 0 12px 40px rgba(15, 60, 90, 0.14);
	--selleros-green: #10B981;
	--selleros-red: #EF4444;
	--selleros-orange: #F59E0B;
	--selleros-sidebar-w: 260px;
	--selleros-max-w: 1320px;

	position: relative;
	display: flex;
	width: 100%;
	max-width: var(--selleros-max-w);
	margin: 0 auto;
	min-height: 100vh;
	background: var(--selleros-bg);
	color: var(--selleros-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	border-radius: var(--selleros-radius);
	overflow: hidden;
	box-shadow: var(--selleros-shadow-lg);
}
.selleros-app *, .selleros-app *::before, .selleros-app *::after { box-sizing: border-box; }
.selleros-app img { max-width: 100%; }
.selleros-app a { color: var(--selleros-accent-2); text-decoration: none; cursor: pointer; }
.selleros-app a:link, .selleros-app a:visited { text-decoration: none; }
.selleros-app button { font-family: inherit; cursor: pointer; }
.selleros-app a.selleros-btn-primary, .selleros-app a.selleros-btn-ghost, .selleros-app a.selleros-btn-ghost-sm { color: inherit; }

/* Dark mode — tuned for readable contrast on every surface */
.selleros-app.selleros-dark {
	--selleros-bg: #0B0E14;
	--selleros-surface: #151924;
	--selleros-surface-2: #1D2230;
	--selleros-border: #2B3140;
	--selleros-text: #EDEFF5;
	--selleros-text-muted: #9AA3B5;
	--selleros-shadow: 0 4px 24px rgba(0,0,0,0.35);
	--selleros-shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}
.selleros-app.selleros-dark ::placeholder { color: #6B7385; opacity: 1; }
.selleros-app.selleros-dark .selleros-field input,
.selleros-app.selleros-dark .selleros-field select,
.selleros-app.selleros-dark .selleros-field textarea,
.selleros-app.selleros-dark .selleros-search-input,
.selleros-app.selleros-dark .selleros-select,
.selleros-app.selleros-dark .selleros-search { background: var(--selleros-surface-2); color: var(--selleros-text); }
.selleros-app.selleros-dark .selleros-icon-btn { background: var(--selleros-surface-2); border-color: var(--selleros-border); color: var(--selleros-text); }
.selleros-app.selleros-dark .selleros-row-actions button,
.selleros-app.selleros-dark .selleros-pagination button { background: var(--selleros-surface-2); }
/* Make sure every bit of plain UI text actually switches to the light
   dark-mode color instead of staying at its light-mode value — some
   headings/labels/table cells only pick up color via inheritance, and a
   WordPress theme's own global `h2 { color: ... }`-style rules can quietly
   win that inheritance battle and leave dark-mode text unreadable. */
.selleros-app.selleros-dark h1,
.selleros-app.selleros-dark h2,
.selleros-app.selleros-dark h3,
.selleros-app.selleros-dark h4,
.selleros-app.selleros-dark h5,
.selleros-app.selleros-dark h6,
.selleros-app.selleros-dark p,
.selleros-app.selleros-dark label,
.selleros-app.selleros-dark td,
.selleros-app.selleros-dark th,
.selleros-app.selleros-dark li,
.selleros-app.selleros-dark .selleros-field > span {
	color: var(--selleros-text);
}
.selleros-app.selleros-dark .selleros-page-head p,
.selleros-app.selleros-dark .selleros-template-card p,
.selleros-app.selleros-dark .selleros-field-hint,
.selleros-app.selleros-dark .selleros-invoice-live-hint {
	color: var(--selleros-text-muted);
}
/* The invoice itself always stays a plain white/printable document,
   whatever theme the rest of the app is in — customers shouldn't receive
   a dark-mode-colored invoice. */
.selleros-app.selleros-dark .selleros-invoice-preview,
.selleros-app.selleros-dark .selleros-invoice-preview-inline {
	background: #ffffff; color: #12202B;
}
.selleros-app.selleros-dark .selleros-invoice-preview h1,
.selleros-app.selleros-dark .selleros-invoice-preview h2,
.selleros-app.selleros-dark .selleros-invoice-preview h3,
.selleros-app.selleros-dark .selleros-invoice-preview p,
.selleros-app.selleros-dark .selleros-invoice-preview td,
.selleros-app.selleros-dark .selleros-invoice-preview th,
.selleros-app.selleros-dark .selleros-invoice-preview-inline h1,
.selleros-app.selleros-dark .selleros-invoice-preview-inline h2,
.selleros-app.selleros-dark .selleros-invoice-preview-inline h3,
.selleros-app.selleros-dark .selleros-invoice-preview-inline p,
.selleros-app.selleros-dark .selleros-invoice-preview-inline td,
.selleros-app.selleros-dark .selleros-invoice-preview-inline th {
	color: #12202B;
}

/* ---------- Sidebar ---------- */
.selleros-sidebar {
	width: var(--selleros-sidebar-w);
	flex-shrink: 0;
	background: #2563EB;
	color: #fff;
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	overflow-y: auto;
}
.selleros-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.selleros-brand-icon {
	width: 38px; height: 38px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; flex-shrink: 0; overflow: hidden;
}
.selleros-brand-icon svg { width: 100%; height: 100%; display: block; }
.selleros-brand-text strong { display: block; font-size: 16px; }
.selleros-brand-text small { color: rgba(255,255,255,0.65); font-size: 11px; }

.selleros-nav { display: flex; flex-direction: column; gap: 4px; }
.selleros-nav-item,
.selleros-nav-item:link,
.selleros-nav-item:visited {
	display: flex; align-items: center; gap: 12px;
	padding: 11px 14px;
	border-radius: var(--selleros-radius-sm);
	color: rgba(255,255,255,0.8) !important;
	text-decoration: none !important;
	font-weight: 500;
	transition: background .15s ease, color .15s ease, transform .1s ease;
}
.selleros-nav-item span { font-size: 16px; width: 20px; text-align: center; }
.selleros-nav-item:hover, .selleros-nav-item:hover:link { background: transparent; color: #fff !important; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.6); }
.selleros-nav-item.is-active, .selleros-nav-item.is-active:link {
	background: rgba(255,255,255,0.16);
	color: #fff !important;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}

.selleros-overlay {
	display: none;
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 40;
}

/* ---------- Main / topbar ---------- */
.selleros-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--selleros-bg); }

.selleros-topbar {
	display: flex; align-items: center; gap: 16px;
	padding: 14px 28px;
	background: var(--selleros-surface);
	border-bottom: 1px solid var(--selleros-border);
	position: sticky; top: 0; z-index: 20;
}
.selleros-burger { display: none; background: none; border: none; font-size: 20px; color: var(--selleros-text); }
.selleros-search {
	flex: 1; max-width: 420px;
	display: flex; align-items: center; gap: 8px;
	background: var(--selleros-bg);
	border: 1px solid var(--selleros-border);
	border-radius: 10px;
	padding: 9px 14px;
}
.selleros-search input { flex: 1; border: none; background: none; outline: none; color: var(--selleros-text); font-size: 13px; }
.selleros-topbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.selleros-quick-add {
	background: linear-gradient(135deg, var(--selleros-accent-2), var(--selleros-accent));
	color: #fff; border: none; border-radius: 10px;
	padding: 9px 16px; font-weight: 600; font-size: 13px;
	box-shadow: 0 4px 14px rgba(99, 60, 220, 0.35);
}
.selleros-icon-btn {
	background: var(--selleros-surface-2); border: 1px solid var(--selleros-border);
	width: 38px; height: 38px; border-radius: 10px; font-size: 16px;
	color: var(--selleros-text); display: flex; align-items: center; justify-content: center;
	transition: background .15s ease, border-color .15s ease;
}
.selleros-icon-btn:hover { background: var(--selleros-border); }
.selleros-icon-btn svg { width: 18px; height: 18px; display: block; }
#selleros-theme-toggle { background: #111827; border-color: #111827; }
#selleros-theme-toggle:hover { background: #000; border-color: #000; }
.selleros-app.selleros-dark #selleros-theme-toggle { background: #fff; border-color: #fff; }
.selleros-app.selleros-dark #selleros-theme-toggle:hover { background: #E5E7EB; }
.selleros-theme-switch { display: inline-flex; border: 1px solid var(--selleros-border); border-radius: 999px; padding: 3px; gap: 2px; background: var(--selleros-surface-2); }
.selleros-theme-switch button {
	border: none; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
	color: var(--selleros-text-muted); transition: background .15s ease, color .15s ease;
}
.selleros-theme-switch button.is-active { background: var(--selleros-surface); color: var(--selleros-text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.selleros-app.selleros-dark .selleros-theme-switch button.is-active { background: var(--selleros-accent); color: #fff; }

.selleros-period-switch { display: inline-flex; border: 1px solid var(--selleros-border); border-radius: 999px; padding: 3px; gap: 2px; background: var(--selleros-surface); flex-shrink: 0; }
.selleros-period-switch button {
	border: none; background: transparent; padding: 7px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
	color: var(--selleros-text-muted); transition: background .15s ease, color .15s ease;
}
.selleros-period-switch button.is-active { background: var(--selleros-accent); color: #fff; }
.selleros-user { display: flex; align-items: center; gap: 10px; }
.selleros-avatar { width: 38px; height: 38px; min-width: 38px; border-radius: 50% !important; object-fit: cover; display: block; overflow: hidden; background: var(--selleros-border); flex-shrink: 0; }
.selleros-avatar-fallback { display: flex !important; align-items: center; justify-content: center; background: linear-gradient(135deg,#4F8CFF,#6D28D9); color: #fff; font-weight: 700; font-size: 15px; text-transform: uppercase; }
.selleros-user-text strong { display: block; font-size: 13px; }
.selleros-user-text small { color: var(--selleros-text-muted); font-size: 11px; }

/* ---------- Content ---------- */
.selleros-content { padding: 24px 28px 60px; overflow-y: auto; }
.selleros-module { display: none; }
.selleros-module.is-active { display: block; animation: sellerosFadeIn .25s ease; }
@keyframes sellerosFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.selleros-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.selleros-page-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.selleros-delivery-notice {
	display: flex; align-items: center; gap: 10px; background: linear-gradient(135deg,#FFF7ED,#FFEDD5);
	border: 1px solid #FED7AA; color: #9A3412; border-radius: 12px; padding: 12px 16px;
	font-size: 13px; margin-bottom: 20px; line-height: 1.5;
}
.selleros-delivery-notice-icon { font-size: 18px; flex-shrink: 0; }
.selleros-td-products { font-size: 12px; color: var(--selleros-text-muted); max-width: 220px; }
.selleros-page-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.selleros-page-head p { margin: 0; color: var(--selleros-text-muted); font-size: 13px; }

/* ---------- Stat cards ---------- */
.selleros-stat-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}
.selleros-stat-card {
	background: var(--selleros-surface);
	border: 1px solid var(--selleros-border);
	border-radius: var(--selleros-radius);
	padding: 18px;
	box-shadow: var(--selleros-shadow);
	min-height: 118px;
}
.selleros-stat-card.skeleton { background: linear-gradient(90deg, var(--selleros-border) 25%, var(--selleros-bg) 50%, var(--selleros-border) 75%); background-size: 200% 100%; animation: sellerosShimmer 1.4s infinite; }
@keyframes sellerosShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.selleros-stat-icon {
	width: 40px; height: 40px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: #fff; margin-bottom: 12px;
}
.selleros-stat-label { color: var(--selleros-text-muted); font-size: 12px; margin-bottom: 4px; }
.selleros-stat-value { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.selleros-stat-change { font-size: 12px; font-weight: 600; }
.selleros-stat-change.is-up { color: var(--selleros-green); }
.selleros-stat-change.is-down { color: var(--selleros-red); }

/* ---------- Cards & grids ---------- */
.selleros-card {
	background: var(--selleros-surface);
	border: 1px solid var(--selleros-border);
	border-radius: var(--selleros-radius);
	box-shadow: var(--selleros-shadow);
	padding: 20px;
	margin-bottom: 20px;
	backdrop-filter: blur(6px);
}
.selleros-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.selleros-card-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.selleros-card-head a { font-size: 12.5px; font-weight: 600; }

.selleros-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.selleros-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.selleros-span-2 { grid-column: span 2; }
.selleros-chart-wrap { position: relative; height: 240px; }

.selleros-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.selleros-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--selleros-text-muted); }
.selleros-legend .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.selleros-legend strong { color: var(--selleros-text); margin-left: auto; }

/* ---------- Quick actions ---------- */
.selleros-quick-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.selleros-qa {
	flex: 1; min-width: 150px;
	display: flex; align-items: center; gap: 10px;
	border: none; border-radius: var(--selleros-radius-sm);
	padding: 16px; font-weight: 600; font-size: 13px;
	transition: transform .12s ease;
}
.selleros-qa:hover { transform: translateY(-2px); }
.selleros-qa span { font-size: 18px; }
.selleros-qa-blue { background: #EFF6FF; color: #1D4ED8; }
.selleros-qa-green { background: #ECFDF5; color: #047857; }
.selleros-qa-purple { background: #F5F3FF; color: #6D28D9; }
.selleros-qa-orange { background: #FFF7ED; color: #C2410C; }
.selleros-qa-red { background: #FEF2F2; color: #B91C1C; }

/* ---------- Tables ---------- */
.selleros-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.selleros-search-input { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: var(--selleros-bg); border: 1px solid var(--selleros-border); border-radius: 10px; padding: 9px 14px; }
.selleros-search-input input { border: none; background: none; outline: none; flex: 1; color: var(--selleros-text); }
.selleros-select {
	background: var(--selleros-bg); border: 1px solid var(--selleros-border); border-radius: 10px;
	padding: 9px 12px; color: var(--selleros-text); font-size: 13px;
}
.selleros-table-wrap { overflow-x: auto; }
.selleros-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.selleros-table thead th {
	text-align: left; color: var(--selleros-text-muted); font-weight: 600; font-size: 11.5px;
	text-transform: uppercase; letter-spacing: .02em;
	padding: 10px 12px; border-bottom: 1px solid var(--selleros-border);
}
.selleros-table tbody td { padding: 12px; border-bottom: 1px solid var(--selleros-border); vertical-align: middle; }
.selleros-table tbody tr:hover { background: var(--selleros-bg); }
.selleros-th-actions, .selleros-td-actions { text-align: right; }
.selleros-empty { text-align: center; color: var(--selleros-text-muted); padding: 30px 12px !important; }

.selleros-row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.selleros-row-actions button {
	width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--selleros-border);
	background: var(--selleros-surface); font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
	color: var(--selleros-text-muted); transition: background .15s ease, border-color .15s ease, color .15s ease;
}
/* Force SVGs to always render at full size/opacity, and force each action's
   icon color explicitly (rather than relying only on inline stroke/fill
   attributes) — this defeats any WordPress theme or page-builder stylesheet
   that globally resets `svg`/`svg path` fill or stroke (a common pattern
   some icon-font compatibility layers use), which would otherwise silently
   blank out these icons regardless of what color is set inline. */
.selleros-app .selleros-row-actions button svg {
	width: 16px !important; height: 16px !important; display: inline-block !important;
	opacity: 1 !important; visibility: visible !important; pointer-events: none;
}
.selleros-row-actions button:hover { background: var(--selleros-surface-2); color: var(--selleros-accent-2); border-color: var(--selleros-accent-3); }
.selleros-row-actions .is-danger { color: #DC2626; }
.selleros-row-actions .is-danger:hover { background: #FEF2F2; border-color: #FCA5A5; color: #B91C1C; }
.selleros-row-actions .is-whatsapp:hover { background: #ECFDF5; border-color: #6EE7B7; color: #059669; }

/* Explicit, high-specificity icon colors per action — belt-and-suspenders
   alongside the inline SVG attributes, scoped to .selleros-app so they can
   never leak out, but strong enough to always win inside it. */
.selleros-app .selleros-row-actions button.is-view svg,
.selleros-app .selleros-row-actions button.is-view svg * { stroke: #2563EB !important; }
.selleros-app .selleros-row-actions button.is-download svg,
.selleros-app .selleros-row-actions button.is-download svg * { stroke: #4F46E5 !important; }
.selleros-app .selleros-row-actions button.is-whatsapp svg,
.selleros-app .selleros-row-actions button.is-whatsapp svg * { fill: #059669 !important; stroke: none !important; }
.selleros-app .selleros-row-actions button.is-mark-paid svg,
.selleros-app .selleros-row-actions button.is-mark-paid svg * { stroke: #059669 !important; }
.selleros-app .selleros-row-actions button.is-mark-pending svg,
.selleros-app .selleros-row-actions button.is-mark-pending svg * { stroke: #C2410C !important; }
.selleros-app .selleros-row-actions button.is-danger svg,
.selleros-app .selleros-row-actions button.is-danger svg * { stroke: #DC2626 !important; }

/* Text-label action buttons (used for the invoices table): plain words
   instead of SVG icons, so the action is always legible no matter what a
   WordPress theme's global CSS does to <svg> elements — there's simply
   nothing left for it to hide or recolor. Colored background + colored
   text per action, all forced with !important to also survive a theme's
   generic `button { ... }` reset. */
.selleros-app .selleros-row-actions.selleros-row-actions-text button {
	width: auto !important; height: auto !important; padding: 6px 10px !important;
	font-size: 11.5px !important; font-weight: 700 !important; line-height: 1 !important;
	border-radius: 7px !important; white-space: nowrap;
}
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-view { background: #EFF6FF !important; border-color: #BFDBFE !important; color: #2563EB !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-edit { background: #EFF6FF !important; border-color: #BFDBFE !important; color: #2563EB !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-download { background: #EEF2FF !important; border-color: #C7D2FE !important; color: #4F46E5 !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-whatsapp { background: #ECFDF5 !important; border-color: #A7F3D0 !important; color: #059669 !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-mark-paid { background: #ECFDF5 !important; border-color: #A7F3D0 !important; color: #059669 !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-mark-pending { background: #FFF7ED !important; border-color: #FED7AA !important; color: #C2410C !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button.is-danger { background: #FEF2F2 !important; border-color: #FECACA !important; color: #DC2626 !important; }
.selleros-app .selleros-row-actions.selleros-row-actions-text button:hover { filter: brightness(0.96); }

.selleros-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.selleros-pagination button {
	min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--selleros-border);
	background: var(--selleros-surface); font-size: 12.5px; color: var(--selleros-text);
}
.selleros-pagination button.is-active { background: var(--selleros-accent); color: #fff; border-color: var(--selleros-accent); }

/* ---------- Badges ---------- */
.selleros-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: capitalize; }
.selleros-badge-inquiry, .selleros-badge-pending { background: #EFF6FF; color: #1D4ED8; }
.selleros-badge-payment_pending { background: #FFF7ED; color: #C2410C; }
.selleros-badge-paid { background: #ECFDF5; color: #047857; }
.selleros-badge-packed { background: #F5F3FF; color: #6D28D9; }
.selleros-badge-shipped { background: #FDF2F8; color: #BE185D; }
.selleros-badge-delivered { background: #ECFDF5; color: #047857; }
.selleros-badge-cancelled { background: #FEF2F2; color: #B91C1C; }
.selleros-badge-overdue { background: #FEF2F2; color: #B91C1C; }
.selleros-badge-partial { background: #FFF7ED; color: #C2410C; }

/* ---------- Buttons ---------- */
.selleros-btn-primary {
	background: linear-gradient(135deg, var(--selleros-accent-2), var(--selleros-accent));
	color: #fff; border: none; border-radius: 10px; padding: 10px 18px;
	font-weight: 600; font-size: 13px; box-shadow: 0 4px 14px rgba(99,60,220,.3);
}
.selleros-btn-ghost { background: var(--selleros-bg); color: var(--selleros-text); border: 1px solid var(--selleros-border); border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: 13px; }
.selleros-btn-ghost-sm { background: var(--selleros-bg); color: var(--selleros-text); border: 1px solid var(--selleros-border); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 12.5px; }

/* ---------- Modals ---------- */
.selleros-modal {
	display: none; position: fixed; inset: 0; z-index: 100;
	align-items: center; justify-content: center;
	background: rgba(15, 15, 30, 0.55);
	padding: 20px;
}
.selleros-modal.is-open { display: flex; }
.selleros-modal-box {
	background: var(--selleros-surface); border-radius: var(--selleros-radius);
	width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
	box-shadow: var(--selleros-shadow-lg);
	animation: sellerosPop .18s ease;
}
.selleros-modal-lg { max-width: 760px; }
@keyframes sellerosPop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.selleros-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--selleros-border); }
.selleros-modal-head h3 { margin: 0; font-size: 16px; }
.selleros-modal-close { background: none; border: none; font-size: 22px; color: var(--selleros-text-muted); line-height: 1; }
.selleros-form { padding: 20px 22px; }
.selleros-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.selleros-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--selleros-text-muted); }
.selleros-field input, .selleros-field select, .selleros-field textarea {
	font-family: inherit; font-size: 13px; font-weight: 400; color: var(--selleros-text);
	background: var(--selleros-bg); border: 1px solid var(--selleros-border); border-radius: 9px;
	padding: 9px 12px; outline: none; resize: vertical;
}
.selleros-field input:focus, .selleros-field select:focus, .selleros-field textarea:focus { border-color: var(--selleros-accent); }
.selleros-field small { font-weight: 400; color: var(--selleros-text-muted); }
.selleros-toggle-field { flex-direction: row; align-items: center; justify-content: space-between; }
.selleros-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- Line items (orders / invoices) ----------
   Two-row card per item: full-width product search on top (it needs the
   room — product names can be long), then Size/Qty/Price/Total on a
   second row below. A single row with fixed-pixel side columns used to
   squeeze the product search down to almost nothing whenever this sat in
   a narrower column (e.g. next to the order summary panel). */
.selleros-line-items { margin: 18px 0; padding: 14px; background: var(--selleros-bg); border-radius: 12px; }
.selleros-line-item {
	display: flex; flex-direction: column; gap: 8px; padding: 10px;
	border: 1px solid var(--selleros-border); border-radius: 10px; margin-bottom: 10px;
	background: var(--selleros-surface);
}
.selleros-li-row-main { display: flex; align-items: center; gap: 8px; }
.selleros-li-row-main .selleros-searchable { flex: 1 1 auto; min-width: 0; }
.selleros-li-row-main .selleros-searchable input { width: 100%; box-sizing: border-box; }
.selleros-li-row-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.selleros-li-row-meta label { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--selleros-text-muted); }
.selleros-line-item select, .selleros-line-item input { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--selleros-border); background: var(--selleros-surface); font-size: 12.5px; box-sizing: border-box; width: 100%; }
.selleros-li-total { font-weight: 700; font-size: 13px; padding: 7px 9px; border-radius: 8px; background: var(--selleros-surface-2); display: flex; align-items: center; }
.selleros-li-remove {
	flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--selleros-border);
	background: var(--selleros-surface-2); color: var(--selleros-red); font-size: 17px; line-height: 1;
}
.selleros-li-remove:hover { background: #FEF2F2; border-color: #FCA5A5; }
.selleros-order-total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 6px; border-top: 1px dashed var(--selleros-border); font-size: 14px; }

/* ---------- Image upload ---------- */
.selleros-image-upload { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 0 22px; }
.selleros-image-upload img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--selleros-border); }

/* ---------- Activity list ---------- */
.selleros-activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.selleros-activity-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; }
.selleros-activity-icon { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: var(--selleros-bg); }
.selleros-activity-time { color: var(--selleros-text-muted); font-size: 11px; margin-left: auto; white-space: nowrap; }

.selleros-summary-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.selleros-summary-list li { display: flex; justify-content: space-between; font-size: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--selleros-border); }
.selleros-summary-list li:last-child { border-bottom: none; padding-bottom: 0; }
.selleros-summary-list strong { font-weight: 700; }

/* ---------- WhatsApp templates ---------- */
.selleros-chip-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.selleros-chip { background: var(--selleros-bg); border: 1px solid var(--selleros-border); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--selleros-text-muted); }
.selleros-chip.is-active { background: var(--selleros-accent); border-color: var(--selleros-accent); color: #fff; }
.selleros-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.selleros-template-card { border: 1px solid var(--selleros-border); border-radius: 12px; padding: 14px; background: var(--selleros-bg); }
.selleros-template-card h4 { margin: 0 0 6px; font-size: 13.5px; }
.selleros-template-card p { margin: 0 0 12px; font-size: 12.5px; color: var(--selleros-text-muted); max-height: 60px; overflow: hidden; }
.selleros-template-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Invoice preview ---------- */
.selleros-invoice-preview { padding: 30px; }
.selleros-invoice-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.selleros-invoice-header img { max-height: 50px; }
.selleros-invoice-brand { display: flex; align-items: center; gap: 14px; }
.selleros-invoice-logo { max-height: 54px; max-width: 140px; object-fit: contain; flex-shrink: 0; }
.selleros-invoice-brand-text h2 { margin: 0; }
.selleros-invoice-meta { text-align: right; font-size: 12.5px; color: var(--selleros-text-muted); }
.selleros-invoice-parties { display: flex; justify-content: space-between; margin-bottom: 24px; font-size: 13px; }
.selleros-invoice-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.selleros-invoice-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--selleros-text-muted); border-bottom: 2px solid var(--selleros-border); padding: 8px; }
.selleros-invoice-table td { padding: 8px; border-bottom: 1px solid var(--selleros-border); font-size: 13px; }
/* Totals row: QR (if any) sits in the empty space to the left, totals block
   stays pinned to the right — QR no longer overlaps the invoice header. */
.selleros-invoice-totals-row { display: flex; align-items: flex-start; gap: 24px; }
.selleros-invoice-totals { margin-left: auto; width: 260px; }
.selleros-invoice-totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; }
.selleros-invoice-totals .grand { font-weight: 700; font-size: 15px; border-top: 2px solid var(--selleros-border); margin-top: 6px; padding-top: 10px; }
.selleros-invoice-qr { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--selleros-border); }
.selleros-invoice-qr img { border-radius: 8px; border: 1px solid var(--selleros-border); }
.selleros-invoice-qr p { font-size: 12.5px; color: var(--selleros-text-muted); margin: 0; }
.selleros-invoice-qr-block { flex-shrink: 0; text-align: center; padding-top: 4px; }
.selleros-invoice-qr-block img { border-radius: 8px; border: 1px solid var(--selleros-border); }
.selleros-invoice-qr-block p { font-size: 10.5px; color: var(--selleros-text-muted); margin: 4px 0 0; font-weight: 600; }

.selleros-inline-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.selleros-field-inline { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--selleros-text-muted); margin-bottom: 14px; }
.selleros-field-inline input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--selleros-accent); flex-shrink: 0; }

/* ---------- Searchable select (customer / product picker) ---------- */
.selleros-searchable { position: relative; }
.selleros-searchable input[type="text"] {
	width: 100%; font-family: inherit; font-size: 13px; color: var(--selleros-text);
	background: var(--selleros-bg); border: 1px solid var(--selleros-border); border-radius: 9px;
	padding: 9px 12px; outline: none;
}
.selleros-searchable input[type="text"]:focus { border-color: var(--selleros-accent); }
.selleros-searchable.is-linked input[type="text"] { border-color: var(--selleros-green); background: #ECFDF5; }
.selleros-app.selleros-dark .selleros-searchable.is-linked input[type="text"] { background: rgba(16,185,129,0.12); }

/* ---------- Invoice builder (two-column, matches live preview UX) ---------- */
.selleros-invoice-builder { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.selleros-invoice-builder .selleros-card { margin-bottom: 0; }
.selleros-invoice-builder h3 { margin: 0 0 16px; font-size: 15px; font-weight: 700; }
.selleros-invoice-form-fields { display: flex; flex-direction: column; gap: 14px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.selleros-invoice-form-fields .selleros-line-items { margin: 4px 0; }
.selleros-invoice-live { position: sticky; top: 84px; }
.selleros-invoice-live-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
/* !important throughout: some WordPress themes apply their own generic
   `button { padding: ...; font-size: ...; }` reset sitewide, which can
   otherwise override these and blow the buttons up to oversized tiles. */
.selleros-invoice-live-actions button {
	flex: 0 0 auto !important; width: auto !important; height: auto !important;
	padding: 9px 14px !important; font-size: 12.5px !important; font-weight: 600 !important;
	border-radius: 8px !important; line-height: 1.2 !important; display: inline-flex !important;
	align-items: center !important; gap: 6px !important; white-space: nowrap;
}
.selleros-invoice-live-actions button svg { width: 15px !important; height: 15px !important; }
.selleros-invoice-live-actions .selleros-btn-download { background: linear-gradient(135deg,#2563EB,#1D4ED8) !important; color:#fff !important; border:none !important; }
.selleros-invoice-live-actions .selleros-btn-whatsapp { background: linear-gradient(135deg,#25D366,#128C7E) !important; color:#fff !important; border:none !important; }
.selleros-invoice-live-hint { font-size: 11.5px; color: var(--selleros-text-muted); margin-top: 8px; }
.selleros-invoice-preview-inline { background: var(--selleros-surface); border: 1px solid var(--selleros-border); border-radius: 12px; padding: 22px; }

/* ---------- WhatsApp: connect-your-number card ---------- */
.selleros-connect-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.selleros-connect-row .selleros-field { flex: 1; min-width: 220px; margin-bottom: 0; }
.selleros-connect-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--selleros-green); }
.selleros-connect-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--selleros-green); }

/* ---------- Expenses: cost-by-product summary ---------- */
.selleros-cost-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.selleros-cost-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--selleros-text-muted); border-bottom: 1px solid var(--selleros-border); padding: 8px; }
.selleros-cost-table td { padding: 8px; border-bottom: 1px solid var(--selleros-border); }

/* ---------- QR generator ---------- */
.selleros-qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.selleros-qr-box img { border-radius: 10px; border: 1px solid var(--selleros-border); background: #fff; padding: 8px; }

.selleros-toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
/* Fixed dark background + white text, deliberately NOT tied to the
   --selleros-text variable — that variable flips between near-black
   (light mode) and near-white (dark mode), which previously made the
   toast's own background follow it too and left white-on-white,
   unreadable text whenever the app was in dark mode. A toast should
   always be legible regardless of which theme the rest of the app is in. */
.selleros-toast {
	background: #1A2233; color: #FFFFFF; padding: 12px 18px; border-radius: 10px;
	font-size: 13px; font-weight: 500; box-shadow: var(--selleros-shadow-lg);
	animation: sellerosToastIn .2s ease;
}
.selleros-toast.is-error { background: #DC2626; color: #FFFFFF; }
.selleros-toast.is-success { background: #059669; color: #FFFFFF; }
@keyframes sellerosToastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.selleros-login-notice { padding: 40px; text-align: center; background: #fff; border-radius: 16px; color: #555; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.selleros-stat-grid { grid-template-columns: repeat(3, 1fr); }
	.selleros-grid-3 { grid-template-columns: 1fr; }
	.selleros-grid-2 { grid-template-columns: 1fr; }
	.selleros-span-2 { grid-column: span 1; }
	.selleros-invoice-builder { grid-template-columns: 1fr; }
	.selleros-invoice-live { position: static; }
}
@media (max-width: 780px) {
	.selleros-app { border-radius: 0; }
	.selleros-sidebar {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
		transform: translateX(-100%); transition: transform .2s ease;
	}
	.selleros-sidebar.is-open { transform: translateX(0); }
	.selleros-overlay.is-open { display: block; }
	.selleros-burger { display: block; }
	.selleros-stat-grid { grid-template-columns: repeat(2, 1fr); }
	.selleros-form-grid { grid-template-columns: 1fr; }
	.selleros-form-grid .selleros-span-2 { grid-column: span 1; }
	.selleros-topbar { padding: 12px 16px; }
	.selleros-content { padding: 16px; }
	.selleros-user-text { display: none; }
	.selleros-search { max-width: none; }
}
@media (max-width: 480px) {
	.selleros-stat-grid { grid-template-columns: 1fr; }
	.selleros-li-row-meta { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Invoice template picker (Settings) ---------- */
.selleros-template-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.selleros-template-option { cursor: pointer; text-align: center; font-size: 12px; font-weight: 600; color: var(--selleros-text-muted); }
.selleros-template-option span:last-child { display: block; margin-top: 6px; }
.selleros-template-swatch { height: 90px; border-radius: 10px; border: 2px solid var(--selleros-border); background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 5px; transition: border-color .15s ease, box-shadow .15s ease; }
.selleros-template-option.is-selected .selleros-template-swatch { border-color: var(--selleros-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.selleros-template-option.is-selected { color: var(--selleros-accent); }
.selleros-template-swatch .tpl-bar { display: block; height: 14px; border-radius: 3px; }
.selleros-template-swatch .tpl-line { display: block; height: 4px; border-radius: 2px; background: #E5E7EB; width: 80%; }
.selleros-template-swatch .tpl-line.short { width: 50%; }
.selleros-template-swatch .tpl-block { display: block; flex: 1; border-radius: 4px; background: #F3F4F6; margin-top: auto; }
.tpl-classic .tpl-bar { background: #2563EB; width: 40%; }
.tpl-modern .tpl-bar { background: linear-gradient(90deg,#2563EB,#7C3AED); width: 100%; height: 20px; }
.tpl-minimal .tpl-bar { background: #111827; width: 25%; height: 8px; }
.tpl-bold .tpl-bar { background: #F59E0B; width: 100%; height: 24px; }
.tpl-elegant .tpl-bar { background: #92400E; width: 35%; }
.tpl-elegant .tpl-block { background: #FEF3C7; }

/* ---------- Invoice preview style variants ---------- */
.selleros-invoice-preview.tpl-classic .selleros-invoice-header h2,
.selleros-invoice-preview-inline.tpl-classic .selleros-invoice-header h2 { color: #2563EB; }
.selleros-invoice-preview.tpl-modern .selleros-invoice-header,
.selleros-invoice-preview-inline.tpl-modern .selleros-invoice-header {
	background: linear-gradient(135deg,#2563EB,#7C3AED); color: #fff; padding: 18px; border-radius: 10px; margin: -8px -8px 20px;
}
.selleros-invoice-preview.tpl-modern .selleros-invoice-header h2,
.selleros-invoice-preview-inline.tpl-modern .selleros-invoice-header h2 { color: #fff; }
.selleros-invoice-preview.tpl-modern .selleros-invoice-header div,
.selleros-invoice-preview-inline.tpl-modern .selleros-invoice-header div { color: rgba(255,255,255,0.85) !important; }
.selleros-invoice-preview.tpl-minimal .selleros-invoice-header h2,
.selleros-invoice-preview-inline.tpl-minimal .selleros-invoice-header h2 { color: #111827; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; font-size: 20px; }
.selleros-invoice-preview.tpl-minimal .selleros-invoice-table th,
.selleros-invoice-preview-inline.tpl-minimal .selleros-invoice-table th { border-bottom: 2px solid #111827; color: #111827; }
.selleros-invoice-preview.tpl-bold .selleros-invoice-header,
.selleros-invoice-preview-inline.tpl-bold .selleros-invoice-header { border-bottom: 5px solid #F59E0B; padding-bottom: 16px; }
.selleros-invoice-preview.tpl-bold .selleros-invoice-header h2,
.selleros-invoice-preview-inline.tpl-bold .selleros-invoice-header h2 { color: #B45309; }
.selleros-invoice-preview.tpl-bold .selleros-invoice-totals .grand,
.selleros-invoice-preview-inline.tpl-bold .selleros-invoice-totals .grand { color: #B45309; }
.selleros-invoice-preview.tpl-elegant,
.selleros-invoice-preview-inline.tpl-elegant { font-family: Georgia, 'Times New Roman', serif; }
.selleros-invoice-preview.tpl-elegant .selleros-invoice-header h2,
.selleros-invoice-preview-inline.tpl-elegant .selleros-invoice-header h2 { color: #92400E; font-style: italic; }
.selleros-invoice-preview.tpl-elegant .selleros-invoice-table th,
.selleros-invoice-preview-inline.tpl-elegant .selleros-invoice-table th { color: #92400E; }

/* ---------- Colored action icon buttons (matches reference design) ---------- */
.selleros-row-actions button.is-view { background: #EFF6FF; border-color: #BFDBFE; }
.selleros-row-actions button.is-view:hover { background: #DBEAFE; }
.selleros-row-actions button.is-download { background: #EEF2FF; border-color: #C7D2FE; }
.selleros-row-actions button.is-download:hover { background: #E0E7FF; }
.selleros-row-actions button.is-whatsapp { background: #ECFDF5; border-color: #A7F3D0; }
.selleros-row-actions button.is-mark-paid { background: #ECFDF5; border-color: #A7F3D0; color: #059669 !important; }
.selleros-row-actions button.is-mark-paid:hover { background: #D1FAE5; }
.selleros-row-actions button.is-mark-pending { background: #FFF7ED; border-color: #FED7AA; color: #C2410C !important; }
.selleros-row-actions button.is-mark-pending:hover { background: #FFEDD5; }
.selleros-row-actions button.is-danger { background: #FEF2F2; border-color: #FECACA; }

/* ---------- Invoice builder: logo / QR upload rows ---------- */
.selleros-inv-upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.selleros-inv-upload-row img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--selleros-border); background: #fff; }
.selleros-inv-upload-row .selleros-btn-ghost-sm { flex-shrink: 0; }
.selleros-btn-ghost-sm.is-danger { color: #DC2626; border-color: #FECACA; background: #FEF2F2; }
.selleros-btn-ghost-sm.is-danger:hover { background: #FEE2E2; border-color: #FCA5A5; }

/* ---------- Toggle switch (Settings: Dark Mode, etc.) ---------- */
.selleros-toggle-field input[type="checkbox"] {
	appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px;
	background: var(--selleros-border); border: 1px solid var(--selleros-border); position: relative;
	cursor: pointer; flex-shrink: 0; transition: background .15s ease, border-color .15s ease;
}
.selleros-toggle-field input[type="checkbox"]::before {
	content: ""; position: absolute; top: 1px; left: 1px; width: 18px; height: 18px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform .15s ease;
}
.selleros-toggle-field input[type="checkbox"]:checked { background: var(--selleros-accent); border-color: var(--selleros-accent); }
.selleros-toggle-field input[type="checkbox"]:checked::before { transform: translateX(18px); }

@media (max-width: 640px) {
	.selleros-template-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Print (invoice) ---------- */
@media print {
	body * { visibility: hidden; }
	.selleros-invoice-preview, .selleros-invoice-preview *,
	.selleros-invoice-preview-inline, .selleros-invoice-preview-inline * { visibility: visible; }
	.selleros-invoice-preview { position: absolute; top: 0; left: 0; width: 100%; }
	.selleros-invoice-preview-inline { position: absolute; top: 0; left: 0; width: 100%; border: none; }
	.selleros-no-print { display: none !important; }
}
