:root {
	--digiscaler-primary: #4F46E5;
	--digiscaler-primary-hover: #4338CA;
	--digiscaler-primary-light: #EEF0FF;
	--digiscaler-whatsapp: #25D366;
	--digiscaler-whatsapp-hover: #1EBE59;
	--digiscaler-bg: #F4F5FA;
	--digiscaler-card: #FFFFFF;
	--digiscaler-text: #1F2333;
	--digiscaler-text-muted: #6B7280;
	--digiscaler-border: #E9EAF2;
	--digiscaler-radius: 12px;
	--digiscaler-shadow: 0 1px 3px rgba(16,24,40,0.06), 0 1px 2px rgba(16,24,40,0.04);
	--digiscaler-sidebar-w: 240px;
}
body.digiscaler-dark {
	--digiscaler-bg: #14161F;
	--digiscaler-card: #1D2030;
	--digiscaler-text: #F3F4F6;
	--digiscaler-text-muted: #9CA3AF;
	--digiscaler-border: #2C2F42;
	--digiscaler-primary-light: #262A48;
}

#wpcontent, #wpbody-content { background: var(--digiscaler-bg); }

/* =====================================================================
   Scoping / override layer
   ---------------------------------------------------------------------
   WordPress core (wp-admin forms.css) and whatever theme is active on
   the front end both style bare tags — input, select, table, h1-h6,
   a, ul/li — and some of those rules load after this file or carry
   surprising specificity, so raw colours/borders/radii/spacing were
   bleeding through instead of the design tokens above.

   Everything here is scoped to #digiscaler-crm-app / #digiscaler-crm-shell.
   IMPORTANT: an ID selector always outranks a class selector in CSS,
   with or without !important — so this block deliberately touches only
   properties that NONE of our own `.digiscaler-*` component rules set
   (box-sizing, heading/list/table box-model, link colour, native
   appearance/outline). It never sets background, border or box-shadow
   on input/select/textarea/button as a class, because those are exactly
   the properties our own `.digiscaler-btn`, `.digiscaler-inline-status`,
   `.digiscaler-table th`, etc. rely on — an ID-scoped reset would beat
   them and break our own design instead of the theme's. Those elements
   keep getting their look from the regular `.digiscaler-*` classes below,
   which is safe because nothing here competes with them. */
#digiscaler-crm-app,
#digiscaler-crm-shell {
	box-sizing: border-box;
}
#digiscaler-crm-app *,
#digiscaler-crm-shell *,
#digiscaler-crm-app *::before,
#digiscaler-crm-app *::after {
	box-sizing: border-box;
}
#digiscaler-crm-app,
#digiscaler-crm-app * {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}
#digiscaler-crm-app h1, #digiscaler-crm-app h2, #digiscaler-crm-app h3,
#digiscaler-crm-app h4, #digiscaler-crm-app h5, #digiscaler-crm-app h6 {
	margin: 0 0 8px; padding: 0; letter-spacing: normal;
}
#digiscaler-crm-app p { margin: 0 0 10px; }
#digiscaler-crm-app ul, #digiscaler-crm-app ol { margin: 0; padding: 0; list-style: none; }
#digiscaler-crm-app img, #digiscaler-crm-app svg { vertical-align: middle; }
#digiscaler-crm-app table { border-collapse: collapse; border-spacing: 0; width: 100%; }
#digiscaler-crm-app th, #digiscaler-crm-app td { text-align: left; font-weight: 400; }

/* Every native form control gets the same box model and has the theme's
   focus glow / native chrome switched off. This never sets colour,
   background or border here — those come from `.digiscaler-*` classes
   a few lines down, which is what keeps status pills, coloured dropdowns
   and buttons working. */
#digiscaler-crm-app input,
#digiscaler-crm-app select,
#digiscaler-crm-app textarea,
#digiscaler-crm-app button {
	font-family: inherit;
	box-sizing: border-box;
	outline: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
#digiscaler-crm-app button { cursor: pointer; text-transform: none; }
/* Native search-input chrome (WebKit magnifier/cancel icon) is what
   themes and wp-admin skin most aggressively — our own search icon and
   placeholder replace it visually, so strip the browser's own version. */
#digiscaler-crm-app input[type="search"]::-webkit-search-decoration,
#digiscaler-crm-app input[type="search"]::-webkit-search-cancel-button,
#digiscaler-crm-app input[type="search"]::-webkit-search-results-button,
#digiscaler-crm-app input[type="search"]::-webkit-search-results-decoration {
	-webkit-appearance: none;
	display: none;
}

/* Links — boosts our own rules just enough to beat a plain theme `a`
   rule, at (effectively) the same specificity our components already
   use, so nav items / pills / buttons (styled by more specific classes
   further down) still win over this. */
:where(#digiscaler-crm-app, #digiscaler-crm-shell) a {
	color: var(--digiscaler-primary);
	text-decoration: none;
}
:where(#digiscaler-crm-app, #digiscaler-crm-shell) a:hover {
	color: var(--digiscaler-primary-hover);
}

/* ---- The two fields flagged as picking up WordPress' own look:
   the topbar search box and the dashboard's custom date-range inputs.
   Unique IDs + !important here is safe precisely because nothing else
   in this file styles these specific IDs, so there is no component
   rule for them to fight. ---- */
#digiscaler-global-search,
#digiscaler-date-from,
#digiscaler-date-to {
	font-family: inherit !important;
	font-size: 13.5px !important;
	color: var(--digiscaler-text) !important;
	background-color: var(--digiscaler-card) !important;
	background-image: none !important;
	border: 1px solid var(--digiscaler-border) !important;
	border-radius: 8px !important;
	padding: 8px 12px !important;
	margin: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	min-height: 0 !important;
	max-width: none !important;
}
#digiscaler-global-search:focus,
#digiscaler-date-from:focus,
#digiscaler-date-to:focus {
	border-color: var(--digiscaler-primary) !important;
	box-shadow: 0 0 0 3px var(--digiscaler-primary-light) !important;
}
#digiscaler-global-search::-webkit-search-decoration,
#digiscaler-global-search::-webkit-search-cancel-button,
#digiscaler-global-search::-webkit-search-results-button,
#digiscaler-global-search::-webkit-search-results-decoration {
	-webkit-appearance: none !important;
	display: none !important;
}
#digiscaler-date-from::-webkit-calendar-picker-indicator,
#digiscaler-date-to::-webkit-calendar-picker-indicator {
	opacity: .6; cursor: pointer;
}
#digiscaler-date-apply {
	background: var(--digiscaler-primary) !important;
	border-color: var(--digiscaler-primary) !important;
	color: #fff !important;
	box-shadow: 0 1px 2px rgba(79,70,229,.25) !important;
}
#digiscaler-date-apply:hover {
	background: var(--digiscaler-primary-hover) !important;
	border-color: var(--digiscaler-primary-hover) !important;
}


.digiscaler-app {
	display: flex;
	min-height: 90vh;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--digiscaler-text);
}

/* Plain text links (client name → edit, "View follow-ups →", etc.) had no
   colour rule of their own anywhere in this file, so they fell back
   entirely to the active theme's `a` / `a:hover` styles — including hover
   states meant for the theme's own dark-background buttons, which turned
   this text white and made it disappear against our light cards.
   `:where()` keeps the non-hover rule at the specificity of a bare `a`
   selector so it never outranks our own components (.digiscaler-btn,
   .digiscaler-pill, .digiscaler-nav-item, …); the `:hover` version is one
   pseudo-class more specific than a theme's bare `a:hover` (which is what
   was overriding us), so it wins that fight on specificity alone, while
   still losing — correctly — to any of our own more specific `:hover`
   rules. Loading after the theme's stylesheet (see the enqueue priority
   in the main plugin file) settles any remaining ties in our favour. */
:where(.digiscaler-shell, .digiscaler-app) a {
	color: var(--digiscaler-primary);
}
:where(.digiscaler-shell, .digiscaler-app) a:hover {
	color: var(--digiscaler-primary-hover);
}

/* Sidebar */
.digiscaler-sidebar {
	width: var(--digiscaler-sidebar-w);
	flex-shrink: 0;
	background: var(--digiscaler-card);
	border-right: 1px solid var(--digiscaler-border);
	padding: 22px 14px;
	border-radius: var(--digiscaler-radius) 0 0 var(--digiscaler-radius);
}

/* Logo — small gradient badge + wordmark, like a product mark rather than
   plain text. The "CRM" half is de-emphasised so "DigiScaler" reads first. */
.digiscaler-logo {
	display: flex; align-items: center; gap: 10px;
	padding: 2px 8px 18px;
}
.digiscaler-logo-mark {
	display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; flex-shrink: 0;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--digiscaler-primary), #7C6CF0);
	color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em;
	box-shadow: 0 3px 8px rgba(79,70,229,.28);
}
.digiscaler-logo-full {
	font-weight: 700; font-size: 17px; color: var(--digiscaler-text);
	letter-spacing: -.01em;
}
.digiscaler-logo-full em {
	font-style: normal; font-weight: 500; font-size: 13px;
	color: var(--digiscaler-text-muted); margin-left: 3px;
}

/* Profile card — who's signed in, without needing the topbar */
.digiscaler-profile-card {
	display: flex; align-items: center; gap: 10px;
	background: var(--digiscaler-bg);
	border: 1px solid var(--digiscaler-border);
	border-radius: 10px;
	padding: 10px 12px;
	margin: 0 2px 18px;
}
.digiscaler-profile-avatar {
	display: flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
	background: var(--digiscaler-primary-light); color: var(--digiscaler-primary);
	font-weight: 700; font-size: 13px;
}
.digiscaler-profile-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.digiscaler-profile-name {
	font-weight: 600; font-size: 13px; color: var(--digiscaler-text);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.digiscaler-profile-sub {
	font-size: 12px; color: var(--digiscaler-text-muted);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.digiscaler-nav-item {
	display: flex; align-items: center; gap: 12px;
	padding: 9px 12px; border-radius: 8px; text-decoration: none;
	color: var(--digiscaler-text); font-size: 14px; font-weight: 500; margin-bottom: 2px;
	border-left: 3px solid transparent;
	transition: background .12s ease, color .12s ease;
}
.digiscaler-nav-item:hover { background: var(--digiscaler-bg); color: var(--digiscaler-text); }
.digiscaler-nav-item.is-active {
	background: var(--digiscaler-primary-light);
	color: var(--digiscaler-primary);
	border-left-color: var(--digiscaler-primary);
}
.digiscaler-nav-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 20px; height: 20px; flex-shrink: 0; color: inherit;
}
.digiscaler-nav-icon svg { width: 19px; height: 19px; }

/* Main content */
.digiscaler-main { flex: 1; padding: 28px 34px; }
.digiscaler-page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.digiscaler-page-header h1 { margin: 0 0 4px; font-size: 25px; font-weight: 700; letter-spacing: -.01em; color: var(--digiscaler-text); }
.digiscaler-subtitle { color: var(--digiscaler-text-muted); margin: 0; font-size: 14px; }

/* Cards */
.digiscaler-card {
	background: var(--digiscaler-card);
	border-radius: var(--digiscaler-radius);
	box-shadow: var(--digiscaler-shadow);
	border: 1px solid var(--digiscaler-border);
	padding: 20px;
	margin-bottom: 20px;
}
.digiscaler-card h2 { margin-top: 0; font-size: 16px; }

/* Stat grid */
.digiscaler-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.digiscaler-stat-card { margin-bottom: 0; }
.digiscaler-stat-label { font-size: 13px; color: var(--digiscaler-text-muted); margin-bottom: 6px; }
.digiscaler-stat-value { font-size: 26px; font-weight: 700; }
.digiscaler-stat-highlight { border-color: var(--digiscaler-primary); }
.digiscaler-stat-link { font-size: 12px; color: var(--digiscaler-primary); text-decoration: none; }

/* Buttons */
.digiscaler-btn {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 8px 14px; border-radius: 8px; border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-card); color: var(--digiscaler-text); font-size: 13px;
	cursor: pointer; text-decoration: none; font-weight: 600;
	transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}
.digiscaler-btn:hover { border-color: #D1D5DB; box-shadow: 0 1px 2px rgba(16,24,40,.06); color: var(--digiscaler-text); }
.digiscaler-btn-primary { background: var(--digiscaler-primary); border-color: var(--digiscaler-primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.25); }
.digiscaler-btn-primary:hover { background: var(--digiscaler-primary-hover); border-color: var(--digiscaler-primary-hover); box-shadow: 0 2px 6px rgba(79,70,229,.3); color: #fff; }
.digiscaler-btn-ghost { background: transparent; }
.digiscaler-btn-ghost:hover { background: var(--digiscaler-bg); color: var(--digiscaler-text); }
.digiscaler-btn-ghost.is-active { background: var(--digiscaler-primary); border-color: var(--digiscaler-primary); color: #fff; }
.digiscaler-btn-ghost.is-active:hover { color: #fff; }
.digiscaler-btn-whatsapp { background: var(--digiscaler-whatsapp); border-color: var(--digiscaler-whatsapp); color: #fff; }
.digiscaler-btn-whatsapp:hover { background: var(--digiscaler-whatsapp-hover); color: #fff; border-color: var(--digiscaler-whatsapp-hover); }
.digiscaler-btn-whatsapp.is-disabled { background: var(--digiscaler-border); border-color: var(--digiscaler-border); color: var(--digiscaler-text-muted); cursor: not-allowed; box-shadow: none; }
.digiscaler-wa-icon { font-size: 14px; }

/* Tables */
.digiscaler-table { width: 100%; border-collapse: collapse; }
.digiscaler-table th {
	text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
	color: var(--digiscaler-text-muted); padding: 12px 14px; background: var(--digiscaler-bg);
	border-bottom: 1px solid var(--digiscaler-border); position: sticky; top: 0; z-index: 1;
}
.digiscaler-table td { padding: 13px 14px; border-bottom: 1px solid var(--digiscaler-border); font-size: 13.5px; }
.digiscaler-table tbody tr { transition: background .1s ease; }
.digiscaler-table tbody tr:hover { background: var(--digiscaler-bg); }
.digiscaler-table tbody tr:last-child td { border-bottom: none; }

/* Kanban */
.digiscaler-kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.digiscaler-kanban-col { min-width: 240px; background: var(--digiscaler-bg); border-radius: var(--digiscaler-radius); padding: 12px; flex-shrink: 0; }
.digiscaler-kanban-col-header { display: flex; justify-content: space-between; font-weight: 600; font-size: 13px; margin-bottom: 10px; padding: 0 4px; }
.digiscaler-kanban-count { background: var(--digiscaler-border); border-radius: 20px; padding: 1px 8px; font-size: 11px; }
.digiscaler-kanban-cards { min-height: 40px; }
.digiscaler-lead-card {
	background: var(--digiscaler-card); border-radius: 10px; padding: 12px; margin-bottom: 10px;
	box-shadow: var(--digiscaler-shadow); cursor: grab; border: 1px solid var(--digiscaler-border);
}
.digiscaler-lead-card.dragging { opacity: 0.5; }
.digiscaler-lead-name { font-weight: 600; font-size: 14px; }
.digiscaler-lead-phone, .digiscaler-lead-source { font-size: 12px; color: var(--digiscaler-text-muted); }
.digiscaler-lead-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* Empty states */
.digiscaler-empty-state { text-align: center; padding: 48px 20px; }
.digiscaler-empty-icon { font-size: 32px; margin-bottom: 10px; }

/* Tabs */
.digiscaler-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.digiscaler-tab { padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--digiscaler-text-muted); font-size: 13px; }
.digiscaler-tab.is-active { background: var(--digiscaler-primary); color: #fff; }

/* Badges */
.digiscaler-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; background: var(--digiscaler-border); }
.digiscaler-badge-done { background: #D1FAE5; color: #065F46; }
.digiscaler-priority-high { background: #FEE2E2; color: #991B1B; }
.digiscaler-priority-medium { background: #FEF3C7; color: #92400E; }
.digiscaler-priority-low { background: #DBEAFE; color: #1E40AF; }

/* Modals */
.digiscaler-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999999; display: flex; align-items: center; justify-content: center; }
.digiscaler-modal-content { background: var(--digiscaler-card); border-radius: var(--digiscaler-radius); padding: 24px; width: 420px; max-width: 90vw; max-height: 85vh; overflow-y: auto; }
.digiscaler-modal-wide { width: 560px; }
.digiscaler-modal-content label { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 600; }
.digiscaler-modal-content input, .digiscaler-modal-content select, .digiscaler-modal-content textarea {
	width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-bg); color: var(--digiscaler-text); font-size: 14px;
}
.digiscaler-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.digiscaler-hint { font-size: 11px; color: var(--digiscaler-text-muted); margin: 4px 0 0; }

/* Projects */
.digiscaler-project-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 16px; }
.digiscaler-project-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.digiscaler-progress-bar { background: var(--digiscaler-border); border-radius: 20px; height: 6px; overflow: hidden; }
.digiscaler-progress-fill { background: var(--digiscaler-primary); height: 100%; transition: width 0.3s; }
.digiscaler-progress-label { font-size: 11px; color: var(--digiscaler-text-muted); margin: 4px 0 10px; }
.digiscaler-task-item { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
.digiscaler-task-item .is-done { text-decoration: line-through; color: var(--digiscaler-text-muted); }
.digiscaler-add-task-form input { margin-top: 8px; font-size: 13px; }

/* Invoice items */
.digiscaler-invoice-item-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.digiscaler-invoice-totals-row { display: flex; gap: 20px; margin-top: 12px; }
.digiscaler-invoice-total-preview { font-size: 16px; font-weight: 700; margin-top: 12px; text-align: right; }

/* Team */
.digiscaler-team-stats { list-style: none; padding: 0; margin: 12px 0; font-size: 13px; }
.digiscaler-team-stats li { display: flex; justify-content: space-between; padding: 4px 0; }

/* Switch */
.digiscaler-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.digiscaler-switch input { opacity: 0; width: 0; height: 0; }
.digiscaler-switch-slider { position: absolute; inset: 0; background: var(--digiscaler-border); border-radius: 22px; cursor: pointer; transition: 0.2s; }
.digiscaler-switch-slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.digiscaler-switch input:checked + .digiscaler-switch-slider { background: var(--digiscaler-primary); }
.digiscaler-switch input:checked + .digiscaler-switch-slider:before { transform: translateX(18px); }

.digiscaler-report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 16px; }
.digiscaler-notice { background: #D1FAE5; color: #065F46; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }

/* Leads dashboard (table view) */
.digiscaler-pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.digiscaler-pill-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--digiscaler-text-muted); margin-right: 2px; }
.digiscaler-pill {
	--pill-color: #6B7280;
	display: inline-flex; align-items: center; gap: 5px;
	padding: 6px 13px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
	border: 1px solid var(--digiscaler-border); text-decoration: none;
	color: var(--pill-color); background: var(--digiscaler-card);
	transition: background .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.digiscaler-pill:hover { border-color: var(--pill-color); box-shadow: 0 1px 3px rgba(16,24,40,.08); color: var(--pill-color) !important; }
.digiscaler-pill.is-active { background: var(--pill-color); color: #fff; border-color: var(--pill-color); box-shadow: 0 1px 3px rgba(16,24,40,.12); }
.digiscaler-pill.is-active:hover { color: #fff !important; }
.digiscaler-pill-static { color: var(--digiscaler-text-muted); background: var(--digiscaler-bg); }

.digiscaler-toolbar {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.digiscaler-toolbar-left { display: flex; gap: 8px; flex-wrap: wrap; }
.digiscaler-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.digiscaler-toolbar-right input[type="search"] {
	padding: 8px 12px 8px 34px; border-radius: 8px; border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 10px center;
	background-size: 15px; color: var(--digiscaler-text); font-size: 13px; min-width: 230px;
	transition: border-color .12s ease, box-shadow .12s ease;
}
.digiscaler-toolbar-right input[type="search"]:focus {
	outline: none; border-color: var(--digiscaler-primary);
	box-shadow: 0 0 0 3px var(--digiscaler-primary-light);
}
.digiscaler-toolbar-right select.digiscaler-month-filter {
	padding: 8px 12px; border-radius: 8px; border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-card); color: var(--digiscaler-text); font-size: 13px; cursor: pointer;
}
.digiscaler-no-live-results {
	display: none; padding: 16px; text-align: center; color: var(--digiscaler-text-muted); font-size: 13px;
}

.digiscaler-table-card { overflow-x: auto; padding: 0; }
.digiscaler-leads-table { min-width: 900px; }
.digiscaler-leads-table th, .digiscaler-leads-table td { white-space: nowrap; }
.digiscaler-note-cell { white-space: normal; max-width: 200px; font-size: 12px; color: var(--digiscaler-text-muted); }
.digiscaler-inline-status {
	padding: 6px 26px 6px 10px; border-radius: 20px; border: 1.5px solid; background-color: transparent;
	font-size: 12px; font-weight: 700; cursor: pointer; appearance: none; -webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 8px center; background-size: 11px;
}

.digiscaler-manage-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--digiscaler-border); font-size: 13px; }
.digiscaler-manage-row:last-child { border-bottom: none; }
.digiscaler-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.digiscaler-manage-row button { margin-left: auto; background: none; border: none; color: var(--digiscaler-text-muted); font-size: 18px; cursor: pointer; line-height: 1; }
.digiscaler-manage-row button:hover { color: #DC2626; }
#digiscaler-status-list, #digiscaler-source-list { max-height: 200px; overflow-y: auto; margin-bottom: 10px; }

@media (max-width: 782px) {
	.digiscaler-app { flex-direction: column; }
	.digiscaler-sidebar { width: 100%; border-radius: var(--digiscaler-radius) var(--digiscaler-radius) 0 0; }
	.digiscaler-main { padding: 16px; }
}

/* Row action buttons (Edit / Delete / Follow-up / To Order) */
.digiscaler-row-actions { white-space: nowrap; }
.digiscaler-row-actions .digiscaler-btn {
	margin-left: 4px; padding: 6px 11px; font-size: 12px; border-radius: 7px;
}
.digiscaler-row-actions .digiscaler-btn:hover { background: var(--digiscaler-bg); }
.digiscaler-chart-fallback td { padding: 6px 8px; font-size: 13px; }

/* ---- Access control matrix ---- */
.digiscaler-access-table td, .digiscaler-access-table th { vertical-align: middle; }
.digiscaler-access-col { text-align: center; width: 140px; }
.digiscaler-access-col input[type="checkbox"] { transform: scale(1.25); cursor: pointer; }

.digiscaler-override-row {
	border: 1px solid var(--digiscaler-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 10px;
}
.digiscaler-override-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.digiscaler-override-head strong { flex: 1; min-width: 140px; }
.digiscaler-override-screens {
	display: flex; flex-wrap: wrap; gap: 10px 18px;
	margin-top: 12px; padding-top: 12px;
	border-top: 1px dashed var(--digiscaler-border);
}
.digiscaler-override-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* ---- CRM user management ---- */
.digiscaler-team-card .digiscaler-team-login { word-break: break-all; margin: 6px 0 10px; }
.digiscaler-team-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.digiscaler-password-row { display: flex; gap: 6px; align-items: center; }
.digiscaler-password-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.digiscaler-inline-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 400; }
.digiscaler-inline-check input { width: auto; }

/* ---- Team Control: departments ---- */
.digiscaler-notice-soft { background: rgba(79,70,229,0.06); border: 1px solid rgba(79,70,229,0.25); }
.digiscaler-notice-soft p { margin: 0; font-size: 13px; }
.digiscaler-dept-card { margin-bottom: 18px; }
.digiscaler-dept-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.digiscaler-dept-head h2 { margin: 0 0 2px; }
.digiscaler-dept-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.digiscaler-dept-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 16px; }
.digiscaler-badge-outline { background: transparent; border: 1px dashed var(--digiscaler-border); color: var(--digiscaler-text-muted); }
.digiscaler-badge-muted { background: var(--digiscaler-border); color: var(--digiscaler-text-muted); }
.digiscaler-screen-picker {
	display: flex; flex-wrap: wrap; gap: 8px 18px;
	border: 1px solid var(--digiscaler-border); border-radius: 8px;
	padding: 12px; margin-top: 4px;
}

/* ---- Orders ---- */
.digiscaler-orders-table td, .digiscaler-orders-table th { white-space: nowrap; }
.digiscaler-amount-due { color: #DC2626; font-weight: 600; }
.digiscaler-amount-clear { color: #16A34A; font-weight: 600; }
.digiscaler-field-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
}
.digiscaler-field-grid .digiscaler-hint { margin: 4px 0 0; }
.digiscaler-input-warn { border-color: #DC2626 !important; color: #DC2626; }
#digiscaler-order-remaining { background: var(--digiscaler-bg); font-weight: 600; }
@media (max-width: 640px) {
	.digiscaler-field-grid { grid-template-columns: 1fr; }
}

/* Status dropdown must be wide enough to actually read the status name */
.digiscaler-inline-order-status {
	min-width: 140px;
	width: auto;
	font-weight: 600;
}
.digiscaler-filter-select { min-width: 150px; }
.digiscaler-field-full { grid-column: 1 / -1; }
.digiscaler-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Assigned By / Developer pill rows sit under the status pills */
.digiscaler-pill-row-labelled {
	align-items: center;
	margin-bottom: 12px;
	padding-top: 10px;
	border-top: 1px dashed var(--digiscaler-border);
}
.digiscaler-pill-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--digiscaler-text-muted);
	margin-right: 4px;
	flex: 0 0 auto;
}
/* "Unassigned" is a count, not a filter — no link, no hover affordance */
.digiscaler-pill-static { opacity: .65; cursor: default; }

/* Freshly converted order gets a brief highlight so it's easy to spot */
@keyframes digiscaler-flash {
	from { background: rgba(79, 70, 229, 0.18); }
	to   { background: transparent; }
}
.digiscaler-row-highlight td {
	animation: digiscaler-flash 2.5s ease-out forwards;
}
.digiscaler-convert-lead {
	background: var(--digiscaler-bg);
	border-radius: 8px;
	padding: 10px 12px;
	margin: 0 0 6px;
	font-size: 14px;
}

/* Lead status dropdown needs room for the status name, same as Orders */
.digiscaler-inline-status {
	min-width: 150px;
	width: auto;
	font-weight: 600;
}

/* ================= Dashboard ================= */
.digiscaler-date-filter {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 0 0 18px; padding: 12px 14px;
	background: var(--digiscaler-card);
	border: 1px solid var(--digiscaler-border);
	border-radius: var(--digiscaler-radius);
}
.digiscaler-date-filter label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--digiscaler-text-muted); }
.digiscaler-date-filter input[type="date"] { width: auto; }

.digiscaler-stat-sub { font-size: 12px; color: var(--digiscaler-text-muted); margin-top: 4px; }
.digiscaler-stat-alert { border-color: #F59E0B; }

/* Thin bar used for percentages everywhere on this screen */
.digiscaler-progress {
	height: 6px; border-radius: 999px; margin-top: 8px;
	background: var(--digiscaler-border); overflow: hidden;
}
.digiscaler-progress span {
	display: block; height: 100%; border-radius: 999px;
	background: var(--digiscaler-primary);
}

.digiscaler-status-strip { display: flex; flex-wrap: wrap; gap: 18px; }
.digiscaler-status-block { flex: 1 1 140px; min-width: 120px; }
.digiscaler-status-count { font-size: 26px; font-weight: 700; line-height: 1.1; }
.digiscaler-status-name { font-size: 13px; color: var(--digiscaler-text-muted); }

.digiscaler-dash-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 16px;
}
.digiscaler-dash-columns .digiscaler-card { margin: 0; }

.digiscaler-bar-row { margin-bottom: 14px; }
.digiscaler-bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }

/* 12-month bars — plain CSS, so no chart CDN is needed here */
.digiscaler-trend { display: flex; align-items: flex-end; gap: 6px; height: 170px; margin-top: 14px; }
.digiscaler-trend-col { flex: 1; display: flex; flex-direction: column; height: 100%; }
.digiscaler-trend-bar-wrap { flex: 1; display: flex; align-items: flex-end; }
.digiscaler-trend-bar {
	width: 100%; border-radius: 6px 6px 0 0;
	background: linear-gradient(180deg, var(--digiscaler-primary), rgba(79,70,229,.55));
	transition: height .3s ease;
}
.digiscaler-trend-label { text-align: center; font-size: 11px; color: var(--digiscaler-text-muted); padding-top: 6px; }

/* ================= Lead pipeline board ================= */
.digiscaler-layout-switch { display: inline-flex; gap: 4px; }
.digiscaler-layout-switch .is-active {
	background: var(--digiscaler-primary);
	color: #fff;
	border-color: var(--digiscaler-primary);
}

.digiscaler-pipeline {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	overflow-x: auto;
	padding-bottom: 12px;
	-webkit-overflow-scrolling: touch;
}
.digiscaler-stage {
	flex: 0 0 270px;
	background: var(--digiscaler-bg);
	border: 1px solid var(--digiscaler-border);
	border-radius: var(--digiscaler-radius);
	max-height: 72vh;
	display: flex;
	flex-direction: column;
}
.digiscaler-stage.is-over {
	border-color: var(--digiscaler-primary);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18) inset;
}
.digiscaler-stage-head {
	padding: 12px 14px;
	border-top: 3px solid var(--digiscaler-border);
	border-radius: var(--digiscaler-radius) var(--digiscaler-radius) 0 0;
	background: var(--digiscaler-card);
}
.digiscaler-stage-name { font-weight: 700; font-size: 14px; }
.digiscaler-stage-meta {
	display: flex; justify-content: space-between; gap: 8px;
	font-size: 12px; color: var(--digiscaler-text-muted); margin-top: 2px;
}
.digiscaler-stage-body { padding: 10px; overflow-y: auto; flex: 1; min-height: 90px; }
.digiscaler-stage-empty {
	margin: 0; padding: 18px 8px; text-align: center;
	font-size: 12px; color: var(--digiscaler-text-muted);
	border: 1px dashed var(--digiscaler-border); border-radius: 8px;
}
.digiscaler-stage-orphan { opacity: .85; }

.digiscaler-deal-card {
	background: var(--digiscaler-card);
	border: 1px solid var(--digiscaler-border);
	border-left: 3px solid var(--card-color, var(--digiscaler-border));
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 8px;
	cursor: grab;
	transition: box-shadow .15s ease, transform .15s ease;
}
.digiscaler-deal-card:hover { box-shadow: var(--digiscaler-shadow); }
.digiscaler-deal-card.is-dragging { opacity: .45; transform: rotate(1deg); }
.digiscaler-deal-title a { font-weight: 700; text-decoration: none; }
.digiscaler-deal-line { font-size: 12px; color: var(--digiscaler-text-muted); margin-top: 2px; }
.digiscaler-deal-source {
	display: inline-block; margin-top: 6px; padding: 1px 8px;
	border: 1px solid var(--digiscaler-border); border-radius: 999px; font-size: 11px;
}
.digiscaler-deal-foot {
	display: flex; justify-content: space-between; align-items: baseline;
	margin-top: 8px; font-size: 13px;
}
.digiscaler-deal-foot span { font-size: 11px; color: var(--digiscaler-text-muted); }
.digiscaler-deal-note {
	margin-top: 6px; font-size: 12px; color: var(--digiscaler-text-muted);
	border-top: 1px dashed var(--digiscaler-border); padding-top: 6px;
}
.digiscaler-deal-actions {
	display: flex; align-items: center; gap: 6px; margin-top: 10px;
}
.digiscaler-deal-actions .digiscaler-btn-whatsapp { padding: 4px 8px; font-size: 11px; }
.digiscaler-icon-btn {
	border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-card);
	border-radius: 6px; cursor: pointer;
	padding: 4px 8px; font-size: 13px; line-height: 1;
}
.digiscaler-icon-btn:hover { border-color: var(--digiscaler-primary); }
.digiscaler-pipeline-hint { margin-top: 4px; }

/* Settings radio choices */
.digiscaler-choice-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.digiscaler-choice {
	display: flex; gap: 10px; align-items: flex-start;
	border: 1px solid var(--digiscaler-border); border-radius: 8px;
	padding: 10px 12px; cursor: pointer; font-weight: 400;
}
.digiscaler-choice.is-selected { border-color: var(--digiscaler-primary); background: rgba(79,70,229,.05); }
.digiscaler-choice input { width: auto; margin-top: 3px; }
.digiscaler-choice em { display: block; font-style: normal; font-size: 12px; color: var(--digiscaler-text-muted); }

@media (max-width: 782px) {
	.digiscaler-stage { flex-basis: 82vw; max-height: none; }
}

/* Stage reordering */
.digiscaler-reorder { display: inline-flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.digiscaler-reorder button {
	margin: 0 !important; padding: 0 4px; line-height: 1;
	font-size: 9px; border: none; background: none; cursor: pointer;
	color: var(--digiscaler-text-muted);
}
.digiscaler-reorder button:hover { color: var(--digiscaler-primary) !important; }

.digiscaler-stage-head { cursor: grab; }
.digiscaler-stage-head:active { cursor: grabbing; }
.digiscaler-stage-grip {
	color: var(--digiscaler-text-muted);
	letter-spacing: -2px;
	margin-right: 4px;
	font-size: 11px;
}
.digiscaler-stage.is-moving { opacity: .5; }
.digiscaler-stage.is-drop-target { outline: 2px dashed var(--digiscaler-primary); outline-offset: 2px; }

/* Dashboard customize panel */
.digiscaler-customize-panel h2 { margin-top: 0; }
.digiscaler-customize-group { margin-bottom: 14px; }
.digiscaler-customize-group h3 {
	margin: 0 0 6px; font-size: 12px; font-weight: 700;
	letter-spacing: .04em; text-transform: uppercase;
	color: var(--digiscaler-text-muted);
}
.digiscaler-customize-panel .digiscaler-modal-actions { margin-top: 6px; }

/* ================= Collapsible sidebar ================= */
.digiscaler-sidebar-action {
	display: flex; align-items: center; gap: 12px;
	width: 100%; padding: 8px 12px;
	background: none; border: 1px solid transparent; border-radius: 8px;
	color: var(--digiscaler-text-muted);
	font-size: 13px; font-weight: 500; text-align: left; cursor: pointer;
	box-shadow: none; outline: none;
}
/* The theme's own button styling (border/box-shadow on focus, accent-colour
   outline) was leaking through onto these — they're real <button> elements,
   unlike the nav links, so Astra's default button chrome applied to them
   and showed up as a stray coloured box. Force it off in every state. */
.digiscaler-sidebar-action,
.digiscaler-sidebar-action:hover,
.digiscaler-sidebar-action:focus,
.digiscaler-sidebar-action:active {
	border-color: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}
.digiscaler-sidebar-action:hover { background: var(--digiscaler-bg); color: var(--digiscaler-text); }
.digiscaler-collapse-icon { transition: transform .2s ease; display: inline-flex; }

/* Sidebar needs to be a column for margin-top:auto to push the footer down */
.digiscaler-sidebar { display: flex; flex-direction: column; }
.digiscaler-sidebar nav { flex: 0 0 auto; }

/* --- Collapsed rail ---
   Icon on top, short label underneath — wider than a bare icon rail so the
   two-word labels ("Toggle Dark Mode") can wrap onto a second line instead
   of getting clipped with an ellipsis. */
.digiscaler-collapsed .digiscaler-sidebar { width: 92px; padding-left: 6px; padding-right: 6px; }
.digiscaler-collapsed .digiscaler-logo-full { display: none; }
.digiscaler-collapsed .digiscaler-logo { justify-content: center; padding: 2px 0 16px; }
.digiscaler-collapsed .digiscaler-profile-card { justify-content: center; padding: 8px 0; background: none; border: none; }
.digiscaler-collapsed .digiscaler-profile-info { display: none; }

.digiscaler-collapsed .digiscaler-nav-item,
.digiscaler-collapsed .digiscaler-sidebar-action {
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	padding: 10px 4px;
	text-align: center;
	border-left: none;
}
.digiscaler-collapsed .digiscaler-nav-icon { width: auto; }
.digiscaler-collapsed .digiscaler-nav-label {
	display: block;
	max-width: 100%;
	font-size: 10.5px;
	line-height: 1.25;
	font-weight: 600;
	white-space: normal;
	overflow-wrap: break-word;
}
.digiscaler-collapsed .digiscaler-collapse-icon { transform: rotate(180deg); }

/* The board and wide tables get the reclaimed width */
.digiscaler-sidebar { transition: width .18s ease; }

@media (max-width: 782px) {
	/* The mobile sidebar is already a horizontal strip — collapsing it there
	   would hide the navigation entirely. */
	.digiscaler-collapsed .digiscaler-sidebar { width: 100%; }
	.digiscaler-collapsed .digiscaler-logo-full { display: block; }
	.digiscaler-collapsed .digiscaler-profile-info { display: flex; }
	.digiscaler-collapsed .digiscaler-nav-item,
	.digiscaler-collapsed .digiscaler-sidebar-action {
		flex-direction: row;
		gap: 10px;
		padding: 8px 12px;
		text-align: left;
	}
	.digiscaler-collapsed .digiscaler-nav-label {
		white-space: nowrap;
		font-size: 13px;
	}
}

/* Collapse control sits right under the tabs, not at the bottom of a tall sidebar */
.digiscaler-sidebar-collapse {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--digiscaler-border);
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.digiscaler-collapsed .digiscaler-sidebar-collapse { padding-left: 0; padding-right: 0; }

@media (max-width: 782px) {
	.digiscaler-sidebar-collapse { display: none; }
}

/* ================= Topbar (front-end shell) ================= */
.digiscaler-topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 0 22px;
}
.digiscaler-topbar-search {
	display: flex; align-items: center; gap: 8px;
	background: var(--digiscaler-card); border: 1px solid var(--digiscaler-border);
	border-radius: 10px; padding: 8px 14px; width: 280px; max-width: 40vw;
	color: var(--digiscaler-text-muted);
}
.digiscaler-topbar-search .digiscaler-nav-icon { width: 17px; height: 17px; }
.digiscaler-topbar-search .digiscaler-nav-icon svg { width: 17px; height: 17px; }
.digiscaler-topbar-search input[type="text"] {
	border: none; background: none; outline: none; font-size: 13.5px;
	color: var(--digiscaler-text); width: 100%; padding: 0;
}
.digiscaler-topbar-right { display: flex; align-items: center; gap: 16px; }
.digiscaler-topbar-bell {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%;
	background: var(--digiscaler-card); border: 1px solid var(--digiscaler-border);
	color: var(--digiscaler-text-muted); cursor: pointer;
}
.digiscaler-topbar-bell svg { width: 18px; height: 18px; }
.digiscaler-topbar-bell:hover { color: var(--digiscaler-primary); border-color: var(--digiscaler-primary); }
.digiscaler-topbar-badge {
	position: absolute; top: -3px; right: -3px;
	background: #EF4444; color: #fff; font-size: 10px; font-weight: 700;
	min-width: 17px; height: 17px; border-radius: 999px;
	display: flex; align-items: center; justify-content: center;
	padding: 0 3px; border: 2px solid var(--digiscaler-bg);
}
.digiscaler-topbar-user { display: flex; align-items: center; gap: 10px; }
.digiscaler-topbar-avatar {
	display: flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
	background: linear-gradient(135deg, var(--digiscaler-primary), #7C6CF0);
	color: #fff; font-weight: 700; font-size: 13px;
}
.digiscaler-topbar-user-info { display: flex; flex-direction: column; line-height: 1.25; }
.digiscaler-topbar-name { font-weight: 600; font-size: 13.5px; color: var(--digiscaler-text); }
.digiscaler-topbar-role { font-size: 11.5px; color: var(--digiscaler-text-muted); }
.digiscaler-topbar-logout { padding: 7px 12px; font-size: 12px; }

@media (max-width: 782px) {
	.digiscaler-topbar { flex-wrap: wrap; }
	.digiscaler-topbar-search { width: 100%; max-width: none; order: 3; }
}

/* ================= Dashboard header actions ================= */
.digiscaler-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.digiscaler-date-pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-radius: 8px; border: 1px solid var(--digiscaler-border);
	background: var(--digiscaler-card); font-size: 13px; font-weight: 600;
	color: var(--digiscaler-text);
}
.digiscaler-date-pill .digiscaler-nav-icon { width: 16px; height: 16px; color: var(--digiscaler-text-muted); }
.digiscaler-date-pill .digiscaler-nav-icon svg { width: 16px; height: 16px; }

/* ================= Stat card icons ================= */
.digiscaler-stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.digiscaler-stat-icon {
	display: flex; align-items: center; justify-content: center; flex-shrink: 0;
	width: 42px; height: 42px; border-radius: 12px;
}
.digiscaler-stat-icon svg { width: 21px; height: 21px; }
.digiscaler-icon-purple { background: var(--digiscaler-primary-light); color: var(--digiscaler-primary); }
.digiscaler-icon-green  { background: #DCFCE7; color: #16A34A; }
.digiscaler-icon-orange { background: #FFEDD5; color: #EA580C; }
.digiscaler-icon-blue   { background: #DBEAFE; color: #2563EB; }
.digiscaler-icon-gray   { background: var(--digiscaler-bg); color: var(--digiscaler-text-muted); }
.digiscaler-icon-amber  { background: #FEF3C7; color: #D97706; }

.digiscaler-stat-card-lr { display: flex; align-items: flex-start; gap: 14px; }
.digiscaler-icon-square { width: 44px; height: 44px; border-radius: 10px; }
.digiscaler-icon-square svg { width: 21px; height: 21px; }
.digiscaler-stat-body { flex: 1; min-width: 0; }
.digiscaler-stat-body .digiscaler-stat-value { margin: 2px 0; }

/* ================= Donut charts ================= */
.digiscaler-donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.digiscaler-donut {
	position: relative; flex-shrink: 0;
	width: 140px; height: 140px; border-radius: 50%;
}
.digiscaler-donut-hole {
	position: absolute; inset: 22px; border-radius: 50%;
	background: var(--digiscaler-card);
}
.digiscaler-donut-legend { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 12px; }
.digiscaler-legend-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.digiscaler-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.digiscaler-legend-label { flex: 1; color: var(--digiscaler-text); font-weight: 500; }
.digiscaler-legend-value { text-align: right; font-weight: 700; color: var(--digiscaler-text); }
.digiscaler-legend-value em {
	display: block; font-style: normal; font-weight: 400; font-size: 11.5px;
	color: var(--digiscaler-text-muted); margin-top: 1px;
}

/* ================= Sales trend (SVG line chart) ================= */
.digiscaler-trend { margin-top: 14px; }
.digiscaler-trend-svg { width: 100%; height: 220px; display: block; overflow: visible; }
.digiscaler-trend-gridline { stroke: var(--digiscaler-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.digiscaler-trend-labels {
	display: flex; justify-content: space-between; margin-top: 8px;
	font-size: 11px; color: var(--digiscaler-text-muted);
}
