/* Copyright (c) 2026, SoftVerx. All rights reserved. See license.txt.
 * Utility Billing look and feel: a modern enterprise application (Inter, navy sidebar, white cards, one blue accent), in light and
 * dark mode. Part 1: design tokens. Part 2: Frappe's own screens (forms, lists, reports) through its style variables. Part 3: the
 * .ub-* components the custom screens are drawn with. Part 4: the sign-in page. */

@font-face {
	font-family: "Inter";
	src: url("/assets/utility_billing/fonts/Inter-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ---------------------------------------------------------------- 1. tokens */
:root, [data-theme="light"] {
	--ub-ink: #0F172A;  --ub-muted: #475569;  --ub-faint: #94A3B8;
	--ub-line: #E2E8F0; --ub-line-strong: #CBD5E1;
	--ub-page: #F4F6F9; --ub-card: #FFFFFF;   --ub-soft: #F8FAFC;
	--ub-blue: #1D4ED8; --ub-blue-dark: #1E3A8A; --ub-blue-soft: #EFF6FF; --ub-blue-line: #BFDBFE;
	--ub-green: #166534; --ub-green-soft: #DCFCE7; --ub-amber: #92400E; --ub-amber-soft: #FEF3C7;
	--ub-red: #B91C1C;   --ub-red-soft: #FEE2E2;  --ub-slate-soft: #F1F5F9; --ub-slate: #334155;
	--ub-navy: #0F172A; --ub-navy-hover: #1E293B;
	--ub-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .05);
	--ub-shadow-lift: 0 4px 14px rgba(15, 23, 42, .08);
}
[data-theme="dark"] {
	--ub-ink: #E5E7EB;  --ub-muted: #A3AEC2;  --ub-faint: #64748B;
	--ub-line: #222E42; --ub-line-strong: #33425A;
	--ub-page: #0B1220; --ub-card: #111A2C;   --ub-soft: #16213A;
	--ub-blue: #3B82F6; --ub-blue-dark: #93C5FD; --ub-blue-soft: #13243F; --ub-blue-line: #1E3A6B;
	--ub-green: #4ADE80; --ub-green-soft: rgba(34, 197, 94, .16); --ub-amber: #FBBF24; --ub-amber-soft: rgba(245, 158, 11, .16);
	--ub-red: #F87171;   --ub-red-soft: rgba(239, 68, 68, .16);   --ub-slate-soft: #1B2740; --ub-slate: #CBD5E1;
	--ub-navy: #080E1B; --ub-navy-hover: #14203A;
	--ub-shadow: none; --ub-shadow-lift: 0 4px 18px rgba(0, 0, 0, .35);
}

/* ---------------------------------------------------------------- 2. Frappe screens */
:root { --font-stack: "Inter", "InterVariable", -apple-system, "Segoe UI", system-ui, sans-serif;
	--primary: var(--ub-blue); --primary-color: var(--ub-blue); --btn-primary: var(--ub-blue); --border-primary: var(--ub-blue); }
:root:not([data-theme="dark"]) {
	--bg-color: var(--ub-page); --heading-color: var(--ub-ink); --border-color: var(--ub-line); --dark-border-color: var(--ub-line-strong);
	--control-bg: #F1F5F9; --control-bg-on-gray: #E8EDF3; --navbar-bg: #FFFFFF; --desk-sidebar-bg: var(--ub-navy); --sidebar-select-color: var(--ub-navy-hover);
}
body { background: var(--ub-page); color: var(--ub-ink); font-feature-settings: "tnum" 1, "cv11" 1; -webkit-font-smoothing: antialiased; }
.page-container, .layout-main-section-wrapper { background: transparent; }
:focus-visible { outline: 2px solid var(--ub-blue); outline-offset: 2px; }

/* Sidebar */
.body-sidebar, .body-sidebar-container .body-sidebar { background: var(--ub-navy) !important; border-right: 0; }
/* Phones: a closed sidebar drawer must leave no panel behind (Frappe clears its background; the navy above would leave a dark block
   over the page). Increment 23, phones and tablets. */
@media (max-width: 767.98px) {
	.body-sidebar-container:not(.expanded) .body-sidebar { background: transparent !important; }
}
.body-sidebar, .body-sidebar .sidebar-item-label, .body-sidebar .header-title, .body-sidebar .avatar-name-email, .body-sidebar .sidebar-item-suffix { color: #CBD5E1; }
.body-sidebar .header-title { color: #FFFFFF; font-weight: 600; letter-spacing: -.01em; }
.body-sidebar .sidebar-item-icon, .body-sidebar .sidebar-item-icon svg, .body-sidebar .drop-icon svg, .body-sidebar .sidebar-item-control svg { color: #94A3B8; stroke: currentColor; }
.body-sidebar .standard-sidebar-item { border-radius: 8px; transition: background .12s ease; }
.body-sidebar .standard-sidebar-item:hover { background: var(--ub-navy-hover); }
.body-sidebar .standard-sidebar-item.active-sidebar, .body-sidebar .standard-sidebar-item.active-sidebar:hover { background: var(--ub-navy-hover); box-shadow: inset 3px 0 0 #3B82F6; }
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label { color: #FFFFFF; font-weight: 600; }
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-icon { color: #60A5FA; }
.body-sidebar .item-anchor.section-break .sidebar-item-label { color: #64748B; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.body-sidebar .divider { border-color: #1E293B; }
.body-sidebar .notification-count { background: #2563EB; color: #FFFFFF; }
.body-sidebar .header-logo, .body-sidebar .header-logo .app-logo { border-radius: 8px; }

/* Buttons, inputs, pills */
.btn { border-radius: 8px; font-weight: 500; transition: background .12s ease, box-shadow .12s ease; }
.btn-primary, .btn-primary:hover, .btn-primary:focus { background: var(--ub-blue); border-color: var(--ub-blue); color: #fff; }
.btn-primary:hover { filter: brightness(.92); }
:root:not([data-theme="dark"]) .btn-default, :root:not([data-theme="dark"]) .btn-secondary { background: #fff; border: 1px solid var(--ub-line-strong); color: var(--ub-ink); box-shadow: none; }
:root:not([data-theme="dark"]) .btn-default:hover { background: var(--ub-soft); }
/* Checkboxes and radio buttons keep Frappe's own look: a background here would hide the tick (bug report 2026-11-16). */
.form-control:not([type="checkbox"]):not([type="radio"]), .input-with-feedback:not([type="checkbox"]):not([type="radio"]), .frappe-control .control-input .form-control, select.form-control { border-radius: 8px; box-shadow: none; }
:root:not([data-theme="dark"]) .form-control:not([type="checkbox"]):not([type="radio"]), :root:not([data-theme="dark"]) .input-with-feedback:not([type="checkbox"]):not([type="radio"]), :root:not([data-theme="dark"]) select.form-control { border: 1px solid var(--ub-line-strong); background-color: #fff; }
.form-control:not([type="checkbox"]):not([type="radio"]):focus, .input-with-feedback:not([type="checkbox"]):not([type="radio"]):focus { border-color: var(--ub-blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); }
.indicator-pill { border-radius: 999px; font-weight: 600; font-size: 12px; padding: 3px 10px; }
.indicator-pill::before { display: none; }
:root:not([data-theme="dark"]) .indicator-pill.green { background: #DCFCE7; color: #166534; }
:root:not([data-theme="dark"]) .indicator-pill.blue { background: #DBEAFE; color: #1E3A8A; }
:root:not([data-theme="dark"]) .indicator-pill.orange, :root:not([data-theme="dark"]) .indicator-pill.yellow { background: #FEF3C7; color: #92400E; }
:root:not([data-theme="dark"]) .indicator-pill.red { background: #FEE2E2; color: #991B1B; }
:root:not([data-theme="dark"]) .indicator-pill.gray, :root:not([data-theme="dark"]) .indicator-pill.grey { background: #F1F5F9; color: #334155; }

/* Cards and sections */
.form-layout .form-section.card-section, .form-layout .form-page, .frappe-card, .report-wrapper, .layout-main-section, .dashboard-graph, .number-card {
	background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 12px; box-shadow: var(--ub-shadow); }
.form-dashboard-section, .form-sidebar { background: transparent; }
.page-head { background: var(--ub-card); border-bottom: 1px solid var(--ub-line); }
.page-title .title-text { font-weight: 700; letter-spacing: -.01em; }

/* Lists and report tables */
.list-row-head, .list-row-head .list-row-col { background: var(--ub-soft); color: var(--ub-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.list-row-container { border-bottom: 1px solid var(--ub-line); transition: background .1s ease; }
.list-row-container:hover { background: var(--ub-soft); }
.result .list-row-container:last-child { border-bottom: 0; }
.dt-header .dt-cell__content, .datatable .dt-header .dt-cell { background: var(--ub-soft); color: var(--ub-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.report-summary { gap: 12px; border: 0; }
.report-summary .summary-item { background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 12px; padding: 14px 18px; box-shadow: var(--ub-shadow); }
/* Frappe fixes the card at 62px with a 16px line for the value; with this padding and size the label and amount were cut off
   (user's screenshot of the Management Dashboard report, 2026-11-16), so the cards grow to fit, on every report */
.report-summary .summary-item { height: auto; min-height: 62px; justify-content: center; gap: 4px; }
.report-summary .summary-label { color: var(--ub-muted); font-size: 13px; line-height: 1.4; }
.report-summary .summary-value { font-size: 22px; font-weight: 700; line-height: 1.25; padding: 2px 0 0; }
.timeline-item .timeline-content, .comment-box { border-radius: 10px; }
.modal-content { border-radius: 14px; border: 1px solid var(--ub-line); box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.page-form, .standard-filter-section { background: transparent; }

/* ---------------------------------------------------------------- 3. Components */
.ub-page .page-head { display: none; }
.ub-page .layout-main-section { background: transparent; border: 0; padding: 0; box-shadow: none; }
.ub-page .page-body, .ub-page .container { max-width: none; }
.ub-root { font-family: var(--font-stack); color: var(--ub-ink); padding: 28px; max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.ub-root * { box-sizing: border-box; }
.ub-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.ub-hello { font-size: 13px; color: var(--ub-muted); margin-bottom: 4px; }
.ub-head h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ub-ink); }
.ub-head p { margin: 4px 0 0; color: var(--ub-muted); font-size: 14px; }
.ub-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ub-select, .ub-btn { font: inherit; font-size: 14px; background: var(--ub-card); border: 1px solid var(--ub-line-strong); border-radius: 8px; padding: 9px 14px; color: var(--ub-ink); cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.ub-select { padding-right: 28px; max-width: 260px; }
.ub-btn:hover, .ub-select:hover { background: var(--ub-soft); border-color: var(--ub-faint); }
.ub-btn-primary { background: var(--ub-blue); border-color: var(--ub-blue); color: #fff; font-weight: 600; }
.ub-btn-primary:hover { background: var(--ub-blue); filter: brightness(.92); }
.ub-badge { font-size: 12px; font-weight: 600; color: var(--ub-amber); background: var(--ub-amber-soft); padding: 4px 10px; border-radius: 999px; }
.ub-card { background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 14px; padding: 20px; min-width: 0; box-shadow: var(--ub-shadow); }
.ub-card h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--ub-ink); letter-spacing: -.01em; }
.ub-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ub-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 500; background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 999px; padding: 7px 14px 7px 10px; color: var(--ub-ink); cursor: pointer; box-shadow: var(--ub-shadow); transition: all .12s ease; }
.ub-chip svg { width: 16px; height: 16px; color: var(--ub-blue); }
.ub-chip:hover { border-color: var(--ub-blue); box-shadow: var(--ub-shadow-lift); transform: translateY(-1px); }
.ub-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ub-kpi { position: relative; background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 14px; padding: 18px 18px 14px; min-width: 0; box-shadow: var(--ub-shadow); transition: box-shadow .15s ease, transform .15s ease; }
.ub-kpi:hover { box-shadow: var(--ub-shadow-lift); transform: translateY(-1px); }
.ub-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ub-kpi-label { font-size: 13px; color: var(--ub-muted); font-weight: 500; }
.ub-kpi-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--ub-blue-soft); color: var(--ub-blue); display: flex; align-items: center; justify-content: center; flex: none; }
.ub-kpi-icon svg { width: 17px; height: 17px; }
.ub-kpi-value { font-size: 28px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ub-kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ub-kpi-note { font-size: 13px; color: var(--ub-muted); min-width: 0; }
.ub-kpi-note.green { color: var(--ub-green); } .ub-kpi-note.red { color: var(--ub-red); } .ub-kpi-note.amber { color: var(--ub-amber); }
.ub-spark { width: 84px; height: 28px; flex: none; }
.ub-spark path.line { fill: none; stroke: var(--ub-blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ub-spark path.fill { fill: var(--ub-blue); opacity: .12; stroke: none; }
.ub-kpi.is-empty .ub-kpi-value { color: var(--ub-faint); }
.ub-kpi.is-empty .ub-kpi-icon { background: var(--ub-slate-soft); color: var(--ub-faint); }
.ub-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ub-span2 { grid-column: span 2; }
.ub-legend { display: flex; gap: 14px; font-size: 13px; color: var(--ub-muted); }
.ub-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.ub-cardhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.ub-cardhead h2 { margin: 0; }
.ub-chart { width: 100%; height: auto; display: block; margin-top: 6px; overflow: visible; }
.ub-chart .grid { stroke: var(--ub-line); stroke-width: 1; }
.ub-chart text { fill: var(--ub-muted); font-size: 11px; font-family: var(--font-stack); }
.ub-chart .a-billed { fill: var(--ub-faint); opacity: .18; } .ub-chart .l-billed { fill: none; stroke: var(--ub-faint); stroke-width: 2; stroke-linejoin: round; }
.ub-chart .a-coll { fill: url(#ubGrad); } .ub-chart .l-coll { fill: none; stroke: var(--ub-blue); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ub-chart .dot { fill: var(--ub-card); stroke: var(--ub-blue); stroke-width: 2.2; }
.ub-chart .hit { fill: transparent; } .ub-chart .hit:hover { fill: var(--ub-blue); opacity: .06; }
.ub-steps { display: flex; flex-direction: column; gap: 0; }
.ub-step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 16px; }
.ub-step:last-child { padding-bottom: 0; }
.ub-step:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--ub-line); }
.ub-step.done:not(:last-child)::before { background: var(--ub-green); opacity: .5; }
.ub-step-mark { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; background: var(--ub-slate-soft); color: var(--ub-muted); }
.ub-step.done .ub-step-mark { background: var(--ub-green-soft); color: var(--ub-green); }
.ub-step.now .ub-step-mark { background: var(--ub-blue); color: #fff; box-shadow: 0 0 0 4px rgba(59, 130, 246, .2); }
.ub-step-title { font-size: 14px; font-weight: 600; } .ub-step-detail { font-size: 13px; color: var(--ub-muted); }
.ub-note { padding: 12px; background: var(--ub-blue-soft); border-radius: 10px; font-size: 13px; color: var(--ub-blue-dark); }
.ub-attn { display: flex; flex-direction: column; gap: 4px; margin: 0 -8px; }
.ub-attn-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 8px; border-radius: 10px; cursor: pointer; background: none; border: 0; text-align: left; font: inherit; color: inherit; width: 100%; transition: background .12s ease; }
.ub-attn-item:hover { background: var(--ub-soft); }
.ub-attn-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--ub-blue-soft); color: var(--ub-blue); }
.ub-attn-icon svg { width: 16px; height: 16px; }
.ub-attn-item.red .ub-attn-icon { background: var(--ub-red-soft); color: var(--ub-red); }
.ub-attn-item.amber .ub-attn-icon { background: var(--ub-amber-soft); color: var(--ub-amber); }
.ub-attn-title { font-size: 14px; font-weight: 600; } .ub-attn-detail { font-size: 13px; color: var(--ub-muted); }
.ub-attn-go { margin-left: auto; color: var(--ub-faint); flex: none; align-self: center; font-size: 18px; }
.ub-allgood { display: flex; gap: 10px; align-items: center; color: var(--ub-green); font-size: 14px; padding: 8px 0; }
.ub-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.ub-tbl th { text-align: left; font-weight: 600; color: var(--ub-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--ub-line); background: var(--ub-soft); }
.ub-tbl td { padding: 11px 12px; border-bottom: 1px solid var(--ub-line); }
.ub-tbl tr:last-child td { border-bottom: 0; }
.ub-tbl .num { text-align: right; font-variant-numeric: tabular-nums; } .ub-tbl .sub { font-size: 12px; color: var(--ub-muted); }
.ub-pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--ub-slate-soft); color: var(--ub-slate); white-space: nowrap; }
.ub-pill.green { background: var(--ub-green-soft); color: var(--ub-green); } .ub-pill.amber { background: var(--ub-amber-soft); color: var(--ub-amber); }
.ub-pill.red { background: var(--ub-red-soft); color: var(--ub-red); } .ub-pill.blue { background: var(--ub-blue-soft); color: var(--ub-blue-dark); }
.ub-rows { display: flex; flex-direction: column; gap: 14px; }
.ub-row-top { display: flex; justify-content: space-between; font-size: 14px; gap: 8px; }
.ub-row-top span:last-child { font-variant-numeric: tabular-nums; color: var(--ub-muted); white-space: nowrap; }
.ub-meter { height: 8px; background: var(--ub-slate-soft); border-radius: 999px; margin-top: 6px; overflow: hidden; }
.ub-meter i { display: block; height: 8px; background: linear-gradient(90deg, #3B82F6, var(--ub-blue)); border-radius: 999px; }
.ub-empty { color: var(--ub-muted); font-size: 14px; padding: 16px 0; }
.ub-skeleton { background: linear-gradient(90deg, var(--ub-slate-soft), var(--ub-soft), var(--ub-slate-soft)); background-size: 200% 100%; animation: ub-pulse 1.2s infinite; border-radius: 14px; min-height: 104px; }
@keyframes ub-pulse { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ub-kpi, .ub-chip, .ub-btn { transition: none; } .ub-kpi:hover, .ub-chip:hover { transform: none; } .ub-skeleton { animation: none; } }
@media (max-width: 1100px) { .ub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ub-grid3 { grid-template-columns: 1fr; } .ub-span2 { grid-column: auto; } }
@media (max-width: 560px) { .ub-root { padding: 16px; } .ub-kpis { grid-template-columns: 1fr; } .ub-head h1 { font-size: 22px; } .ub-spark { width: 64px; } }

/* ---------------------------------------------------------------- 4. Sign-in page */
body[data-path="login"], body[data-path="update-password"], body[data-path="forgot-password"] {
	background: radial-gradient(1200px 600px at 15% -10%, #1E3A8A 0%, transparent 60%), radial-gradient(900px 500px at 100% 110%, #2563EB 0%, transparent 55%), #0F172A;
	min-height: 100vh; font-family: var(--font-stack);
}
body[data-path="login"] .page-card, body[data-path="forgot-password"] .page-card, body[data-path="update-password"] .page-card {
	background: #FFFFFF; border: 0; border-radius: 18px; box-shadow: 0 25px 60px rgba(2, 6, 23, .45); padding: 34px 32px; max-width: 420px; }
body[data-path="login"] .page-card-head h4, body[data-path="login"] .page-card-head .login-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: #0F172A; }
body[data-path="login"] .page-card-head img, body[data-path="login"] .page-card-head .app-logo { max-height: 52px; max-width: 52px; border-radius: 12px; margin-bottom: 8px; }
body[data-path="login"] .form-control { border-radius: 10px; padding: 11px 14px; height: auto; background: #F1F5F9; border: 1px solid #E2E8F0; }
body[data-path="login"] .form-control:focus { background: #fff; border-color: #1D4ED8; box-shadow: 0 0 0 3px rgba(29, 78, 216, .18); }
body[data-path="login"] .btn-primary, body[data-path="login"] .btn-login, body[data-path="login"] .btn-login-option.btn-primary { background: #1D4ED8 !important; border-color: #1D4ED8 !important; color: #fff !important; border-radius: 10px; padding: 11px 16px; font-weight: 600; }
body[data-path="login"] .btn-primary:hover, body[data-path="login"] .btn-login:hover { background: #1E3A8A !important; border-color: #1E3A8A !important; }
body[data-path="login"] .btn-default, body[data-path="login"] .btn-login-option { border-radius: 10px; }
body[data-path="login"] .login-content .text-muted, body[data-path="login"] a { color: #1D4ED8; }
body[data-path="login"] .navbar { display: none; }
body[data-path="login"] .web-footer, body[data-path="login"] footer { color: #94A3B8; }

/* Recovery page: progress bar */
.ub-bar { height: 10px; border-radius: 999px; background: var(--ub-slate-soft); overflow: hidden; margin: 10px 0 6px; }
.ub-bar i { display: block; height: 100%; border-radius: 999px; background: var(--ub-blue); transition: width .3s ease; }
.ub-bar i.ok { background: var(--ub-green); }
/* AI analytics (increment 24): the dashboard's Insights card and the Ask page */
.ub-insights { margin-bottom: 16px; }
.ub-insight-text { font-size: 15px; line-height: 1.6; margin: 0 0 8px; }
.ub-insight-facts { margin: 0 0 8px; padding-left: 18px; line-height: 1.7; }
.ub-insight-sources { margin-top: 8px; font-size: 13px; color: var(--ub-muted); }
.ub-insight-sources ol { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.ub-fact-ref { color: var(--ub-blue); font-weight: 600; }
.ub-ask-box { display: flex; gap: 8px; flex-wrap: wrap; }
.ub-ask-box input { flex: 1 1 260px; min-width: 0; }
.ub-answer { white-space: pre-wrap; font-size: 15px; line-height: 1.6; }
/* Consumer 360, redesigned after the mock-up (2026-11-16) */
.ub-c360-search { margin-bottom: 12px; } .ub-c360-search .ub-c360-q { width: 100%; max-width: 560px; }
.ub-c360-found { padding: 6px; } .ub-c360-pick { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ub-c360-pick:hover { background: var(--ub-soft); } .ub-c360-pick .sub { color: var(--ub-muted); font-size: 13px; }
.ub-c360-crumb { font-size: 13px; color: var(--ub-muted); margin: 4px 0 10px; }
.ub-c360-head { display: flex; flex-direction: column; gap: 16px; }
.ub-c360-id { display: flex; gap: 16px; align-items: center; }
.ub-c360-avatar { width: 56px; height: 56px; border-radius: 12px; background: var(--ub-blue-soft); color: var(--ub-blue-dark); display: flex;
	align-items: center; justify-content: center; font-weight: 700; font-size: 20px; flex: 0 0 auto; }
.ub-c360-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ub-c360-name h1 { font-size: 24px; margin: 0; }
.ub-c360-facts { color: var(--ub-muted); font-size: 14px; margin-top: 4px; }
.ub-c360-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ub-c360-accounts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.ub-c360-acc { border: 1px solid var(--ub-line); background: var(--ub-card); border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--ub-ink); }
.ub-c360-acc span { margin-left: 8px; color: var(--ub-muted); } .ub-c360-acc.on { border-color: var(--ub-blue); box-shadow: inset 0 0 0 1px var(--ub-blue); }
.ub-c360-total { margin-left: auto; font-size: 13px; color: var(--ub-muted); }
.ub-c360-alerts { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; } .ub-c360-alerts .ub-link { cursor: pointer; }
.ub-c360-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ub-line); margin: 16px 0; overflow-x: auto; }
.ub-c360-tab { border: 0; background: none; padding: 10px 12px; font-size: 14px; color: var(--ub-muted); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.ub-c360-tab.on { color: var(--ub-blue); border-bottom-color: var(--ub-blue); font-weight: 600; }
.ub-c360-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.ub-c360-grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.ub-c360-big { font-size: 34px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.ub-c360-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 14px 0 0; font-size: 14px; }
.ub-c360-dl dt { color: var(--ub-muted); font-weight: 400; } .ub-c360-dl dd { margin: 0; text-align: right; }
.ub-c360-bill td { padding: 8px 10px; } .ub-c360-bill tr.strong td { font-weight: 700; }
.ub-c360-bars { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding-top: 10px; }
.ub-c360-bar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.ub-c360-bar i { width: 100%; max-width: 34px; background: var(--ub-blue-line); border-radius: 4px 4px 0 0; }
.ub-c360-bar i.last { background: var(--ub-blue); }
.ub-c360-bar i.est { background: repeating-linear-gradient(45deg, var(--ub-blue-line), var(--ub-blue-line) 4px, var(--ub-card) 4px, var(--ub-card) 7px); }
.ub-c360-bar .v { font-size: 11px; color: var(--ub-muted); margin-bottom: 4px; } .ub-c360-bar .m { font-size: 11px; color: var(--ub-muted); margin-top: 6px; }
.ub-c360-tl { list-style: none; margin: 0; padding: 0; } .ub-c360-tl li { display: flex; gap: 10px; padding: 8px 0; }
.ub-c360-tl i { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--ub-faint); flex: 0 0 auto; }
.ub-c360-tl i.blue { background: var(--ub-blue); } .ub-c360-tl i.green { background: #22C55E; } .ub-c360-tl i.amber { background: #F59E0B; }
.ub-c360-tl .sub { font-size: 12px; color: var(--ub-muted); }
.ub-c360-sub { font-size: 16px; margin: 16px 0 8px; }
@media (max-width: 1100px) { .ub-c360-grid3 { grid-template-columns: 1fr 1fr; } .ub-c360-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .ub-c360-grid3 { grid-template-columns: 1fr; } .ub-c360-name h1 { font-size: 20px; } .ub-c360-total { margin-left: 0; }
	.ub-c360-bars { gap: 4px; } .ub-c360-bar .v { display: none; } }
/* Tariff editor, after the mock-up (2026-11-16) */
.ub-te-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.ub-te-dirty { margin-left: 8px; font-weight: 600; color: var(--ub-red); }
.ub-te-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 16px; }
.ub-te-step { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--ub-slate-soft); color: var(--ub-muted); }
.ub-te-step.done { background: var(--ub-green-soft); color: var(--ub-green); } .ub-te-step.on { background: var(--ub-navy); color: #fff; font-weight: 600; }
.ub-te-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ub-te-grid .ub-card { margin-bottom: 16px; }
.ub-te-side { position: sticky; top: 72px; }
.ub-te-impact-card { border: 2px solid var(--ub-blue); }
.ub-te-seg { display: inline-flex; background: var(--ub-slate-soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; margin-bottom: 14px; }
.ub-te-method { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; color: var(--ub-muted); cursor: pointer; }
.ub-te-method.on { background: var(--ub-card); color: var(--ub-ink); font-weight: 600; box-shadow: var(--ub-shadow); }
.ub-te-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.ub-te-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ub-muted); font-weight: 400; }
.ub-te-fields input { width: 100%; } .ub-te-ro { padding: 8px 0; color: var(--ub-ink); font-size: 15px; }
.ub-te input.ub-select { min-width: 0; width: 100%; }
.ub-te-add { border: 0; background: none; color: var(--ub-blue); font-size: 13px; padding: 8px 0 0; cursor: pointer; }
.ub-te-addcharge { margin-top: 10px; max-width: 280px; }
.ub-te-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.ub-te-stat { background: var(--ub-soft); border-radius: 10px; padding: 10px 12px; } .ub-te-stat b { font-size: 20px; }
.ub-te-example { margin-top: 12px; padding: 10px 12px; background: var(--ub-soft); border-radius: 10px; font-size: 13px; color: var(--ub-muted); }
@media (max-width: 1100px) { .ub-te-grid { grid-template-columns: 1fr; } .ub-te-side { position: static; } }
@media (max-width: 700px) { .ub-te-fields { grid-template-columns: 1fr; } }
/* Selection bar with bulk actions (defaulters and recovery, after the mock-up; reusable on any list page) */
.ub-selbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--ub-blue-soft);
	border: 1px solid var(--ub-blue-line); border-radius: 10px; padding: 10px 14px; margin: 10px 0 12px; font-size: 14px; }
.ub-selbar[hidden] { display: none; }
.ub-btn.ub-btn-danger { background: var(--ub-red); border-color: var(--ub-red); color: #fff; }
.ub-c360 { cursor: pointer; } .ub-c360 b { color: var(--ub-blue); }
.ub-rec-stages summary { cursor: pointer; list-style: none; } .ub-rec-stages summary::-webkit-details-marker { display: none; }
.ub-rec-stages summary h2::after { content: " ▾"; color: var(--ub-faint); font-size: 13px; }
.ub-target { cursor: pointer; }
.ub-allgood > svg { width: 20px; height: 20px; flex: 0 0 auto; }
/* Cash counter, after the mock-up (2026-11-16) */
.ub-cash-top { font-size: 13px; color: var(--ub-muted); margin-bottom: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ub-cash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ub-cash-grid .ub-card { margin-bottom: 16px; }
.ub-cash-scan { display: flex; gap: 8px; } .ub-cash-scan input { flex: 1; font-size: 16px; padding: 10px 12px; }
.ub-cash-who { margin: 16px 0 4px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .ub-cash-who b { font-size: 18px; }
.ub-cash-due { font-size: 26px; font-weight: 700; }
/* a consumer ID with several accounts: the cashier picks one (increment 31) */
.ub-cash-choose { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.ub-cash-choose td { padding: 8px 8px; border-top: 1px solid var(--ub-line); vertical-align: middle; }
.ub-cash-choose td:first-child { padding-left: 0; white-space: nowrap; } .ub-cash-choose td.text-right { white-space: nowrap; }
.ub-cash-choose td:nth-child(3) { color: var(--ub-muted); }
.ub-cash-change { padding: 8px 0; font-size: 20px; font-weight: 700; color: var(--ub-green); } .ub-cash-change.red { color: var(--ub-red); }
.ub-cash-modes { margin: 12px 0 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--ub-muted); }
.ub-cash-modes .ub-te-method { border: 1px solid var(--ub-line); }
.ub-cash-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 1000px) { .ub-cash-grid { grid-template-columns: 1fr; } }
/* Reading review, after the mock-up (2026-11-16) */
.ub-rv-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ub-rv-side { position: sticky; top: 72px; }
.ub-rv-row { cursor: pointer; } .ub-rv-row:hover td { background: var(--ub-soft); }
.ub-rv-row.on td { background: var(--ub-blue-soft); } .ub-rv-row.on td:first-child { box-shadow: inset 3px 0 0 var(--ub-blue); }
.ub-rv-photo { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; margin: 6px 0 4px; background: var(--ub-soft); }
.ub-rv-nophoto { height: 120px; border-radius: 10px; background: var(--ub-soft); display: flex; align-items: center; justify-content: center;
	color: var(--ub-faint); font-size: 13px; margin: 6px 0 4px; }
@media (max-width: 1100px) { .ub-rv-grid { grid-template-columns: 1fr; } .ub-rv-side { position: static; } }

/* Bill run wizard (mock-up "Bill run wizard", 2026-11-16) */
.ub-btn-sm { padding: 4px 10px; font-size: 12px; }
.ub-br-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.ub-br-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ub-muted); background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 999px; padding: 6px 14px 6px 6px; }
.ub-br-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ub-soft); font-size: 12px; font-weight: 600; }
.ub-br-steps li.done { color: var(--ub-ink); }
.ub-br-steps li.done span { background: var(--ub-green, #1a7f4b); color: #fff; }
.ub-br-steps li.now { border-color: var(--ub-blue); color: var(--ub-blue); font-weight: 600; }
.ub-br-steps li.now span { background: var(--ub-blue); color: #fff; }
.ub-br-act { white-space: nowrap; }
.ub-br-act .ub-btn { margin-right: 4px; }
.ub-br-bulkbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ub-br-bulkbar .ub-kpi-note { margin: 0; }
.ub-br .ub-kpis { margin-bottom: 16px; }
.ub-kpi-go[data-drill]:not([data-drill=""]) { cursor: pointer; transition: box-shadow .12s ease, transform .12s ease; }
.ub-kpi-go[data-drill]:not([data-drill=""]):hover { box-shadow: var(--ub-shadow-lift); transform: translateY(-1px); }
/* Consumer 360 search: one row per account */
.ub-c360-found { max-height: 420px; overflow-y: auto; }
.ub-c360-pick { justify-content: space-between; align-items: center; }
.ub-c360-pick.on { background: var(--ub-soft); box-shadow: inset 3px 0 0 var(--ub-blue); }
.ub-c360-hit { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ub-c360-hit-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ub-c360-bal { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.ub-c360-bal.due { color: var(--ub-red, #b91c1c); }
.ub-c360-why { font-size: 11px; color: var(--ub-muted); text-transform: uppercase; letter-spacing: .04em; }

/* Role Rights and Society Users (increment 25) */
.ub-rr-wrap { overflow: auto; max-height: calc(100vh - 260px); }
.ub-rr-tbl th { position: sticky; top: 0; z-index: 1; }
.ub-rr-tbl td:first-child, .ub-rr-tbl th:first-child { position: sticky; left: 0; background: var(--ub-card); min-width: 260px; z-index: 2; }
.ub-rr-rolehead span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 11px; }
.ub-rr-cell { text-align: center; }
.ub-rr-area td { background: var(--ub-soft); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--ub-muted); }
.ub-us-ticks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.ub-us-tick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; }
.ub-us-h { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ub-muted); margin: 14px 0 6px; }
.ub-us-block { display: flex; gap: 6px; margin-bottom: 6px; }
.ub-us-row.on { background: var(--ub-soft); }
/* five summary cards (Defaulters and Recovery, with held by court order: increment 40) */
.ub-kpis.ub-kpis5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ub-kpis.ub-kpis5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ub-kpis.ub-kpis5 { grid-template-columns: 1fr; } }
/* nine dashboard cards, three to a row (increment 46: active connections added to the eight) */
.ub-kpis.ub-kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ub-kpis.ub-kpis3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ub-kpis.ub-kpis3 { grid-template-columns: 1fr; } }
/* Reading Entry (increment 47): the cycle's meters, a row an account; only the reading is typed */
.ub-re-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ub-re-stat { background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--ub-shadow); }
.ub-re-stat-label { font-size: 12px; color: var(--ub-muted); font-weight: 500; }
.ub-re-stat-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ub-re-stat.green .ub-re-stat-value { color: var(--ub-green); } .ub-re-stat.amber .ub-re-stat-value { color: var(--ub-amber); } .ub-re-stat.red .ub-re-stat-value { color: var(--ub-red); }
.ub-re-card { padding: 0; overflow: hidden; }
.ub-re-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--ub-line); }
.ub-re-search { cursor: text; min-width: 280px; max-width: 360px; padding-right: 14px; }
.ub-re-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 0; cursor: pointer; }
.ub-re-grow { flex: 1; }
.ub-re-count { font-size: 13px; color: var(--ub-muted); }
.ub-re-bar .ub-btn:disabled { opacity: .5; cursor: default; }
.ub-re-scroll { overflow: auto; max-height: calc(100vh - 330px); min-height: 260px; }
.ub-re-tbl { font-size: 13px; }
.ub-re-tbl thead th { position: sticky; top: 0; z-index: 2; white-space: nowrap; padding: 8px; }
.ub-re-tbl td { padding: 6px 8px; vertical-align: top; }
.ub-re-tbl .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.ub-re-seq { color: var(--ub-faint); font-variant-numeric: tabular-nums; }
.ub-re-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ub-blue-dark); cursor: pointer; }
.ub-re-open:hover { text-decoration: underline; }
.ub-re-in { font: inherit; font-size: 13px; border: 1px solid var(--ub-line-strong); border-radius: 6px; padding: 5px 8px; background: var(--ub-card); color: var(--ub-ink); }
.ub-re-in:focus { outline: 2px solid var(--ub-blue); outline-offset: 0; border-color: var(--ub-blue); }
.ub-re-in:disabled { background: var(--ub-soft); color: var(--ub-faint); border-color: var(--ub-line); }
.ub-re-num { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
.ub-re-num[data-f="mdi_kw"] { width: 58px; }
.ub-re-date { width: 122px; } .ub-re-code { width: 116px; }
.ub-re-mute { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin: 0 0 0 6px; cursor: pointer; white-space: nowrap; }
.ub-re-mute .ub-re-in { padding: 0; }
.ub-re-tbl tr.is-entered td:first-child { box-shadow: inset 3px 0 0 var(--ub-green); }
.ub-re-tbl tr.is-dirty td:first-child { box-shadow: inset 3px 0 0 var(--ub-blue); }
.ub-re-tbl tr.is-failed td:first-child { box-shadow: inset 3px 0 0 var(--ub-red); }
.ub-re-tbl tr.is-locked td { background: var(--ub-soft); }
.ub-re-state { min-width: 130px; } .ub-re-state .sub { white-space: normal; max-width: 150px; } .ub-re-err { color: var(--ub-red) !important; }
.ub-re-hint { padding: 10px 16px; border-top: 1px solid var(--ub-line); }
@media (max-width: 560px) { .ub-re-search { min-width: 0; width: 100%; max-width: none; } }

/* Background jobs started from a button (increment 55): a panel at the bottom right that doesn't block the screen */
.ub-jobs { position: fixed; right: 16px; bottom: 16px; z-index: 1030; display: flex; flex-direction: column; gap: 8px; width: 340px; max-width: calc(100vw - 32px); }
.ub-job { background: var(--ub-card); color: var(--ub-ink); border: 1px solid var(--ub-line-strong); border-radius: 10px; box-shadow: var(--ub-shadow-lift); padding: 10px 12px; font-size: 13px; }
.ub-job-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.ub-job-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-job-close { border: 0; background: none; color: var(--ub-muted); font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; }
.ub-job .progress { height: 8px; margin: 0; }
.ub-job-text { color: var(--ub-muted); margin-top: 6px; overflow-wrap: anywhere; }
.ub-job.done .progress-bar { background: var(--ub-green); }
.ub-job.failed { border-color: var(--ub-red); }
.ub-job.failed .ub-job-text { color: var(--ub-red); }

/* ---------------------------------------------------------------- Home dashboard (increment 61: executive overview)
   Chart colours by role. Series: blue, orange, aqua in that fixed order (validated together for colour-blind readers, light and
   dark); ageing: one orange ramp, light to dark with age (reversed on dark), "not yet due" neutral, "before go-live" hatched gray.
   Status: good / warning / critical, always with a label. Text never takes a series colour. */
.ub-dash {
	--c1: #2a78d6; --c2: #eb6834; --c3: #1baf7a;
	--age-due: #a9b4c2; --age-1: #eda56a; --age-2: #e2803f; --age-3: #cc5f2a; --age-4: #a8441e; --age-5: #7d2f14; --age-go: #8b8f98;
	--grid: #e6e8ec; --axis: #c3c8d0; --tick: #7b8290;
	--st-good: #0ca30c; --st-warn: #fab219; --st-bad: #d03b3b; --up-good: #0b7a0b; --down-bad: #c03030;
	max-width: 1440px; gap: 16px;
}
[data-theme="dark"] .ub-dash {
	--c1: #3987e5; --c2: #d95926; --c3: #199e70;
	--age-due: #556070; --age-1: #b0471f; --age-2: #cf5a2b; --age-3: #e5793f; --age-4: #f0a868; --age-5: #f6c48f; --age-go: #6b7180;
	--grid: #222e42; --axis: #33425a; --tick: #8a95a8; --up-good: #3fcf5a; --down-bad: #f07a7a;
}
.ub-dash h1 { margin: 2px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.ub-dh { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.ub-dh p { margin: 4px 0 0; color: var(--ub-muted); font-size: 14px; }
.ub-dh-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ub-muted); display: flex; align-items: center; gap: 8px; }
.ub-dh-eyebrow .ub-badge { text-transform: none; letter-spacing: 0; }
.ub-dh-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ub-slicer { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ub-slicer > span { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ub-muted); }
.ub-slicer .ub-select { min-width: 170px; }
.ub-btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ub-muted); }
.ub-btn-ghost svg { width: 15px; height: 15px; }
.ub-refresh.is-busy svg { animation: ub-spin 1s linear infinite; }
@keyframes ub-spin { to { transform: rotate(360deg); } }
.ub-dmenu .dropdown-item { cursor: pointer; font-size: 14px; }
.ub-dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.ub-dgrid .span-3 { grid-column: span 3; } .ub-dgrid .span-4 { grid-column: span 4; }
.ub-dgrid .span-8 { grid-column: span 8; } .ub-dgrid .span-12 { grid-column: span 12; }
.ub-dgrid .ub-skeleton.s-hero { grid-column: span 3; min-height: 168px; } .ub-dgrid .ub-skeleton.s-wide { grid-column: span 8; min-height: 340px; }
.ub-dgrid .ub-skeleton.s-side { grid-column: span 4; min-height: 340px; }
.ub-skeleton.s-line { min-height: 14px; border-radius: 6px; margin: 10px 0; } .ub-skeleton.s-line.short { width: 60%; }
.ub-dcard { display: flex; flex-direction: column; padding: 18px 20px; }
.ub-dcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ub-dcard-head h2 { margin: 0; font-size: 15px; }
.ub-dsub { font-size: 12.5px; color: var(--ub-muted); margin-top: 2px; }
.ub-dnote { font-size: 12.5px; color: var(--ub-muted); margin-top: 12px; line-height: 1.45; }
.ub-svg { display: block; overflow: visible; font-family: var(--font-stack); }
.ub-chart-box { width: 100%; min-width: 0; }
[data-drill] { cursor: pointer; }
[data-drill]:focus-visible, .ub-dash [tabindex]:focus-visible { outline: 2px solid var(--ub-blue); outline-offset: 2px; }

/* headline figures */
.ub-hero { display: flex; flex-direction: column; padding: 18px 20px 12px; transition: box-shadow .15s ease, border-color .15s ease; }
.ub-hero:hover { box-shadow: var(--ub-shadow-lift); border-color: var(--ub-line-strong); }
.ub-hero-label { font-size: 13px; font-weight: 600; color: var(--ub-muted); }
.ub-hero-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.ub-hero-value { font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.ub-hero-sub { font-size: 13px; color: var(--ub-muted); margin-top: 2px; }
.ub-hero-delta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 12.5px; min-height: 22px; }
.ub-delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; padding: 2px 8px 2px 5px; border-radius: 999px; background: var(--ub-slate-soft); color: var(--ub-ink); }
.ub-delta svg { width: 12px; height: 12px; fill: currentColor; }
.ub-delta.good { color: var(--up-good); background: var(--ub-green-soft); } .ub-delta.bad { color: var(--down-bad); background: var(--ub-red-soft); }
.ub-vs { color: var(--ub-muted); }
.ub-status { display: inline-flex; align-items: center; gap: 6px; color: var(--ub-ink); font-weight: 500; }
.ub-status i, .ub-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--ub-faint); flex: none; }
.ub-status.green i, .ub-dot.green { background: var(--st-good); } .ub-status.amber i, .ub-dot.amber { background: var(--st-warn); }
.ub-status.red i, .ub-dot.red { background: var(--st-bad); }
.ub-hero-spark { margin-top: auto; padding-top: 8px; height: 48px; }
.ub-spark2 .s-line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ub-spark2 .s-area { fill: var(--c1); opacity: .1; } .ub-spark2 .s-dot { fill: var(--c1); stroke: var(--ub-card); stroke-width: 2; }
.ub-gauge { flex: none; }
.ub-gauge .g-track { fill: none; stroke: var(--ub-slate-soft); stroke-width: 8; }
.ub-gauge .g-fill { fill: none; stroke: var(--c1); stroke-width: 8; stroke-linecap: round; }
.ub-gauge .g-target { stroke: var(--ub-ink); stroke-width: 2; stroke-linecap: round; }

/* charts */
.ub-svg .grid { stroke: var(--grid); stroke-width: 1; } .ub-svg .grid.base { stroke: var(--axis); }
.ub-svg .tick { fill: var(--tick); font-size: 11px; font-variant-numeric: tabular-nums; } .ub-svg .tick.now { fill: var(--ub-ink); font-weight: 600; }
.ub-svg .endlabel { fill: var(--ub-ink); font-size: 12px; font-weight: 600; }
.ub-svg .m-billed { fill: var(--c1); } .ub-svg .m-coll { fill: var(--c2); }
.ub-svg .hit { fill: transparent; } .ub-svg .hit:hover, .ub-svg .hit:focus { fill: var(--ub-ink); opacity: .05; outline: none; }
.ub-legend .k-billed { background: var(--c1); } .ub-legend .k-coll { background: var(--c2); }
.ub-dash .ub-legend { margin: -4px 0 6px; font-size: 12.5px; }
.ub-seg { display: inline-flex; border: 1px solid var(--ub-line-strong); border-radius: 8px; overflow: hidden; flex: none; }
.ub-seg button { font: inherit; font-size: 12.5px; padding: 5px 12px; background: var(--ub-card); color: var(--ub-muted); border: 0; cursor: pointer; }
.ub-seg button.on { background: var(--ub-navy); color: #fff; }
.ub-tip { position: absolute; z-index: 1080; pointer-events: none; background: var(--ub-navy, #0F172A); color: #fff; font-size: 12.5px; line-height: 1.45;
	padding: 7px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: 260px; font-family: var(--font-stack); font-variant-numeric: tabular-nums; }
.ub-tblwrap { overflow-x: auto; }
.ub-dtbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ub-dtbl td { padding: 7px 0; border-bottom: 1px solid var(--ub-line); }
.ub-dtbl tr:last-child td { border-bottom: 0; }
.ub-dtbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.ub-dtbl .muted { color: var(--ub-muted); }
.ub-dash .ub-tbl.ub-dtbl th, .ub-dash .ub-tbl.ub-dtbl td { padding: 9px 12px; }
.ub-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; background: var(--ub-faint); }
.ub-key.c1, .d-seg.c1 { background: var(--c1); stroke: var(--c1); } .ub-key.c2, .d-seg.c2 { background: var(--c2); stroke: var(--c2); }
.ub-key.c3, .d-seg.c3 { background: var(--c3); stroke: var(--c3); }
.d-seg { fill: none; cursor: default; } .d-seg:hover, .d-seg:focus { opacity: .85; outline: none; }
.ub-svg .d-total { fill: var(--ub-ink); font-size: 16px; font-weight: 700; } .ub-svg .d-cap { fill: var(--ub-muted); font-size: 11px; }
.ub-donut { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; }
.ub-donut table { flex: 1 1 200px; min-width: 200px; } .ub-donut td:first-child { white-space: nowrap; }
.ub-hbars { display: flex; flex-direction: column; gap: 12px; }
.ub-hbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 4px; }
.ub-hbar-top span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ub-hbar-top .v { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.ub-hbar-top em { font-style: normal; font-weight: 400; color: var(--ub-muted); margin-left: 8px; }
.ub-svg .h-track { fill: var(--ub-slate-soft); } .ub-svg .h-fill { fill: var(--c1); }

/* what consumers owe */
.ub-owe-total { font-size: 26px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ub-owe-total span { font-size: 13px; font-weight: 500; color: var(--ub-muted); letter-spacing: 0; }
.ub-segbar { display: flex; gap: 2px; height: 28px; margin: 12px 0 10px; }
.ub-segbar span { border-radius: 4px; min-width: 3px; display: flex; align-items: center; padding-left: 8px; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; }
.age-due { background: var(--age-due); } .age-1 { background: var(--age-1); } .age-2 { background: var(--age-2); } .age-3 { background: var(--age-3); }
.age-4 { background: var(--age-4); } .age-5 { background: var(--age-5); }
.age-go { background: repeating-linear-gradient(135deg, var(--age-go) 0 5px, color-mix(in srgb, var(--age-go) 70%, var(--ub-card)) 5px 9px); }
.ub-segbar .age-due, .ub-segbar .age-1 { color: #0b0b0b; }
[data-theme="dark"] .ub-segbar .age-1 { color: #fff; } [data-theme="dark"] .ub-segbar .age-4, [data-theme="dark"] .ub-segbar .age-5 { color: #0b0b0b; }
.ub-agetbl tr.is-zero td { color: var(--ub-faint); } .ub-agetbl tr.is-zero .ub-key { opacity: .45; }

/* operating figures */
.ub-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
/* increment 74: eight cards, two rows of four */
.ub-op { display: flex; gap: 12px; align-items: flex-start; background: var(--ub-card); border: 1px solid var(--ub-line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--ub-shadow); min-width: 0; transition: box-shadow .15s ease; }
.ub-op:hover { box-shadow: var(--ub-shadow-lift); }
.ub-op-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--ub-blue-soft); color: var(--ub-blue); display: flex; align-items: center; justify-content: center; flex: none; }
.ub-op-icon svg { width: 17px; height: 17px; }
.ub-op-body { min-width: 0; }
.ub-op-label { font-size: 12.5px; color: var(--ub-muted); font-weight: 500; }
.ub-op-value { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ub-op-note { font-size: 12px; color: var(--ub-muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.ub-op-note .ub-dot { margin-top: 0; }
.ub-op.is-empty .ub-op-value { color: var(--ub-faint); } .ub-op.is-empty .ub-op-icon { background: var(--ub-slate-soft); color: var(--ub-faint); }

/* billing cycle */
.ub-cprogress { height: 6px; border-radius: 999px; background: var(--ub-slate-soft); overflow: hidden; margin-bottom: 14px; }
.ub-cprogress i { display: block; height: 100%; background: var(--st-good); border-radius: 999px; }
.ub-cycle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ub-cstep { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.ub-cstep:last-child { padding-bottom: 0; }
.ub-cstep:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--ub-line); }
.ub-cmark { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex: none; background: var(--ub-slate-soft); color: var(--ub-muted); }
.ub-cstep.done .ub-cmark { background: var(--ub-green-soft); color: var(--ub-green); }
.ub-cstep.now .ub-cmark { background: var(--ub-blue); color: #fff; box-shadow: 0 0 0 4px var(--ub-blue-soft); }
.ub-ctitle { font-size: 13.5px; font-weight: 600; } .ub-cdetail { font-size: 12.5px; color: var(--ub-muted); }
.ub-cstep.next .ub-ctitle { color: var(--ub-muted); font-weight: 500; }
.ub-inbar { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ub-inbar i { display: block; height: 4px; border-radius: 2px; background: var(--c1); opacity: .7; align-self: flex-end; }
.ub-dash .ub-insight-facts { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.5; }
.ub-dash .ub-insight-facts li + li { margin-top: 6px; }

@media (max-width: 1200px) {
	.ub-dgrid .span-3 { grid-column: span 6; } .ub-dgrid .span-8, .ub-dgrid .span-4 { grid-column: span 12; }
	.ub-dgrid .ub-skeleton.s-hero { grid-column: span 6; } .ub-dgrid .ub-skeleton.s-wide, .ub-dgrid .ub-skeleton.s-side { grid-column: span 12; }
}
@media (min-width: 761px) and (max-width: 1200px) { .ub-dgrid > .ub-dcard.span-4 { grid-column: span 6; } }
@media (max-width: 760px) {
	.ub-dgrid .span-3, .ub-dgrid .ub-skeleton.s-hero { grid-column: span 12; }
	.ub-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ub-dh-tools { width: 100%; } .ub-slicer { flex: 1 1 140px; } .ub-slicer .ub-select { min-width: 0; width: 100%; max-width: none; }
	.ub-donut { flex-direction: column; align-items: stretch; } .ub-donut svg { margin: 0 auto; }
}
@media (max-width: 420px) { .ub-ops { grid-template-columns: 1fr; } .ub-hero-value { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .ub-hero, .ub-op { transition: none; } .ub-refresh.is-busy svg { animation: none; } }

/* Customer Services Dashboard (increment 90) */
.ub-svc-tabs { margin: 4px 0 16px; display: inline-flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.ub-svc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ub-svc-tile { padding: 14px 16px; border-left: 4px solid transparent; }
.ub-svc-tile.is-link { cursor: pointer; }
.ub-svc-tile.is-link:hover, .ub-svc-tile.is-link:focus-visible { border-color: var(--border-color); box-shadow: var(--shadow-md); }
.ub-svc-tile.tone-red { border-left-color: var(--red-500, #e03636); }
.ub-svc-tile.tone-amber { border-left-color: var(--orange-500, #f39200); }
.ub-svc-label { font-size: 12px; color: var(--text-muted); }
.ub-svc-value { font-size: 26px; font-weight: 600; line-height: 1.25; margin: 4px 0 2px; color: var(--text-color); font-variant-numeric: tabular-nums; }
.ub-svc-note { font-size: 12px; color: var(--text-muted); }
.ub-svc-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 12px; }
.ub-svc-table tr[data-open] { cursor: pointer; }
.ub-svc-table tr[data-open]:hover td, .ub-svc-table tr[data-open]:focus-visible td { background: var(--subtle-fg, var(--control-bg)); }
.ub-svc-table td.num, .ub-svc-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
