/*-----------------------------------------------------------------------------
 * Client Billing on Porto Admin, dark (Plan #32, 2026-11-30)
 *
 * Loads LAST, after the sagentic.dev stack copied into assets/porto/css/ (theme, skins, colors, dark-mode).
 * Three parts:
 *   1. sagentic.me's own layout rules (carried over from the classic NobleUI look's custom.css, dark values only;
 *      that theme was removed 2026-11-30 and no page uses its classes any more).
 *   2. The sign-in and password pages.
 *   3. The sagentic.dev house style applied to Bootstrap components the billing pages use:
 *      amethyst labels, dark alerts, card headers, the header lookup, the sidebar headings.
 *
 * Palette: the amethyst family from sagentic.dev's dark-mode guide (/home2/sagedev/.guides/darkmode/README.md §5.6).
 * Text ladder on the #2e353e card: #fff headings, #c9ced8 body, #9aa1b0 quiet, #c4b5fd labels.
 *---------------------------------------------------------------------------*/

:root {
	--bl-body: #c9ced8;
	--bl-quiet: #9aa1b0;
	--bl-label: #c4b5fd;          /* --medium-purple-light */
	--bl-accent: #ad9bf5;
	--bl-grape: #8b6fd4;          /* --cyber-grape-light-hover */
	--bl-card: #2e353e;
	--bl-card-head: #282d36;
	--bl-page: #1d2127;
	--bl-well: #21262d;
	--bl-line: rgba(255, 255, 255, .09);
	--bl-line-strong: #3c444f;
	--bl-link: #6ea8fe;           /* --hyperlink, dark */
	--bl-green: #34d399;
	--bl-amber: #fbbf24;
}

/* ==========================================================================
   1. sagentic.me layout rules (from assets/css/custom.css)
   ========================================================================== */

.mh-300 { min-height: 300px !important; }
.mh-500 { min-height: 500px !important; }
.card-height-lg { min-height: 700px !important; }
.card-height-md { min-height: 400px !important; }
.card-height-sm { min-height: 200px !important; }

/* sagentic.me's own alt fonts (the site's font setup, kept: Plan #32 "Fonts per the site's own setup") */
.alt-font1 { font-family: "Prompt", sans-serif; }
.alt-font2 { font-family: "Quicksand", sans-serif; }
.alt-font3 { font-family: "Chivo Mono", monospace; }
.alt-font4 { font-family: "Roboto Mono", monospace; }
.alt-font5 { font-family: "Exo", sans-serif; }

.content-lead { font-family: "Prompt", sans-serif; font-size: 22px; font-weight: bold; color: var(--bl-label); text-transform: capitalize; }
.content-lead:before { font-family: "Font Awesome 7 Pro"; content: "\f044" !important; font-weight: 900; display: inline-block; padding-right: 5px; color: var(--bl-grape); }
.faq-lead { font-family: "Poppins", sans-serif; font-size: 16px; font-weight: 600; color: #fff; text-transform: capitalize; }
.faq-lead:before { font-family: "Font Awesome 7 Pro"; content: "\f059" !important; font-weight: 900 !important; display: inline-block; padding-right: 5px; color: var(--bl-grape); }
.error-message { color: #ea868f; font-weight: bold; font-size: 13px; }

/* Rich text (knowledge base articles, service descriptions) */
.paragraph-fix p { margin-bottom: 1rem; }
.paragraph-fix h2, .paragraph-fix h3, .paragraph-fix h4, .paragraph-fix h5 {
	color: var(--bl-label); font-weight: 600; margin: 1.75rem 0 .75rem; padding-bottom: .4rem; border-bottom: 1px solid rgba(196, 181, 253, .3);
}
.paragraph-fix > h2:first-child, .paragraph-fix > h3:first-child, .paragraph-fix > h4:first-child, .paragraph-fix > h5:first-child { margin-top: 0; }
.paragraph-fix ul, .paragraph-fix ol { margin-bottom: 1rem; }
.paragraph-fix li { margin-bottom: .25rem; }

.text-accessible-green { color: var(--bl-green) !important; }
.client-map { display: block; height: 220px; }
.arb-fine-print { font-size: .75rem; line-height: 1.5; color: var(--bl-quiet); }

/* .table-stack: on phones each row becomes a card and each cell a "LABEL ... value" line */
@media (max-width: 767.98px) {
	.table-stack thead { display: none; }
	.table-stack, .table-stack tbody, .table-stack tr, .table-stack td, .table-stack tbody th { display: block; width: 100%; }
	.table-stack tr { border: 1px solid var(--bl-line-strong); margin-bottom: .75rem; padding: 0 .75rem .25rem; overflow: hidden; }
	html.dark .table-stack td, html.dark .table-stack tbody th { text-align: right !important; border: 0; border-bottom: 1px solid var(--bl-line); padding: .5rem 0; white-space: normal; overflow-wrap: anywhere; }
	.table-stack td::after, .table-stack tbody th::after { content: ""; display: table; clear: both; }
	.table-stack td:last-child { border-bottom: 0 !important; }
	.table-stack td[data-label]::before, .table-stack tbody th[data-label]::before { content: attr(data-label); float: left; margin-right: 1rem; text-align: left; font-weight: 600; color: var(--bl-label); text-transform: uppercase; font-size: .75rem; letter-spacing: .03em; line-height: 1.6; }
	.table-stack td > div, .table-stack td > .text-truncate { max-width: none !important; margin-left: auto; }
	.table-stack td .badge.w-100, .table-stack td .btn.w-100 { width: auto !important; }
	html.dark .table-stack tr > :first-child { text-align: left !important; margin: 0 -.75rem .25rem; width: calc(100% + 1.5rem); padding: .6rem .75rem; background-color: var(--bl-card-head); border-bottom: 1px solid var(--bl-line-strong); font-weight: 600; }
	.table-stack td[data-label="Actions"] { white-space: normal !important; }
	.table-stack td[data-label="Actions"] .btn { margin: 0 0 .25rem .25rem; }
}

/* Invoice line items on phones (includes/invoices/view-invoice.php) */
@media (max-width: 767.98px) {
	.invoice-lines thead { display: none; }
	.invoice-lines, .invoice-lines tbody, .invoice-lines tfoot { display: block; width: 100%; }
	.invoice-lines tr { display: flex; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid var(--bl-line); }
	.invoice-lines td, .invoice-lines th { display: block; border: 0 !important; padding: .6rem .25rem; }
	.invoice-lines td:first-child, .invoice-lines th:first-child { flex: 1 1 0; min-width: 0; order: 1; text-align: left !important; white-space: normal; overflow-wrap: anywhere; }
	.invoice-lines .text-end:last-child { flex: 0 0 auto; order: 2; text-align: right; white-space: nowrap; }
	.invoice-lines .line-desc { order: 3; flex: 0 0 100%; padding-top: 0; font-size: .85em; color: var(--bl-quiet); white-space: normal; }
}

/* Invoice view action buttons: a two-column grid on phones, a right-aligned row from md up */
.invoice-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; width: 100%; }
.invoice-actions > *, .invoice-actions .btn { width: 100%; }
@media (min-width: 768px) {
	.invoice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; width: auto; }
	.invoice-actions > *, .invoice-actions .btn { width: auto; }
}

/* Billing Admin dashboard: Needs Attention panels */
.attn-panel { display: flex; flex-direction: column; border: 1px solid var(--bl-line-strong); background: var(--bl-well); overflow: hidden; }
.attn-head { display: flex; align-items: center; padding: .75rem 1rem; font-weight: 600; color: #fff; border-bottom: 1px solid var(--bl-line); }
.attn-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; border-bottom: 1px solid var(--bl-line); }
.attn-row:last-child { border-bottom: 0; }
.attn-row .min-w-0 { min-width: 0; }
.attn-sub { display: block; font-size: .8rem; color: var(--bl-quiet); }
.attn-foot { display: flex; justify-content: space-between; margin-top: auto; padding: .6rem 1rem; font-size: .85rem; border-top: 1px solid var(--bl-line); color: var(--bl-quiet); }

/* Labels: email previews, invoice number/date/due/status */
.preview-group { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--bl-label); }
.meta-label { font-weight: 600; color: var(--bl-label); }
.meta-when { color: var(--bl-amber); }

/* .table-wrap: let cells wrap (the theme sets white-space: nowrap on table cells) */
.table-wrap td, .table-wrap th { white-space: normal; }
.table-wrap td.text-nowrap { white-space: nowrap; }

/* Service lines on invoices (name, billing frequency, domain) */
.svc-name { color: #a78bfa; font-weight: 600; }
.svc-freq { color: #e88bfd; }
.svc-domain { color: #9c88ff; }

/* Reports: Collections by Month */
.month-chart .month-col { outline-offset: 2px; }
.month-chart .month-bar { transition: filter .12s ease; }
.month-chart .month-col:hover .month-bar, .month-chart .month-col:focus-visible .month-bar { filter: brightness(1.2); }

/* Invoice Print / PDF menu */
.print-menu { min-width: 300px; max-width: calc(100vw - 32px); }
.print-menu-receipt { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 1rem; }
.print-menu-receipt > span:first-child { min-width: 0; }
.invoice-actions .print-menu .btn { width: auto; }

/* Record a Payment: sections with a title bar */
.payment-form .form-label { font-weight: 600; color: var(--bl-label); }
.payment-form .pay-section { border: 1px solid var(--bl-line-strong); padding: 0 1rem 1rem; margin-bottom: 1rem; }
.payment-form .pay-section-title { margin: 0 -1rem 1rem; padding: .6rem 1rem; border-bottom: 1px solid var(--bl-line-strong); background: #212529;
	color: var(--bl-label); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }


/* ==========================================================================
   2. Sign-in and password pages (includes/entry/login.php, reset.php)
   ========================================================================== */

/* Page title rows ("Invoices" + buttons): Porto's page-header bar already names the page, so these sit
   as the first row of the content. Under 576px the title gets its own line and the buttons wrap. */
.content-body > .d-flex.justify-content-between.mb-4 h4,
.content-body > .d-flex.justify-content-between h4 { color: #fff; font-weight: 600; }
@media (max-width: 575.98px) {
	.content-body > .d-flex.justify-content-between.mb-4 { flex-wrap: wrap; gap: .5rem; }
	.content-body > .d-flex.justify-content-between.mb-4 > :first-child { flex: 1 1 100%; }
	.content-body > .d-flex.justify-content-between.mb-4 h4 { margin-bottom: 0 !important; }
}

.content-body-full .auth-wrapper { min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; }
.content-body-full .auth-row { padding: 2rem 0; }
.content-body-full .auth-row .card { background: var(--bl-card); border: 1px solid var(--bl-line-strong); }
.content-body-full .auth-form { padding: 1.75rem 2rem !important; }
.content-body-full .auth-logo { color: var(--bl-label); font-weight: 600; text-decoration: none; }
.content-body-full .auth-logo-img { height: 48px; width: auto; }

/* ==========================================================================
   3. sagentic.dev house style on the billing components
   ========================================================================== */

/* Body text ladder (the dark-mode guide's "text ladder") */
html.dark .content-body { color: var(--bl-body); }
html.dark .text-body { color: var(--bl-body) !important; }
html.dark .text-muted, html.dark .text-secondary, html.dark .form-text, html.dark .small.text-muted { color: var(--bl-quiet) !important; }
html.dark .text-body-emphasis { color: #fff !important; }
html.dark .text-secondary-emphasis { color: #d3d7df !important; }
html.dark .text-danger-emphasis { color: #ea868f !important; }
html.dark .text-light { color: #e9ecef !important; }
html.dark .text-dark { color: var(--bl-body) !important; }
html.dark h1, html.dark h2, html.dark h3, html.dark h4, html.dark h5, html.dark h6,
html.dark .h1, html.dark .h2, html.dark .h3, html.dark .h4, html.dark .h5, html.dark .h6 { color: #fff; }
html.dark .content-body .page-header h2 { color: inherit; }

/* Links that aren't buttons: the hyperlink blue (anything that's a .btn keeps its own color) */
html.dark .content-body a:not([class*="btn"]):not(.dropdown-item):not(.nav-link):not(.page-link):not(.list-group-item):not([class*="text-"]):not(.badge) { color: var(--bl-link); }
html.dark .content-body a:not([class*="btn"]):not(.dropdown-item):not(.nav-link):not(.page-link):not(.list-group-item):not([class*="text-"]):not(.badge):hover { color: #9ec5fe; }

/* Cards: the classic cards carry a plain .card-header and a .card-title in the body. */
html.dark .card { color: var(--bl-body); }
html.dark .card > .card-header { background: var(--bl-card-head); border-bottom: 1px solid var(--bl-line-strong); color: #fff; }
html.dark .card > .card-header .card-title,
html.dark .card > .card-header h5, html.dark .card > .card-header h6 { color: var(--bl-grape); text-transform: uppercase; letter-spacing: .03em; }
html.dark .card-body > .card-title, html.dark .card-body .card-title { color: #fff; font-weight: 600; }
/* A header whose color is the status (Notes tab: Client Status green/red) keeps white text on its own fill */
html.dark .card > .card-header.bg-success, html.dark .card > .card-header.bg-danger { border-bottom: 0; }
html.dark .card > .card-header.bg-success h5, html.dark .card > .card-header.bg-danger h5,
html.dark .card > .card-header.bg-success .card-title, html.dark .card > .card-header.bg-danger .card-title { color: #fff !important; }
html.dark h6.card-title { color: var(--bl-grape) !important; text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
html.dark .card-footer { background: var(--bl-card-head); border-top: 1px solid var(--bl-line-strong); }
html.dark .card.border-0, html.dark .card { border-radius: 0; }

/* Form labels are amethyst (dark-mode guide §5.1b) */
html.dark .content-body .form-label, html.dark .content-body .col-form-label, html.dark .content-body label:not(.form-check-label):not(.btn) { color: var(--bl-label); }
html.dark .form-check-label { color: var(--bl-body); }
html.dark .input-group-text { background: var(--bl-card-head); border-color: var(--bl-line-strong); color: var(--bl-quiet); }
html.dark .form-control-plaintext { color: var(--bl-body); }
html.dark .form-control:disabled, html.dark .form-select:disabled, html.dark .form-control[readonly] { background-color: #262b33; color: var(--bl-quiet); }
html.dark .form-control::placeholder { color: #6c7380; }

/* Alerts: dark, tinted panels (bright Bootstrap fills look like light-mode cards on this page) */
html.dark .alert { border-radius: 0; border-width: 1px 1px 1px 4px; }
html.dark .alert-primary   { background: rgba(139, 111, 212, .14); border-color: #8b6fd4; color: #e2dbff; }
html.dark .alert-secondary { background: rgba(154, 161, 176, .12); border-color: #6c757d; color: #d3d7df; }
html.dark .alert-success   { background: rgba(117, 183, 152, .13); border-color: #198754; color: #a3cfbb; }
html.dark .alert-danger    { background: rgba(234, 134, 143, .13); border-color: #dc3545; color: #f1aeb5; }
html.dark .alert-warning   { background: rgba(255, 193, 7, .11); border-color: #ffc107; color: #ffe69c; }
html.dark .alert-info      { background: rgba(13, 202, 240, .10); border-color: #0dcaf0; color: #9eeaf9; }
html.dark .alert-light     { background: var(--bl-well); border-color: var(--bl-line-strong); color: var(--bl-body); }
html.dark .alert .alert-heading { color: inherit; }
html.dark .alert a:not([class*="btn"]) { color: inherit; text-decoration: underline; }
html.dark .alert p, html.dark .alert li, html.dark .alert div { color: inherit; }
html.dark .alert .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* Bootstrap 5.3 "subtle" badges and fills: their light tints turn into bright chips on dark */
html.dark .bg-primary-subtle   { background-color: rgba(139, 111, 212, .22) !important; }
html.dark .bg-secondary-subtle { background-color: rgba(154, 161, 176, .18) !important; }
html.dark .bg-success-subtle   { background-color: rgba(117, 183, 152, .18) !important; }
html.dark .bg-danger-subtle    { background-color: rgba(234, 134, 143, .18) !important; }
html.dark .bg-warning-subtle   { background-color: rgba(255, 193, 7, .16) !important; }
html.dark .bg-info-subtle      { background-color: rgba(13, 202, 240, .14) !important; }
html.dark .text-primary-emphasis { color: #d3c8ff !important; }
html.dark .text-success-emphasis { color: #a3cfbb !important; }
html.dark .text-warning-emphasis { color: #ffe69c !important; }
html.dark .text-info-emphasis    { color: #9eeaf9 !important; }
html.dark .bg-body-tertiary, html.dark .bg-light:not(.badge) { background-color: var(--bl-well) !important; color: var(--bl-body); }
html.dark .bg-white:not(.badge) { color: #212529; }
html.dark .border, html.dark .border-top, html.dark .border-bottom, html.dark .border-start, html.dark .border-end { border-color: var(--bl-line-strong) !important; }
html.dark .border-primary { border-color: var(--bl-grape) !important; }
html.dark .border-success { border-color: #198754 !important; }
html.dark .border-warning { border-color: #ffc107 !important; }
html.dark .badge.bg-warning, html.dark .badge.bg-info, html.dark .badge.text-bg-warning, html.dark .badge.text-bg-info { color: #000 !important; }
html.dark .badge.bg-light { color: #212529 !important; }

/* text-primary on a dark card: the amethyst accent, not the skin's tan */
html.dark .text-primary { color: var(--bl-accent) !important; }
html.dark .btn-primary { --bs-btn-bg: #7c5cd6; --bs-btn-border-color: #7c5cd6; --bs-btn-hover-bg: #6a4bc2; --bs-btn-hover-border-color: #6a4bc2; --bs-btn-active-bg: #5e41b0; --bs-btn-active-border-color: #5e41b0; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-bg: #7c5cd6; --bs-btn-disabled-border-color: #7c5cd6; background-color: var(--bs-btn-bg); border-color: var(--bs-btn-border-color); color: #fff; }
html.dark .btn-primary:hover, html.dark .btn-primary:focus { background-color: var(--bs-btn-hover-bg); border-color: var(--bs-btn-hover-border-color); color: #fff; }
html.dark .btn-outline-primary { --bs-btn-color: #c4b5fd; --bs-btn-border-color: #8b6fd4; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #7c5cd6; --bs-btn-hover-border-color: #7c5cd6; --bs-btn-active-color: #fff; --bs-btn-active-bg: #6a4bc2; --bs-btn-active-border-color: #6a4bc2; color: var(--bs-btn-color); border-color: var(--bs-btn-border-color); background: transparent; }
html.dark .btn-outline-primary:hover, html.dark .btn-outline-primary.active { color: #fff; background-color: #7c5cd6; border-color: #7c5cd6; }
html.dark .btn-light { --bs-btn-bg: #3a414c; --bs-btn-border-color: #4a525e; --bs-btn-color: #e9ecef; --bs-btn-hover-bg: #474f5b; --bs-btn-hover-border-color: #565f6b; --bs-btn-hover-color: #fff; background-color: var(--bs-btn-bg); border-color: var(--bs-btn-border-color); color: var(--bs-btn-color); }
html.dark .btn-outline-secondary { --bs-btn-color: #c9ced8; --bs-btn-border-color: #6c757d; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #5c636a; --bs-btn-hover-border-color: #5c636a; color: var(--bs-btn-color); border-color: var(--bs-btn-border-color); }
html.dark .btn-outline-success { --bs-btn-color: #75b798; --bs-btn-border-color: #198754; color: var(--bs-btn-color); border-color: var(--bs-btn-border-color); }
html.dark .btn-outline-danger  { --bs-btn-color: #ea868f; --bs-btn-border-color: #dc3545; color: var(--bs-btn-color); border-color: var(--bs-btn-border-color); }
html.dark .btn-link { color: var(--bl-link); }

/* Tables: sagentic.dev's markup (table table-sm table-striped align-middle, th.table-label) styled by its custom.css +
   dark-mode.css; only the semantic row colors below are billing's own */
html.dark .table-danger { --bs-table-bg: rgba(220, 53, 69, .12); --bs-table-color: var(--bl-body); }
html.dark .table-warning { --bs-table-bg: rgba(255, 193, 7, .08); --bs-table-color: var(--bl-body); }
html.dark .table-success { --bs-table-bg: rgba(25, 135, 84, .12); --bs-table-color: var(--bl-body); }
html.dark .table-light, html.dark .table > thead.table-light > tr > th { --bs-table-bg: var(--bl-card-head); --bs-table-color: var(--bl-label); }
html.dark .table-danger .svc-name { color: #c4b5fd; } html.dark .table-danger .svc-freq { color: #f0abfc; } html.dark .table-danger .svc-domain { color: #b3a5ff; }

/* Actions columns are icons only (Kenny, 2026-11-30: "icons only for action columns"), like the Clients list: no button
   fill, outline or padding box, just the icon. Light by default and amethyst on hover; the button's variant still says
   what it does: danger red (delete, refund), success green (pay, enable, show), warning amber (hide, disable, end),
   info cyan (email/send). The tooltip and aria-label carry the name. */
td[data-label="Actions"] .btn {
	--bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: transparent; --bs-btn-hover-border-color: transparent;
	--bs-btn-active-bg: transparent; --bs-btn-active-border-color: transparent; --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: transparent;
	background: transparent !important; border-color: transparent !important; box-shadow: none !important;
	padding: .1rem .3rem !important; font-size: 1.15rem; line-height: 1; color: #e9ecef !important;
}
td[data-label="Actions"] .btn:hover, td[data-label="Actions"] .btn:focus-visible { color: var(--bl-label) !important; }
td[data-label="Actions"] .btn[class*="-danger"] { color: #ea868f !important; }
td[data-label="Actions"] .btn[class*="-success"] { color: #75b798 !important; }
td[data-label="Actions"] .btn[class*="-warning"] { color: #ffc107 !important; }
td[data-label="Actions"] .btn[class*="-info"] { color: #0dcaf0 !important; }
td[data-label="Actions"] .btn:disabled, td[data-label="Actions"] .btn.disabled { opacity: .35; }
td[data-label="Actions"] .btn i { margin: 0 !important; }
td[data-label="Actions"] a:not(.btn) i { font-size: 1.15rem; }

/* Edit pencils on cards (inline edit: [data-edit-toggle]; a service's schedule: [data-schedule-edit]) are bare icons, like the
   action columns (Kenny, 2026-11-30: "icons only"). */
[data-edit-toggle].btn, [data-schedule-edit].btn, [data-edit-cancel].btn {
	background: transparent !important; border-color: transparent !important; box-shadow: none !important;
	padding: .1rem .3rem !important; font-size: 1.05rem; line-height: 1; color: #e9ecef !important;
}
[data-edit-toggle].btn:hover, [data-schedule-edit].btn:hover, [data-edit-toggle].btn:focus-visible, [data-schedule-edit].btn:focus-visible { color: var(--bl-label) !important; }
[data-edit-toggle].btn.btn-success { color: #75b798 !important; }   /* editing: the pencil is Save */

/* Actions columns sit flush right (Kenny, 2026-11-30: "align action column right/end"): the last icon in a cell
   drops the me-* spacing it shares with the others */
td[data-label="Actions"] > :last-child { margin-right: 0 !important; }

/* List groups, dropdowns, modals (tabs: sagentic.dev's .tabs > .nav-tabs.tabs-primary + .tab-content, styled by dark-mode.css) */
html.dark .list-group { --bs-list-group-bg: transparent; --bs-list-group-color: var(--bl-body); --bs-list-group-border-color: var(--bl-line); --bs-list-group-action-hover-bg: rgba(255, 255, 255, .04); --bs-list-group-action-hover-color: #fff; --bs-list-group-active-bg: #4a3d6b; --bs-list-group-active-border-color: #4a3d6b; }
html.dark .dropdown-menu { --bs-dropdown-bg: #282d36; --bs-dropdown-color: var(--bl-body); --bs-dropdown-border-color: var(--bl-line-strong); --bs-dropdown-link-color: var(--bl-body); --bs-dropdown-link-hover-bg: #343b45; --bs-dropdown-link-hover-color: #fff; --bs-dropdown-link-active-bg: #4a3d6b; --bs-dropdown-header-color: var(--bl-label); --bs-dropdown-divider-bg: var(--bl-line-strong); border-radius: 0; }
html.dark .modal-content { background: var(--bl-card); color: var(--bl-body); border: 1px solid var(--bl-line-strong); border-radius: 0; }
html.dark .modal-header, html.dark .modal-footer { border-color: var(--bl-line-strong); background: var(--bl-card-head); }
html.dark .modal-title { color: #fff; }
html.dark .btn-close { filter: invert(1) grayscale(1) brightness(1.6); border-radius: 0; }
html.dark .tab-content { color: var(--bl-body); }
html.dark .nav-pills .nav-link { color: var(--bl-body); border-radius: 0; }
html.dark .nav-pills .nav-link.active { background: #4a3d6b; color: #fff; }
html.dark .breadcrumb { --bs-breadcrumb-divider-color: var(--bl-quiet); --bs-breadcrumb-item-active-color: var(--bl-quiet); margin-bottom: 0; }
html.dark .page-link { border-radius: 0; }
html.dark .progress { background-color: var(--bl-well); border-radius: 0; }
html.dark .accordion { --bs-accordion-bg: var(--bl-card); --bs-accordion-color: var(--bl-body); --bs-accordion-border-color: var(--bl-line-strong); --bs-accordion-btn-color: #fff; --bs-accordion-active-bg: var(--bl-card-head); --bs-accordion-active-color: #fff; --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23dee2e6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); --bs-accordion-btn-active-icon: var(--bs-accordion-btn-icon); }
html.dark pre, html.dark code { color: #e2dbff; }
html.dark pre { background: var(--bl-well); border: 1px solid var(--bl-line-strong); padding: .75rem; }
html.dark hr { border-color: var(--bl-line-strong); opacity: 1; background-image: none; }

/* Page-header bar buttons (Kenny, 2026-11-30: "Edit icons or other icons go in the page header title bar to the
   right - look at sagedev"): sagentic.dev's small square btn-medium-purple icons, right of the heading.
   Placed by billing_pageHeader() (includes/layout/look.php). */
/* exactly sagentic.dev's wrapper (<span class="float-end p-2 d-flex gap-2">): the buttons keep Porto's own btn-sm size */
.page-header .page-header-actions { float: right; display: flex; gap: .5rem; padding: .5rem; }
.page-header .page-header-actions form { display: contents; }
.page-header .page-header-actions .dropdown-menu { z-index: 1050; }
.page-header h2 .badge { font-size: .65rem; vertical-align: middle; position: relative; top: -2px; text-transform: uppercase; }
@media (max-width: 767.98px) {
	/* Phones: the heading keeps its line, the buttons wrap onto a second row inside the bar */
	.page-header { height: auto !important; min-height: 50px; display: flex; flex-wrap: wrap; align-items: center; }
	.page-header h2 { float: none; max-width: 100%; }
	.page-header .page-header-actions { float: none; flex-wrap: wrap; padding: 0 15px 10px; margin-left: auto; }
}

/* Title boxes: the dashboards' standard section style (Kenny, 2026-11-30: "when we have cards like this, use the title
   box border card styling we have been using on all the dashboards"; /home/sagedash/.guides/dashboard-design-standard.md
   6.3). <fieldset class="title-box"><legend><h4 class="title-box-title">Title</h4></legend> ... </fieldset>: a thin
   outline with the title on its top line. Same rules as sagedash's custom.css; the color is the amethyst label color
   (the dashboards default to --brand / --mud, which is near-black and vanishes on this dark card). */
.title-box {
	--title-box-color: var(--bl-label);
	position: relative;
	border: 1px solid var(--title-box-color);
	padding: .25rem .85rem .85rem;
	margin: 0 0 1.75rem;
	min-width: 0;
}
.title-box > legend { float: none; width: auto; margin: 0 0 .5rem -.4rem; padding: 0 .4rem; line-height: 1; }
.title-box-title { margin: 0; color: var(--title-box-color) !important; font-size: 1.1rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.title-box > :last-child { margin-bottom: 0 !important; }

/* Headings: Porto's theme.css squeezes every h1-h6 with letter-spacing: -1px, which makes small bold headings cramped
   and hard to read (Kenny, 2026-11-30, on the notice title: "Need to use a bigger clearer font than this"). */
html.dark .content-body h1, html.dark .content-body h2, html.dark .content-body h3,
html.dark .content-body h4, html.dark .content-body h5, html.dark .content-body h6 { letter-spacing: normal; }
/* ...and gives them hairline weights (h5 300, h4 400): names like a client's contact read faint (Kenny, 2026-11-30:
   "Need to improve this text as well"). Content headings are semibold; title-box titles keep their 800. */
html.dark .content-body h3, html.dark .content-body h4, html.dark .content-body h5, html.dark .content-body h6 { font-weight: 600; }
html.dark .content-body .title-box-title { font-weight: 800; }
/* Important Notices: the title reads at a glance */
.important-notices .alert-heading { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
.important-notices .alert-heading i { font-size: 1.1rem; }
.important-notices .alert .paragraph-fix { font-size: .95rem; }

/* Header: greeting, client lookup and Quick Actions */
.header .hdr-greeting { line-height: 1.3; font-size: .85rem; padding-top: 2px; }
.header .client-lookup { position: relative; vertical-align: middle; margin-top: 14px; width: 280px; }
.header .client-lookup .form-control { font-size: .875rem; }
.header .client-lookup-menu { top: calc(100% + 4px); left: 0; width: 100%; min-width: 300px; max-height: 360px; overflow-y: auto; }
.header .client-lookup-menu .dropdown-item { white-space: normal; }
.header .client-lookup-menu .dropdown-item.active { background: #4a3d6b; color: #fff; }
.header .client-lookup-menu .dropdown-item.active .text-muted { color: rgba(255, 255, 255, .85) !important; }
.header .quick-actions-menu { width: 330px; }
.header .quick-actions-menu .content { padding: 8px; }
.header .quick-action { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; text-align: center; font-size: .78rem; color: var(--bl-body) !important; text-decoration: none; }
.header .quick-action:hover, .header .quick-action:focus-visible { background: rgba(255, 255, 255, .06); color: #fff !important; }
html.dark .header .notification-menu .title { color: #fff; }
html.dark .header .notification-menu .message { color: var(--bl-quiet); }
html.dark .userbox .dropdown-menu a { color: var(--bl-body); }
html.dark .userbox .dropdown-menu a:hover { color: #fff; }
.userbox .dropdown-menu .userbox-meta { padding: 4px 10px; font-size: .75rem; line-height: 1.3rem; color: var(--bl-quiet); }
.userbox .dropdown-menu .userbox-meta i { font-size: 1.1rem; margin-right: 3px; vertical-align: middle; } /* same size as the linked items (Kenny, 2026-11-30) */
.header .logo img { height: 35px; width: auto; }

/* Sidebar headings (Administration, Billing, Support, System). Hidden when the sidebar is collapsed to icons. */
#sidebar-left .nav-main > li.nav-heading { padding: 14px 25px 4px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: #6f6491; pointer-events: none; }
#sidebar-left .nav-main > li.nav-heading:first-child { padding-top: 10px; }
html.sidebar-left-collapsed:not(.sidebar-left-opened) #sidebar-left:not(:hover) .nav-main > li.nav-heading { height: 1px; padding: 0; margin: 8px 18px; overflow: hidden; background: rgba(255, 255, 255, .08); color: transparent; }

/* The footer's company logo */
#footer .footer-logo { height: 25px; width: auto; }

/* Stat tiles on the dashboards and reports (a card whose body leads with a small label, then a big number) */
html.dark .card .text-uppercase.small, html.dark .card .small.text-uppercase { letter-spacing: .04em; }

/* Sweet alert / toast surfaces that pages may open */
html.dark .swal2-popup { background: var(--bl-card) !important; color: var(--bl-body) !important; }
html.dark .swal2-title { color: #fff !important; }

/* Print: a plain light document (Plan #32: "Printed and emailed output stays light"). The frame, buttons,
   alerts and menus never print; cards, tables and text go white/black. Badges keep their own colors. */
@media print {
	html.dark, html.dark body, html.dark .body, html.dark .inner-wrapper, html.dark .content-body { background: #fff !important; }
	.header, #sidebar-left, #footer, .page-header, .alert, .btn, .btn-group, .dropdown-menu, .invoice-actions, .d-print-none, .no-print, .nav-tabs, .breadcrumb { display: none !important; }
	html.fixed .content-body { margin-left: 0 !important; padding: 0 !important; }
	html.fixed .inner-wrapper { padding-top: 0 !important; }
	html.dark .card, html.dark .card-body, html.dark .card-header, html.dark .card-footer, html.dark .tab-content, html.dark .tab-pane,
	html.dark pre, html.dark .attn-panel { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; }
	html.dark .table { --bs-table-bg: #fff; --bs-table-color: #000; --bs-table-striped-bg: #f5f5f5; --bs-table-striped-color: #000; --bs-table-border-color: #ccc; }
	html.dark .table > :not(caption) > * > * { background-color: #fff !important; box-shadow: none !important; border-color: #ccc !important; }
	html.dark .content-body *:not(.badge):not(.badge *) { color: #000 !important; }
	html.dark .content-body a { text-decoration: none; }
	.title-box { --title-box-color: #000 !important; }
}
