/* Modernize theme handles layout; keep only Blazor-specific overrides. */

/* Chipr brand accent */
:root,
[data-bs-theme="light"],
[data-bs-theme="light"][data-color-theme="Orange_Theme"]:root {
    --bs-body-bg: #F2F1E8;
    --bs-body-color: #2D2D2D;
    --bs-primary: #608c5a;
    --bs-primary-rgb: 96, 140, 90;
    --bs-link-hover-color: #528858;
    --bs-primary-bg-subtle: rgba(96, 140, 90, 0.12);
    --bs-light-primary: rgba(96, 140, 90, 0.12);
    --brand-accent-secondary: #d6f2fe;
    --brand-accent-secondary-rgb: 214, 242, 254;
    --brand-accent-secondary-strong: #b8e8fc;
    --brand-accent-secondary-subtle: rgba(214, 242, 254, 0.72);
    --brand-accent-on-surface: #2D2D2D;
    --brand-accent-muted-on-surface: #4a4a4a;
    --chipr-brand-accent: #608c5a;
    --chipr-success: #608c5a;
    --chipr-success-hover: #528858;
    --chipr-success-medium: #7DB27A;
    --chipr-success-light: #a3cd9a;
    --chipr-success-dark: #466f42;
    /* Timer fault / critical attention (banner, chips, borders). */
    --chipr-fault: #dc2626;
    --chipr-fault-rgb: 220, 38, 38;
    --orbit-weather-sky: #4a8ec4;
    --orbit-weather-sun: #e3a008;
    --orbit-weather-storm: #6b7cb8;
    --orbit-weather-snow: #5aa8c4;
    --orbit-weather-haze: #8b95a3;
    --bs-success: var(--chipr-success);
    --bs-success-rgb: 96, 140, 90;
    --bs-green: var(--chipr-success);
    --bs-success-bg-subtle: rgba(96, 140, 90, 0.12);
    --bs-success-text-emphasis: var(--chipr-success-dark);
    --bs-success-border-subtle: rgba(96, 140, 90, 0.25);
    --chipr-dropdown-highlight-bg: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 20%, var(--bs-body-bg, #fff));
    --chipr-dropdown-highlight-color: var(--brand-accent-on-surface, #1a1a1a);
    --chipr-dropdown-highlight-active-bg: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 32%, #ebe4c4);
    --chipr-dropdown-highlight-active-color: var(--brand-accent-on-surface, #1a1a1a);
    --bs-dropdown-link-hover-bg: var(--chipr-dropdown-highlight-bg);
    --bs-dropdown-link-hover-color: var(--chipr-dropdown-highlight-color);
    --bs-dropdown-link-active-bg: var(--chipr-dropdown-highlight-active-bg);
    --bs-dropdown-link-active-color: var(--chipr-dropdown-highlight-active-color);
    --bs-info: #608c5a;
    --bs-info-rgb: 96, 140, 90;
    --bs-secondary: #6b6b6b;
    --bs-secondary-rgb: 107, 107, 107;
    --bs-cyan: #608c5a;
    --bs-blue: #608c5a;
    --bs-light-indigo: var(--brand-accent-secondary-subtle);
    --bs-muted: #6b6b6b;
    --bs-muted-rgb: 107, 107, 107;
    --bs-gray-400: #8a8a8a;
    --bs-gray-500: #6b6b6b;
    --bs-gray-600: #4a4a4a;
    --bs-gray: #4a4a4a;
    --bs-dark: #1a1a1a;
    --bs-dark-rgb: 26, 26, 26;
}

.btn-primary,
[data-bs-theme="light"][data-color-theme="Orange_Theme"]:root .btn-primary,
[data-bs-theme="dark"][data-color-theme="Orange_Theme"]:root .btn-primary,
#main-wrapper .btn.btn-primary {
    --bs-btn-color: #1a1a1a;
    --bs-btn-bg: #608c5a;
    --bs-btn-border-color: #608c5a;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-hover-bg: #528858;
    --bs-btn-hover-border-color: #528858;
    --bs-btn-focus-shadow-rgb: 96, 140, 90;
    --bs-btn-active-color: #1a1a1a;
    --bs-btn-active-bg: #466f42;
    --bs-btn-active-border-color: #466f42;
    --bs-btn-disabled-color: #1a1a1a;
    --bs-btn-disabled-bg: #608c5a;
    --bs-btn-disabled-border-color: #608c5a;
}

#main-wrapper .btn.btn-primary,
#main-wrapper a.btn.btn-primary {
    background-color: #608c5a !important;
    border-color: #608c5a !important;
    color: #1a1a1a !important;
}

#main-wrapper .btn.btn-primary:hover:not(:disabled):not(.disabled),
#main-wrapper .btn.btn-primary:focus-visible:not(:disabled):not(.disabled),
#main-wrapper a.btn.btn-primary:hover,
#main-wrapper a.btn.btn-primary:focus-visible {
    background-color: #528858 !important;
    border-color: #528858 !important;
    color: #1a1a1a !important;
}

#main-wrapper .btn.btn-primary:active:not(:disabled):not(.disabled),
#main-wrapper a.btn.btn-primary:active {
    background-color: #466f42 !important;
    border-color: #466f42 !important;
    color: #1a1a1a !important;
}

.btn-outline-primary {
    --bs-btn-color: #608c5a;
    --bs-btn-border-color: #608c5a;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-hover-bg: #608c5a;
    --bs-btn-hover-border-color: #608c5a;
    --bs-btn-focus-shadow-rgb: 96, 140, 90;
    --bs-btn-active-color: #1a1a1a;
    --bs-btn-active-bg: #528858;
    --bs-btn-active-border-color: #528858;
    --bs-btn-disabled-color: #608c5a;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #608c5a;
    --bs-gradient: none;
}

.btn-outline-secondary {
    --bs-btn-color: #6b6b6b;
    --bs-btn-border-color: #d0d0d0;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-hover-bg: #f5f5f5;
    --bs-btn-hover-border-color: #c8c8c8;
    --bs-btn-focus-shadow-rgb: 107, 107, 107;
    --bs-btn-active-color: #1a1a1a;
    --bs-btn-active-bg: #ececec;
    --bs-btn-active-border-color: #c8c8c8;
    --bs-btn-disabled-color: #8a8a8a;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #d8d8d8;
    --bs-gradient: none;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: rgba(96, 140, 90, 0.15);
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #a3a3a3;
    --bs-btn-border-color: #404040;
    --bs-btn-hover-color: #f5f5f5;
    --bs-btn-hover-bg: #2a2a2a;
    --bs-btn-hover-border-color: #525252;
    --bs-btn-active-color: #f5f5f5;
    --bs-btn-active-bg: #333333;
    --bs-btn-active-border-color: #525252;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #2a2a2a;
    color: #f5f5f5;
}

body {
    font-family: "source-sans-pro", "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Minimal, mobile-app-like scrollbars — hidden until hover (overlay/auto-hide feel). */
:root {
    --app-scrollbar-size: 5px;
    --app-scrollbar-thumb: color-mix(in srgb, var(--bs-body-color, #2a3547) 28%, transparent);
    --app-scrollbar-thumb-hover: color-mix(in srgb, var(--bs-body-color, #2a3547) 42%, transparent);
    --app-scrollbar-track: transparent;
}

html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: transparent var(--app-scrollbar-track);
}

html:hover,
body:hover,
*:hover {
    scrollbar-color: var(--app-scrollbar-thumb) var(--app-scrollbar-track);
}

*::-webkit-scrollbar {
    width: var(--app-scrollbar-size);
    height: var(--app-scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--app-scrollbar-track);
}

*::-webkit-scrollbar-thumb {
    background-color: transparent;
    border-radius: 999px;
}

*:hover::-webkit-scrollbar-thumb {
    background-color: var(--app-scrollbar-thumb);
}

*::-webkit-scrollbar-thumb:hover,
*:hover::-webkit-scrollbar-thumb:hover {
    background-color: var(--app-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Sidebar uses SimpleBar — thin track; thumb auto-hides until hover or scroll. */
.simplebar-track.simplebar-vertical {
    width: var(--app-scrollbar-size) !important;
}

.simplebar-track.simplebar-horizontal {
    height: var(--app-scrollbar-size) !important;
}

.simplebar-scrollbar:before {
    background: var(--app-scrollbar-thumb) !important;
    border-radius: 999px;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0 !important;
    transition: opacity 0.15s ease;
}

.simplebar-wrapper:hover .simplebar-scrollbar:before,
.simplebar-scrollbar.simplebar-visible:before {
    opacity: 0.85 !important;
}

.simplebar-scrollbar:hover:before {
    background: var(--app-scrollbar-thumb-hover) !important;
    opacity: 1 !important;
}

#main-wrapper h1,
#main-wrapper h2,
#main-wrapper h3,
#main-wrapper h4,
#main-wrapper h5,
#main-wrapper h6,
#main-wrapper .fw-semibold,
.orbit-tagline {
    font-family: "bebas-neue", "alternate-gothic-no-2-d", "Segoe UI", Helvetica, Arial, sans-serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.orbit-tagline {
    font-size: 0.95rem !important;
    letter-spacing: 0.08em;
}

/* Topbar content row is --og-header-height (70px). Safe-area is owned ONLY by .topbar
   padding-top; --og-topbar-offset is content + inset + border-bottom (once). Body + sticky
   both consume that offset — do not add env(safe-area-inset-top) again on either. */
:root {
    --og-safe-area-top: 0px;
    --og-safe-area-top: constant(safe-area-inset-top);
    --og-safe-area-top: env(safe-area-inset-top, 0px);
    /* +1px matches .topbar border-bottom so sticky/CSS top meets the painted bottom. */
    --og-topbar-offset: calc(var(--og-header-height, 70px) + var(--og-safe-area-top) + 1px);
    /* Theme: .page-wrapper .body-wrapper > .container-fluid { padding: 0 24px } */
    --og-page-gutter-x: 24px;
}

/* Above sticky audit summary (20); below mobile overlay (90) / sidebar (99). Theme default is 9. */
.topbar {
    z-index: 50;
    /* Match app body — cream in light, near-black in dark (never brand green). */
    background-color: var(--bs-body-bg);
    /* Match .left-sidebar border-right (var(--bs-border-color); light #ebf1f6 / dark #2a2a2a) */
    border-bottom: 1px solid var(--bs-border-color);
    /* iOS/iPadOS: keep menu + theme toggles below status bar / notch / Dynamic Island.
       Theme sets padding: 0 25px; override top only. 0 on Android/desktop / MAUI Container. */
    padding-top: var(--og-safe-area-top);
}

/* Theme: .body-wrapper { padding-top: calc(70px + 30px) } — clear taller topbar via
   --og-topbar-offset (already includes safe-area). JS may refine --og-topbar-offset. */
.body-wrapper {
    padding-top: calc(var(--og-topbar-offset) + 30px);
    /* Keep horizontal swipe on table scroll wrappers only — not the page body. */
    overflow-x: clip;
    max-width: 100%;
}

/* Cards / page content: clip sideways overflow; tables scroll inside their wrappers. */
#main-wrapper .body-wrapper > .container-fluid,
#main-wrapper .body-wrapper .card {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

/* Bottom inset matches horizontal page gutters (theme sets padding: 0 24px only). */
#main-wrapper .page-wrapper .body-wrapper > .container-fluid {
    padding-bottom: var(--og-page-gutter-x);
}

/* Projects page: ONE sticky stack (filters + column header table) under the topbar.
   A separate sticky toolbar + sticky thead always leaves a height-estimate / subpixel
   seam where tbody text peeks through — avoid two sticky layers entirely.
   overflow-x:auto on .table-responsive creates a scrollport and breaks viewport sticky,
   so desktop uses overflow-x:clip (same idea as body-wrapper). */
:root {
    --projects-toolbar-pad-y: 0.5rem;
}

.projects-sticky-stack {
    position: sticky;
    top: calc(var(--og-topbar-offset) - 1px);
    z-index: 21;
    /* Opaque paint box for the whole stack — no transparent join between filters and cols. */
    background-color: var(--bs-body-bg, #F2F1E8);
}

.projects-filter-bar {
    /* Symmetric inset above/below the filter controls before the column header bar. */
    padding-top: var(--projects-toolbar-pad-y);
    padding-bottom: var(--projects-toolbar-pad-y);
    margin: 0;
    background-color: var(--bs-body-bg, #F2F1E8);
}

/* Keep All/Active/Archived + search on one toolbar row (wrap only when narrow).
   Override Bootstrap .input-group { width: 100% }, which otherwise expands to the
   full sticky bar and forces the search onto its own line. */
.projects-filter-bar .projects-filter-controls {
    min-width: 0;
}

#main-wrapper .projects-filter-bar .projects-search-group {
    width: 16rem;
    max-width: 100%;
    flex: 0 1 16rem;
    border-radius: 7px;
    transition: box-shadow 0.15s ease-in-out;
}

/* Theme search to match audit-form-control / #main-wrapper inputs.
   Modernize sets .input-group-text to #465670 / #7c8fac — override that here.
   Include #main-wrapper so focus beats #main-wrapper .form-control:focus. */
#main-wrapper .projects-filter-bar .projects-search-group > .input-group-text,
#main-wrapper .projects-filter-bar .projects-search-group > .form-control {
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

#main-wrapper .projects-filter-bar .projects-search-group > .input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
}

#main-wrapper .projects-filter-bar .projects-search-group > .input-group-text .ti {
    font-size: 1rem;
    line-height: 1;
}

#main-wrapper .projects-filter-bar .projects-search-group > .form-control {
    padding: 0.25rem 0.75rem;
    caret-color: #608c5a;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
    box-shadow: none;
}

#main-wrapper .projects-filter-bar .projects-search-group > .form-control::placeholder {
    color: var(--bs-secondary-color);
    opacity: 1;
}

html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .input-group-text,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .input-group-text {
    color: #6b6b6b !important;
    background-color: #1a1a1a !important;
    border: var(--bs-border-width, 1px) solid #d0d0d0 !important;
    border-right: 0 !important;
}

html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background-color: #1a1a1a !important;
    border: var(--bs-border-width, 1px) solid #d0d0d0 !important;
}

html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .input-group-text {
    color: #8a8a8a !important;
    background-color: #141414 !important;
    border: var(--bs-border-width, 1px) solid #2a2a2a !important;
    border-right: 0 !important;
}

html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background-color: #141414 !important;
    border: var(--bs-border-width, 1px) solid #2a2a2a !important;
}

/* One orange focus ring around the whole search control (addon + field). */
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group:focus-within,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(96, 140, 90, 0.25);
}

html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:active:not(:disabled),
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control:active:not(:disabled) {
    border-color: #608c5a !important;
    background-color: #1a1a1a !important;
    box-shadow: none !important;
    outline: 0;
}

html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a;
}

html[data-bs-theme="light"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text,
:root:not([data-bs-theme="dark"]) #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text {
    color: #6b6b6b !important;
    -webkit-text-fill-color: #6b6b6b;
}

html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:active:not(:disabled) {
    border-color: #608c5a !important;
    background-color: #141414 !important;
    box-shadow: none !important;
    outline: 0;
}

html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .form-control,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus,
html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group > .form-control:focus-visible {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #fff;
}

html[data-bs-theme="dark"] #main-wrapper .projects-filter-bar .projects-search-group:focus-within > .input-group-text {
    color: #a3a3a3 !important;
    -webkit-text-fill-color: #a3a3a3;
}

#main-wrapper .body-wrapper .card.projects-table-card {
    overflow: visible;
}

#main-wrapper .body-wrapper .projects-table-card .table-responsive.projects-table-scroll {
    overflow-x: clip;
    overflow-y: visible;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Head + body are split tables sharing colgroup widths; keep layout in sync. */
#main-wrapper .projects-table-card .projects-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

#main-wrapper .projects-table-card .projects-col-project { width: 14%; }
#main-wrapper .projects-table-card .projects-col-client { width: 32%; }
#main-wrapper .projects-table-card .projects-col-status { width: 12%; }
#main-wrapper .projects-table-card .projects-col-progress { width: 18%; }
#main-wrapper .projects-table-card .projects-col-budget { width: 12%; }
#main-wrapper .projects-table-card .projects-col-actions { width: 12%; }

/* No soft-wrapping of cell strings (no ellipsis). Intentional stacked block
   lines stay (e.g. progress bar above amount, budget fee under type). */
#main-wrapper .projects-table-card .projects-table th,
#main-wrapper .projects-table-card .projects-table td {
    white-space: nowrap;
}

/* Allow · $/hr to wrap onto a second line — fixed 18% progress col + overflow-x:clip
   was clipping the rate off the end of a nowrap "$X of $Y (Z%) · $R/hr" string. */
#main-wrapper .projects-table-card .projects-progress-label {
    white-space: normal;
    overflow-wrap: anywhere;
}

#main-wrapper .projects-table-card .project-budget-effective-rate,
#main-wrapper .home-recent-projects .project-budget-effective-rate {
    white-space: nowrap;
}

#main-wrapper .home-recent-projects .projects-progress-label {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Stacked budget progress: Harvest spent + invoice fees collected */
:root,
[data-bs-theme="light"] {
    --project-progress-fees: #1f8f7a;
    --project-progress-fees-label: #1a7a68;
}

[data-bs-theme="dark"] {
    /* Teal reads clearly on near-black; avoid yellow/warning on dark. */
    --project-progress-fees: #3db8a0;
    --project-progress-fees-label: #5eccb6;
}

.progress.project-budget-progress {
    overflow: hidden;
}

/*
 * Theme styles.css sets .progress-bar { border-radius: 7px }.
 * When spent + fees adjoin, square the meeting edges; outer ends stay rounded
 * (track overflow clips, and non-meeting corners keep their radius).
 */
.progress.project-budget-progress--stacked > .progress-bar:first-child:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.progress.project-budget-progress--stacked > .progress-bar:last-child:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.progress.project-budget-progress--stacked .progress-bar + .progress-bar {
    /* Hairline seam so budget-spent vs payments read as a clear split. */
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.35);
}

.progress.project-budget-progress .progress-bar.project-progress-bar-fees {
    background-color: var(--project-progress-fees) !important;
}

/* Cost-only / no-budget cost remainder: soft primary (not danger/over-budget). */
.progress.project-budget-progress--cost-only .progress-bar.project-progress-bar-cost {
    opacity: 0.55;
}

.project-fees-collected-label {
    color: var(--project-progress-fees-label);
    font-weight: 500;
}

#main-wrapper .projects-table-card .project-fees-collected-label {
    white-space: nowrap;
}

/* Progress cell stacks bar + labels; allow vertical layout inside nowrap table. */
#main-wrapper .projects-table-card .projects-table td:has(.project-budget-progress) {
    white-space: normal;
}

/* Visual column header lives in the sticky stack; body thead is SR-only. */
#main-wrapper .projects-table-card .projects-head-table {
    margin-bottom: 0;
}

#main-wrapper .projects-table-card .projects-head-table thead th {
    position: static;
}

#main-wrapper .projects-table-card .projects-sr-thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Narrow viewports: one scrollport for head+body so columns stay aligned; stack sticks inside it. */
@media (max-width: 991.98px) {
    .projects-sticky-stack {
        top: 0;
    }

    #main-wrapper .body-wrapper .projects-table-card .table-responsive.projects-table-scroll {
        max-height: calc(100dvh - var(--og-topbar-offset) - 0.5rem);
        overflow: auto;
        overscroll-behavior: contain;
    }

    #main-wrapper .projects-table-card .projects-table {
        min-width: 56rem;
    }
}

/* Jump-to-top FAB: above sticky summary (20) / content; below topbar (50) and reconnect (1080).
   Visibility is driven by html.og-jump-to-top-visible so Blazor re-renders of MainLayout
   cannot wipe a JS-toggled class on the button itself. */
.jump-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right, 0px));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: #608c5a;
    color: #1a1a1a;
    box-shadow: 0 0.35rem 0.85rem rgba(26, 26, 26, 0.22);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.4rem);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}

html.og-jump-to-top-visible .jump-to-top,
.jump-to-top.jump-to-top-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.jump-to-top:hover,
.jump-to-top:focus-visible {
    background-color: #528858;
    color: #1a1a1a;
}

.jump-to-top:focus-visible {
    outline: 2px solid #608c5a;
    outline-offset: 3px;
}

.jump-to-top .ti {
    font-size: 1.35rem;
    line-height: 1;
}

.topbar .navbar {
    display: flex;
    align-items: center !important;
}

.topbar .orbit-topbar-actions {
    gap: 0.5rem;
}

.topbar .orbit-topbar-actions .nav-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.topbar .orbit-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: 40px;
    min-height: 40px;
}

.topbar .orbit-theme-toggle,
.orbit-auth-theme .orbit-theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.topbar .orbit-theme-toggle .nav-link.moon,
.topbar .orbit-theme-toggle .nav-link.sun,
.orbit-auth-theme .orbit-theme-toggle .nav-link.moon,
.orbit-auth-theme .orbit-theme-toggle .nav-link.sun {
    position: absolute;
    inset: 0;
    margin: 0;
}

.topbar .orbit-tagline {
    align-items: center;
    height: 40px;
    line-height: 1 !important;
    margin: 0;
    padding: 0;
    /* Bebas Neue sits optically high; nudge to match theme toggle center */
    transform: translateY(2px);
}

.orbit-pwa-standalone-weather {
    display: none;
    align-items: center;
    gap: 0.35rem;
    height: 40px;
    padding: 0 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--bs-body-color-rgb), 0.12);
    background: rgba(var(--bs-body-color-rgb), 0.06);
    color: var(--bs-body-color);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    max-width: min(42vw, 14rem);
}

button.orbit-pwa-standalone-weather {
    appearance: none;
    font: inherit;
    cursor: pointer;
}

button.orbit-pwa-standalone-weather:hover,
button.orbit-pwa-standalone-weather:focus-visible {
    border-color: color-mix(in srgb, var(--bs-primary, #3F8F52) 45%, rgba(var(--bs-body-color-rgb), 0.12));
    background: color-mix(in srgb, var(--bs-primary, #3F8F52) 10%, rgba(var(--bs-body-color-rgb), 0.06));
}

.orbit-pwa-standalone-weather__icon {
    flex: 0 0 auto;
    font-size: 1.05em;
    line-height: 1;
}

.orbit-pwa-standalone-weather__temp {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.orbit-pwa-standalone-weather__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-weight: 500;
    color: var(--bs-secondary-color, #5a6a85);
}

html[data-bs-theme="dark"] .orbit-pwa-standalone-weather__label {
    color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 767.98px) {
    .orbit-pwa-standalone-weather {
        width: auto;
        max-width: none;
        padding: 0 0.5rem;
        justify-content: center;
        gap: 0.25rem;
    }

    .orbit-pwa-standalone-weather__label {
        display: none;
    }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
    .orbit-pwa-standalone-weather.orbit-pwa-standalone-weather--active {
        display: inline-flex;
    }

    html[data-orbit-standalone-weather="1"] .orbit-tagline {
        display: none !important;
    }
}

/* MAUI Hybrid (Android/iOS/Windows) is not display-mode: standalone. */
.orbit-pwa-standalone-weather.orbit-pwa-standalone-weather--packaged.orbit-pwa-standalone-weather--active,
html[data-orbit-packaged-app="1"] .orbit-pwa-standalone-weather.orbit-pwa-standalone-weather--active {
    display: inline-flex !important;
}

html[data-orbit-packaged-app="1"] .orbit-tagline {
    display: none !important;
}

/* Dark theme: near-black neutrals instead of Modernize dark blue */
[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: #0a0a0a;
    --bs-body-bg-rgb: 10, 10, 10;
    --bs-body-bg-dark: #000000;
    --bs-secondary-bg: #111111;
    --bs-secondary-bg-rgb: 17, 17, 17;
    --bs-tertiary-bg: #171717;
    --bs-tertiary-bg-rgb: 23, 23, 23;
    --bs-body-color: #a3a3a3;
    --bs-body-color-rgb: 163, 163, 163;
    --bs-primary: #608c5a;
    --bs-primary-rgb: 96, 140, 90;
    --brand-accent-secondary: #1a3040;
    --brand-accent-secondary-rgb: 26, 48, 64;
    --brand-accent-secondary-strong: #234058;
    --brand-accent-secondary-subtle: rgba(26, 48, 64, 0.72);
    --brand-accent-secondary-dark: #1a3040;
    --brand-accent-on-surface: #f5f5f5;
    --brand-accent-muted-on-surface: #c8d4dc;
    --chipr-brand-accent: #608c5a;
    --chipr-success: #608c5a;
    --chipr-success-hover: #528858;
    --chipr-success-medium: #7DB27A;
    --chipr-success-light: #99C78E;
    --chipr-success-dark: #466f42;
    --chipr-fault: #f87171;
    --chipr-fault-rgb: 248, 113, 113;
    --orbit-weather-sky: #7eb8ff;
    --orbit-weather-sun: #f0c14b;
    --orbit-weather-storm: #a8b4ff;
    --orbit-weather-snow: #9fd4ea;
    --orbit-weather-haze: #9aa3ad;
    --bs-success: var(--chipr-success-medium);
    --bs-success-rgb: 125, 178, 122;
    --bs-green: var(--chipr-success-medium);
    --bs-success-text-emphasis: var(--chipr-success-light);
    --bs-success-border-subtle: rgba(125, 178, 122, 0.24);
    --chipr-dropdown-highlight-bg: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 14%, #1a1a1a);
    --chipr-dropdown-highlight-color: var(--brand-accent-on-surface, #f5f5f5);
    --chipr-dropdown-highlight-active-bg: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 22%, #1a1a1a);
    --chipr-dropdown-highlight-active-color: var(--brand-accent-on-surface, #f5f5f5);
    --bs-dropdown-link-hover-bg: var(--chipr-dropdown-highlight-bg);
    --bs-dropdown-link-hover-color: var(--chipr-dropdown-highlight-color);
    --bs-dropdown-link-active-bg: var(--chipr-dropdown-highlight-active-bg);
    --bs-dropdown-link-active-color: var(--chipr-dropdown-highlight-active-color);
    --bs-secondary-color: #8a8a8a;
    --bs-secondary-color-rgb: 138, 138, 138;
    --bs-tertiary-color: rgba(163, 163, 163, 0.55);
    --bs-emphasis-color: #f5f5f5 !important;
    --bs-emphasis-color-rgb: 245, 245, 245;
    --bs-border-color: #2a2a2a;
    --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
    --bs-dark-bg-subtle: #141414;
    --bs-light-bg-subtle: #262626;
    --bs-primary-bg-subtle: #2a1810;
    --bs-secondary-bg-subtle: #141414;
    --bs-success-bg-subtle: #1a2818;
    --bs-info-bg-subtle: #141414;
    --bs-warning-bg-subtle: #221a10;
    --bs-danger-bg-subtle: #221418;
    --bs-dark-border-subtle: #1f1f1f;
    --bs-light-border-subtle: #333333;
    --bs-heading-color: #f5f5f5 !important;
    --bs-highlight-color: #a3a3a3;
    --bs-highlight-bg: rgba(96, 140, 90, 0.35);
    --bs-link-color: #a3a3a3;
    --bs-link-color-rgb: 163, 163, 163;
    --bs-link-hover-color: #608c5a;
    --bs-gray-100: #141414;
    --bs-gray-200: #2a2a2a;
    --bs-gray-300: #333333;
    --bs-info-text-emphasis: #608c5a;
    --bs-primary-text-emphasis: #608c5a;
}

[data-bs-theme="dark"][data-color-theme="Orange_Theme"]:root {
    --bs-primary: #608c5a;
    --bs-primary-rgb: 96, 140, 90;
    --brand-accent-secondary: #1a3040;
    --brand-accent-secondary-rgb: 26, 48, 64;
    --brand-accent-secondary-strong: #234058;
    --brand-accent-secondary-subtle: rgba(26, 48, 64, 0.72);
    --brand-accent-secondary-dark: #1a3040;
    --brand-accent-on-surface: #f5f5f5;
    --brand-accent-muted-on-surface: #c8d4dc;
    --chipr-brand-accent: #608c5a;
}

[data-bs-theme="dark"] .card {
    --bs-card-title-color: #f5f5f5 !important;
    --bs-card-subtitle-color: #8a8a8a;
    --bs-card-box-shadow: rgba(0, 0, 0, 0.45) 0 0 2px 0, rgba(0, 0, 0, 0.35) 0 12px 24px -4px;
}

/* Light theme: neutral headings instead of Modernize blue-gray (#2a3547) */
html[data-bs-theme="light"],
[data-bs-theme="light"] {
    --bs-heading-color: #1a1a1a !important;
    --bs-emphasis-color: #1a1a1a !important;
    --bs-body-color: #5a5a5a;
    --bs-body-color-rgb: 90, 90, 90;
    --bs-secondary-color: #6b6b6b;
    --bs-secondary-color-rgb: 107, 107, 107;
    --bs-link-color: #4a4a4a;
    --bs-link-color-rgb: 74, 74, 74;
    --bs-info-bg-subtle: var(--brand-accent-secondary-subtle);
    --bs-info-text-emphasis: #466f42;
    --bs-primary-text-emphasis: #466f42;
    --bs-highlight-bg: rgba(96, 140, 90, 0.28);
    --bs-highlight-color: #1a1a1a;
    --bs-gray-100: #f5f5f5;
    --bs-gray-200: #e8e8e8;
    --bs-gray-300: #d8d8d8;
    --bs-light: #f5f5f5;
    --bs-light-rgb: 245, 245, 245;
}

html[data-bs-theme="light"] .card,
[data-bs-theme="light"] .card {
    --bs-card-title-color: #1a1a1a !important;
    --bs-card-subtitle-color: #6b6b6b;
}

/* Page cards: Modernize zeroes card borders and matches card bg to the canvas. */
#main-wrapper .card {
    --bs-card-border-width: 1px;
}

html[data-bs-theme="dark"] #main-wrapper .card,
[data-bs-theme="dark"] #main-wrapper .card {
    --bs-card-border-color: var(--bs-light-border-subtle, #333333);
    --bs-card-bg: var(--bs-secondary-bg, #111111);
    --bs-card-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

html[data-bs-theme="light"] #main-wrapper .card,
[data-bs-theme="light"] #main-wrapper .card,
:root:not([data-bs-theme="dark"]) #main-wrapper .card {
    --bs-card-border-color: var(--bs-gray-300, #d8d8d8);
    --bs-card-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-bs-theme="light"] .bg-info-subtle {
    --bs-bg-opacity: 1;
    background-color: var(--brand-accent-secondary) !important;
    color: var(--brand-accent-muted-on-surface);
}

[data-bs-theme="light"] .bg-info-subtle h1,
[data-bs-theme="light"] .bg-info-subtle h2,
[data-bs-theme="light"] .bg-info-subtle h3,
[data-bs-theme="light"] .bg-info-subtle h4,
[data-bs-theme="light"] .bg-info-subtle h5,
[data-bs-theme="light"] .bg-info-subtle h6,
[data-bs-theme="light"] .bg-info-subtle .fw-semibold,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h1,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h2,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h3,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h4,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h5,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body h6,
html[data-bs-theme="light"] #main-wrapper .card.bg-info-subtle .card-body .fw-semibold {
    color: var(--brand-accent-on-surface) !important;
    -webkit-text-fill-color: var(--brand-accent-on-surface) !important;
}

[data-bs-theme="dark"] .bg-info-subtle h1,
[data-bs-theme="dark"] .bg-info-subtle h2,
[data-bs-theme="dark"] .bg-info-subtle h3,
[data-bs-theme="dark"] .bg-info-subtle h4,
[data-bs-theme="dark"] .bg-info-subtle h5,
[data-bs-theme="dark"] .bg-info-subtle h6,
[data-bs-theme="dark"] .bg-info-subtle .fw-semibold,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h1,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h2,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h3,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h4,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h5,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body h6,
html[data-bs-theme="dark"] #main-wrapper .card.bg-info-subtle .card-body .fw-semibold {
    color: var(--brand-accent-on-surface) !important;
    -webkit-text-fill-color: var(--brand-accent-on-surface) !important;
}

[data-bs-theme="dark"] .url-preview-backdrop {
    background: rgba(0, 0, 0, 0.72);
}

[data-bs-theme="dark"] .url-preview-panel {
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .bg-info-subtle {
    --bs-bg-opacity: 1;
    background-color: var(--brand-accent-secondary-dark, #1a3040) !important;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .nav-icon-hover-bg:hover {
    background-color: #1a1a1a !important;
}

/* Full-viewport boot splash (pre-Blazor / WebView shell). */
.orbit-boot-splash {
    --orbit-splash-bg: #0a0a0a;
    --orbit-splash-track: #2a2a2a;
    --chipr-splash-accent: var(--chipr-brand-accent, #608c5a);
    --orbit-splash-glow: rgba(96, 140, 90, 0.55);
    --orbit-splash-status: rgba(255, 255, 255, 0.5);
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--orbit-splash-bg);
    transition: opacity 0.28s ease;
}

@media (prefers-color-scheme: light) {
    html:not([data-bs-theme="dark"]) .orbit-boot-splash {
        --orbit-splash-bg: #F2F1E8;
        --orbit-splash-track: #d0d0d0;
        --orbit-splash-glow: rgba(96, 140, 90, 0.4);
        --orbit-splash-status: rgba(0, 0, 0, 0.45);
    }
}

html[data-bs-theme="dark"] .orbit-boot-splash {
    --orbit-splash-bg: #0a0a0a;
    --orbit-splash-track: #2a2a2a;
    --orbit-splash-glow: rgba(96, 140, 90, 0.55);
    --orbit-splash-status: rgba(255, 255, 255, 0.5);
}

html[data-bs-theme="light"] .orbit-boot-splash {
    --orbit-splash-bg: #F2F1E8;
    --orbit-splash-track: #d0d0d0;
    --orbit-splash-glow: rgba(96, 140, 90, 0.4);
    --orbit-splash-status: rgba(0, 0, 0, 0.45);
}

.orbit-boot-splash--hide {
    opacity: 0;
    pointer-events: none;
}

.orbit-boot-splash__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.orbit-boot-splash__logo {
    display: block;
    width: 44px;
    height: 44px;
}

.orbit-boot-splash__track {
    position: relative;
    width: 72px;
    height: 2px;
    overflow: hidden;
    border-radius: 1px;
    background: var(--orbit-splash-track);
}

.orbit-boot-splash__bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 34%;
    height: 100%;
    border-radius: 1px;
    background: var(--chipr-splash-accent);
    box-shadow: 0 0 10px 2px var(--orbit-splash-glow);
    animation: orbit-boot-splash-bounce 2.4s ease-in-out infinite;
    will-change: left, transform;
}

.orbit-boot-splash__status {
    margin: -4px 0 0;
    font: 400 11px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--orbit-splash-status);
}

.orbit-boot-splash__status-viewport {
    display: block;
    overflow: hidden;
    height: 1.35em;
}

.orbit-boot-splash__status-track {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.32s ease;
}

.orbit-boot-splash__status-track.is-rolling {
    transform: translateY(-50%);
}

.orbit-boot-splash__status-item {
    display: block;
    height: 1.35em;
    line-height: 1.35em;
    white-space: nowrap;
}

@keyframes orbit-boot-splash-bounce {
    0%,
    100% {
        left: 0;
        transform: translateX(0);
    }

    50% {
        left: 100%;
        transform: translateX(-100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .orbit-boot-splash__bar {
        left: 33%;
        animation: none;
        box-shadow: 0 0 8px 1px var(--orbit-splash-glow);
    }

    .orbit-boot-splash__status-track {
        transition: none;
    }
}

/* Legacy MAUI placeholder class — map to splash when still referenced. */
.app-initial-loading {
    display: none;
}

/* Audit form inputs — full explicit styling so WebView2 renders every state identically. */
.form-control.audit-form-control,
.form-select.audit-form-control {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    border-radius: 7px;
    appearance: none;
    -webkit-appearance: none;
    background-clip: padding-box;
    box-shadow: var(--bs-box-shadow-inset);
    caret-color: #608c5a;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

[data-bs-theme="light"] .form-control.audit-form-control,
[data-bs-theme="light"] .form-select.audit-form-control,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control,
:root:not([data-bs-theme="dark"]) .form-select.audit-form-control {
    /* Dark field surfaces need light typed text (not body #5a5a5a). */
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background-color: #1a1a1a !important;
    border: var(--bs-border-width) solid #d0d0d0 !important;
}

[data-bs-theme="dark"] .form-control.audit-form-control,
[data-bs-theme="dark"] .form-select.audit-form-control {
    /* !important: beat Modernize dark resting #202936 / #333f55 / #7c8fac */
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background-color: #141414 !important;
    border: var(--bs-border-width) solid #2a2a2a !important;
}

.form-control.audit-form-control::placeholder {
    color: var(--bs-secondary-color);
    opacity: 1;
}

[data-bs-theme="light"] .form-control.audit-form-control:focus,
[data-bs-theme="light"] .form-control.audit-form-control:focus-visible,
[data-bs-theme="light"] .form-control.audit-form-control:active:not(:disabled),
[data-bs-theme="light"] .form-select.audit-form-control:focus,
[data-bs-theme="light"] .form-select.audit-form-control:focus-visible,
[data-bs-theme="light"] .form-select.audit-form-control:active:not(:disabled),
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control:focus,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control:focus-visible,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control:active:not(:disabled),
:root:not([data-bs-theme="dark"]) .form-select.audit-form-control:focus,
:root:not([data-bs-theme="dark"]) .form-select.audit-form-control:focus-visible,
:root:not([data-bs-theme="dark"]) .form-select.audit-form-control:active:not(:disabled) {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5;
    background-color: #1a1a1a !important;
    border-color: #608c5a !important;
    outline: 0;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
}

[data-bs-theme="dark"] .form-control.audit-form-control:focus,
[data-bs-theme="dark"] .form-control.audit-form-control:focus-visible,
[data-bs-theme="dark"] .form-control.audit-form-control:active:not(:disabled),
[data-bs-theme="dark"] .form-select.audit-form-control:focus,
[data-bs-theme="dark"] .form-select.audit-form-control:focus-visible,
[data-bs-theme="dark"] .form-select.audit-form-control:active:not(:disabled) {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5;
    background-color: #141414 !important;
    border-color: #608c5a !important;
    outline: 0;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
}

[data-bs-theme="light"] .form-control.audit-form-control:disabled,
[data-bs-theme="light"] .form-select.audit-form-control:disabled,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control:disabled,
:root:not([data-bs-theme="dark"]) .form-select.audit-form-control:disabled {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
    opacity: 1;
    -webkit-text-fill-color: var(--bs-secondary-color);
    cursor: not-allowed;
}

[data-bs-theme="dark"] .form-control.audit-form-control:disabled,
[data-bs-theme="dark"] .form-select.audit-form-control:disabled {
    background-color: #1f1f1f !important;
    border-color: #2a2a2a !important;
    color: #8a8a8a !important;
    opacity: 1;
    -webkit-text-fill-color: #8a8a8a;
    cursor: not-allowed;
}

.form-control.audit-form-control:disabled::placeholder {
    color: var(--bs-secondary-color);
    opacity: 1;
}

[data-bs-theme="dark"] .form-control.audit-form-control:disabled::placeholder {
    color: #8a8a8a;
    opacity: 1;
}

/* Floating labels — match Modernize 16px horizontal padding so label and input text share a left edge.
   (audit-form-control defaults to 8px 16px; Bootstrap form-floating uses 0.75rem, which misaligns.) */
:root {
    --audit-floating-control-height: calc(3.5rem + calc(var(--bs-border-width) * 2));
}

.form-floating > .form-control.audit-form-control,
.form-floating > .form-select.audit-form-control {
    height: var(--audit-floating-control-height);
    min-height: var(--audit-floating-control-height);
    line-height: 1.25;
    padding: 1rem 16px;
}

/* Keep inline buttons the same height as neighboring floating inputs. */
.input-group:has(> .form-floating) {
    align-items: stretch;
}

.input-group:has(> .form-floating) > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: auto;
    min-height: var(--audit-floating-control-height);
    padding-top: 0;
    padding-bottom: 0;
}

.input-group:has(> .form-floating) > .form-floating:not(:last-child) > .form-control,
.input-group:has(> .form-floating) > .form-floating:not(:last-child) > .form-select {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group:has(> .form-floating) > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Match Run / submit buttons to floating input height; flex-start keeps them
   lined up with the input when helper text sits under the left column. */
.row.align-items-end > [class*="col"] > .btn:only-child,
.row.align-items-start > [class*="col"] > .btn:only-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: var(--audit-floating-control-height);
    padding-top: 0;
    padding-bottom: 0;
}

.form-floating > .form-control.audit-form-control:focus,
.form-floating > .form-control.audit-form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
    padding-left: 16px;
    padding-right: 16px;
}

.form-floating > .form-select.audit-form-control {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
    padding-left: 16px;
}

.form-floating > .form-control.audit-form-control::placeholder {
    color: transparent;
}

.form-floating > label {
    color: var(--bs-secondary-color, #5a6a85);
    padding-left: 16px;
    padding-right: 16px;
}

html[data-bs-theme="light"] #main-wrapper .form-floating > label,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > label,
:root:not([data-bs-theme="dark"]) #main-wrapper .form-floating > label,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-floating > label {
    color: #5a6a85;
}

html[data-bs-theme="dark"] #main-wrapper .form-floating > label,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > label {
    color: #8a8a8a;
}

/* Beat Modernize disabled floating-label color (#2a3547) in app + auth. */
html[data-bs-theme="light"] #main-wrapper .form-floating > .form-control:disabled ~ label,
html[data-bs-theme="light"] #main-wrapper .form-floating > :disabled ~ label,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:disabled ~ label,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > :disabled ~ label,
:root:not([data-bs-theme="dark"]) #main-wrapper .form-floating > .form-control:disabled ~ label,
:root:not([data-bs-theme="dark"]) #main-wrapper .form-floating > :disabled ~ label,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-floating > .form-control:disabled ~ label,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-floating > :disabled ~ label {
    color: var(--bs-secondary-color, #5a6a85);
}

html[data-bs-theme="dark"] #main-wrapper .form-floating > .form-control:disabled ~ label,
html[data-bs-theme="dark"] #main-wrapper .form-floating > :disabled ~ label,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:disabled ~ label,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > :disabled ~ label {
    color: #8a8a8a;
}

#main-wrapper,
#main-wrapper * {
    -webkit-user-select: none;
    user-select: none;
}

#main-wrapper input,
#main-wrapper textarea,
#main-wrapper select,
#main-wrapper [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
}

#main-wrapper img,
#main-wrapper svg {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Tabler icons: styles.css references local fonts that aren't bundled — CDN loaded in index.html */
.ti {
    font-family: tabler-icons !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar header row aligned with topbar toggle/theme icons */
:root {
    --og-header-height: 70px;
    --og-sidebar-logo-img-height: 48px;
    /* Expanded + mini grass size (brand mark is taller than CHIPR+tagline; bottoms still match). */
    --og-sidebar-logo-mark-size: var(--og-sidebar-logo-img-height);
    --og-sidebar-logo-x-width: var(--og-sidebar-logo-mark-size);
    --og-sidebar-logo-x-height: var(--og-sidebar-logo-mark-size);
    --og-sidebar-logo-x-offset-y: 0px;
    /* CHIPR wordmark + ink-tight tagline SVG (text column beside grass). */
    --og-sidebar-logo-wordmark-height: 1.45rem;
    --og-sidebar-logo-subtitle-height: 0.72rem;
    --og-sidebar-logo-nudge-up: 7px;
    --og-sidebar-logo-mark-gap: 0.45rem;
    --og-sidebar-logo-subtitle-gap: 0.15rem;
    --og-sidebar-logo-text-stack-height: calc(
        var(--og-sidebar-logo-wordmark-height) +
        var(--og-sidebar-logo-subtitle-gap) +
        var(--og-sidebar-logo-subtitle-height)
    );
    /* Lockup height: taller of grass vs text column (flex-end aligns ink bottoms). */
    --og-sidebar-logo-lockup-height: max(
        var(--og-sidebar-logo-mark-size),
        var(--og-sidebar-logo-text-stack-height)
    );
    --og-sidebar-mini-badge-padding: 0.2rem;
    --og-sidebar-mini-badge-size: 16px;
    --og-sidebar-mini-badge-icon-size: 10px;
}

.left-sidebar .brand-logo {
    min-height: var(--og-header-height);
    height: var(--og-header-height);
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
    flex-shrink: 0;
}

.left-sidebar.with-vertical {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

.sidebar-menu-shell {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.left-sidebar .sidebar-menu-shell .scroll-sidebar {
    flex: 1;
    min-height: 0;
    height: auto !important;
    overflow-y: auto;
    padding: 0 24px;
}

/* One blank nav-cap-sized gap above the first section */
#sidebarnav > .nav-menu-spacer {
    list-style: none;
    height: 2rem;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Collapsed mini rail: keep the dots marker, hide the Watering label */
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .nav-small-cap {
    display: flex;
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .nav-small-cap .hide-menu {
    display: none;
}

/* Match .nav-small-cap section labels (Tools / Settings); button must not look like a nav link */
.sidebar-resources-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-style: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.sidebar-resources-toggle:hover,
.sidebar-resources-toggle:focus {
    background: transparent;
    color: inherit;
    text-decoration: none;
}

.sidebar-resources-toggle:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.sidebar-resources-chevron {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    opacity: 0.55;
    display: inline-block;
    transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-resources-chevron.is-expanded {
    transform: rotate(180deg);
}

.sidebar-resources-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-resources-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-bottom-nav {
    flex-shrink: 0;
    /* Slightly tighter than .scroll-sidebar (24px) so the account chip reads wider.
       Bottom matches side gutter + .sidebar-account-chip-item margin-top (0.75rem). */
    padding: 0 0.75rem 0.75rem;
    background: var(--bs-body-bg);
}

.sidebar-bottom-nav #sidebarnav-bottom {
    margin-bottom: 0;
}

/* Sidebar account chip (avatar + name + settings/sign-out) */
.sidebar-account-chip-item {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.sidebar-account-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    /* Match .sidebar-link border-radius (7px) — subtle / near-square */
    border-radius: 7px;
    background: color-mix(in srgb, var(--bs-tertiary-bg, var(--bs-body-bg)) 88%, var(--bs-primary) 12%);
}

[data-bs-theme="dark"] .sidebar-account-chip {
    background: color-mix(in srgb, #1a1a1a 82%, var(--bs-primary) 18%);
    border-color: color-mix(in srgb, var(--bs-border-color) 70%, var(--bs-primary) 30%);
}

.sidebar-account-chip-identity {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.1rem 0.15rem;
    border-radius: 5px;
    color: inherit;
    text-decoration: none;
}

.sidebar-account-chip-identity:hover {
    color: inherit;
    text-decoration: none;
}

.sidebar-account-chip-identity:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bs-primary) 55%, transparent);
    outline-offset: 2px;
}

.sidebar-account-chip-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
}

.sidebar-account-chip-text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
    line-height: 1.2;
}

.sidebar-account-chip-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

.sidebar-account-chip-secondary {
    display: block;
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
}

.sidebar-account-chip-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.45rem;
}

.sidebar-account-chip-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Icon-sized hit box — no residual padding around the glyph */
    width: 1.1rem;
    height: 1.1rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bs-secondary-color);
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1;
}

.sidebar-account-chip-action .ti {
    font-size: 1.1rem;
    line-height: 1;
}

.sidebar-account-chip-action:hover {
    color: var(--bs-primary);
    background: transparent;
    text-decoration: none;
}

.sidebar-account-chip-action:focus {
    outline: none;
    box-shadow: none;
}

.sidebar-account-chip-action:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bs-primary) 55%, transparent);
    outline-offset: 2px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-account-chip {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.35rem;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-account-chip-identity {
    justify-content: center;
    flex: 0 0 auto;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-account-chip-actions {
    flex-direction: column;
}

/* Anonymous Sign in CTA — same footprint as .sidebar-account-chip, yellow fill + black text */
.sidebar-sign-in-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--bs-primary);
    border-radius: 7px;
    background: var(--bs-primary);
    color: #1a1a1a;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-sign-in-button .ti {
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
}

.sidebar-sign-in-button:hover,
.sidebar-sign-in-button:focus {
    background: color-mix(in srgb, var(--bs-primary) 88%, #000 12%);
    border-color: color-mix(in srgb, var(--bs-primary) 88%, #000 12%);
    color: #1a1a1a;
    text-decoration: none;
}

.sidebar-sign-in-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--bs-primary) 55%, transparent);
    outline-offset: 2px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-sign-in-button {
    padding: 0.55rem 0.35rem;
}

.sidebar-app-downloads {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
}

.sidebar-app-download-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    /* Bleed past .sidebar-bottom-nav horizontal padding (0.75rem) for a full-width strip */
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    /* Keep badge content aligned with .scroll-sidebar’s 24px gutter */
    padding: 0.4rem 24px;
    border-radius: 0;
    /* Match .left-sidebar border-right (var(--bs-border-color); light #ebf1f6 / dark #2a2a2a) */
    background: var(--bs-border-color);
    color: var(--bs-emphasis-color);
}

.sidebar-app-download-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.25;
    color: var(--bs-emphasis-color);
    -webkit-text-fill-color: var(--bs-emphasis-color);
    white-space: nowrap;
}

.sidebar-app-download-links {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    padding-right: 0.15rem;
}

/* Package / store / PWA — compact iconic badges */
.sidebar-app-download-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.sidebar-app-download-link:hover,
.sidebar-app-download-link:focus-visible {
    opacity: 0.88;
    outline: none;
}

.sidebar-app-download-link:focus-visible {
    box-shadow: 0 0 0 2px var(--bs-primary);
}

.sidebar-app-download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    color: inherit;
}

.sidebar-app-download-icon .ti {
    font-size: 1.2rem;
    line-height: 1;
}

.sidebar-app-download-icon .sidebar-app-download-windows-icon {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-app-download-row {
    justify-content: center;
    /* Match mini-sidebar bottom-nav padding (10px) so the strip stays edge-to-edge */
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-app-download-label {
    display: none;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-app-download-links {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-left: 0;
    padding-right: 0;
}

/* Badges on border-color strip: icon/chrome track emphasis for light + dark */
#main-wrapper .left-sidebar .sidebar-app-download-icon {
    color: var(--bs-emphasis-color);
    background: color-mix(in srgb, var(--bs-emphasis-color) 14%, transparent);
}

.sidebar-pwa-install-button {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.sidebar-pwa-install-hint,
.sidebar-pwa-ios-hint {
    margin: 0.35rem 0 0;
    padding: 0 0.15rem 0 0;
    font-size: 0.7rem;
    line-height: 1.35;
    color: #8a8a8a;
    -webkit-text-fill-color: #8a8a8a;
}

html[data-bs-theme="light"] .sidebar-pwa-install-hint,
html[data-bs-theme="light"] .sidebar-pwa-ios-hint {
    color: var(--bs-secondary-color, #5a6a85);
    -webkit-text-fill-color: var(--bs-secondary-color, #5a6a85);
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-pwa-install-hint,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-pwa-ios-hint {
    display: none;
}

.left-sidebar .brand-logo .logo-img.logo-img-stacked {
    width: auto !important;
    max-width: 220px;
    height: auto !important;
    min-height: 0;
    overflow: visible;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-top: calc((var(--og-header-height) / 2) - (var(--og-sidebar-logo-lockup-height) / 2) - var(--og-sidebar-logo-nudge-up));
    transform: none !important;
    line-height: 1;
    text-decoration: none;
}

/*
 * Brand lockup (sidebar + auth), always horizontal:
 *   [grass]  CHIPR
 *   [grass]  tagline
 * Ink bottoms: grass + tagline are viewBox-tight SVGs; flex-end aligns blade bases to tagline ink.
 */
.logo-full-stack {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    column-gap: var(--og-sidebar-logo-mark-gap);
    min-width: 0;
}

.brand-logo .logo-mark {
    display: block;
    flex: 0 0 auto;
    width: var(--og-sidebar-logo-mark-size);
    height: var(--og-sidebar-logo-mark-size);
    align-self: flex-end;
    line-height: 0;
    margin-bottom: 0;
}

.logo-mark .logo-mark-img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    object-position: bottom center;
    display: block;
}

/* Text column: CHIPR over ink-tight tagline SVG; column bottom = tagline ink. */
.brand-logo .logo-wordmark-wrap {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    row-gap: var(--og-sidebar-logo-subtitle-gap);
    min-width: 0;
}

.brand-logo .logo-wordmark-wrap .dark-logo:not(.logo-subtitle-img),
.brand-logo .logo-wordmark-wrap .light-logo:not(.logo-subtitle-img) {
    display: block;
    height: var(--og-sidebar-logo-wordmark-height);
    max-height: var(--og-sidebar-logo-wordmark-height);
    width: auto;
    transform: none;
    object-fit: contain;
    object-position: bottom left;
}

.logo-mini-mark {
    display: none !important;
    width: var(--og-sidebar-logo-x-width);
    height: var(--og-sidebar-logo-x-height);
    line-height: 0;
    flex-shrink: 0;
}

.logo-mini-mark .logo-mini-img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
}

.brand-logo .logo-subtitle-img {
    display: block;
    height: var(--og-sidebar-logo-subtitle-height);
    max-height: var(--og-sidebar-logo-subtitle-height);
    width: auto;
    object-fit: contain;
    object-position: bottom left;
    line-height: 0;
}

.topbar .navbar {
    align-items: center;
    min-height: var(--og-header-height);
    height: var(--og-header-height);
}

.topbar .navbar .navbar-nav {
    align-items: center;
}

.topbar .nav-icon-hover-bg .nav-link.sidebartoggler,
.topbar .nav-icon-hover-bg .nav-link.moon,
.topbar .nav-icon-hover-bg .nav-link.sun,
.topbar .orbit-theme-toggle .nav-link.moon,
.topbar .orbit-theme-toggle .nav-link.sun,
.orbit-auth-theme .orbit-theme-toggle .nav-link.moon,
.orbit-auth-theme .orbit-theme-toggle .nav-link.sun {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px !important;
    height: 40px !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.topbar .nav-icon-hover-bg .nav-link i,
.orbit-auth-theme .orbit-theme-toggle .nav-link i {
    font-size: 20px;
    line-height: 1;
}

/* dark-logo = white text for dark theme; light-logo = dark text for light theme */
[data-bs-theme="dark"] .brand-logo .dark-logo {
    display: block !important;
}

[data-bs-theme="dark"] .brand-logo .light-logo {
    display: none !important;
}

[data-bs-theme="light"] .brand-logo .light-logo {
    display: block !important;
}

[data-bs-theme="light"] .brand-logo .dark-logo {
    display: none !important;
}

/* Theme switcher icons (MainLayout topbar + AuthLayout) */
.topbar .nav-link.moon,
.topbar .nav-link.sun,
.orbit-auth-theme .nav-link.moon,
.orbit-auth-theme .nav-link.sun {
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .topbar a.moon,
[data-bs-theme="dark"] .orbit-auth-theme a.moon {
    display: none !important;
}

[data-bs-theme="dark"] .topbar a.sun,
[data-bs-theme="dark"] .orbit-auth-theme a.sun {
    display: flex !important;
}

[data-bs-theme="light"] .topbar a.moon,
[data-bs-theme="light"] .orbit-auth-theme a.moon {
    display: flex !important;
}

[data-bs-theme="light"] .topbar a.sun,
[data-bs-theme="light"] .orbit-auth-theme a.sun {
    display: none !important;
}

#blazor-error-ui {
    background: #b32121;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
    color: #fff;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Fallback when edge-to-edge; 0 when MAUI SafeAreaEdges already inset the WebView.
   Does not clear a position:fixed .topbar — that uses padding-top safe-area above. */
.status-bar-safe-area {
    display: flex;
    position: sticky;
    top: 0;
    height: constant(safe-area-inset-top);
    height: env(safe-area-inset-top, 0px);
    background-color: var(--bs-body-bg, #F2F1E8);
    width: 100%;
    z-index: 1;
}

.sidebar-link-with-badge {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.35rem;
}

.sidebar-link-with-badge .sidebar-link-text {
    flex: 1;
    min-width: 0;
}

.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 0.4375rem;
    border: 0;
    border-radius: 999px;
    line-height: 0;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    background-color: rgba(96, 140, 90, 0.14) !important;
    color: #608c5a !important;
    -webkit-text-fill-color: #608c5a !important;
    opacity: 1;
    transition:
        opacity 0.28s ease,
        transform 0.28s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

/* Spinning brand ring on the badge perimeter while setup status is checking. */
.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning.is-checking::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 2px solid rgba(96, 140, 90, 0.22);
    border-top-color: #608c5a;
    border-right-color: rgba(96, 140, 90, 0.55);
    box-sizing: border-box;
    pointer-events: none;
    animation: sidebar-setup-warning-spin 0.75s linear infinite;
}

/* Non-blocking startup banner while connection/setup validation runs in background. */
.orbit-startup-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--bs-body-color, #2a3547);
    background: rgba(96, 140, 90, 0.1);
    border: 1px solid rgba(96, 140, 90, 0.28);
}

.orbit-startup-banner .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    color: #608c5a;
}

/* Sideload APK download: fixed bottom hover layer, visible on every page. */
.orbit-update-download-dock {
    position: fixed;
    z-index: 45;
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 0;
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--bs-body-color, #2a3547);
    background: var(--bs-body-bg, #fff);
    border: 1px solid rgba(96, 140, 90, 0.35);
    box-shadow: 0 0.45rem 1.35rem rgba(26, 26, 26, 0.22);
}

@media (min-width: 1200px) {
    .orbit-update-download-dock {
        left: calc(270px + 0.75rem);
    }

    body[data-sidebartype="mini-sidebar"] .orbit-update-download-dock {
        left: calc(87px + 0.75rem);
    }
}

.orbit-update-download-dock--failed {
    background: var(--bs-body-bg, #fff);
    border-color: rgba(220, 38, 38, 0.4);
}

.orbit-update-download-dock__row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.orbit-update-download-dock__row .ti {
    color: #608c5a;
}

.orbit-update-download-dock--failed .ti {
    color: #dc2626;
}

.orbit-update-download-dock__label {
    min-width: 0;
    flex: 1 1 auto;
}

.orbit-update-download-dock__pct {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #608c5a;
}

.orbit-update-download-dock__bar {
    height: 0.55rem;
    overflow: hidden;
    background: rgba(96, 140, 90, 0.18);
}

.orbit-update-download-dock__bar .progress-bar {
    background-color: #608c5a;
    transition: width 0.2s linear;
}

.orbit-update-download-dock__retry {
    flex: 0 0 auto;
}

.orbit-update-download-dock__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.4rem;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.orbit-update-download-dock__dismiss:focus-visible {
    outline: 2px solid #608c5a;
    outline-offset: 2px;
}

body:has(.orbit-update-download-dock) .body-wrapper {
    padding-bottom: 7rem;
}

.orbit-update-download-dock ~ .jump-to-top {
    bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}

/* Packaged MAUI only — device offline (not Blazor Server circuit chrome). */
.orbit-offline-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-body-color, #2a3547);
    background: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 10%, var(--bs-body-bg, #fff));
    border: 1px solid color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 28%, var(--bs-border-color, #dfe5ef));
}

.orbit-offline-banner .ti {
    color: var(--chipr-brand-accent, #608c5a);
    font-size: 1.1rem;
    line-height: 1;
}

[data-bs-theme="dark"] .orbit-offline-banner {
    background: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 18%, #1a1a1a);
    border-color: color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 45%, #404040);
}

/* Timer fault / low-battery banner (below page header on Timers dashboard).
   Same fault red + soft fill as .orbit-timer-health-status / .orbit-fault-badge. */
.orbit-timer-health-banner {
    margin: -0.5rem 0 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--chipr-fault, #dc2626);
    background-color: rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.1);
    border: 1px solid rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.35);
    font-size: 0.9375rem;
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.orbit-timer-health-banner__line + .orbit-timer-health-banner__line {
    margin-top: 0.35rem;
}

.orbit-timer-health-banner__device {
    font-weight: 600;
}

.orbit-timer-health-banner__summary {
    font-weight: 400;
}

.orbit-timer-health-banner__sep {
    opacity: 0.75;
    margin: 0 0.25rem;
}

html[data-bs-theme="dark"] .orbit-timer-health-banner,
[data-bs-theme="dark"] .orbit-timer-health-banner {
    color: var(--chipr-fault, #f87171);
    background-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.12);
    border-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.28);
}

.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning.is-fading-out {
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

@keyframes sidebar-setup-warning-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-link.sidebar-link-with-badge .sidebar-setup-warning.is-checking::after {
        animation: none;
        border-color: rgba(96, 140, 90, 0.35);
        border-top-color: #608c5a;
    }

    .sidebar-link.sidebar-link-with-badge .sidebar-setup-warning {
        transition: opacity 0.01s linear;
    }

    .sidebar-link.sidebar-link-with-badge .sidebar-setup-warning.is-fading-out {
        transform: none;
    }
}

.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning > .ti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px !important;
    width: 14px;
    height: 14px;
    line-height: 1;
    background: none !important;
    background-color: transparent !important;
}

.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning > .ti::before {
    display: block;
    line-height: 1;
    background: none !important;
    background-color: transparent !important;
}

.sidebar-link.sidebar-link-with-badge .sidebar-setup-warning > .ti.ti-alert-triangle {
    transform: translateY(-0.5px);
}

.setup-section-highlight {
    scroll-margin-top: 6rem;
    /* Isolate the highlighted section above sibling/table paint;
       stay below .audit-summary-sticky (20) and .topbar (50). */
    position: relative;
    z-index: 5;
}

.card.setup-section-highlight,
.card-body.setup-section-highlight,
.pagespeed-score-card.setup-section-highlight,
.setup-settings-section.setup-section-highlight {
    border-radius: 0.45rem;
}

/* Paint glow on an overlay so inset ring / outer shadow sit above table
   content (e.g. Page Results / Issues) and .url-preview-link (z-index: 1). */
.card.setup-section-highlight::after,
.card-body.setup-section-highlight::after,
.pagespeed-score-card.setup-section-highlight::after,
.setup-settings-section.setup-section-highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    animation: setup-section-glow-inset 1.1s ease-in-out 2;
    box-shadow:
        inset 0 0 0 2px var(--bs-warning),
        0 0 16px 2px rgba(var(--bs-warning-rgb, 255, 174, 31), 0.22);
}

.card.setup-section-highlight.setup-section-highlight-fadeout::after,
.card-body.setup-section-highlight.setup-section-highlight-fadeout::after,
.pagespeed-score-card.setup-section-highlight.setup-section-highlight-fadeout::after,
.setup-settings-section.setup-section-highlight.setup-section-highlight-fadeout::after {
    animation: none;
    transition: box-shadow 0.6s ease-out;
    box-shadow: none !important;
}

.setup-section-highlight > .row,
.setup-settings-section > .row {
    margin-inline: 0;
}

@keyframes setup-section-glow-inset {
    0%,
    100% {
        box-shadow:
            inset 0 0 0 2px var(--bs-warning),
            0 0 0 3px rgba(var(--bs-warning-rgb, 255, 174, 31), 0.14),
            0 0 14px 2px rgba(var(--bs-warning-rgb, 255, 174, 31), 0.2);
    }

    50% {
        box-shadow:
            inset 0 0 0 2px var(--bs-warning),
            0 0 0 4px rgba(var(--bs-warning-rgb, 255, 174, 31), 0.24),
            0 0 24px 6px rgba(var(--bs-warning-rgb, 255, 174, 31), 0.34);
    }
}

#setup-opengraph,
#setup-google-analytics,
#setup-socialpilot,
#setup-integrations,
#setup-fallback,
#setup-fallback-opengraph,
#setup-connection,
#setup-settings-opengraph,
#setup-settings-google-analytics,
#setup-settings-socialpilot {
    scroll-margin-top: 6rem;
}

.home-card-subtitle {
    margin-top: 0.35rem;
    line-height: 1.5;
    min-height: 3rem;
}

/* Home dashboard: income strip mirrors Recent projects (section header + figures, no card shell). */
.home-income-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    overflow: visible;
}

.home-income-figure {
    overflow: visible;
}

.home-income-figure-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-bottom: 0.2rem;
}

/* CSS tooltip (not native title / Bootstrap JS) so it works in MAUI WebView. */
.home-income-stat-hint {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--bs-secondary-color, #5a6a85);
    opacity: 0.75;
    cursor: help;
    outline: none;
}

.home-income-stat-hint:hover,
.home-income-stat-hint:focus-visible {
    opacity: 1;
    color: var(--bs-body-color, #2a3547);
}

.home-income-stat-hint-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    z-index: 3;
    min-width: 11rem;
    max-width: 16rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.94);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 2px);
    transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
}

.home-income-stat-hint:hover .home-income-stat-hint-tooltip,
.home-income-stat-hint:focus-visible .home-income-stat-hint-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.home-income-figure-value {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.home-income-figure-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-left: 0.15rem;
}

.home-income-figure-emphasis .home-income-figure-value {
    color: var(--bs-primary, #5d87ff);
}

.home-income-figures-secondary {
    padding-top: 0.85rem;
    border-top: 1px solid var(--bs-border-color, #dfe5ef);
}

html[data-bs-theme="dark"] .home-income-figures-secondary,
[data-bs-theme="dark"] .home-income-figures-secondary {
    border-top-color: var(--bs-light-border-subtle, #333333);
}

.home-income-figure-net.is-positive .home-income-figure-value {
    color: var(--bs-success, #608c5a);
}

.home-income-figure-net.is-negative .home-income-figure-value {
    color: var(--bs-danger, #fa896b);
}

@media (max-width: 767.98px) {
    .home-income-figures {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .home-income-stat-hint-tooltip {
        left: 0;
        transform: translate(0, 2px);
    }

    .home-income-stat-hint:hover .home-income-stat-hint-tooltip,
    .home-income-stat-hint:focus-visible .home-income-stat-hint-tooltip {
        transform: translate(0, 0);
    }
}

/* Home income vs expense chart (SVG, no chart library). */
.home-income-expense-series {
    width: 100%;
    max-width: none;
    overflow: visible;
}

.home-ie-chart {
    width: 100%;
    max-width: none;
}

.home-ie-chart-plot {
    position: relative;
    width: 100%;
    min-width: 0;
}

.home-ie-chart-svg {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    aspect-ratio: 720 / 220;
}

.home-ie-chart-hit {
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
}

.home-ie-chart-hover-rule {
    stroke: var(--bs-secondary-color, #6b6b6b);
    stroke-width: 1;
    stroke-opacity: 0.35;
    pointer-events: none;
}

.home-ie-chart-marker {
    stroke: #fff;
    stroke-width: 1.5;
    pointer-events: none;
}

html[data-bs-theme="dark"] .home-ie-chart-marker,
[data-bs-theme="dark"] .home-ie-chart-marker {
    stroke: #141414;
}

.home-ie-chart-marker-income {
    fill: var(--bs-primary, #608c5a);
}

.home-ie-chart-marker-expense {
    fill: var(--bs-info, #5d87ff);
}

html[data-bs-theme="dark"] .home-ie-chart-marker-expense,
[data-bs-theme="dark"] .home-ie-chart-marker-expense {
    fill: #8aa4ff;
}

.home-ie-chart-tooltip {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -100%);
    min-width: 8.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.94);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    white-space: nowrap;
}

.home-ie-chart-tooltip-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.2rem;
}

.home-ie-chart-tooltip-row {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.home-ie-chart-tooltip-income {
    color: #f7a05a;
}

.home-ie-chart-tooltip-expense {
    color: #9eb6ff;
}

.home-ie-chart-grid {
    stroke: var(--bs-border-color, #dfe5ef);
    stroke-width: 1;
    stroke-opacity: 0.55;
}

html[data-bs-theme="dark"] .home-ie-chart-grid,
[data-bs-theme="dark"] .home-ie-chart-grid {
    stroke: var(--bs-light-border-subtle, #333333);
    stroke-opacity: 0.9;
}

.home-ie-chart-divider {
    stroke: var(--bs-secondary-color, #6b6b6b);
    stroke-width: 1;
    stroke-dasharray: 3 4;
    stroke-opacity: 0.65;
}

.home-ie-chart-line {
    fill: none;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-ie-chart-line-income {
    stroke: var(--bs-primary, #608c5a);
}

.home-ie-chart-line-expense {
    stroke: var(--bs-info, #5d87ff);
}

html[data-bs-theme="dark"] .home-ie-chart-line-expense,
[data-bs-theme="dark"] .home-ie-chart-line-expense {
    stroke: #8aa4ff;
}

.home-ie-chart-line.is-projected {
    stroke-dasharray: 6 5;
    stroke-opacity: 0.85;
}

.home-ie-chart-axis-label {
    fill: var(--bs-secondary-color, #6b6b6b);
    font-size: 11px;
}

.home-ie-chart-max {
    font-size: 10px;
}

.home-ie-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
    font-size: 0.78rem;
    color: var(--bs-secondary-color, #6b6b6b);
}

.home-ie-chart-legend li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.home-ie-chart-swatch {
    display: inline-block;
    width: 1.1rem;
    height: 0;
    border-top-width: 2.5px;
    border-top-style: solid;
}

.home-ie-chart-swatch-income {
    border-top-color: var(--bs-primary, #608c5a);
}

.home-ie-chart-swatch-expense {
    border-top-color: var(--bs-info, #5d87ff);
}

html[data-bs-theme="dark"] .home-ie-chart-swatch-expense,
[data-bs-theme="dark"] .home-ie-chart-swatch-expense {
    border-top-color: #8aa4ff;
}

.home-ie-chart-swatch-actual {
    border-top-color: var(--bs-body-color, #2a3547);
}

.home-ie-chart-swatch-projected {
    border-top-color: var(--bs-body-color, #2a3547);
    border-top-style: dashed;
}

.home-audit-suite {
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
}

.home-run-audit-card {
    border: none;
    border-radius: 0;
    border-bottom: 1px solid color-mix(in srgb, #608c5a 28%, var(--bs-border-color, #dfe5ef));
    background: color-mix(in srgb, #608c5a 7%, var(--bs-body-bg, #fff));
}

.home-run-audit-body {
    padding: 1.25rem 1.35rem;
}

.home-run-audit-body .home-card-subtitle {
    min-height: 0;
}

.home-run-audit-action {
    margin-top: 0;
    padding-top: 0;
    min-width: 11rem;
}

.home-tools-frame {
    position: relative;
    padding: 1.35rem 1rem 1.15rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 94%, #f0f2f5 6%);
}

.home-tools-connector {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 0.85rem;
    transform: translateX(-50%);
    background: color-mix(in srgb, #608c5a 45%, var(--bs-border-color, #dfe5ef));
}

.home-tools-caption {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-gray-500, #6b6b6b);
    text-align: center;
}

.home-dashboard-cards > [class*="col-"] {
    display: flex;
}

.home-dashboard-cards .card {
    width: 100%;
}

.home-dashboard-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 11.5rem;
}

.home-card-action {
    margin-top: auto;
    padding-top: 1.25rem;
}

.home-card-action .btn {
    margin: 0;
}

/* Phones: collapse equal-height stretch so CTA sits under the header */
@media (max-width: 767.98px) {
    .home-dashboard-cards > [class*="col-"] {
        display: block;
    }

    .home-dashboard-card-body {
        min-height: 0;
        height: auto;
    }

    .home-dashboard-cards .home-card-subtitle {
        min-height: 0;
    }

    .home-dashboard-cards .home-card-action {
        margin-top: 0.75rem;
        padding-top: 0.65rem;
    }

    .home-tools-frame {
        padding: 1.1rem 0.75rem 0.9rem;
    }
}

.home-card-checklist {
    padding-left: 0;
    margin-left: 0;
}

.api-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.15rem 0.45rem;
}

.audit-summary-kpi-body {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    min-height: 5.5rem;
}

.audit-summary-kpi-ring.score-ring {
    width: 72px;
    height: 72px;
}

.audit-summary-kpi-ring .score-ring-value {
    font-size: 1.25rem;
}

.audit-summary-kpi-ring .score-ring-track,
.audit-summary-kpi-ring .score-ring-progress {
    stroke-width: 5.5;
}

.audit-summary-kpi-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .audit-summary-kpi-body {
        min-height: 0;
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }

    .audit-summary-kpi-ring.score-ring {
        width: 64px;
        height: 64px;
    }

    .audit-summary-kpi-ring .score-ring-value {
        font-size: 1.1rem;
    }
}

.grade-badge {
    min-width: 2.5rem;
    font-weight: 700;
}

.score-ring {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-track,
.score-ring-progress {
    fill: none;
    stroke-width: 6;
}

.score-ring-track {
    stroke: var(--bs-gray-200, #e8e8e8);
}

[data-bs-theme="dark"] .score-ring-track {
    stroke: #2a2a2a;
}

.score-ring-progress {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.35s ease;
}

.score-ring-value {
    position: relative;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.issue-critical { border-left: 4px solid #fa896b; }
.issue-warning { border-left: 4px solid #ffae1f; }
.issue-info { border-left: 4px solid rgba(96, 140, 90, 0.55); }

.summary-stat-link {
    color: inherit;
    text-decoration: none;
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    line-height: inherit;
}

.summary-stat-link:hover,
.summary-stat-link:focus-visible {
    text-decoration: underline;
    cursor: pointer;
    color: inherit;
}

.summary-stat-link.summary-stat-count,
.summary-stat-link.summary-stat-count:hover,
.summary-stat-link.summary-stat-count:focus-visible {
    color: var(--bs-heading-color, var(--bs-body-color));
}

.audit-scroll-target {
    scroll-margin-top: calc(5.5rem + var(--audit-sticky-height, 0px));
}

/* Audit data tables: flexible columns fill leftover width; ellipsis only on overflow */
.audit-data-table {
    table-layout: fixed;
    width: 100%;
}

.audit-data-table .audit-col-score,
.audit-data-table .audit-col-issues {
    width: 4.5rem;
    white-space: nowrap;
}

.audit-data-table .audit-col-grade {
    width: 5rem;
    white-space: nowrap;
}

.audit-data-table .audit-col-severity {
    width: 6.5rem;
    white-space: nowrap;
}

.audit-data-table .audit-col-page {
    width: 28%;
}

.audit-data-table .audit-col-metadata {
    width: 3rem;
    white-space: nowrap;
    text-align: end;
    padding-right: 0.5rem; /* match leftmost cell padding-left */
}

.audit-data-table .audit-cell-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.audit-data-table .audit-cell-clip .url-preview-link {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Page Results: horizontal scroll only here; cells stay one line (no wrap / no ellipsis). */
.audit-page-results-scroll,
#main-wrapper .body-wrapper .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
}

.audit-page-results-table.audit-data-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.audit-page-results-table th,
.audit-page-results-table td {
    white-space: nowrap;
}

.audit-page-results-table .audit-cell-clip,
.audit-page-results-table .audit-cell-clip .url-preview-link,
.audit-page-results-table .url-preview-link-text {
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
    max-width: none;
}

.audit-page-results-table .audit-cell-clip .url-preview-link {
    display: inline-flex;
    width: auto;
    max-width: none;
}

.audit-page-metadata-btn {
    padding: 0.15rem 0.3rem;
    line-height: 1;
    color: var(--bs-secondary-color, #5a6a85);
    border: 0;
    background: transparent;
}

.audit-page-metadata-btn:hover,
.audit-page-metadata-btn:focus-visible {
    color: var(--bs-primary, #5d87ff);
}

.audit-page-metadata-btn .ti {
    font-size: 0.95rem;
}

/* Narrow (docs / off-domain) url-preview width — never the 75vw site panel. */
.page-metadata-panel.url-preview-panel {
    width: min(420px, 100vw);
    min-width: 0;
    max-width: 100vw;
}

.page-metadata-subtitle {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #5a6a85);
    margin-top: 0.15rem;
}

.page-metadata-body {
    overflow: auto;
    overscroll-behavior: contain;
}

.page-metadata-panel .page-metadata-preview {
    max-width: none;
    width: 100%;
}

.page-metadata-dl dt {
    font-weight: 600;
    color: var(--bs-secondary-color, #5a6a85);
}

.page-metadata-dl dd {
    margin-bottom: 0.65rem;
    overflow-wrap: anywhere;
}

.audit-status-text {
    font-size: 0.95rem;
}

.audit-status-line {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    vertical-align: middle;
}

.audit-status-page-count {
    white-space: nowrap;
}

.audit-status-roll {
    display: inline-block;
    font-size: 0.95rem;
    vertical-align: middle;
}

.audit-status-roll-viewport {
    display: block;
    overflow: hidden;
    height: 1.4em;
}

.audit-status-roll-track {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 0.32s ease;
}

.audit-status-roll-track.is-rolling {
    transform: translateY(-50%);
}

.audit-status-roll-item {
    display: block;
    height: 1.4em;
    line-height: 1.4em;
    white-space: nowrap;
}

.audit-summary-sentinel {
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.audit-summary-sticky {
    position: fixed;
    /* Meet topbar bottom; -1px tucks under .topbar (z-index 50) to kill DPR/transform hairlines. */
    top: calc(var(--og-topbar-offset) - 1px);
    /* Below topbar (50) and mobile nav (overlay 90 / sidebar 99); above page content. */
    z-index: 20;
    /* Soft grey so the sticky stats strip offsets from the top toggle bar above. */
    background-color: var(--bs-secondary-bg, #f5f5f5);
    border-bottom: 1px solid var(--bs-border-color, var(--bs-gray-300));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* html.og-audit-sticky-visible mirrors the bar class so Blazor re-renders that
   strip JS-added classes still keep the strip painted. */
html.og-audit-sticky-visible .audit-summary-sticky,
.audit-summary-sticky.audit-summary-sticky-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.audit-summary-sticky-inner {
    /* Top + horizontal only; bottom padding lives on the scroll row so the
       horizontal scrollbar can sit flush on the sticky bar’s bottom edge. */
    padding: 0.65rem 1.5rem 0;
}

.audit-summary-sticky-row {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0.85rem;
    /* Equal to .audit-summary-sticky-inner top padding: space above chips
       matches space below chips (above the scrollbar). */
    padding-bottom: 0.65rem;
    overflow-x: auto;
    /* visible: avoid clipping score/stat numbers at the top of the strip */
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.audit-summary-sticky-row > .audit-summary-sticky-group {
    flex-shrink: 0;
}

.audit-summary-sticky-row > .audit-summary-sticky-group-site {
    /* Hug content; do not grow into spare width. Full URL stays visible; row scrolls. */
    flex: 0 0 auto;
}

.audit-summary-sticky-group {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    border: 1px solid var(--bs-border-color, var(--bs-gray-300));
    border-radius: 7px;
    background-color: var(--bs-body-bg);
    overflow: hidden;
}

.audit-summary-sticky-group > .audit-summary-sticky-item {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border: none;
    border-radius: 0;
    background-color: transparent;
    padding: 0.4rem 0.75rem;
}

.audit-summary-sticky-group > .audit-summary-sticky-item + .audit-summary-sticky-item {
    border-left: 1px solid var(--bs-border-color, var(--bs-gray-300));
}

.audit-summary-sticky-group > .audit-summary-sticky-card-score {
    padding: 0.35rem 0.65rem;
}

/* Legacy single-card class kept for StickyExtraContent consumers outside groups. */
.audit-summary-sticky-card {
    border: 1px solid var(--bs-border-color, var(--bs-gray-300));
    border-radius: 7px;
    background-color: var(--bs-body-bg);
    padding: 0.4rem 0.75rem;
}

button.audit-summary-sticky-chip {
    color: inherit;
    text-align: start;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    text-decoration: none;
}

button.audit-summary-sticky-chip:hover,
button.audit-summary-sticky-chip:focus,
button.audit-summary-sticky-chip:focus-visible {
    text-decoration: none;
    color: inherit;
}

button.audit-summary-sticky-chip:hover {
    background-color: var(--bs-tertiary-bg, var(--bs-gray-100));
}

button.audit-summary-sticky-chip:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

button.audit-summary-sticky-chip:disabled {
    cursor: default;
    opacity: 0.7;
}

button.audit-summary-sticky-chip:disabled:hover {
    background-color: transparent;
}

.audit-summary-sticky .summary-stat-link:hover,
.audit-summary-sticky .summary-stat-link:focus-visible {
    text-decoration: none;
}

.audit-summary-sticky .url-preview-link:hover .url-preview-link-text,
.audit-summary-sticky .url-preview-link:focus-visible .url-preview-link-text {
    text-decoration: none;
}

.audit-summary-sticky-score-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
}

.audit-summary-sticky-score-label {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
}

.audit-summary-sticky-ring.score-ring {
    width: 44px;
    height: 44px;
}

.audit-summary-sticky-ring .score-ring-value {
    font-size: 0.85rem;
}

.audit-summary-sticky-ring .score-ring-track,
.audit-summary-sticky-ring .score-ring-progress {
    stroke-width: 5;
}

.audit-summary-sticky-stat {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Chip values (counts, site URL): high-contrast vs muted labels.
   Light: --bs-emphasis-color (#1a1a1a). Dark: near-white (#f5f5f5). */
.audit-summary-sticky .summary-stat-count,
.audit-summary-sticky .summary-stat-count.text-danger,
.audit-summary-sticky .summary-stat-count.text-warning,
.audit-summary-sticky .summary-stat-count.text-info {
    color: var(--bs-emphasis-color) !important;
}

#main-wrapper .audit-summary-sticky .url-preview-link,
#main-wrapper .audit-summary-sticky .url-preview-link.text-muted,
#main-wrapper .audit-summary-sticky .summary-stat-link.url-preview-link,
#main-wrapper .audit-summary-sticky .url-preview-link:hover,
#main-wrapper .audit-summary-sticky .url-preview-link:focus-visible {
    color: var(--bs-emphasis-color) !important;
}

.audit-summary-sticky-site {
    font-size: 0.85rem;
    gap: 0.4rem;
}

.audit-site-favicon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 2px;
    background: transparent;
}

.site-analytics-site-favicon {
    width: 22px;
    height: 22px;
}

.audit-meta-preview {
    display: flex;
    flex-direction: column;
    max-width: 32rem;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--bs-body-bg, #fff);
}

.audit-meta-preview-media {
    width: 100%;
    aspect-ratio: 1.91 / 1;
    background: var(--bs-tertiary-bg, #f6f9fc);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.audit-meta-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.audit-meta-preview-body {
    padding: 0.75rem 0.9rem 0.85rem;
}

.audit-meta-preview-site {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-bottom: 0.2rem;
}

.audit-meta-preview-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bs-body-color, #2a3547);
    margin-bottom: 0.25rem;
}

.audit-meta-preview-description {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--bs-secondary-color, #5a6a85);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-bs-theme="dark"] .audit-meta-preview {
    background: #171717;
    border-color: #333;
}

[data-bs-theme="dark"] .audit-meta-preview-media {
    background: #1f1f1f;
}

[data-bs-theme="dark"] .audit-meta-preview-title {
    color: #f0f0f0;
}

html {
    scroll-behavior: smooth;
}

@keyframes issue-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.issue-item-fade-in {
    animation: issue-fade-in 0.35s ease forwards;
}

.issue-resolve-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    vertical-align: baseline;
}

.issue-resolve-link .external-link-icon {
    font-size: 0.85em;
}

.issue-severity-filter .btn {
    min-width: 4.5rem;
}

.issue-severity-filter .issue-filter-inactive {
    background-color: #ececec !important;
    border-color: #d8d8d8 !important;
    color: #4a4a4a !important;
    --bs-btn-bg: #ececec;
    --bs-btn-border-color: #d8d8d8;
    --bs-btn-color: #4a4a4a;
    --bs-btn-hover-bg: #e0e0e0;
    --bs-btn-hover-border-color: #cccccc;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-active-bg: #e0e0e0;
    --bs-btn-active-border-color: #cccccc;
    --bs-btn-active-color: #1a1a1a;
}

[data-bs-theme="dark"] .issue-severity-filter .issue-filter-inactive {
    background-color: #1f1f1f !important;
    border-color: #333333 !important;
    color: #a3a3a3 !important;
    --bs-btn-bg: #1f1f1f;
    --bs-btn-border-color: #333333;
    --bs-btn-color: #a3a3a3;
    --bs-btn-hover-bg: #2a2a2a;
    --bs-btn-hover-border-color: #404040;
    --bs-btn-hover-color: #d4d4d4;
    --bs-btn-active-bg: #2a2a2a;
    --bs-btn-active-border-color: #404040;
    --bs-btn-active-color: #d4d4d4;
}

/* Active filter/view toggles — Orbit accent (#608c5a), not theme warning orange. */
.issue-severity-filter .btn-warning.text-black,
.issue-severity-filter .btn-primary:not(.issue-filter-inactive),
.timers-view-toggle .btn-warning.text-black,
.schedules-view-toggle .btn-warning.text-black,
.orbit-timer-panel-tabs .btn-warning.text-black,
.orbit-auth-channel-toggle .btn-primary:not(.issue-filter-inactive) {
    --bs-btn-color: #1a1a1a;
    --bs-btn-bg: #608c5a;
    --bs-btn-border-color: #608c5a;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-hover-bg: #528858;
    --bs-btn-hover-border-color: #528858;
    --bs-btn-focus-shadow-rgb: 96, 140, 90;
    --bs-btn-active-color: #1a1a1a;
    --bs-btn-active-bg: #466f42;
    --bs-btn-active-border-color: #466f42;
    background-color: #608c5a !important;
    border-color: #608c5a !important;
    color: #1a1a1a !important;
}

.issue-severity-filter .btn-warning.text-black:hover:not(:disabled):not(.disabled),
.issue-severity-filter .btn-primary:not(.issue-filter-inactive):hover:not(:disabled):not(.disabled),
.timers-view-toggle .btn-warning.text-black:hover:not(:disabled):not(.disabled),
.schedules-view-toggle .btn-warning.text-black:hover:not(:disabled):not(.disabled),
.orbit-timer-panel-tabs .btn-warning.text-black:hover:not(:disabled):not(.disabled),
.orbit-auth-channel-toggle .btn-primary:not(.issue-filter-inactive):hover:not(:disabled):not(.disabled) {
    background-color: #528858 !important;
    border-color: #528858 !important;
    color: #1a1a1a !important;
}

.issue-severity-filter .btn-warning.text-black:focus-visible:not(:disabled):not(.disabled),
.issue-severity-filter .btn-primary:not(.issue-filter-inactive):focus-visible:not(:disabled):not(.disabled),
.timers-view-toggle .btn-warning.text-black:focus-visible:not(:disabled):not(.disabled),
.schedules-view-toggle .btn-warning.text-black:focus-visible:not(:disabled):not(.disabled),
.orbit-timer-panel-tabs .btn-warning.text-black:focus-visible:not(:disabled):not(.disabled),
.orbit-auth-channel-toggle .btn-primary:not(.issue-filter-inactive):focus-visible:not(:disabled):not(.disabled) {
    background-color: #528858 !important;
    border-color: #528858 !important;
    color: #1a1a1a !important;
    box-shadow: 0 0 0 0.25rem rgba(96, 140, 90, 0.25);
}

.issue-severity-filter .btn-warning.text-black:active:not(:disabled):not(.disabled),
.issue-severity-filter .btn-primary:not(.issue-filter-inactive):active:not(:disabled):not(.disabled),
.timers-view-toggle .btn-warning.text-black:active:not(:disabled):not(.disabled),
.schedules-view-toggle .btn-warning.text-black:active:not(:disabled):not(.disabled),
.orbit-timer-panel-tabs .btn-warning.text-black:active:not(:disabled):not(.disabled),
.orbit-auth-channel-toggle .btn-primary:not(.issue-filter-inactive):active:not(:disabled):not(.disabled) {
    background-color: #466f42 !important;
    border-color: #466f42 !important;
    color: #1a1a1a !important;
}

.badge.bg-warning.text-black {
    color: #000 !important;
}

@media (prefers-reduced-motion: reduce) {
    .issue-item-fade-in {
        animation: none;
    }

    .audit-summary-sticky {
        transition: none;
    }

    .audit-status-roll-track {
        transition: none;
    }

    .score-ring-progress {
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

.url-preview-link {
    border: 0;
    background: none;
    padding: 0;
    color: #608c5a;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
    max-width: 100%;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    vertical-align: bottom;
}

.url-preview-link-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}

.url-preview-link-icon {
    flex-shrink: 0;
    font-size: 0.8em;
    line-height: 1;
    opacity: 0.8;
    text-decoration: none;
}

.url-preview-link:hover .url-preview-link-text,
.url-preview-link:focus-visible .url-preview-link-text {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.url-preview-link:hover,
.url-preview-link:focus-visible {
    color: #528858;
    text-decoration: none;
}

.url-preview-link:hover .url-preview-link-icon,
.url-preview-link:focus-visible .url-preview-link-icon {
    opacity: 1;
    text-decoration: none !important;
}

.url-preview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    z-index: 1040;
}

.url-preview-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.url-preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(52vw, 900px);
    min-width: 360px;
    background: var(--bs-body-bg, #fff);
    border-left: 1px solid var(--bs-border-color, #dfe5ef);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

/* Audited-site page URLs: wide preview; docs / off-domain keep default width above. */
.url-preview-panel.url-preview-panel--site {
    width: 75vw;
    min-width: min(75vw, 360px);
    max-width: 75vw;
}

.url-preview-panel.open {
    transform: translateX(0);
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .url-preview-backdrop,
    .url-preview-panel {
        transition-duration: 0.01ms;
    }
}

.url-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bs-border-color, #dfe5ef);
    background: var(--bs-body-bg, #fff);
}

.url-preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    min-width: 0;
}

.url-preview-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Shared right-slideout dismiss: chevron, no button chrome. */
.url-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    box-shadow: none;
    color: var(--bs-body-color, #2a3547);
    font-size: 1.35rem;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.url-preview-close .ti {
    font-size: inherit;
    line-height: 1;
}

.url-preview-close:hover,
.url-preview-close:focus-visible {
    background: rgba(var(--bs-body-color-rgb, 42, 53, 71), 0.08);
    border: 0;
    box-shadow: none;
    outline: none;
    color: var(--bs-body-color, #2a3547);
}

.url-preview-close:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.url-preview-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem 1rem 1rem;
}

.url-preview-frame {
    flex: 1;
    width: 100%;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.5rem;
    background: #fff;
}

.url-preview-hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .url-preview-panel,
    .url-preview-panel.url-preview-panel--site {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
    }
}

/* Harvest project dashboard slideout — same chrome as url-preview, dashboard width. */
.project-detail-panel.url-preview-panel {
    width: min(56vw, 960px);
    min-width: min(420px, 100vw);
    max-width: 100vw;
    --home-project-header-icon-size: 1.15rem;
}

/* Same Tabler star toggle as Home recent cards (outline vs filled grey). */
.project-detail-panel .home-project-favorite-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    line-height: 1;
    font-size: var(--home-project-header-icon-size);
    text-decoration: none;
    opacity: 0.9;
}

.project-detail-panel .home-project-favorite-btn:hover,
.project-detail-panel .home-project-favorite-btn:focus-visible {
    text-decoration: none;
    opacity: 1;
}

.project-detail-panel .home-project-favorite-btn .home-project-favorite-icon {
    display: block;
    width: var(--home-project-header-icon-size);
    height: var(--home-project-header-icon-size);
    color: var(--bs-secondary-color, #6b6b6b);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-detail-panel .home-project-favorite-btn.is-favorited .home-project-favorite-icon {
    color: var(--bs-secondary-color, #6b6b6b);
    fill: currentColor;
    stroke: currentColor;
}

.project-detail-subtitle {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #5a6a85);
    margin-top: 0.15rem;
}

.project-detail-body {
    overflow: auto;
    overscroll-behavior: contain;
}

.project-detail-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #5a6a85);
    margin-bottom: 0.65rem;
}

.project-detail-stat-label {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #5a6a85);
    margin-bottom: 0.15rem;
}

.project-detail-stat-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.project-detail-table {
    font-size: 0.875rem;
}

.project-detail-notes {
    max-width: 16rem;
}

#main-wrapper .projects-table-card .projects-table tr.projects-row-clickable {
    cursor: pointer;
}

#main-wrapper .home-recent-projects .home-project-card {
    /* Shared scale for project name + drag grip (and keeps header icons aligned). */
    --home-project-header-icon-size: 1.15rem;
    cursor: pointer;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Budget-type meta (Total fees / Hours / No budget): small muted Tabler glyph left of label. */
#main-wrapper .home-recent-projects .home-project-budget-meta {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

#main-wrapper .home-recent-projects .home-project-budget-meta-icon {
    flex-shrink: 0;
    font-size: 0.95em;
    line-height: 1;
    opacity: 0.85;
}

html[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card,
[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card {
    /* Body is near-black; lift cards + use a clearer edge than default border. */
    border-color: var(--bs-light-border-subtle, #333333);
    background-color: var(--bs-secondary-bg, #111111);
}

#main-wrapper .home-recent-projects .home-project-card:hover,
#main-wrapper .home-recent-projects .home-project-card:focus-visible {
    border-color: color-mix(in srgb, var(--bs-primary, #5d87ff) 45%, var(--bs-border-color, #dfe5ef));
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.04);
}

html[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card:hover,
html[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card:focus-visible,
[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card:hover,
[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-card:focus-visible {
    border-color: color-mix(in srgb, var(--bs-primary, #608c5a) 35%, var(--bs-light-border-subtle, #333333));
    background-color: var(--bs-tertiary-bg, #171717);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.28);
}

#main-wrapper .home-recent-projects .home-project-card-actions {
    position: relative;
    z-index: 2;
    margin-top: -0.1rem;
}

#main-wrapper .home-recent-projects .home-project-favorite-btn,
#main-wrapper .home-recent-projects .home-project-dismiss-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    line-height: 1;
    font-size: var(--home-project-header-icon-size);
    text-decoration: none;
    opacity: 0.9;
}

#main-wrapper .home-recent-projects .home-project-favorite-btn:hover,
#main-wrapper .home-recent-projects .home-project-favorite-btn:focus-visible,
#main-wrapper .home-recent-projects .home-project-dismiss-btn:hover,
#main-wrapper .home-recent-projects .home-project-dismiss-btn:focus-visible {
    text-decoration: none;
    opacity: 1;
}

#main-wrapper .home-recent-projects .home-project-dismiss-btn:hover .ti,
#main-wrapper .home-recent-projects .home-project-dismiss-btn:focus-visible .ti {
    color: var(--bs-body-color, #5a6a85) !important;
}

/* Tabler star SVG: outline (muted) vs filled (same grey family — not warning orange). */
#main-wrapper .home-recent-projects .home-project-favorite-btn .home-project-favorite-icon {
    display: block;
    width: var(--home-project-header-icon-size);
    height: var(--home-project-header-icon-size);
    color: var(--bs-secondary-color, #6b6b6b);
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#main-wrapper .home-recent-projects .home-project-favorite-btn.is-favorited .home-project-favorite-icon {
    color: var(--bs-secondary-color, #6b6b6b);
    fill: currentColor;
    /* Keep stroke so outer silhouette matches the outline glyph weight. */
    stroke: currentColor;
}

/* Title + badge share the same left edge; grip sits in the padding gutter. */
#main-wrapper .home-recent-projects .home-project-title-block {
    position: relative;
    min-width: 0;
    flex: 1 1 auto;
}

#main-wrapper .home-recent-projects .home-project-title-text {
    min-width: 0;
}

/* Match project name type size to drag grip height (same CSS variable). */
#main-wrapper .home-recent-projects .home-project-name {
    font-size: var(--home-project-header-icon-size);
    line-height: 1;
}

#main-wrapper .home-recent-projects .home-project-drag-handle {
    position: absolute;
    top: 0;
    left: calc(-1 * var(--home-project-header-icon-size));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--home-project-header-icon-size);
    height: var(--home-project-header-icon-size);
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: var(--home-project-header-icon-size);
    line-height: 1;
    opacity: 0.7;
    /* WebView2 often ignores grab/grabbing; `move` is the supported reorder cursor. */
    cursor: move !important;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    z-index: 1;
}

#main-wrapper .home-recent-projects .home-project-drag-handle .ti {
    pointer-events: none;
}

#main-wrapper .home-recent-projects .home-project-drag-handle:hover,
#main-wrapper .home-recent-projects .home-project-drag-handle:focus-visible {
    opacity: 1;
    color: var(--bs-body-color, #2a3547);
}

#main-wrapper .home-recent-projects .home-project-card.is-dragging {
    opacity: 0.45;
}

/* Collapse the source card while reordering so the dashed slot occupies its grid cell. */
#main-wrapper .home-recent-projects .home-project-card-col-dragging {
    display: none !important;
}

#main-wrapper .home-recent-projects .home-project-card-favorite .home-dashboard-card-body {
    /* Grip sits in the left padding gutter; don't clip it. */
    overflow: visible;
}

#main-wrapper .home-recent-projects .home-dashboard-cards.is-reordering-favorites {
    cursor: move;
    user-select: none;
}

html.home-favorite-reorder-active,
html.home-favorite-reorder-active body {
    cursor: move !important;
    user-select: none !important;
}

#main-wrapper .home-recent-projects .home-project-drop-slot-col {
    /* Match project card columns: flex child that fills the Bootstrap col. */
    display: flex;
    min-height: 100%;
}

#main-wrapper .home-recent-projects .home-project-drop-placeholder {
    /* Critical: cols are display:flex (row). Without width/flex-grow the empty
       placeholder collapses to a tall hairline (border only) — the broken artifact. */
    box-sizing: border-box;
    flex: 1 1 auto;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    min-height: 11.5rem;
    height: 100%;
    border: 2px dashed color-mix(in srgb, var(--bs-primary, #5d87ff) 55%, var(--bs-border-color, #dfe5ef));
    border-radius: var(--bs-border-radius, 0.375rem);
    background: color-mix(in srgb, var(--bs-primary, #5d87ff) 8%, transparent);
}

html[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-drop-placeholder,
[data-bs-theme="dark"] #main-wrapper .home-recent-projects .home-project-drop-placeholder {
    border-color: color-mix(in srgb, var(--bs-primary, #608c5a) 50%, var(--bs-light-border-subtle, #333333));
    background: color-mix(in srgb, var(--bs-primary, #608c5a) 12%, transparent);
}

@media (max-width: 767.98px) {
    #main-wrapper .home-recent-projects .home-project-drop-placeholder {
        /* Cards drop equal-height stretch on phones; keep a card-like slot, not a hairline. */
        min-height: 9rem;
    }
}

/* JS-owned drag ghost (appended to body). Match card header grip + title scale. */
.home-project-drag-ghost {
    --home-project-header-icon-size: 1.15rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1090;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: min(16rem, 55vw);
    padding: 0.65rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--bs-primary, #5d87ff) 45%, var(--bs-border-color, #dfe5ef));
    border-radius: var(--bs-border-radius, 0.375rem);
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 92%, transparent);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.18);
    pointer-events: none;
    opacity: 0.95;
    will-change: transform;
}

html[data-bs-theme="dark"] .home-project-drag-ghost,
[data-bs-theme="dark"] .home-project-drag-ghost {
    background: color-mix(in srgb, var(--bs-secondary-bg, #111111) 92%, transparent);
    border-color: color-mix(in srgb, var(--bs-primary, #608c5a) 40%, var(--bs-light-border-subtle, #333333));
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.45);
}

.home-project-drag-ghost-grip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--home-project-header-icon-size);
    height: var(--home-project-header-icon-size);
    font-size: var(--home-project-header-icon-size);
    line-height: 1;
    color: var(--bs-secondary-color, #6b6b6b);
    opacity: 0.85;
}

.home-project-drag-ghost-label {
    font-weight: 600;
    font-size: var(--home-project-header-icon-size);
    line-height: 1;
    min-width: 0;
    color: var(--bs-body-color, #2a3547);
}

@media (max-width: 768px) {
    .project-detail-panel.url-preview-panel {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
    }
}

/* Shared website URL suggestion combobox (+ Site Analytics domain picker) */
.website-url-autocomplete,
.site-analytics-domain-autocomplete {
    position: relative;
}

.website-url-autocomplete .input-group > .form-control.audit-form-control,
.website-url-autocomplete .input-group > .form-floating,
.site-analytics-domain-autocomplete .input-group > .form-control.audit-form-control,
.site-analytics-domain-autocomplete .input-group > .form-floating {
    width: 1%;
    flex: 1 1 auto;
    min-width: 0;
}

.website-url-autocomplete .input-group > .form-floating > .form-control.audit-form-control,
.site-analytics-domain-autocomplete .input-group > .form-floating > .form-control.audit-form-control {
    width: 100%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.website-url-autocomplete .input-group > .form-floating:not(:first-child) > .form-control.audit-form-control,
.site-analytics-domain-autocomplete .input-group > .form-floating:not(:first-child) > .form-control.audit-form-control {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.website-url-autocomplete .website-url-suggestion-toggle,
.site-analytics-domain-autocomplete .site-analytics-domain-refresh {
    min-width: 2.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.website-url-autocomplete .website-url-suggestion-toggle .ti,
.site-analytics-domain-autocomplete .site-analytics-domain-refresh .ti {
    font-size: 1.05rem;
    line-height: 1;
}

.website-url-suggestions,
.site-analytics-domain-suggestions {
    position: absolute;
    inset-inline-start: 0;
    inset-inline-end: 0;
    top: calc(100% + 0.25rem);
    z-index: 1050;
    max-height: 16rem;
    overflow-y: auto;
    margin: 0;
    padding: 0.35rem 0;
    display: block;
}

.website-url-suggestions .dropdown-item,
.site-analytics-domain-suggestions .dropdown-item {
    white-space: normal;
}

.website-url-suggestions .dropdown-item.active,
.website-url-suggestions .dropdown-item:active,
.site-analytics-domain-suggestions .dropdown-item.active,
.site-analytics-domain-suggestions .dropdown-item:active {
    color: var(--chipr-dropdown-highlight-active-color);
    background-color: var(--chipr-dropdown-highlight-active-bg);
}

.site-analytics-metric-row {
    /* Hit target for metric-reorder.js; chrome lives on preset/custom inner shells. */
    padding: 0;
}

.site-analytics-metric-row.is-dragging {
    opacity: 0.55;
}

.site-analytics-metric-row.is-dragging .site-analytics-metric-preset,
.site-analytics-metric-row.is-dragging .site-analytics-metric-custom {
    outline: 1px solid var(--bs-primary, #608c5a);
    outline-offset: 2px;
}

.site-analytics-metric-preset {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.4rem 0.55rem 0.4rem 0.35rem;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 92%, #608c5a 8%);
}

.site-analytics-metric-preset-body {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
}

.site-analytics-metric-preset-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bs-body-color, #2a3547);
    line-height: 1.25;
}

.site-analytics-metric-kind {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #608c5a;
    line-height: 1;
}

.site-analytics-metric-remove {
    flex: 0 0 auto;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
}

.site-analytics-metric-custom {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.55rem 0.55rem 0.35rem;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.5rem;
    background: var(--bs-body-bg, #fff);
}

.site-analytics-metric-custom-fields {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    gap: 0.5rem 0.85rem;
    flex: 1 1 auto;
    min-width: 0;
}

.site-analytics-metric-field.form-floating > .form-control {
    min-height: 3.25rem;
    height: 3.25rem;
}

.site-analytics-metric-field.form-floating > label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* CSS tooltip (not native title / Bootstrap JS) so it works in MAUI WebView
   and for custom KPI rows added after page load. */
.site-analytics-metric-custom,
.site-analytics-metric-custom-fields,
.site-analytics-metric-field-events {
    overflow: visible;
}

/* Allow the in-label hint + tooltip (Bootstrap floating labels clip and ignore pointer events). */
.site-analytics-metric-field-events.form-floating > label {
    overflow: visible;
}

.site-analytics-metric-field-hint {
    position: relative;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--bs-secondary-color, #5a6a85);
    opacity: 0.8;
    cursor: help;
    outline: none;
    pointer-events: auto;
}

.site-analytics-metric-field-hint:hover,
.site-analytics-metric-field-hint:focus-visible {
    opacity: 1;
    color: var(--bs-body-color, #2a3547);
}

.site-analytics-metric-field-hint-tooltip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 7;
    min-width: 11rem;
    max-width: 16rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.94);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 0.12s ease, visibility 0.12s ease, transform 0.12s ease;
}

.site-analytics-metric-field-hint:hover .site-analytics-metric-field-hint-tooltip,
.site-analytics-metric-field-hint:focus-visible .site-analytics-metric-field-hint-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 767.98px) {
    .site-analytics-metric-custom-fields {
        grid-template-columns: 1fr;
    }
}

body.is-metric-reordering,
body.is-metric-reordering * {
    cursor: move !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.site-analytics-metric-reorder {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.site-analytics-metric-move-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 0.2rem;
    background: transparent;
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}

.site-analytics-metric-move-btn:hover:not(:disabled),
.site-analytics-metric-move-btn:focus-visible:not(:disabled) {
    color: var(--bs-body-color, #2a3547);
    background: rgba(90, 106, 133, 0.12);
}

.site-analytics-metric-move-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.site-analytics-metric-move-btn:focus-visible {
    outline: 2px solid var(--bs-primary, #5d87ff);
    outline-offset: 1px;
}

.site-analytics-metric-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 0.875rem;
    /* Extra vertical hit area without growing the visual stack past the inputs. */
    padding: 0.2rem 0;
    box-sizing: content-box;
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.85rem;
    line-height: 1;
    /* WebView2 on Windows often ignores grab/grabbing; `move` is the supported reorder cursor. */
    cursor: move !important;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.site-analytics-metric-drag-handle .ti {
    pointer-events: none;
}

.site-analytics-metric-drag-handle:hover,
.site-analytics-metric-drag-handle:focus-visible {
    cursor: move !important;
    color: var(--bs-body-color, #2a3547);
}

.site-analytics-metric-drag-handle:active,
.site-analytics-metric-drag-handle.is-pointer-dragging {
    cursor: move !important;
    color: var(--bs-primary, #5d87ff);
}

.site-analytics-metric-drag-handle.is-disabled,
.site-analytics-metric-drag-handle.is-disabled:hover,
.site-analytics-metric-drag-handle.is-disabled:focus-visible,
.site-analytics-metric-drag-handle.is-disabled:active {
    opacity: 0.35;
    cursor: not-allowed !important;
    color: var(--bs-secondary-color, #6b6b6b);
    pointer-events: none;
}

.site-analytics-metric-drag-handle:focus-visible {
    outline: 2px solid var(--bs-primary, #5d87ff);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.site-analytics-add-all-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid color-mix(in srgb, #608c5a 35%, var(--bs-border-color, #dfe5ef));
    border-radius: 0.5rem;
    background: color-mix(in srgb, #608c5a 10%, var(--bs-body-bg, #fff));
}

.site-analytics-add-all-metrics-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 12rem;
    flex: 1 1 12rem;
}

.site-analytics-add-all-metrics-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #608c5a;
}

.site-analytics-add-all-metrics-hint {
    font-size: 0.9rem;
    color: var(--bs-body-color, #2a3547);
}

.site-analytics-add-all-metrics-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 2.4rem;
    padding-inline: 1rem;
}

@media (max-width: 575.98px) {
    .site-analytics-add-all-metrics-btn {
        width: 100%;
    }
}

.google-auth-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.32s ease, visibility 0.32s ease;
    z-index: 1040;
}

.google-auth-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.google-auth-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(420px, 100vw);
    background: var(--bs-body-bg, #fff);
    border-left: 1px solid var(--bs-border-color, #dfe5ef);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.google-auth-panel.open {
    transform: translateX(0);
    visibility: visible;
}

.pagespeed-diagnostics-panel {
    width: min(560px, 100vw);
}

.google-auth-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--bs-border-color, #dfe5ef);
}

.google-auth-title {
    font-size: 1rem;
    font-weight: 600;
}

.google-auth-subtitle {
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-top: 0.15rem;
}

.google-auth-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.1rem;
}

/* While a slideout is mounted, JS also sets overflow:hidden on the page scroll
   parent (html/body or .body-wrapper). Class mirrors that for CSS consumers. */
html.og-slideout-open,
body.og-slideout-open {
    overflow: hidden;
}

.google-auth-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.google-auth-step-content {
    flex: 1;
    min-width: 0;
}

.google-auth-step h6 {
    margin: 0;
    font-weight: 600;
}

.google-auth-step-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.google-auth-step-icon.is-active {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

.google-auth-steps-list {
    margin: 1rem 0 0;
    padding-left: 1.2rem;
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.88rem;
}

.google-auth-steps-list li + li {
    margin-top: 0.35rem;
}

.google-auth-actions {
    margin-top: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .google-auth-backdrop,
    .google-auth-panel,
    .pagespeed-diagnostics-panel {
        transition-duration: 0.01ms;
    }
}

.site-analytics-date-range {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(214, 242, 254, 0.95);
    border-radius: 12px;
    background: #d6f2fe;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .site-analytics-date-range {
    background: #d6f2fe;
    border-color: rgba(214, 242, 254, 0.95);
    color: #1a1a1a;
}

.site-analytics-date-range-summary {
    font-size: 0.85rem;
    color: #4a4a4a;
}

[data-bs-theme="dark"] .site-analytics-date-range-summary {
    color: #4a4a4a;
}

.site-analytics-date-range .form-check-label {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.site-analytics-date-range .form-floating > label {
    color: #5a6a85;
}

.site-analytics-date-range .btn-outline-secondary {
    --bs-btn-color: #1a1a1a;
    --bs-btn-border-color: #1a1a1a;
    --bs-btn-hover-color: #d6f2fe;
    --bs-btn-hover-bg: #1a1a1a;
    --bs-btn-hover-border-color: #1a1a1a;
    --bs-btn-active-color: #d6f2fe;
    --bs-btn-active-bg: #1a1a1a;
    --bs-btn-active-border-color: #1a1a1a;
    --bs-btn-disabled-color: #6b6b6b;
    --bs-btn-disabled-border-color: #8a8a8a;
    background-color: transparent !important;
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .site-analytics-date-range .btn-outline-secondary,
html[data-bs-theme="dark"] #main-wrapper .site-analytics-date-range .btn-outline-secondary {
    background-color: transparent !important;
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .site-analytics-date-range .btn-outline-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme="light"] #main-wrapper .site-analytics-date-range .btn-outline-secondary:focus-visible:not(:disabled):not(.disabled),
html[data-bs-theme="dark"] #main-wrapper .site-analytics-date-range .btn-outline-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme="dark"] #main-wrapper .site-analytics-date-range .btn-outline-secondary:focus-visible:not(:disabled):not(.disabled),
.site-analytics-date-range .btn-outline-secondary:hover,
.site-analytics-date-range .btn-outline-secondary:focus-visible {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #d6f2fe !important;
    -webkit-text-fill-color: #d6f2fe !important;
}

.site-analytics-date-range .btn-primary {
    background-color: #608c5a !important;
    border-color: #608c5a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.site-analytics-report {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.site-analytics-report-empty {
    /* Keep equal inset under the warning so bottom matches left/right padding. */
    padding-bottom: 1.5rem;
}

[data-bs-theme="dark"] .site-analytics-report {
    background: #111111;
}

.site-analytics-report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 0;
}

.site-analytics-site-name {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .site-analytics-site-name {
    color: #f5f5f5;
}

.site-analytics-report-date {
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.9rem;
}

.site-analytics-report-header-actions {
    /* 3Ã— former Bootstrap gap-2 (0.5rem) between Save PDF / Email and brand mark */
    gap: 1.5rem;
}

.site-analytics-email-modal,
.run-audit-email-modal {
    z-index: 1055;
}

.site-analytics-email-modal + .modal-backdrop,
.run-audit-email-modal + .modal-backdrop {
    z-index: 1050;
}

.site-analytics-brand-mark {
    width: 42px;
    height: 42px;
    display: block;
    flex-shrink: 0;
}

.site-analytics-report-summary {
    margin-top: 2.75rem;
    padding-top: 0;
}

.site-analytics-metadata-audit {
    margin-top: 2.75rem;
    padding-top: 0;
}

.site-analytics-metadata-audit-status {
    font-size: 0.9rem;
    line-height: 1.45;
}

.site-analytics-report-summary-text {
    color: var(--bs-secondary-color, #4a4a4a);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 0.65rem;
}

.site-analytics-report-summary-text:last-of-type {
    margin-bottom: 0;
}

[data-bs-theme="dark"] .site-analytics-report-summary-text {
    color: #c8c8c8;
}

.site-analytics-report-summary-subtitle {
    margin-top: 2.25rem;
}

.site-analytics-report-summary-lead {
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.8rem;
    line-height: 1.4;
    margin: -0.2rem 0 0.75rem;
}

.site-analytics-report-summary-note {
    color: var(--bs-secondary-color, #6b6b6b);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.25rem 0 0;
}

[data-bs-theme="dark"] .site-analytics-report-summary-lead,
[data-bs-theme="dark"] .site-analytics-report-summary-note {
    color: #a8a8a8;
}

.site-analytics-report-summary-steps {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--bs-secondary-color, #4a4a4a);
    font-size: 0.9rem;
    line-height: 1.5;
}

.site-analytics-report-summary-steps li {
    margin-bottom: 0.55rem;
}

.site-analytics-report-summary-steps li:last-child {
    margin-bottom: 0;
}

.site-analytics-report-summary-sc-link {
    display: inline-block;
    margin-left: 0.35rem;
    font-size: 0.82em;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-analytics-report-summary-steps {
    color: #c8c8c8;
}

.site-analytics-report-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 2.75rem;
    padding-top: 1.25rem;
    padding-bottom: 0;
}

.site-analytics-flow-logo {
    display: none;
    height: 1.35rem;
    width: auto;
    max-width: 100%;
}

/* light-logo = orange + black THE FLOW; dark-logo = orange + white THE FLOW */
[data-bs-theme="light"] .site-analytics-report-footer .light-logo {
    display: block;
}

[data-bs-theme="dark"] .site-analytics-report-footer .dark-logo {
    display: block;
}

.site-analytics-period + .site-analytics-period {
    margin-top: 2.5rem;
    padding-top: 0;
}

.site-analytics-period-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.15rem;
    min-width: 0;
}

.site-analytics-period-heading {
    flex: 0 0 7.5rem;
    max-width: 7.5rem;
    padding-top: 0.15rem;
    min-width: 0;
}

.site-analytics-period-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
    line-height: 1.05;
}

.site-analytics-period-title-line {
    display: block;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-analytics-period-title {
    color: #f5f5f5;
}

.site-analytics-period-subtitle {
    font-size: 0.7rem;
    font-style: italic;
    color: #1a1a1a;
    margin-bottom: 0;
    line-height: 1.3;
}

.site-analytics-period-subtitle-line {
    display: block;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-analytics-period-subtitle {
    color: #d4d4d4;
}

.site-analytics-kpi-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.75rem, 1fr));
    gap: 0.85rem;
    min-width: 0;
    width: 100%;
    align-items: stretch;
}

/* Tablet / large phone: title full-width above wrapping KPI cards */
@media (max-width: 1100px) {
    .site-analytics-period-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .site-analytics-period-heading {
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
        padding-top: 0;
    }

    .site-analytics-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    }
}

.site-analytics-kpi-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #d6f2fe;
    border-radius: 1rem;
    padding: 0.9rem 0.95rem 0.85rem;
    height: 8.9rem;
    min-width: 0;
    box-sizing: border-box;
}

[data-bs-theme="dark"] .site-analytics-kpi-card {
    background: #d6f2fe;
}

.trend-bg-arrow {
    position: absolute;
    right: 8%;
    width: 37.152%;
    height: auto;
    aspect-ratio: 68 / 53;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    opacity: 0.88;
    display: block;
}

.trend-bg-arrow.is-up {
    /* Nudge past the edge so overflow clips the stem's rounded tail. */
    bottom: -5px;
    top: auto;
}

.trend-bg-arrow.is-down {
    /* Match up-arrow edge alignment at the top. */
    top: -5px;
    bottom: auto;
}

.site-analytics-kpi-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100%;
}

.site-analytics-kpi-value {
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1;
    color: #111111;
    -webkit-text-fill-color: #111111;
    margin-bottom: 0.2rem;
    overflow-wrap: anywhere;
}

.site-analytics-kpi-label {
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.2;
    color: #111111;
    -webkit-text-fill-color: #111111;
    overflow-wrap: break-word;
}

.site-analytics-kpi-previous {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--bs-secondary-color, #6b6b6b);
    -webkit-text-fill-color: var(--bs-secondary-color, #6b6b6b);
    overflow-wrap: break-word;
}

.site-analytics-kpi-change {
    margin-top: auto;
    padding-top: 0.65rem;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
    color: #111111;
    -webkit-text-fill-color: #111111;
    font-weight: 700;
    line-height: 1;
}

.site-analytics-kpi-change-arrow {
    font-size: 0.9rem;
    line-height: 1;
    font-weight: 700;
    flex-shrink: 0;
}

.site-analytics-kpi-change-pct {
    white-space: nowrap;
    flex-shrink: 0;
}

.site-analytics-kpi-muted {
    margin-top: auto;
    padding-top: 0.65rem;
    font-size: 0.72rem;
    color: var(--bs-secondary-color, #6b6b6b);
}

.site-analytics-chart-panel {
    background: transparent;
    border-radius: 0;
    padding: 0.35rem 0 0;
    margin-bottom: 1.75rem;
}

[data-bs-theme="dark"] .site-analytics-chart-panel {
    background: transparent;
}

.site-analytics-chart {
    width: 100%;
}

.site-analytics-chart-layout {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.site-analytics-chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 2.35rem;
    height: 180px;
    padding: 12px 0;
    font-size: 0.68rem;
    line-height: 1;
    color: var(--bs-secondary-color, #6b6b6b);
    text-align: right;
}

.site-analytics-chart-plot {
    position: relative;
    flex: 1;
    min-width: 0;
}

.site-analytics-chart-svg {
    width: 100%;
    height: 180px;
    display: block;
}

.site-analytics-chart-gridline {
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 1;
}

[data-bs-theme="dark"] .site-analytics-chart-gridline {
    stroke: rgba(255, 255, 255, 0.08);
}

.site-analytics-chart-hit {
    fill: transparent;
    stroke: transparent;
    cursor: pointer;
}

.site-analytics-chart-marker {
    fill: #608c5a;
    stroke: #fff;
    stroke-width: 1.5;
    pointer-events: none;
}

[data-bs-theme="dark"] .site-analytics-chart-marker {
    stroke: #141414;
}

.site-analytics-chart-tooltip {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -100%);
    min-width: 7rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.94);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    white-space: nowrap;
}

.site-analytics-chart-tooltip-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.15rem;
}

.site-analytics-chart-tooltip-value {
    font-size: 0.82rem;
    font-weight: 600;
}

.site-analytics-chart-tooltip-comparison {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
}

.site-analytics-line-current {
    fill: none;
    stroke: #608c5a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-analytics-line-comparison {
    fill: none;
    stroke: rgba(96, 140, 90, 0.35);
    stroke-width: 2.5;
    stroke-dasharray: 6 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.site-analytics-chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-top: 0.35rem;
}

.site-analytics-detail-row {
    margin-top: 0.25rem;
}

.site-analytics-table-card,
.site-analytics-channel-panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    min-width: 0;
    max-width: 100%;
}

.site-analytics-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
}

/* Grow with content so one-line cells scroll inside the wrapper (no wrap / no ellipsis). */
.site-analytics-table-scroll .site-analytics-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

.site-analytics-table-scroll .site-analytics-table th,
.site-analytics-table-scroll .site-analytics-table td {
    white-space: nowrap;
}

.site-analytics-table-scroll .site-analytics-table th:first-child,
.site-analytics-table-scroll .site-analytics-table td:first-child,
.site-analytics-table-scroll .site-analytics-table .site-analytics-page-cell,
.site-analytics-table-scroll .site-analytics-table .site-analytics-name-cell,
.site-analytics-table-scroll .site-analytics-table .site-analytics-page-cell .url-preview-link,
.site-analytics-table-scroll .site-analytics-table .url-preview-link-text {
    overflow: visible;
    text-overflow: unset;
    white-space: nowrap;
    max-width: none;
    width: auto;
}

.site-analytics-table-scroll .site-analytics-table .site-analytics-page-cell .url-preview-link {
    display: inline-flex;
    width: auto;
    max-width: none;
}

.site-analytics-table-title {
    /* Body stack — not Bebas display headings (h3/h4 Summary etc. inherit those otherwise). */
    font-family: "source-sans-pro", "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    margin-bottom: 0.55rem;
    color: #1a1a1a;
}

[data-bs-theme="dark"] .site-analytics-table-title {
    color: #f5f5f5;
}

.site-analytics-table {
    --bs-table-bg: transparent;
    --bs-table-color: #4a4a4a;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: transparent;
    --bs-table-border-color: transparent;
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
    border: 0;
}

.site-analytics-table > :not(caption) > * > * {
    border-bottom-width: 0;
}

.site-analytics-table th {
    font-size: 0.72rem;
    color: #6b6b6b;
    font-weight: 600;
    border: 0 !important;
    background-color: transparent;
    padding-top: 0.35rem;
    padding-bottom: 0.5rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

[data-bs-theme="dark"] .site-analytics-table th {
    color: #8a8a8a;
    background-color: transparent;
}

.site-analytics-table td {
    font-size: 0.78rem;
    border: 0 !important;
    vertical-align: middle;
    color: #4a4a4a !important;
    -webkit-text-fill-color: #4a4a4a !important;
    background-color: transparent;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* Reserved metric columns (value + trend + %); name column takes the remainder and ellipsizes. */
.site-analytics-table th.text-end,
.site-analytics-table td.text-end,
.site-analytics-table .site-analytics-metric-cell {
    width: 7rem;
    max-width: 7rem;
    white-space: nowrap;
    vertical-align: middle;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.site-analytics-table th:first-child,
.site-analytics-table td:first-child,
.site-analytics-table .site-analytics-page-cell,
.site-analytics-table .site-analytics-name-cell {
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    padding-left: 0.15rem;
    padding-right: 0.4rem;
}

.site-analytics-table .site-analytics-page-cell .url-preview-link {
    display: inline-flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

[data-bs-theme="dark"] .site-analytics-table td {
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
}

[data-bs-theme="dark"] .site-analytics-table tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

.site-analytics-table tbody tr:hover {
    background-color: transparent;
}

.site-analytics-table-metric {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
    max-width: 100%;
    font-variant-numeric: tabular-nums;
}

.site-analytics-table-metric > span {
    white-space: nowrap;
    flex-shrink: 0;
}

.site-analytics-table-trend {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--bs-secondary-color, #6b6b6b);
    line-height: 1;
}

.site-analytics-table-change {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6b6b6b);
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-analytics-channel-bars {
    min-width: 0;
    width: 100%;
}

.site-analytics-channel-group {
    margin-bottom: 0.85rem;
    min-width: 0;
}

.site-analytics-channel-lines {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.site-analytics-channel-line {
    position: relative;
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.35rem;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.site-analytics-channel-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a4a4a;
    text-align: right;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-analytics-channel-count {
    color: #d4d4d4;
}

.site-analytics-channel-row {
    display: grid;
    grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.65rem;
    min-width: 0;
}

.site-analytics-channel-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 0.35rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-bs-theme="dark"] .site-analytics-channel-name {
    color: #d4d4d4;
}

.site-analytics-channel-track {
    height: 12px;
    background: #e5e5e5;
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    min-width: 0;
}

.site-analytics-channel-bar {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
    pointer-events: none;
}

.site-analytics-channel-tooltip {
    position: absolute;
    z-index: 2;
    left: calc(3.5rem + 0.35rem + 50%);
    top: 0;
    transform: translate(-50%, calc(-100% - 8px));
    min-width: 8.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(26, 26, 26, 0.94);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    white-space: nowrap;
}

.site-analytics-channel-tooltip-label {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 0.15rem;
}

.site-analytics-channel-tooltip-value {
    font-size: 0.78rem;
    font-weight: 600;
}

.site-analytics-channel-bar.comparison {
    background: rgba(96, 140, 90, 0.28);
    opacity: 0.9;
}

.site-analytics-channel-bar.current {
    background: #608c5a;
}

.site-analytics-channel-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.72rem;
    font-style: italic;
    color: var(--bs-secondary-color, #6b6b6b);
    margin-top: 0.65rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 0.35rem;
}

.legend-dot.current {
    background: #608c5a;
}

.legend-dot.comparison {
    background: rgba(96, 140, 90, 0.35);
}

/* Phones: full-width single-column KPI cards */
@media (max-width: 768px) {
    .site-analytics-kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .site-analytics-kpi-card {
        padding: 0.8rem 0.75rem 0.75rem;
    }

    .site-analytics-kpi-value {
        font-size: 1.85rem;
    }

    .site-analytics-channel-group {
        margin-bottom: 0.75rem;
    }

    .site-analytics-channel-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
}

/* Setup & integrations page */
.setup-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

button.setup-status-badge-link {
    border: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

button.setup-status-badge-link:hover,
button.setup-status-badge-link:focus {
    opacity: 0.92;
    transform: translateY(-1px);
}

.setup-integration-message {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6b6b6b);
}

.setup-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.setup-checklist-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: rgba(245, 245, 245, 0.85);
}

[data-bs-theme="dark"] .setup-checklist-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.setup-checklist-item.is-complete {
    border-color: var(--bs-success-border-subtle, rgba(96, 140, 90, 0.25));
}

.setup-checklist-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.setup-checklist-item.is-complete .setup-checklist-icon {
    background: var(--bs-success-bg-subtle, rgba(96, 140, 90, 0.15));
    color: var(--chipr-success-hover, #528858);
}

.setup-checklist-item.is-pending .setup-checklist-icon {
    background: rgba(107, 107, 107, 0.12);
    color: #8a8a8a;
}

.setup-checklist-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.setup-checklist-instructions {
    font-size: 0.82rem;
    color: var(--bs-secondary-color, #6b6b6b);
    line-height: 1.45;
}

.setup-checklist-optional,
.setup-checklist-inapp {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    vertical-align: middle;
}

.setup-checklist-optional {
    background: rgba(107, 107, 107, 0.12);
    color: #6b6b6b;
}

.setup-checklist-inapp {
    background: rgba(96, 140, 90, 0.12);
    color: #608c5a;
}

.setup-config-sample {
    background: #141414;
    color: #d4d4d4;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.78rem;
    overflow-x: auto;
}

[data-bs-theme="light"] .setup-config-sample {
    background: #f3f3f3;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
}

.setup-settings-section {
    position: relative;
    padding: 1.15rem 1.25rem;
    border-radius: 0.5rem;
}

.setup-settings-section + .setup-settings-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .setup-settings-section + .setup-settings-section {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.setup-settings-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.setup-settings-title {
    margin-bottom: 0;
    font-weight: 600;
}

.setup-credential-help {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.1rem;
    margin: 0 0 0.85rem;
    padding: 0;
    list-style: none;
}

.setup-credential-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    color: #608c5a;
    text-decoration: none;
}

.setup-credential-help-link:hover,
.setup-credential-help-link:focus,
.external-link:hover,
.external-link:focus-visible {
    color: #528858;
    text-decoration: none;
}

.setup-credential-help-link:hover .external-link-text,
.setup-credential-help-link:focus .external-link-text,
.external-link:not(.btn):hover .external-link-text,
.external-link:not(.btn):focus-visible .external-link-text {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.setup-checklist-help-link {
    margin-top: 0.45rem;
}

.external-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #608c5a;
}

.external-link-text {
    text-decoration: none;
    color: inherit;
}

.external-link-icon {
    flex-shrink: 0;
    font-size: 0.92em;
    line-height: 1;
    text-decoration: none !important;
}

.external-link:hover .external-link-icon,
.external-link:focus-visible .external-link-icon,
.setup-credential-help-link:hover .external-link-icon,
.setup-credential-help-link:focus .external-link-icon {
    text-decoration: none !important;
}

.sidebar-link.sidebar-link-external {
    text-decoration: none;
}

.sidebar-link.sidebar-link-with-badge .sidebar-external-link-marker {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 0.4375rem;
    line-height: 0;
    text-decoration: none !important;
}

.sidebar-link.sidebar-link-with-badge .sidebar-external-link-marker .sidebar-external-link-icon,
.sidebar-link.sidebar-link-with-badge .sidebar-external-link-marker .sidebar-external-link-icon.ti {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px !important;
    width: 14px;
    height: 14px;
    line-height: 1;
    opacity: 0.75;
    text-decoration: none !important;
}

.sidebar-link.sidebar-link-with-badge .sidebar-external-link-marker .sidebar-external-link-icon::before {
    display: block;
    line-height: 1;
}

.sidebar-link.sidebar-link-external:hover,
.sidebar-link.sidebar-link-external:focus {
    text-decoration: none;
}

.sidebar-link.sidebar-link-external:hover .sidebar-link-text,
.sidebar-link.sidebar-link-external:focus .sidebar-link-text {
    text-decoration: none;
}

.sidebar-link.sidebar-link-external:hover .sidebar-external-link-marker .sidebar-external-link-icon,
.sidebar-link.sidebar-link-external:focus .sidebar-external-link-marker .sidebar-external-link-icon {
    opacity: 1;
    text-decoration: none !important;
}

/* Sidebar active item — override Modernize `.sidebar-nav ul .sidebar-item > .sidebar-link.active` */
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link:hover,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active:hover,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active:hover {
    background-color: #608c5a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link:hover,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link.active:hover,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active:hover {
    background-color: #608c5a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active .hide-menu,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active .sidebar-link-text,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning),
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning) .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link .hide-menu,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link .sidebar-link-text,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning),
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning) .ti::before {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active .hide-menu,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active .sidebar-link-text,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning),
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item > .sidebar-link.active > span:not(.sidebar-setup-warning) .ti::before,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link .hide-menu,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link .sidebar-link-text,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning),
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav ul .sidebar-item.selected > .sidebar-link > span:not(.sidebar-setup-warning) .ti::before {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

/* Beat Modernize !important heading tokens site-wide */
html[data-bs-theme="dark"],
html[data-bs-theme="dark"][data-color-theme="Orange_Theme"] {
    --bs-heading-color: #f5f5f5 !important;
    --bs-emphasis-color: #f5f5f5 !important;
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"][data-color-theme="Orange_Theme"] .card {
    --bs-card-title-color: #f5f5f5 !important;
}

html[data-bs-theme="light"] #main-wrapper h1,
html[data-bs-theme="light"] #main-wrapper h2,
html[data-bs-theme="light"] #main-wrapper h3,
html[data-bs-theme="light"] #main-wrapper h4,
html[data-bs-theme="light"] #main-wrapper h5,
html[data-bs-theme="light"] #main-wrapper h6,
html[data-bs-theme="light"] #main-wrapper .card-header h5,
html[data-bs-theme="light"] #main-wrapper .card-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper h1,
html[data-bs-theme="dark"] #main-wrapper h2,
html[data-bs-theme="dark"] #main-wrapper h3,
html[data-bs-theme="dark"] #main-wrapper h4,
html[data-bs-theme="dark"] #main-wrapper h5,
html[data-bs-theme="dark"] #main-wrapper h6,
html[data-bs-theme="dark"] #main-wrapper .card-header h5,
html[data-bs-theme="dark"] #main-wrapper .card-title {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

/* Chipr page headers — brand cream (light) / warm dark surface (dark) */
html[data-bs-theme="light"] #main-wrapper .page-header-banner {
    background-color: var(--bs-body-bg, #F2F1E8) !important;
    border: 0;
    box-shadow: none !important;
    color: #4a4a4a !important;
}

html[data-bs-theme="dark"] #main-wrapper .page-header-banner {
    background-color: color-mix(in srgb, #F2F1E8 8%, var(--bs-secondary-bg, #111111)) !important;
    border: 0;
    box-shadow: none !important;
    color: #f5f5f5 !important;
}

#main-wrapper .page-header-banner .ti,
#main-wrapper .page-header-banner .text-primary {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .page-header-banner .btn-header-outline,
#main-wrapper .btn.btn-header-outline {
    background-color: transparent !important;
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .page-header-banner .btn-header-outline .ti,
#main-wrapper .btn.btn-header-outline .ti {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .page-header-banner .btn-header-outline:hover,
#main-wrapper .page-header-banner .btn-header-outline:focus-visible,
#main-wrapper .btn.btn-header-outline:hover,
#main-wrapper .btn.btn-header-outline:focus-visible {
    background-color: rgba(26, 26, 26, 0.08) !important;
    border-color: #1a1a1a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .page-header-banner .btn-header-outline:disabled,
#main-wrapper .btn.btn-header-outline:disabled {
    opacity: 0.65;
}

#main-wrapper .page-header-banner .btn-google-connected,
#main-wrapper .page-header-banner .btn-google-connected .ti {
    color: #F2F1E8 !important;
    -webkit-text-fill-color: #F2F1E8 !important;
}

#main-wrapper .page-header-banner .btn-google-connected,
#main-wrapper .btn.btn-google-connected {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    color: #F2F1E8 !important;
    -webkit-text-fill-color: #F2F1E8 !important;
}

#main-wrapper .page-header-banner .btn-google-connected:hover,
#main-wrapper .page-header-banner .btn-google-connected:focus-visible,
#main-wrapper .btn.btn-google-connected:hover,
#main-wrapper .btn.btn-google-connected:focus-visible {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #F2F1E8 !important;
    -webkit-text-fill-color: #F2F1E8 !important;
}

#main-wrapper .page-header-title,
#main-wrapper .page-header-banner .page-header-title,
#main-wrapper .page-header-banner h4.page-header-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .page-header-subtitle,
#main-wrapper .page-header-banner .page-header-subtitle,
#main-wrapper .page-header-banner p.page-header-subtitle {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

#main-wrapper .card-header h5,
#main-wrapper .card-header .page-section-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .card-header h5,
html[data-bs-theme="dark"] #main-wrapper .card-header .page-section-title {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

/* Sidebar — neutral labels with B-hyve orange icons for unselected items
   (anchors + button.sidebar-link e.g. Sign out) */
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active),
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link:not(.active):link,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link:not(.active):visited,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .hide-menu,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .sidebar-link-text {
    color: #4a4a4a !important;
    -webkit-text-fill-color: #4a4a4a !important;
    text-decoration: none !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .ti::before {
    color: #608c5a !important;
    -webkit-text-fill-color: #608c5a !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active),
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link:not(.active):link,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link:not(.active):visited,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .hide-menu,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .sidebar-link-text {
    color: #a3a3a3 !important;
    -webkit-text-fill-color: #a3a3a3 !important;
    text-decoration: none !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) > span:not(.sidebar-setup-warning) .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active) .ti::before {
    color: #608c5a !important;
    -webkit-text-fill-color: #608c5a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .nav-small-cap,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .nav-small-cap .hide-menu,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .nav-small-cap .sidebar-resources-toggle,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .nav-small-cap,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .nav-small-cap .hide-menu,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .nav-small-cap .sidebar-resources-toggle {
    color: #8a8a8a !important;
    -webkit-text-fill-color: #8a8a8a !important;
    text-decoration: none !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active):hover,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav .sidebar-link:not(.active):hover {
    background-color: rgba(96, 140, 90, 0.12) !important;
}

/* Body content headings — all card/section titles */
html[data-bs-theme="light"] #main-wrapper .body-wrapper h1,
html[data-bs-theme="light"] #main-wrapper .body-wrapper h2,
html[data-bs-theme="light"] #main-wrapper .body-wrapper h3,
html[data-bs-theme="light"] #main-wrapper .body-wrapper h4,
html[data-bs-theme="light"] #main-wrapper .body-wrapper h5,
html[data-bs-theme="light"] #main-wrapper .body-wrapper h6,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .card-title,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .setup-settings-title,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .site-analytics-site-name,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .site-analytics-period-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .body-wrapper h1,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper h2,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper h3,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper h4,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper h5,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper h6,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .card-title,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .setup-settings-title,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .site-analytics-site-name,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .site-analytics-period-title {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper .site-analytics-period-title,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .site-analytics-period-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper .site-analytics-period-title-line,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .site-analytics-period-title-line {
    display: block !important;
    white-space: nowrap !important;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper .site-analytics-period-subtitle,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .site-analytics-period-subtitle {
    font-size: 0.7rem !important;
    font-style: italic !important;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper .page-header-banner .page-header-title,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .page-header-banner h4.page-header-title,
html[data-bs-theme="light"] #main-wrapper .body-wrapper .page-header-banner .page-header-subtitle {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .body-wrapper .page-header-banner .page-header-title,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .page-header-banner h4.page-header-title,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper .page-header-banner .page-header-subtitle {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="dark"] #main-wrapper .page-header-banner .ti,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner .text-primary,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner .page-header-title,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner h4.page-header-title,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner .page-header-subtitle,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner p.page-header-subtitle {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="dark"] #main-wrapper .page-header-banner .btn-header-outline,
html[data-bs-theme="dark"] #main-wrapper .btn.btn-header-outline {
    border-color: #f5f5f5 !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="dark"] #main-wrapper .page-header-banner .btn-header-outline .ti,
html[data-bs-theme="dark"] #main-wrapper .btn.btn-header-outline .ti {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="dark"] #main-wrapper .page-header-banner .btn-header-outline:hover,
html[data-bs-theme="dark"] #main-wrapper .page-header-banner .btn-header-outline:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .btn.btn-header-outline:hover,
html[data-bs-theme="dark"] #main-wrapper .btn.btn-header-outline:focus-visible {
    background-color: rgba(245, 245, 245, 0.1) !important;
    border-color: #f5f5f5 !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

/* Form labels — Modernize forces blue-gray #7c8fac !important in dark mode */
html[data-bs-theme="light"] #main-wrapper .form-label,
html[data-bs-theme="light"] #main-wrapper .col-form-label,
html[data-bs-theme="light"] .orbit-auth-shell .form-label,
html[data-bs-theme="light"] .orbit-auth-shell .col-form-label {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    text-transform: capitalize;
}

html[data-bs-theme="dark"] #main-wrapper .form-label,
html[data-bs-theme="dark"] #main-wrapper .col-form-label,
html[data-bs-theme="dark"] .orbit-auth-shell .form-label,
html[data-bs-theme="dark"] .orbit-auth-shell .col-form-label {
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
    text-transform: capitalize;
}

#main-wrapper .form-label,
#main-wrapper .col-form-label,
#main-wrapper .form-check-label,
.orbit-auth-shell .form-label,
.orbit-auth-shell .col-form-label,
.orbit-auth-shell .form-check-label {
    text-transform: capitalize;
}

/* Checkboxes (not switches) — Orbit yellow fill + dark checkmark in both themes */
:root {
    --orbit-check-fill: #608c5a;
    --orbit-check-mark: #1a1a1a;
    --orbit-check-focus-ring: rgba(96, 140, 90, 0.25);
    --orbit-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231a1a1a' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    --orbit-check-indeterminate-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%231a1a1a' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}

html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"],
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"] {
    background-color: #fff;
    border-color: #d0d0d0;
}

html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"],
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"] {
    background-color: #141414;
    border-color: #2a2a2a;
}

html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--orbit-check-fill) !important;
    border-color: var(--orbit-check-fill) !important;
}

html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked {
    background-image: var(--orbit-check-bg-image) !important;
}

html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:indeterminate {
    background-image: var(--orbit-check-indeterminate-bg-image) !important;
}

html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus,
html[data-bs-theme="light"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus,
html[data-bs-theme="dark"] #main-wrapper .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus-visible {
    border-color: var(--orbit-check-fill);
    box-shadow: 0 0 0 0.25rem var(--orbit-check-focus-ring);
    outline: 0;
}

/* Code blocks — replace Modernize blue-gray bg-light */
html[data-bs-theme="light"] #main-wrapper pre.orbit-code-block,
html[data-bs-theme="light"] #main-wrapper pre.bg-light {
    background-color: #f3f3f3 !important;
    border: 1px solid #e0e0e0;
    color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper pre.orbit-code-block code,
html[data-bs-theme="light"] #main-wrapper pre.bg-light code {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper pre.orbit-code-block,
html[data-bs-theme="dark"] #main-wrapper pre.bg-light {
    background-color: #141414 !important;
    border: 1px solid #2a2a2a;
    color: #d4d4d4 !important;
}

html[data-bs-theme="dark"] #main-wrapper pre.orbit-code-block code,
html[data-bs-theme="dark"] #main-wrapper pre.bg-light code {
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
}

/* Form controls — beat Modernize blue focus/background on inputs and selects.
   Auth pages sit outside #main-wrapper (.orbit-auth-shell) — keep the same tokens. */
html[data-bs-theme="light"] #main-wrapper .form-control,
html[data-bs-theme="light"] #main-wrapper .form-select,
html[data-bs-theme="light"] .orbit-auth-shell .form-control,
html[data-bs-theme="light"] .orbit-auth-shell .form-select {
    background-color: #1a1a1a !important;
    border-color: #d0d0d0 !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    caret-color: #608c5a;
}

html[data-bs-theme="dark"] #main-wrapper .form-control,
html[data-bs-theme="dark"] #main-wrapper .form-select,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select {
    background-color: #141414 !important;
    border-color: #2a2a2a !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    caret-color: #608c5a;
}

html[data-bs-theme="light"] #main-wrapper .form-control:focus,
html[data-bs-theme="light"] #main-wrapper .form-control:focus-visible,
html[data-bs-theme="light"] #main-wrapper .form-control:active:not(:disabled),
html[data-bs-theme="light"] #main-wrapper .form-select:focus,
html[data-bs-theme="light"] #main-wrapper .form-select:focus-visible,
html[data-bs-theme="light"] #main-wrapper .form-select:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-select:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:active:not(:disabled) {
    background-color: #1a1a1a !important;
    border-color: #608c5a !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    outline: 0;
    caret-color: #608c5a;
}

html[data-bs-theme="dark"] #main-wrapper .form-control:focus,
html[data-bs-theme="dark"] #main-wrapper .form-control:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .form-control:active:not(:disabled),
html[data-bs-theme="dark"] #main-wrapper .form-select:focus,
html[data-bs-theme="dark"] #main-wrapper .form-select:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .form-select:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:active:not(:disabled) {
    background-color: #141414 !important;
    border-color: #608c5a !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    outline: 0;
    caret-color: #608c5a;
}

html[data-bs-theme="light"] #main-wrapper .form-control:disabled,
html[data-bs-theme="light"] #main-wrapper .form-select:disabled,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:disabled,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:disabled {
    background-color: var(--bs-secondary-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-secondary-color) !important;
    -webkit-text-fill-color: var(--bs-secondary-color) !important;
    opacity: 1;
    cursor: not-allowed;
}

html[data-bs-theme="dark"] #main-wrapper .form-control:disabled,
html[data-bs-theme="dark"] #main-wrapper .form-select:disabled,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:disabled,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:disabled {
    background-color: #1f1f1f !important;
    border-color: #2a2a2a !important;
    color: #8a8a8a !important;
    -webkit-text-fill-color: #8a8a8a !important;
    opacity: 1;
    cursor: not-allowed;
}

/* Text selection in inputs — B-hyve orange instead of browser/theme blue */
html[data-bs-theme="light"] #main-wrapper input::selection,
html[data-bs-theme="light"] #main-wrapper textarea::selection,
html[data-bs-theme="light"] #main-wrapper .form-control::selection,
html[data-bs-theme="light"] #main-wrapper .form-select::selection,
html[data-bs-theme="light"] .orbit-auth-shell input::selection,
html[data-bs-theme="light"] .orbit-auth-shell textarea::selection,
html[data-bs-theme="light"] .orbit-auth-shell .form-control::selection,
html[data-bs-theme="light"] .orbit-auth-shell .form-select::selection {
    background-color: rgba(96, 140, 90, 0.28) !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper input::selection,
html[data-bs-theme="dark"] #main-wrapper textarea::selection,
html[data-bs-theme="dark"] #main-wrapper .form-control::selection,
html[data-bs-theme="dark"] #main-wrapper .form-select::selection,
html[data-bs-theme="dark"] .orbit-auth-shell input::selection,
html[data-bs-theme="dark"] .orbit-auth-shell textarea::selection,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control::selection,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select::selection {
    background-color: rgba(96, 140, 90, 0.45) !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper input::-moz-selection,
html[data-bs-theme="light"] #main-wrapper textarea::-moz-selection,
html[data-bs-theme="light"] #main-wrapper .form-control::-moz-selection,
html[data-bs-theme="light"] #main-wrapper .form-select::-moz-selection,
html[data-bs-theme="light"] .orbit-auth-shell input::-moz-selection,
html[data-bs-theme="light"] .orbit-auth-shell textarea::-moz-selection,
html[data-bs-theme="light"] .orbit-auth-shell .form-control::-moz-selection,
html[data-bs-theme="light"] .orbit-auth-shell .form-select::-moz-selection {
    background-color: rgba(96, 140, 90, 0.28) !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper input::-moz-selection,
html[data-bs-theme="dark"] #main-wrapper textarea::-moz-selection,
html[data-bs-theme="dark"] #main-wrapper .form-control::-moz-selection,
html[data-bs-theme="dark"] #main-wrapper .form-select::-moz-selection,
html[data-bs-theme="dark"] .orbit-auth-shell input::-moz-selection,
html[data-bs-theme="dark"] .orbit-auth-shell textarea::-moz-selection,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control::-moz-selection,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select::-moz-selection {
    background-color: rgba(96, 140, 90, 0.45) !important;
    color: #1a1a1a !important;
}

/* Tables — neutral row backgrounds, orange hover accent */
html[data-bs-theme="light"] #main-wrapper,
html[data-bs-theme="light"] #main-wrapper .table {
    --bs-table-color: #4a4a4a;
    --bs-table-color-state: #4a4a4a;
    --bs-table-color-type: #4a4a4a;
    --bs-table-bg: transparent;
    --bs-table-border-color: #e5e5e5;
    --bs-table-striped-bg: #f5f5f5;
    --bs-table-striped-color: #4a4a4a;
    --bs-table-hover-bg: rgba(96, 140, 90, 0.08);
    --bs-table-hover-color: #1a1a1a;
    --bs-table-active-bg: rgba(96, 140, 90, 0.12);
    --bs-table-active-color: #1a1a1a;
}

html[data-bs-theme="dark"] #main-wrapper,
html[data-bs-theme="dark"] #main-wrapper .table {
    --bs-table-color: #d4d4d4;
    --bs-table-color-state: #d4d4d4;
    --bs-table-color-type: #d4d4d4;
    --bs-table-bg: transparent;
    --bs-table-border-color: #2a2a2a;
    --bs-table-striped-bg: #141414;
    --bs-table-striped-color: #d4d4d4;
    --bs-table-hover-bg: rgba(96, 140, 90, 0.12);
    --bs-table-hover-color: #f5f5f5;
    --bs-table-active-bg: rgba(96, 140, 90, 0.18);
    --bs-table-active-color: #f5f5f5;
}

html[data-bs-theme="light"] #main-wrapper .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #4a4a4a !important;
    -webkit-text-fill-color: #4a4a4a !important;
    border-bottom-color: #e5e5e5 !important;
    box-shadow: none !important;
}

html[data-bs-theme="dark"] #main-wrapper .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
    border-bottom-color: #2a2a2a !important;
    box-shadow: none !important;
}

html[data-bs-theme="light"] #main-wrapper .table thead th {
    color: #3a3a3a !important;
    -webkit-text-fill-color: #3a3a3a !important;
    background-color: #ececec !important;
    border-bottom-color: #d8d8d8 !important;
}

html[data-bs-theme="dark"] #main-wrapper .table thead th {
    color: #9a9a9a !important;
    -webkit-text-fill-color: #9a9a9a !important;
    background-color: #1a1a1a !important;
    border-bottom-color: #2a2a2a !important;
}

html[data-bs-theme="light"] #main-wrapper .table tbody td,
html[data-bs-theme="light"] #main-wrapper .table tbody th {
    color: #4a4a4a !important;
    -webkit-text-fill-color: #4a4a4a !important;
}

html[data-bs-theme="dark"] #main-wrapper .table tbody td,
html[data-bs-theme="dark"] #main-wrapper .table tbody th {
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
}

html[data-bs-theme="light"] #main-wrapper .table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f5f5f5 !important;
    color: #4a4a4a !important;
    -webkit-text-fill-color: #4a4a4a !important;
}

html[data-bs-theme="dark"] #main-wrapper .table.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #141414 !important;
    color: #d4d4d4 !important;
    -webkit-text-fill-color: #d4d4d4 !important;
}

html[data-bs-theme="light"] #main-wrapper .table.table-hover > tbody > tr:hover > * {
    background-color: rgba(96, 140, 90, 0.08) !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .table.table-hover > tbody > tr:hover > * {
    background-color: rgba(96, 140, 90, 0.12) !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
}

html[data-bs-theme="light"] #main-wrapper .table tbody tr:hover > * {
    background-color: rgba(96, 140, 90, 0.06) !important;
}

html[data-bs-theme="dark"] #main-wrapper .table tbody tr:hover > * {
    background-color: rgba(96, 140, 90, 0.1) !important;
}

/* Table links and blue link text — B-hyve orange */
#main-wrapper .text-primary,
#main-wrapper .text-info {
    color: #608c5a !important;
}

#main-wrapper .url-preview-link,
#main-wrapper .url-preview-link.text-muted,
#main-wrapper .table .url-preview-link,
#main-wrapper .table .url-preview-link.text-muted,
#main-wrapper .summary-stat-link.url-preview-link {
    color: #608c5a !important;
}

#main-wrapper .url-preview-link:hover,
#main-wrapper .url-preview-link:focus-visible,
#main-wrapper .table .url-preview-link:hover,
#main-wrapper .table .url-preview-link:focus-visible {
    color: #528858 !important;
}

#main-wrapper .url-preview-link .url-preview-link-icon,
#main-wrapper .table .url-preview-link .url-preview-link-icon {
    color: inherit;
}

#main-wrapper .body-wrapper a.external-link:not(.btn),
#main-wrapper .body-wrapper a.external-link:not(.btn) .external-link-text,
#main-wrapper .body-wrapper .setup-credential-help-link {
    color: #608c5a !important;
}

#main-wrapper .body-wrapper a.external-link:not(.btn):hover,
#main-wrapper .body-wrapper a.external-link:not(.btn):focus-visible,
#main-wrapper .body-wrapper .setup-credential-help-link:hover,
#main-wrapper .body-wrapper .setup-credential-help-link:focus {
    color: #528858 !important;
}

/* Outline ExternalLink buttons: keep dark hover label (theme-aware) over green fill. */
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover,
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible,
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover .external-link-text,
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible .external-link-text,
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover .external-link-icon,
html[data-bs-theme="light"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible .external-link-icon {
    color: #1a1a1a !important;
    text-decoration: none;
}

html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover .external-link-text,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible .external-link-text,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:hover .external-link-icon,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a.external-link.btn-outline-primary:focus-visible .external-link-icon {
    color: #141414 !important;
    text-decoration: none;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper .text-muted {
    color: #6b6b6b !important;
}

html[data-bs-theme="dark"] #main-wrapper .body-wrapper .text-muted {
    color: #8a8a8a !important;
}

html[data-bs-theme="light"] #main-wrapper .table a:not(.btn):not(.url-preview-link),
html[data-bs-theme="dark"] #main-wrapper .table a:not(.btn):not(.url-preview-link) {
    color: #608c5a;
    text-decoration: none;
}

html[data-bs-theme="light"] #main-wrapper .table a:not(.btn):not(.url-preview-link):hover,
html[data-bs-theme="dark"] #main-wrapper .table a:not(.btn):not(.url-preview-link):hover {
    color: #528858;
    text-decoration: underline;
}

/* B-hyve global component theme — badges, alerts, spinners, cards, selection */
::selection {
    background-color: rgba(96, 140, 90, 0.35);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(96, 140, 90, 0.35);
    color: inherit;
}

#main-wrapper .spinner-border.text-primary,
.app-initial-loading .spinner-border.text-primary,
#app .spinner-border.text-primary {
    /* Brand orange; keep right edge transparent so the border spins as a spinner. */
    color: #608c5a !important;
    border-right-color: transparent;
}

#main-wrapper .bg-accent-secondary-subtle,
#main-wrapper .card.bg-accent-secondary-subtle,
#main-wrapper .round-40.bg-accent-secondary-subtle {
    background-color: var(--brand-accent-secondary) !important;
    color: var(--brand-accent-muted-on-surface);
}

#main-wrapper .card.bg-accent-secondary-subtle .card-body,
#main-wrapper .card.bg-accent-secondary-subtle h5,
#main-wrapper .card.bg-accent-secondary-subtle .fw-semibold {
    color: var(--brand-accent-on-surface) !important;
    -webkit-text-fill-color: var(--brand-accent-on-surface) !important;
}

#main-wrapper .card.bg-accent-secondary-subtle .text-muted {
    color: var(--brand-accent-muted-on-surface) !important;
    -webkit-text-fill-color: var(--brand-accent-muted-on-surface) !important;
}

#main-wrapper .bg-primary-subtle,
#main-wrapper .card.bg-primary-subtle {
    background-color: rgba(96, 140, 90, 0.12) !important;
    color: var(--bs-body-color);
}

html[data-bs-theme="dark"] #main-wrapper .bg-primary-subtle,
html[data-bs-theme="dark"] #main-wrapper .card.bg-primary-subtle {
    background-color: rgba(96, 140, 90, 0.14) !important;
}

#main-wrapper .badge.bg-info {
    background-color: #608c5a !important;
    color: #1a1a1a !important;
}

/* Chipr success green — dark text on filled badges for contrast. */
#main-wrapper .badge.bg-success,
#main-wrapper .badge.text-bg-success,
.orbit-auth-shell .badge.bg-success,
.orbit-auth-shell .badge.text-bg-success {
    background-color: var(--chipr-success, #608c5a) !important;
    color: #1a1a1a !important;
}

#main-wrapper .badge.bg-secondary {
    background-color: #525252 !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .alert-info {
    --bs-alert-color: var(--brand-accent-muted-on-surface);
    --bs-alert-bg: var(--brand-accent-secondary);
    --bs-alert-border-color: rgba(var(--brand-accent-secondary-rgb), 0.85);
    background-color: var(--brand-accent-secondary) !important;
    border-color: rgba(var(--brand-accent-secondary-rgb), 0.85) !important;
    color: var(--brand-accent-muted-on-surface) !important;
}

html[data-bs-theme="dark"] #main-wrapper .alert-info {
    --bs-alert-color: var(--brand-accent-muted-on-surface);
    --bs-alert-bg: var(--brand-accent-secondary);
    --bs-alert-border-color: rgba(var(--brand-accent-secondary-rgb), 0.85);
    background-color: var(--brand-accent-secondary) !important;
    border-color: rgba(var(--brand-accent-secondary-rgb), 0.85) !important;
    color: var(--brand-accent-muted-on-surface) !important;
}

html[data-bs-theme="light"] #main-wrapper .badge.bg-light {
    background-color: #ececec !important;
    color: #4a4a4a !important;
}

html[data-bs-theme="dark"] #main-wrapper .badge.bg-light {
    background-color: #1f1f1f !important;
    color: #a3a3a3 !important;
}

html[data-bs-theme="light"] #main-wrapper .badge.bg-light.text-dark {
    color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .badge.bg-light.text-dark {
    color: #d4d4d4 !important;
}

/* Timers dashboard quick-stat cards */
.card-body:has(.orbit-stat-value) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* Weather grows only when forecast/condition needs the room.
   Phones: full-width row. Tablets: two of three columns. Desktop: modest flex from Running now. */
@media (max-width: 767.98px) {
    .orbit-stat-row--weather-expand > .orbit-stat-col--weather {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .orbit-stat-row--weather-expand > .orbit-stat-col--weather {
        flex: 0 0 66.66666667%;
        max-width: 66.66666667%;
    }
}

@media (min-width: 1200px) {
    /* Unequal widths so Devices can keep “N / N online” on one line next to Stop all.
       Compact cards (flow / gallons) and Running now give up space. */
    .orbit-stat-row.row > [class*="col"] {
        flex: 1 1 0;
        width: auto;
        max-width: none;
    }

    .orbit-stat-row > .orbit-stat-col--compact {
        flex: 0.7 1 0;
    }

    .orbit-stat-row > .orbit-stat-col--running {
        flex: 0.8 1 0;
    }

    .orbit-stat-row > .orbit-stat-col--devices {
        flex: 1.45 1 0;
    }

    .orbit-stat-row > .orbit-stat-col--weather {
        flex: 1.1 1 0;
    }

    .orbit-stat-row--weather-expand > .orbit-stat-col--weather {
        flex: 1.25 1 0;
    }
}

.orbit-stat-value {
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.orbit-stat-value .orbit-stat-unit {
    font-size: 0.55em;
    font-weight: 600;
}

.orbit-stat-value .orbit-stat-meta {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--bs-secondary-color, #5a6a85);
    letter-spacing: normal;
}

.orbit-stat-value .orbit-stat-meta--flow {
    color: #608c5a;
    font-weight: 600;
}

.orbit-stat-value .orbit-stat-meta--at {
    color: inherit;
    font-weight: 600;
}

.orbit-stat-value:has(.orbit-stat-meta--flow) {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 0.15em;
}

.orbit-stat-value--text {
    font-size: 1.125rem;
    line-height: 1.35;
    letter-spacing: normal;
}

.orbit-stat-value:has(.orbit-yard-status-pip) {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.orbit-stat-value .orbit-yard-status-pip {
    width: 0.65rem;
    height: 0.65rem;
}

.orbit-stat-value--text .orbit-stat-meta {
    font-size: 1em;
    font-weight: 600;
    color: inherit;
    letter-spacing: normal;
}

.orbit-link-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.375rem;
}

.orbit-link-stat-row .orbit-stat-value--text {
    min-width: 0;
    white-space: nowrap;
}

.orbit-bulk-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.4rem;
    line-height: 1.2;
    background-color: #608c5a;
    border: 1px solid #608c5a;
    color: #1a1a1a;
}

.orbit-bulk-mode-btn:hover:not(:disabled),
.orbit-bulk-mode-btn:focus-visible:not(:disabled) {
    background-color: #528858;
    border-color: #528858;
    color: #1a1a1a;
}

.orbit-bulk-mode-btn:active:not(:disabled) {
    background-color: #466f42;
    border-color: #466f42;
    color: #1a1a1a;
}

.orbit-bulk-mode-btn:disabled {
    opacity: 0.65;
    color: #1a1a1a;
}

/* Same breakpoint as phone-layout.js so packaged Android and mobile web match. */
@media (max-width: 767.98px) {
    .orbit-bulk-mode-btn__all {
        display: none;
    }
}

.orbit-bulk-delay-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

html[data-bs-theme="light"] .orbit-bulk-delay-btn:hover:not(:disabled):not(.disabled),
html[data-bs-theme="light"] .orbit-bulk-delay-btn:focus-visible:not(:disabled):not(.disabled),
html[data-bs-theme="dark"] .orbit-bulk-delay-btn:hover:not(:disabled):not(.disabled),
html[data-bs-theme="dark"] .orbit-bulk-delay-btn:focus-visible:not(:disabled):not(.disabled) {
    color: #1a1a1a;
}

.orbit-stat-value--weather {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    max-width: 100%;
}

.orbit-weather-temp {
    flex-shrink: 0;
}

.orbit-weather-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
    min-width: 0;
}

.orbit-weather-condition {
    font-size: 0.65em;
    font-weight: 500;
    line-height: 1.2;
    color: var(--bs-secondary-color, #5a6a85);
    letter-spacing: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orbit-weather-forecast {
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: var(--bs-secondary-color, #5a6a85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-bs-theme="dark"] .orbit-weather-forecast {
    color: rgba(255, 255, 255, 0.55);
}

.orbit-weather-card-hit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0.45rem var(--bs-card-spacer-x, 1rem);
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    border-radius: inherit;
}

.orbit-weather-card-hit:hover,
.orbit-weather-card-hit:focus-visible {
    background: color-mix(in srgb, var(--bs-primary, #3F8F52) 6%, transparent);
}

.orbit-weather-card-hit:focus-visible {
    outline: 2px solid var(--bs-primary, #3F8F52);
    outline-offset: -2px;
}

.orbit-weather-icon {
    font-size: 1.05em;
    line-height: 1;
}

/* Weather glyphs use sky/sun colors — not Chipr green. */
:is(
    .orbit-stat-value--weather,
    .orbit-pwa-standalone-weather,
    .orbit-weather-now,
    .orbit-weather-daily,
    .orbit-weather-hourly
) .ti {
    color: var(--orbit-weather-sky, #4a8ec4);
    -webkit-text-fill-color: var(--orbit-weather-sky, #4a8ec4);
}

:is(
    .orbit-stat-value--weather,
    .orbit-pwa-standalone-weather,
    .orbit-weather-now,
    .orbit-weather-daily,
    .orbit-weather-hourly
) :is(.ti-sun, .ti-sun-high) {
    color: var(--orbit-weather-sun, #e3a008);
    -webkit-text-fill-color: var(--orbit-weather-sun, #e3a008);
}

:is(
    .orbit-stat-value--weather,
    .orbit-weather-now,
    .orbit-pwa-standalone-weather,
    .orbit-weather-daily,
    .orbit-weather-hourly
) .ti-cloud-storm {
    color: var(--orbit-weather-storm, #6b7cb8);
    -webkit-text-fill-color: var(--orbit-weather-storm, #6b7cb8);
}

:is(
    .orbit-stat-value--weather,
    .orbit-pwa-standalone-weather,
    .orbit-weather-now,
    .orbit-weather-daily,
    .orbit-weather-hourly
) .ti-snowflake {
    color: var(--orbit-weather-snow, #5aa8c4);
    -webkit-text-fill-color: var(--orbit-weather-snow, #5aa8c4);
}

:is(
    .orbit-stat-value--weather,
    .orbit-pwa-standalone-weather,
    .orbit-weather-now,
    .orbit-weather-daily,
    .orbit-weather-hourly
) :is(.ti-mist, .ti-wind) {
    color: var(--orbit-weather-haze, #8b95a3);
    -webkit-text-fill-color: var(--orbit-weather-haze, #8b95a3);
}

/* Orbit device/link connection status (Online/Offline, Live/Idle) */
.orbit-status-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    line-height: 1;
}

html[data-bs-theme="light"] .orbit-status-badge--online {
    background-color: color-mix(in srgb, var(--chipr-success-light, #a3cd9a) 72%, #fff) !important;
    color: var(--chipr-success-dark, #466f42) !important;
    border: 1px solid var(--bs-success-border-subtle, rgba(96, 140, 90, 0.22));
}

html[data-bs-theme="dark"] .orbit-status-badge--online {
    background-color: color-mix(in srgb, var(--chipr-success, #608c5a) 18%, transparent) !important;
    color: var(--chipr-success-light, #99C78E) !important;
    border: 1px solid var(--bs-success-border-subtle, rgba(125, 178, 122, 0.24));
}

html[data-bs-theme="light"] .orbit-status-badge--offline {
    background-color: #ececec !important;
    color: #6b6b6b !important;
    border: 1px solid #d8d8d8;
}

html[data-bs-theme="dark"] .orbit-status-badge--offline {
    background-color: #262626 !important;
    color: #a3a3a3 !important;
    border: 1px solid #404040;
}

#main-wrapper .btn-outline-primary {
    color: #608c5a !important;
    border-color: #608c5a !important;
}

#main-wrapper .btn-outline-primary:hover:not(:disabled):not(.disabled),
#main-wrapper .btn-outline-primary:focus-visible:not(:disabled):not(.disabled) {
    background-color: #608c5a !important;
    border-color: #608c5a !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .btn-outline-secondary {
    color: #6b6b6b !important;
    border-color: #d0d0d0 !important;
}

html[data-bs-theme="light"] #main-wrapper .btn-outline-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme="light"] #main-wrapper .btn-outline-secondary:focus-visible:not(:disabled):not(.disabled) {
    background-color: #f5f5f5 !important;
    border-color: #c8c8c8 !important;
    color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .btn-outline-secondary {
    color: #a3a3a3 !important;
    border-color: #404040 !important;
}

html[data-bs-theme="dark"] #main-wrapper .btn-outline-secondary:hover:not(:disabled):not(.disabled),
html[data-bs-theme="dark"] #main-wrapper .btn-outline-secondary:focus-visible:not(:disabled):not(.disabled) {
    background-color: #2a2a2a !important;
    border-color: #525252 !important;
    color: #f5f5f5 !important;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper a:not(.btn):not(.sidebar-link):not(.external-link):not(.url-preview-link) {
    color: #608c5a;
}

html[data-bs-theme="dark"] #main-wrapper .body-wrapper a:not(.btn):not(.sidebar-link):not(.external-link):not(.url-preview-link) {
    color: #608c5a;
}

html[data-bs-theme="light"] #main-wrapper .body-wrapper a:not(.btn):not(.sidebar-link):hover,
html[data-bs-theme="dark"] #main-wrapper .body-wrapper a:not(.btn):not(.sidebar-link):hover {
    color: #528858;
}

[data-bs-theme="dark"] .site-analytics-channel-track {
    background: #2a2a2a;
}

/* Sidebar setup warning badges — beat inactive-link .ti color rules (#main-wrapper specificity) */
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning .ti::before {
    color: #608c5a !important;
    -webkit-text-fill-color: #608c5a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning .ti::before {
    color: #608c5a !important;
    -webkit-text-fill-color: #608c5a !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
    background-color: #608c5a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

@media (hover: hover) {
    html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover,
    html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible,
    html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
    html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
        transform: scale(1.05);
    }
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus .ti::before,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible .ti::before {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible {
    background-color: #608c5a !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

@media (hover: hover) {
    html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover,
    html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible {
        transform: scale(1.05);
    }
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover .ti::before,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus .ti::before,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible .ti::before {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning .ti,
html[data-bs-theme="dark"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning .ti::before {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning .ti,
html[data-bs-theme="light"] #main-wrapper .left-sidebar .sidebar-nav a.sidebar-link.active .sidebar-setup-warning .ti::before {
    background: none !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

/* Mini sidebar collapsed rail — restore full layout on hover expand */
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) {
    overflow-x: hidden;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .brand-logo {
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .brand-logo .logo-img.logo-img-stacked,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .brand-logo a.logo-img {
    width: 100% !important;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: 0;
    overflow: visible !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .brand-logo .logo-full-stack {
    display: none !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .brand-logo .logo-mini-mark {
    display: block !important;
    margin: 0 auto;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-menu-shell .scroll-sidebar,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-bottom-nav {
    padding-left: 10px;
    padding-right: 10px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav ul .sidebar-item {
    display: flex;
    justify-content: center;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav ul .sidebar-item > .sidebar-link {
    display: inline-flex !important;
    width: auto !important;
    max-width: calc(100% - 6px);
    margin: 0 auto;
    justify-content: center;
    padding: 11px 13px !important;
    box-sizing: border-box;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav ul .sidebar-item > .sidebar-link.active {
    padding: 11px 13px !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-link.sidebar-link-with-badge {
    position: relative;
    justify-content: center;
    gap: 0;
    overflow: visible;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
    position: absolute;
    top: 2px;
    right: 2px;
    margin-left: 0;
    padding: var(--og-sidebar-mini-badge-padding) !important;
    z-index: 1;
    transform: none !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
    background: none !important;
    background-color: transparent !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible > .ti,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:hover > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link .sidebar-setup-warning:focus-visible > .ti::before,
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible > .ti::before {
    font-size: var(--og-sidebar-mini-badge-icon-size) !important;
    width: var(--og-sidebar-mini-badge-icon-size) !important;
    height: var(--og-sidebar-mini-badge-icon-size) !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-external-link-marker {
    display: none !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .brand-logo {
    align-items: flex-start;
    padding: 0 24px;
}

/* Theme sets hover z-index:50 — same as our .topbar — and .topbar paints later in the
   DOM, so the menu toggle covers the brand. Raise the slide-out above .topbar (50) and
   .topbar.orbit-account-menu-open (60); match theme/mobile .left-sidebar (99). */
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover {
    z-index: 99;
}

/* Belt-and-suspenders: while the mini rail is expanded, hide the topbar toggler so it
   cannot peek over the brand even if a stacking context traps the sidebar below. */
body[data-sidebartype="mini-sidebar"] #main-wrapper:has(> .left-sidebar:hover) .topbar .nav-item.nav-icon-hover-bg:has(.sidebartoggler) {
    visibility: hidden;
    pointer-events: none;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .brand-logo .logo-img.logo-img-stacked {
    width: auto !important;
    max-width: 220px;
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    align-self: auto;
    margin-top: calc((var(--og-header-height) / 2) - (var(--og-sidebar-logo-lockup-height) / 2) - var(--og-sidebar-logo-nudge-up));
}

/* Beat theme `.hide-menu { display: inline-block }` if reintroduced — keep [grass|text] flex lockup. */
body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .brand-logo .logo-full-stack {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    column-gap: var(--og-sidebar-logo-mark-gap);
    min-width: 0;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .brand-logo .logo-mini-mark {
    display: none !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .brand-logo .logo-wordmark-wrap {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    row-gap: var(--og-sidebar-logo-subtitle-gap);
    min-width: 0;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-menu-shell .scroll-sidebar {
    padding-left: 24px;
    padding-right: 24px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-bottom-nav {
    /* Match expanded .sidebar-bottom-nav side gutter (chip / download strip) */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-nav ul .sidebar-item {
    display: block;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-nav ul .sidebar-item > .sidebar-link {
    display: flex !important;
    width: 100% !important;
    max-width: none;
    margin: 0;
    padding: 11px 15px !important;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-link.sidebar-link-with-badge {
    justify-content: flex-start;
    gap: 0.35rem;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-link.sidebar-link-with-badge .sidebar-setup-warning {
    position: static;
    top: auto;
    right: auto;
    margin-left: auto;
    padding: 0.4375rem;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-link.sidebar-link-with-badge .sidebar-setup-warning > .ti {
    font-size: 14px !important;
    width: 14px;
    height: 14px;
}

body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:hover .sidebar-link.sidebar-link-with-badge .sidebar-external-link-marker {
    display: inline-grid !important;
    position: static;
    top: auto;
    right: auto;
    margin-left: auto;
}

/* Collapsed rail — lock warning badge size (must follow all sidebar badge theme rules) */
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:hover,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:focus,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:focus,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:focus-visible,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning:focus-visible,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: var(--og-sidebar-mini-badge-size) !important;
    height: var(--og-sidebar-mini-badge-size) !important;
    min-width: var(--og-sidebar-mini-badge-size) !important;
    max-width: var(--og-sidebar-mini-badge-size) !important;
    min-height: var(--og-sidebar-mini-badge-size) !important;
    max-height: var(--og-sidebar-mini-badge-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    display: inline-grid !important;
    place-items: center !important;
    flex: none !important;
    box-sizing: border-box !important;
    line-height: 0 !important;
}

html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning {
    background-color: rgba(96, 140, 90, 0.14) !important;
}

html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning:hover,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning:focus-visible,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link:not(.active) .sidebar-setup-warning:focus-visible {
    background-color: #608c5a !important;
}

html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:hover,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav a.sidebar-link.active .sidebar-setup-warning:focus-visible {
    background: none !important;
    background-color: transparent !important;
}

html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning .ti,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning .ti,
html[data-bs-theme="dark"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning .ti::before,
html[data-bs-theme="light"] body[data-sidebartype="mini-sidebar"] #main-wrapper .left-sidebar:not(:hover) .sidebar-nav .sidebar-setup-warning .ti::before {
    font-size: var(--og-sidebar-mini-badge-icon-size) !important;
    width: var(--og-sidebar-mini-badge-icon-size) !important;
    height: var(--og-sidebar-mini-badge-icon-size) !important;
    min-width: var(--og-sidebar-mini-badge-icon-size) !important;
    max-width: var(--og-sidebar-mini-badge-icon-size) !important;
    min-height: var(--og-sidebar-mini-badge-icon-size) !important;
    max-height: var(--og-sidebar-mini-badge-icon-size) !important;
    line-height: 1 !important;
    transform: none !important;
}

/* Mobile / tablet off-canvas sidebar — Modernize xl breakpoint is 1300px */
@media (max-width: 1299.98px) {
    body.sidebar-mobile-open {
        overflow: hidden;
    }

    /* Theme backdrop uses z-index:10; raise so it covers page content under the drawer.
       Adjacent-sibling selector requires .dark-transparent immediately after #main-wrapper.
       Also match body.sidebar-mobile-open so taps still work if markup order drifts. */
    #main-wrapper.show-sidebar + .dark-transparent,
    body.sidebar-mobile-open .dark-transparent.sidebartoggler {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 90;
        cursor: pointer;
        /* Safari iOS: empty overlays often ignore taps without an explicit hit target */
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .left-sidebar.with-vertical {
        z-index: 99;
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: constant(safe-area-inset-bottom);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        box-sizing: border-box;
    }

    .left-sidebar .brand-logo .sidebartoggler-close {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin-top: 0.35rem;
        line-height: 1;
    }

    .sidebar-bottom-nav {
        padding-bottom: max(0.75rem, calc(0.75rem + env(safe-area-inset-bottom, 0px)));
    }
}

/* Run Audit combined workflow */
.run-audit-steps {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.run-audit-step {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

button.run-audit-step-jump {
    display: inline-flex;
    align-items: flex-start;
    align-self: flex-start;
    gap: 0.75rem;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0.15rem 0.2rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: inherit;
    text-align: start;
    font: inherit;
    line-height: inherit;
    cursor: pointer;
}

button.run-audit-step-jump:hover,
button.run-audit-step-jump:active {
    background: transparent;
}

button.run-audit-step-jump:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

button.run-audit-step-jump:disabled {
    cursor: default;
}

.run-audit-step-icon {
    width: 1.5rem;
    /* One title line-box so the icon centers with the label, not the detail subtext */
    height: 1.5em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.run-audit-step-icon .ti {
    font-size: 1.25rem;
    line-height: 1;
}

.run-audit-step-icon .spinner-border {
    width: 1.15rem;
    height: 1.15rem;
    border-width: 0.15em;
}

.run-audit-step-running .fw-semibold {
    color: var(--bs-primary);
}

.run-audit-step-pending .run-audit-step-waiting,
.run-audit-tool-waiting {
    font-style: italic;
}

.run-audit-score-ring {
    width: 4.5rem;
    height: 4.5rem;
}

.run-audit-score-ring .score-ring-value {
    font-size: 1.15rem;
}

/* PageSpeed Insights */
.pagespeed-score-card {
    padding: 0.75rem 0.5rem;
}

.pagespeed-score-card-button {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--bs-border-radius, 0.375rem);
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pagespeed-score-card-button:hover,
.pagespeed-score-card-button:focus-visible {
    border-color: var(--bs-border-color, rgba(0, 0, 0, 0.15));
    background-color: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
    outline: none;
}

.pagespeed-score-card-button:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}

.pagespeed-score-card .score-ring {
    margin-inline: auto;
}

.pagespeed-score-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-body-color);
}

.pagespeed-opportunity-list .list-group-item {
    border-color: var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08));
}

.pagespeed-issue-title {
    font-weight: 600;
    color: var(--bs-body-color) !important;
    line-height: 1.35;
}

.pagespeed-issue-title:hover,
.pagespeed-issue-title:focus-visible {
    color: var(--bs-primary) !important;
}

.pagespeed-learn-more {
    font-size: 0.8125rem;
}

.pagespeed-docs-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pagespeed-docs-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.pagespeed-docs-iframe {
    width: 100%;
    min-height: min(70vh, 640px);
    height: 70vh;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.375rem;
    background: var(--bs-body-bg, #fff);
}

/* Passwordless auth (Modernize auth shell + B-hyve branding) */
.orbit-auth-shell {
    background: var(--bs-body-bg, #0b0f14);
    /* Full-viewport panel so enter/leave can slide over the body background. */
    position: fixed;
    inset: 0;
    z-index: 1060;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.32s ease;
    will-change: transform;
}

.orbit-auth-shell.orbit-auth-shell--open {
    transform: translateX(0);
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .orbit-auth-shell {
        transition-duration: 0.01ms;
    }
}

.orbit-auth-shell .auth-max-width {
    max-width: 420px;
}

.orbit-auth-shell .auth-card {
    border: 1px solid var(--bs-gray-300, #d8d8d8);
    background-color: var(--bs-body-bg, #fff);
}

html[data-bs-theme="dark"] .orbit-auth-shell .auth-card,
[data-bs-theme="dark"] .orbit-auth-shell .auth-card {
    border-color: var(--bs-light-border-subtle, #333333);
    background-color: var(--bs-secondary-bg, #111111);
}

.orbit-auth-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    color: var(--bs-secondary-color, #8a8a8a);
    background: transparent;
    line-height: 1;
}

.orbit-auth-back-btn:hover,
.orbit-auth-back-btn:focus-visible {
    color: var(--bs-body-color, #e8e8e8);
}

.orbit-auth-back-btn i {
    font-size: 1.25rem;
    line-height: 1;
}

/* Center the brand block on the page; Orbit + CONTROLLER stay left-aligned in the text column. */
.orbit-auth-shell .brand-logo {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    margin-inline: auto;
    justify-content: center;
}

.orbit-auth-shell .brand-logo .logo-img,
.orbit-auth-shell .brand-logo .logo-img.logo-img-stacked {
    width: auto !important;
    max-width: 220px;
    height: auto !important;
    overflow: visible;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-top: 0;
    transform: none !important;
    line-height: 1;
    text-decoration: none;
}

.orbit-auth-shell .brand-logo .logo-full-stack {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
}

.orbit-auth-shell .brand-logo .logo-wordmark-wrap {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-end;
    row-gap: var(--og-sidebar-logo-subtitle-gap);
    min-width: 0;
}

.orbit-auth-channel-toggle {
    display: flex;
    width: 100%;
}

.orbit-auth-channel-toggle .btn {
    flex: 1 1 0;
}

/* OTP: one input + CSS 6-slot background (paste / autofill / auto-submit unchanged).
   Transparent field; slots painted with repeating gradients. Orange caret from audit-form-control. */
.orbit-otp-field {
    --otp-slots: 6;
    --otp-gap: 0.5rem;
    --otp-slot: 2.85rem;
    --otp-height: 3.25rem;
    --otp-slot-bg: #fff;
    --otp-slot-border: #d0d0d0;
    width: min(100%, calc(var(--otp-slots) * var(--otp-slot) + (var(--otp-slots) - 1) * var(--otp-gap)));
    margin-inline: auto;
}

[data-bs-theme="dark"] .orbit-otp-field {
    --otp-slot-bg: #141414;
    --otp-slot-border: #2a2a2a;
}

.form-control.audit-form-control.orbit-otp-input {
    display: block;
    width: 100%;
    height: var(--otp-height);
    /* Center each digit in its slot: left pad = (slot - 1ch) / 2; spacing = remaining slot + gap. */
    padding: 0 0 0 calc((var(--otp-slot) - 1ch) / 2) !important;
    font-size: 1.35rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
    letter-spacing: calc(var(--otp-slot) - 1ch + var(--otp-gap));
    line-height: var(--otp-height);
    text-align: left;
    border: none !important;
    border-radius: 7px;
    box-shadow: none !important;
    background-color: transparent !important;
    /* Layers: side borders | top edge | bottom edge | slot fills */
    background-image:
        repeating-linear-gradient(
            90deg,
            var(--otp-slot-border) 0,
            var(--otp-slot-border) 1px,
            transparent 1px,
            transparent calc(var(--otp-slot) - 1px),
            var(--otp-slot-border) calc(var(--otp-slot) - 1px),
            var(--otp-slot-border) var(--otp-slot),
            transparent var(--otp-slot),
            transparent calc(var(--otp-slot) + var(--otp-gap))
        ),
        repeating-linear-gradient(
            90deg,
            var(--otp-slot-border) 0,
            var(--otp-slot-border) var(--otp-slot),
            transparent var(--otp-slot),
            transparent calc(var(--otp-slot) + var(--otp-gap))
        ),
        repeating-linear-gradient(
            90deg,
            var(--otp-slot-border) 0,
            var(--otp-slot-border) var(--otp-slot),
            transparent var(--otp-slot),
            transparent calc(var(--otp-slot) + var(--otp-gap))
        ),
        repeating-linear-gradient(
            90deg,
            var(--otp-slot-bg) 0,
            var(--otp-slot-bg) var(--otp-slot),
            transparent var(--otp-slot),
            transparent calc(var(--otp-slot) + var(--otp-gap))
        ) !important;
    background-size:
        100% calc(100% - 2px),
        100% 1px,
        100% 1px,
        100% 100% !important;
    background-position:
        0 1px,
        0 0,
        0 100%,
        0 0 !important;
    background-repeat: no-repeat, repeat-x, repeat-x, no-repeat !important;
}

html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input:active:not(:disabled),
[data-bs-theme="light"] .form-control.audit-form-control.orbit-otp-input:focus,
[data-bs-theme="light"] .form-control.audit-form-control.orbit-otp-input:focus-visible,
[data-bs-theme="light"] .form-control.audit-form-control.orbit-otp-input:active:not(:disabled),
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control.orbit-otp-input:focus,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control.orbit-otp-input:focus-visible,
:root:not([data-bs-theme="dark"]) .form-control.audit-form-control.orbit-otp-input:active:not(:disabled),
[data-bs-theme="dark"] .form-control.audit-form-control.orbit-otp-input:focus,
[data-bs-theme="dark"] .form-control.audit-form-control.orbit-otp-input:focus-visible,
[data-bs-theme="dark"] .form-control.audit-form-control.orbit-otp-input:active:not(:disabled) {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0;
}

/* Orange slot borders + outer glow on focus (same token as audit-form-control). */
.form-control.audit-form-control.orbit-otp-input:focus,
.form-control.audit-form-control.orbit-otp-input:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.orbit-otp-input:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.orbit-otp-input:focus-visible {
    --otp-slot-border: #608c5a;
    box-shadow: 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
}

/* OTP resend cooldown: Bootstrap .btn:disabled opacity (0.65) washes link gray
   (#a3a3a3 dark / #4a4a4a light) into near-invisible text on auth backgrounds.
   Match secondary / text-muted tokens instead. */
.orbit-auth-shell .btn-link.orbit-otp-resend:disabled,
.orbit-auth-shell .btn-link.orbit-otp-resend.disabled {
    opacity: 1;
    color: var(--bs-secondary-color, #6b6b6b);
    -webkit-text-fill-color: var(--bs-secondary-color, #6b6b6b);
    text-decoration: none;
}

html[data-bs-theme="light"] .orbit-auth-shell .btn-link.orbit-otp-resend:disabled,
html[data-bs-theme="light"] .orbit-auth-shell .btn-link.orbit-otp-resend.disabled,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .btn-link.orbit-otp-resend:disabled,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .btn-link.orbit-otp-resend.disabled {
    color: #6b6b6b;
    -webkit-text-fill-color: #6b6b6b;
}

html[data-bs-theme="dark"] .orbit-auth-shell .btn-link.orbit-otp-resend:disabled,
html[data-bs-theme="dark"] .orbit-auth-shell .btn-link.orbit-otp-resend.disabled {
    color: #8a8a8a;
    -webkit-text-fill-color: #8a8a8a;
}

.orbit-topbar-end {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.topbar .orbit-user-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.topbar .orbit-user-menu > .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    line-height: 1;
    padding: 0 0.15rem 0 0;
    color: inherit;
}

.topbar .orbit-user-menu > .nav-link:hover,
.topbar .orbit-user-menu > .nav-link:focus-visible,
.topbar .orbit-user-menu.show > .nav-link {
    color: var(--bs-primary);
}

/* Modernize opens topbar dropdowns on :hover — account menu is click/tap only. */
.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-user-menu:hover > .dropdown-menu {
    display: none;
}

.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-user-menu.show > .dropdown-menu,
.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-user-menu > .dropdown-menu.show {
    display: block;
}

/* Notifications bell (Modernize content-dd + Chipr topbar patterns) */
.topbar .orbit-notify-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar .orbit-notify-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
}

.topbar .orbit-notify-toggle .ti {
    font-size: 1.25rem;
    line-height: 1;
}

.topbar .orbit-notify-badge.popup-badge {
    top: 2px;
    right: 2px;
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .topbar .orbit-notify-badge.popup-badge {
        top: 2px;
        right: 2px;
    }
}

.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-notify-menu:hover > .dropdown-menu {
    display: none;
}

.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-notify-menu.show > .dropdown-menu,
.topbar .navbar .navbar-nav .nav-item.dropdown.orbit-notify-menu > .dropdown-menu.show {
    display: block;
}

.orbit-notify-dropdown {
    width: min(360px, calc(100vw - 1.5rem));
    padding: 0;
    margin-top: 0.35rem !important;
    overflow: hidden;
}

.orbit-notify-dropdown-header {
    padding: 0.85rem 1.1rem 0.5rem;
    border-bottom: 1px solid rgba(var(--bs-body-color-rgb), 0.08);
}

.orbit-notify-dropdown-header .btn-link {
    font-size: 0.8125rem;
    font-weight: 600;
}

.orbit-notify-empty {
    padding: 1.75rem 1.25rem;
    font-size: 0.875rem;
}

.orbit-notify-body.message-body {
    max-height: min(360px, 55vh);
    overflow-y: auto;
    padding: 0.35rem 0;
}

.orbit-notify-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.1rem;
    white-space: normal;
    text-align: left;
    border: 0;
    background: transparent;
}

.orbit-notify-item--unread {
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
}

.orbit-notify-item-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    font-size: 1.05rem;
    line-height: 1;
}

.orbit-notify-item-icon--danger {
    color: var(--bs-danger);
    background: color-mix(in srgb, var(--bs-danger) 16%, transparent);
}

.orbit-notify-item-icon--warning {
    color: var(--bs-warning);
    background: color-mix(in srgb, var(--bs-warning) 18%, transparent);
}

.orbit-notify-item-icon--info {
    color: var(--bs-info);
    background: color-mix(in srgb, var(--bs-info) 16%, transparent);
}

.orbit-notify-item-icon--muted {
    color: var(--bs-secondary-color, var(--bs-muted));
    background: rgba(var(--bs-body-color-rgb), 0.08);
}

.orbit-notify-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.orbit-notify-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.orbit-notify-item-msg {
    line-height: 1.35;
}

.orbit-notify-item-kind {
    color: color-mix(in srgb, var(--bs-body-color) 55%, transparent);
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Raise topbar above the dismiss catcher so avatar + menu stay interactive. */
.topbar.orbit-account-menu-open {
    z-index: 60;
}

.orbit-account-menu-backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 55;
    background: transparent;
    cursor: default;
    /* Safari iOS: empty overlays often ignore taps without an explicit hit target */
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.orbit-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--bs-primary) 18%, transparent);
    color: var(--bs-primary);
    border: 1px solid color-mix(in srgb, var(--bs-primary) 35%, transparent);
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
}

.orbit-user-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
}

.orbit-user-initials {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.orbit-user-gravatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Dropdown item highlight — muted Orbit yellow (beat Modernize blue-gray hover/active). */
html[data-bs-theme="light"] .dropdown-item:hover,
html[data-bs-theme="light"] .dropdown-item:focus,
:root:not([data-bs-theme="dark"]) .dropdown-item:hover,
:root:not([data-bs-theme="dark"]) .dropdown-item:focus {
    color: var(--chipr-dropdown-highlight-color);
    background-color: var(--chipr-dropdown-highlight-bg);
}

html[data-bs-theme="light"] .dropdown-item.active,
html[data-bs-theme="light"] .dropdown-item:active,
:root:not([data-bs-theme="dark"]) .dropdown-item.active,
:root:not([data-bs-theme="dark"]) .dropdown-item:active {
    color: var(--chipr-dropdown-highlight-active-color);
    background-color: var(--chipr-dropdown-highlight-active-bg);
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
    color: var(--chipr-dropdown-highlight-color);
    background-color: var(--chipr-dropdown-highlight-bg);
}

html[data-bs-theme="dark"] .dropdown-item.active,
html[data-bs-theme="dark"] .dropdown-item:active {
    color: var(--chipr-dropdown-highlight-active-color);
    background-color: var(--chipr-dropdown-highlight-active-bg);
}

/*
 * Dropdown section headers (optgroup-style: "Run now", "Set delay", etc.).
 * Modernize hardcodes --bs-dropdown-header-color:#2a3547 on .dropdown-menu,
 * which is unreadable on Chipr dark surfaces. Timer play/delay menus also
 * portal to body and escape html[data-bs-theme] #main-wrapper h6 !important.
 * Use Settings-like muted type (--bs-secondary-color) in both themes.
 */
.dropdown-menu,
.dropdown-menu.orbit-timer-action-menu--portal,
body > .dropdown-menu {
    --bs-dropdown-header-color: var(--bs-secondary-color, var(--bs-muted, #6b6b6b));
}

html[data-bs-theme="light"] .dropdown-menu,
:root:not([data-bs-theme="dark"]) .dropdown-menu {
    --bs-dropdown-header-color: var(--bs-secondary-color, #6b6b6b);
}

html[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"].dropdown-menu {
    --bs-dropdown-header-color: var(--bs-secondary-color, #8a8a8a);
}

.dropdown-header,
.dropdown-menu .dropdown-header,
h6.dropdown-header,
.orbit-timer-action-menu .dropdown-header,
body > .dropdown-menu .dropdown-header,
html[data-bs-theme="light"] #main-wrapper .dropdown-menu h6.dropdown-header,
html[data-bs-theme="dark"] #main-wrapper .dropdown-menu h6.dropdown-header,
html[data-bs-theme="light"] #main-wrapper h6.dropdown-header,
html[data-bs-theme="dark"] #main-wrapper h6.dropdown-header {
    color: var(--bs-dropdown-header-color, var(--bs-secondary-color, var(--bs-muted))) !important;
    -webkit-text-fill-color: var(--bs-dropdown-header-color, var(--bs-secondary-color, var(--bs-muted))) !important;
}

/* Native <select> groups (Map sprinkler catalog by brand). */
.form-select optgroup,
select optgroup {
    color: var(--bs-secondary-color, var(--bs-muted, #6b6b6b));
    background-color: var(--bs-body-bg, var(--bs-secondary-bg));
    font-weight: 600;
}

.orbit-profile-dropdown {
    width: min(280px, calc(100vw - 1.5rem));
    padding: 0;
    margin-top: 0.35rem !important;
    overflow: hidden;
}

.orbit-profile-dropdown-header {
    padding: 0.85rem 1.1rem 0.35rem;
}

.orbit-profile-dropdown-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem 1rem;
}

.orbit-profile-dropdown-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.orbit-profile-dropdown-body {
    padding: 0.65rem 0.75rem 0.85rem;
}

.orbit-profile-dropdown .dropdown-item {
    border-radius: 0.45rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.orbit-profile-dropdown .dropdown-item .ti {
    color: #608c5a;
}

.orbit-profile-dropdown .dropdown-item:active .ti,
.orbit-profile-dropdown .dropdown-item.active .ti {
    color: var(--chipr-dropdown-highlight-active-color);
}

[data-bs-theme="dark"] .orbit-user-avatar {
    background: color-mix(in srgb, var(--bs-primary) 22%, #1a1a1a);
    border-color: color-mix(in srgb, var(--bs-primary) 45%, transparent);
}

/* Sign out on the account chip — keep button chrome reset (styles come from .sidebar-account-chip-action) */
#main-wrapper .left-sidebar .sidebar-nav button.sidebar-account-chip-action.sidebar-logout-button {
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}

/* Phones: reclaim main-content width — tighter page gutters + card padding (not topbar/sidebar) */
@media (max-width: 767.98px) {
    :root {
        --og-page-gutter-x: 0.5rem;
    }

    /* Theme default: .page-wrapper .body-wrapper > .container-fluid { padding: 0 24px } */
    #main-wrapper .page-wrapper .body-wrapper > .container-fluid {
        padding-left: var(--og-page-gutter-x);
        padding-right: var(--og-page-gutter-x);
        padding-bottom: var(--og-page-gutter-x);
        --bs-gutter-x: var(--og-page-gutter-x);
    }

    /* Theme default card spacer: 30px */
    #main-wrapper .body-wrapper .card {
        --bs-card-spacer-y: 0.5rem;
        --bs-card-spacer-x: 0.5rem;
        --bs-card-cap-padding-y: 0.5rem;
        --bs-card-cap-padding-x: 0.5rem;
    }

    #main-wrapper .body-wrapper .card.mb-4 {
        margin-bottom: 0.65rem !important;
    }

    /* Page headers use Bootstrap utilities that bypass card spacer vars */
    #main-wrapper .body-wrapper .card > .card-body.px-4 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    #main-wrapper .body-wrapper .card > .card-body.py-3 {
        padding-top: 0.625rem !important;
        padding-bottom: 0.625rem !important;
    }

    /* Tighten common form/card grid gaps without shrinking control hit targets */
    #main-wrapper .body-wrapper .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    #main-wrapper .body-wrapper .row.g-4 {
        --bs-gutter-x: 0.65rem;
        --bs-gutter-y: 0.65rem;
    }
}

/* ==========================================================================
   Auth shell focus kill-switch — beat Modernize .form-control:focus
   (background-color: transparent + border #aec3ff + blue rgba(93,135,255) ring)
   and dark resting #202936. Must stay last so cascade wins over styles.css.
   ========================================================================== */
html[data-bs-theme="light"] .orbit-auth-shell .form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:active,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-select:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:active,
html[data-bs-theme="light"] .orbit-auth-shell .form-select:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:active,
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.audit-form-control:active,
html[data-bs-theme="light"] .orbit-auth-shell .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:active,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:active:not(:disabled),
[data-bs-theme="light"] .orbit-auth-shell .form-control:focus,
[data-bs-theme="light"] .orbit-auth-shell .form-control:focus-visible,
[data-bs-theme="light"] .orbit-auth-shell .form-control:active,
[data-bs-theme="light"] .orbit-auth-shell .form-control:active:not(:disabled),
[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:focus,
[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:active,
[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:focus,
[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:active,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-control:focus,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-control:focus-visible,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-control:active,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-control:active:not(:disabled),
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .audit-form-control:focus,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .audit-form-control:active,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-floating > .form-control:focus,
:root:not([data-bs-theme="dark"]) .orbit-auth-shell .form-floating > .form-control:active {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-color: #608c5a !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    outline: 0 !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    caret-color: #608c5a;
}

html[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:active,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:active,
html[data-bs-theme="dark"] .orbit-auth-shell .form-select:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:active,
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:active,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control.audit-form-control:active:not(:disabled),
[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus,
[data-bs-theme="dark"] .orbit-auth-shell .form-control:focus-visible,
[data-bs-theme="dark"] .orbit-auth-shell .form-control:active,
[data-bs-theme="dark"] .orbit-auth-shell .form-control:active:not(:disabled),
[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:focus,
[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:active,
[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:focus,
[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:active {
    background: #141414 !important;
    background-color: #141414 !important;
    border-color: #608c5a !important;
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    outline: 0 !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    caret-color: #608c5a;
}

/* Audit history: one horizontal row per run (tool · URL · when · actions) */
.audit-history-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem 1rem;
    width: 100%;
    min-width: 0;
}

.audit-history-tool {
    flex: 0 0 auto;
}

.audit-history-site {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.audit-history-when {
    flex: 0 0 auto;
}

.audit-history-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.audit-history-actions .audit-history-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    white-space: nowrap;
}

.audit-history-actions .audit-history-action-btn .ti {
    margin: 0;
    line-height: 1;
}

@media (max-width: 575.98px) {
    .audit-history-row {
        flex-wrap: wrap;
    }

    .audit-history-site {
        flex: 1 1 100%;
        order: 3;
        width: 100%;
    }

    .audit-history-when {
        margin-left: auto;
    }

    .audit-history-actions {
        width: 100%;
        order: 4;
    }
}

/* Autofill can paint a blue/yellow wash that survives normal background rules */
html[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill:hover,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill:active,
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:-webkit-autofill,
html[data-bs-theme="light"] .orbit-auth-shell .audit-form-control:-webkit-autofill:focus,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:-webkit-autofill,
html[data-bs-theme="light"] .orbit-auth-shell .form-floating > .form-control:-webkit-autofill:focus,
[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill,
[data-bs-theme="light"] .orbit-auth-shell .form-control:-webkit-autofill:focus {
    /* Match dark field surfaces used on auth inputs (not white wash + black text). */
    -webkit-text-fill-color: #f5f5f5 !important;
    caret-color: #608c5a;
    border-color: #608c5a !important;
    box-shadow: 0 0 0 1000px #1a1a1a inset, 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    transition: background-color 99999s ease-out 0s;
}

html[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill:hover,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill:active,
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:-webkit-autofill,
html[data-bs-theme="dark"] .orbit-auth-shell .audit-form-control:-webkit-autofill:focus,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:-webkit-autofill,
html[data-bs-theme="dark"] .orbit-auth-shell .form-floating > .form-control:-webkit-autofill:focus,
[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill,
[data-bs-theme="dark"] .orbit-auth-shell .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #f5f5f5 !important;
    caret-color: #608c5a;
    border-color: #608c5a !important;
    box-shadow: 0 0 0 1000px #141414 inset, 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    transition: background-color 99999s ease-out 0s;
}

/* ==========================================================================
   Email report modal focus kill-switch — keep form-floating; beat Modernize:
   - .form-control:focus → bg transparent, border #aec3ff, ring rgba(93,135,255,.25)
   - input:focus → border #aec3ff + blue ring
   - [data-bs-theme=dark] .form-control:focus → border #5d87ff !important
   Match auth-shell / other B-hyve floating inputs (#608c5a). Stay last in file.
   ========================================================================== */
.site-analytics-email-modal,
.run-audit-email-modal {
    --bs-primary: #608c5a;
    --bs-primary-rgb: 96, 140, 90;
    --bs-focus-ring-color: rgba(96, 140, 90, 0.25);
}

.site-analytics-email-modal .form-control,
.site-analytics-email-modal .form-control.audit-form-control,
.site-analytics-email-modal .audit-form-control,
.site-analytics-email-modal .form-floating > .form-control,
.site-analytics-email-modal .form-floating > .form-control.audit-form-control,
.site-analytics-email-modal input.form-control,
.run-audit-email-modal .form-control,
.run-audit-email-modal .form-control.audit-form-control,
.run-audit-email-modal .audit-form-control,
.run-audit-email-modal .form-floating > .form-control,
.run-audit-email-modal .form-floating > .form-control.audit-form-control,
.run-audit-email-modal input.form-control {
    caret-color: #608c5a;
}

html[data-bs-theme="light"] .site-analytics-email-modal .form-control,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control.audit-form-control,
html[data-bs-theme="light"] .site-analytics-email-modal .audit-form-control,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control,
html[data-bs-theme="light"] .site-analytics-email-modal input.form-control,
html[data-bs-theme="light"] .run-audit-email-modal .form-control,
html[data-bs-theme="light"] .run-audit-email-modal .form-control.audit-form-control,
html[data-bs-theme="light"] .run-audit-email-modal .audit-form-control,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control.audit-form-control,
html[data-bs-theme="light"] .run-audit-email-modal input.form-control,
[data-bs-theme="light"] .site-analytics-email-modal .form-control,
[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control,
[data-bs-theme="light"] .run-audit-email-modal .form-control,
[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-control,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > .form-control,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-control,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > .form-control {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-color: #d0d0d0 !important;
}

html[data-bs-theme="dark"] .site-analytics-email-modal .form-control,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control.audit-form-control,
html[data-bs-theme="dark"] .site-analytics-email-modal .audit-form-control,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control,
html[data-bs-theme="dark"] .site-analytics-email-modal input.form-control,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control.audit-form-control,
html[data-bs-theme="dark"] .run-audit-email-modal .audit-form-control,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control.audit-form-control,
html[data-bs-theme="dark"] .run-audit-email-modal input.form-control,
[data-bs-theme="dark"] .site-analytics-email-modal .form-control,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control,
[data-bs-theme="dark"] .run-audit-email-modal .form-control,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control {
    color: #f5f5f5 !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    background: #141414 !important;
    background-color: #141414 !important;
    border-color: #2a2a2a !important;
}

/* Light focus/active — beat .form-control:focus + input:focus blue ring/#aec3ff */
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:active:not(:disabled),
html[data-bs-theme="light"] .site-analytics-email-modal .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control.audit-form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .site-analytics-email-modal .audit-form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .audit-form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal .audit-form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal .audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .site-analytics-email-modal input.form-control:focus,
html[data-bs-theme="light"] .site-analytics-email-modal input.form-control:focus-visible,
html[data-bs-theme="light"] .site-analytics-email-modal input.form-control:active,
html[data-bs-theme="light"] .site-analytics-email-modal input.form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal .form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal .form-control.audit-form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal .audit-form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal .audit-form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal .audit-form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal .audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="light"] .run-audit-email-modal input.form-control:focus,
html[data-bs-theme="light"] .run-audit-email-modal input.form-control:focus-visible,
html[data-bs-theme="light"] .run-audit-email-modal input.form-control:active,
html[data-bs-theme="light"] .run-audit-email-modal input.form-control:active:not(:disabled),
[data-bs-theme="light"] .site-analytics-email-modal .form-control:focus,
[data-bs-theme="light"] .site-analytics-email-modal .form-control:focus-visible,
[data-bs-theme="light"] .site-analytics-email-modal .form-control:active,
[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:focus,
[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:active,
[data-bs-theme="light"] .site-analytics-email-modal input.form-control:focus,
[data-bs-theme="light"] .run-audit-email-modal .form-control:focus,
[data-bs-theme="light"] .run-audit-email-modal .form-control:focus-visible,
[data-bs-theme="light"] .run-audit-email-modal .form-control:active,
[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:focus,
[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:active,
[data-bs-theme="light"] .run-audit-email-modal input.form-control:focus,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-control:focus,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-control:focus-visible,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-control:active,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > .form-control:focus,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > .form-control:active,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal input.form-control:focus,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-control:focus,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-control:focus-visible,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-control:active,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > .form-control:focus,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > .form-control:active,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal input.form-control:focus {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    background: #fff !important;
    background-color: #1a1a1a !important;
    border-color: #608c5a !important;
    outline: 0 !important;
    outline-color: transparent !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    caret-color: #608c5a !important;
}

/* Dark focus/active — beat [data-bs-theme=dark] .form-control:focus { border #5d87ff !important } */
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .site-analytics-email-modal .audit-form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .audit-form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal .audit-form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal .audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .site-analytics-email-modal input.form-control:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal input.form-control:focus-visible,
html[data-bs-theme="dark"] .site-analytics-email-modal input.form-control:active,
html[data-bs-theme="dark"] .site-analytics-email-modal input.form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal .audit-form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .audit-form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal .audit-form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal .audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control.audit-form-control:active:not(:disabled),
html[data-bs-theme="dark"] .run-audit-email-modal input.form-control:focus,
html[data-bs-theme="dark"] .run-audit-email-modal input.form-control:focus-visible,
html[data-bs-theme="dark"] .run-audit-email-modal input.form-control:active,
html[data-bs-theme="dark"] .run-audit-email-modal input.form-control:active:not(:disabled),
[data-bs-theme="dark"] .site-analytics-email-modal .form-control:focus,
[data-bs-theme="dark"] .site-analytics-email-modal .form-control:focus-visible,
[data-bs-theme="dark"] .site-analytics-email-modal .form-control:active,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:focus,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:active,
[data-bs-theme="dark"] .site-analytics-email-modal input.form-control:focus,
[data-bs-theme="dark"] .run-audit-email-modal .form-control:focus,
[data-bs-theme="dark"] .run-audit-email-modal .form-control:focus-visible,
[data-bs-theme="dark"] .run-audit-email-modal .form-control:active,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:focus,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:active,
[data-bs-theme="dark"] .run-audit-email-modal input.form-control:focus {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    background: #141414 !important;
    background-color: #141414 !important;
    border-color: #608c5a !important;
    outline: 0 !important;
    outline-color: transparent !important;
    box-shadow: var(--bs-box-shadow-inset), 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    caret-color: #608c5a !important;
}

/* Floating label — resting + :focus/~ floated (prevent primary/blue wash) */
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > label,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > label,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:focus ~ label,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:-webkit-autofill ~ label,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:focus ~ label,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:-webkit-autofill ~ label,
[data-bs-theme="light"] .site-analytics-email-modal .form-floating > label,
[data-bs-theme="light"] .run-audit-email-modal .form-floating > label,
[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:focus ~ label,
[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:focus ~ label,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > label,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > label,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > .form-control:focus ~ label,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > .form-control:focus ~ label {
    color: #5a6a85 !important;
}

html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > label,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > label,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:focus ~ label,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:-webkit-autofill ~ label,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:focus ~ label,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:not(:placeholder-shown) ~ label,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:-webkit-autofill ~ label,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > label,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > label,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:focus ~ label,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:focus ~ label {
    color: #8a8a8a !important;
}

html[data-bs-theme="light"] .site-analytics-email-modal .form-floating > .form-control:disabled,
html[data-bs-theme="light"] .run-audit-email-modal .form-floating > .form-control:disabled,
:root:not([data-bs-theme="dark"]) .site-analytics-email-modal .form-floating > .form-control:disabled,
:root:not([data-bs-theme="dark"]) .run-audit-email-modal .form-floating > .form-control:disabled {
    background: var(--bs-secondary-bg) !important;
    background-color: var(--bs-secondary-bg) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--bs-secondary-color) !important;
    -webkit-text-fill-color: var(--bs-secondary-color) !important;
}

html[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:disabled,
html[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:disabled,
[data-bs-theme="dark"] .site-analytics-email-modal .form-floating > .form-control:disabled,
[data-bs-theme="dark"] .run-audit-email-modal .form-floating > .form-control:disabled {
    background: #1f1f1f !important;
    background-color: #1f1f1f !important;
    border-color: #2a2a2a !important;
    color: #8a8a8a !important;
    -webkit-text-fill-color: #8a8a8a !important;
}

/* Autofill focus can reintroduce blue wash / ring */
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:-webkit-autofill,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:-webkit-autofill:hover,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:-webkit-autofill:focus,
html[data-bs-theme="light"] .site-analytics-email-modal .form-control:-webkit-autofill:active,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:-webkit-autofill,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:-webkit-autofill:hover,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:-webkit-autofill:focus,
html[data-bs-theme="light"] .run-audit-email-modal .form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #1a1a1a !important;
    caret-color: #608c5a !important;
    border-color: #608c5a !important;
    box-shadow: 0 0 0 1000px #fff inset, 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    transition: background-color 99999s ease-out 0s;
}

html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:-webkit-autofill,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:-webkit-autofill:hover,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:-webkit-autofill:focus,
html[data-bs-theme="dark"] .site-analytics-email-modal .form-control:-webkit-autofill:active,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:-webkit-autofill,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:-webkit-autofill:hover,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:-webkit-autofill:focus,
html[data-bs-theme="dark"] .run-audit-email-modal .form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #1a1a1a !important;
    caret-color: #608c5a !important;
    border-color: #608c5a !important;
    box-shadow: 0 0 0 1000px #141414 inset, 0 0 0 0.25rem rgba(96, 140, 90, 0.25) !important;
    transition: background-color 99999s ease-out 0s;
}

/* Timer dashboard — battery level indicator */
.orbit-battery {
    line-height: 1;
}

.orbit-battery .ti {
    font-size: 1.15em;
    flex-shrink: 0;
}

/* Timer dashboard — zone indicator (pairs with battery treatment) */
.orbit-zone {
    line-height: 1;
    flex-shrink: 0;
}

.orbit-zone .ti {
    font-size: 1.15em;
    flex-shrink: 0;
}

.orbit-zone-row {
    min-width: 0;
}

.orbit-zone-label {
    font-size: 0.875rem;
    line-height: 1.2;
    max-width: 12rem;
}

.btn.orbit-zone-change,
.btn.orbit-timer-edit {
    --bs-btn-font-size: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.orbit-zone-change {
    flex-shrink: 0;
}

.orbit-zone--empty {
    color: var(--bs-secondary-color, #6b6b6b);
}

.orbit-zone--assigned {
    color: var(--bs-primary, #5d87ff);
}

/* Timer dashboard — zone & alias slideout (reuses url-preview chrome) */
.orbit-zone-panel.url-preview-panel {
    width: min(24rem, 100vw);
    min-width: min(20rem, 100vw);
    max-width: 100vw;
}

.orbit-weather-panel.url-preview-panel {
    width: min(28rem, 100vw);
    min-width: min(20rem, 100vw);
    max-width: 100vw;
}

.orbit-weather-panel-body {
    padding: 1rem;
}

.orbit-weather-now {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.orbit-weather-now__icon {
    font-size: 2rem;
    line-height: 1;
}

.orbit-weather-now__temp {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.orbit-weather-advice {
    padding: 0.85rem 0.95rem;
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
}

.orbit-weather-advice__pct {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.orbit-weather-meter {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(var(--bs-body-color-rgb), 0.12);
    overflow: hidden;
}

.orbit-stat-row .orbit-weather-meter {
    align-self: stretch;
    margin-top: 0.15rem;
}

.orbit-weather-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--bs-primary, #3F8F52);
}

.orbit-weather-advice--Hold .orbit-weather-meter > span,
.orbit-weather-advice--WaitForRain .orbit-weather-meter > span,
.orbit-weather-advice--RainYesterday .orbit-weather-meter > span,
.orbit-weather-advice--RecentRain .orbit-weather-meter > span {
    background: #5a8fbf;
}

.orbit-weather-advice--WaitForDelay .orbit-weather-meter > span {
    background: #d97706;
}

.orbit-weather-advice--WaterSoon .orbit-weather-meter > span,
.orbit-weather-advice--WaterNow .orbit-weather-meter > span {
    background: var(--bs-primary, #3F8F52);
}

.orbit-weather-resume-list,
.orbit-weather-daily {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.orbit-weather-resume-list li,
.orbit-weather-daily li {
    display: grid;
    gap: 0.15rem 0.65rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--bs-border-color, #dfe5ef);
}

.orbit-weather-resume-list li:last-child,
.orbit-weather-daily li:last-child {
    border-bottom: 0;
}

.orbit-weather-daily li {
    grid-template-columns: 4.25rem 1.25rem 4.25rem minmax(0, 1fr);
    align-items: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0.4rem;
}

.orbit-weather-daily__icon {
    justify-self: center;
}

.orbit-weather-daily__temps {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.orbit-weather-daily li.is-today {
    font-weight: 600;
    border-bottom-color: transparent;
    background: color-mix(in srgb, var(--bs-primary, #608c5a) 14%, transparent);
}

html[data-bs-theme="dark"] .orbit-weather-daily li.is-today {
    background: color-mix(in srgb, var(--bs-primary, #608c5a) 20%, transparent);
}

.orbit-weather-daily li.is-past {
    opacity: 0.78;
}

.orbit-weather-hourly {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
}

.orbit-weather-hourly__item {
    flex: 0 0 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    text-align: center;
}

.orbit-weather-hourly__item .ti {
    font-size: 1.1rem;
}

.orbit-weather-hourly__temp {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.orbit-weather-hourly__rain,
.orbit-weather-hourly__time {
    color: var(--bs-secondary-color, #5a6a85);
}

.orbit-zone-panel .url-preview-body {
    padding: 1rem;
}

.orbit-zone-panel-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
}

.orbit-zone-panel-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.orbit-zone-panel-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--bs-border-color, #dfe5ef);
    border-radius: 0.5rem;
}

.orbit-zone-panel-list-item.is-selected {
    border-color: var(--bs-primary, #5d87ff);
    background: color-mix(in srgb, var(--bs-primary, #5d87ff) 8%, transparent);
}

.orbit-timer-panel-tabs {
    width: 100%;
}

.orbit-timer-panel-tabs .btn {
    flex: 1 1 0;
}

.orbit-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.orbit-history-item {
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--bs-border-color, #eaeff4);
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 94%, var(--bs-secondary-bg, #f6f9fc));
}

.orbit-history-status {
    text-transform: capitalize;
    font-weight: 500;
    background: color-mix(in srgb, var(--bs-secondary-bg, #f6f9fc) 80%, transparent);
    color: var(--bs-secondary-color, #6b6b6b);
}

.orbit-zone-swatch {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.orbit-battery--good {
    color: var(--chipr-success-hover, #528858);
}

.orbit-battery--warn {
    color: #ca8a04;
}

.orbit-battery--low {
    color: #ea580c;
}

.orbit-battery--critical {
    color: var(--chipr-fault, #dc2626);
}

.orbit-battery--unknown {
    color: var(--bs-secondary-color, #6b6b6b);
}

[data-bs-theme="dark"] .orbit-battery--good {
    color: var(--chipr-success-medium, #7DB27A);
}

[data-bs-theme="dark"] .orbit-battery--warn {
    color: #eab308;
}

[data-bs-theme="dark"] .orbit-battery--low {
    color: #fb923c;
}

[data-bs-theme="dark"] .orbit-battery--critical {
    color: var(--chipr-fault, #f87171);
}

/* Schedules week calendar */
.schedules-view-toggle {
    width: auto;
}

.schedules-view-toggle .btn {
    min-width: 5.5rem;
}

.schedules-week-card {
    overflow: hidden;
}

.schedules-week-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - var(--og-topbar-offset, 71px) - 11rem);
    -webkit-overflow-scrolling: touch;
}

.schedules-week {
    --week-hours: 12;
    --week-hour-height: 5rem;
    --week-time-col: 3.25rem;
    --week-min-day-width: 7.25rem;
    display: grid;
    grid-template-columns: var(--week-time-col) repeat(7, minmax(var(--week-min-day-width), 1fr));
    grid-template-rows: auto minmax(calc(var(--week-hours) * var(--week-hour-height)), auto);
    min-width: calc(var(--week-time-col) + 7 * var(--week-min-day-width));
    border-top: 1px solid var(--bs-border-color, #eaeff4);
    position: relative;
}

.schedules-week-corner {
    grid-column: 1;
    grid-row: 1;
    border-bottom: 1px solid var(--bs-border-color, #eaeff4);
    border-right: 1px solid var(--bs-border-color, #eaeff4);
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 92%, var(--bs-secondary-bg, #f6f9fc));
}

.schedules-week-dayhead {
    grid-row: 1;
    padding: 0.55rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--bs-border-color, #eaeff4);
    border-right: 1px solid var(--bs-border-color, #eaeff4);
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 92%, var(--bs-secondary-bg, #f6f9fc));
}

.schedules-week-dayhead.is-today,
.schedules-week-daycol.is-today {
    background: color-mix(in srgb, #608c5a 10%, var(--bs-body-bg, #fff));
}

.schedules-week-dayabbr {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6b6b6b);
}

.schedules-week-daydate {
    margin-top: 0.15rem;
    font-size: 0.68rem;
    color: var(--bs-secondary-color, #6b6b6b);
}

.schedules-week-dayhead.is-today .schedules-week-dayabbr {
    color: var(--bs-body-color, #1a1a1a);
}

.schedules-week-dayhead.is-today .schedules-week-daydate {
    color: var(--bs-body-color, #1a1a1a);
}

.schedules-week-block--history {
    --history-accent: var(--chipr-success-hover, #528858);
    border-color: color-mix(in srgb, var(--history-accent) 55%, var(--bs-border-color, #d0d0d0));
    background: color-mix(in srgb, var(--history-accent) 18%, var(--bs-body-bg, #fff));
}

.schedules-history-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    font-size: 0.78rem;
    color: var(--bs-secondary-color, #6b6b6b);
}

.schedules-history-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.schedules-history-swatch {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.2rem;
    display: inline-block;
}

.schedules-week-times {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    border-right: 1px solid var(--bs-border-color, #eaeff4);
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 96%, var(--bs-secondary-bg, #f6f9fc));
}

.schedules-week-timelabel {
    height: var(--week-hour-height);
    padding: 0.15rem 0.35rem 0 0;
    text-align: right;
    font-size: 0.68rem;
    line-height: 1;
    color: var(--bs-secondary-color, #6b6b6b);
    transform: translateY(-0.35rem);
}

.schedules-week-timelabel:first-child {
    transform: none;
    padding-top: 0.25rem;
}

.schedules-create-panel .schedules-create-option {
    width: 100%;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.schedules-create-panel .schedules-create-option:disabled,
.schedules-create-panel .schedules-create-option.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.schedules-create-panel .schedules-create-option.is-conflict:not(.is-selected) {
    border-color: color-mix(in srgb, #b45309 45%, var(--bs-border-color, #dfe5ef));
}

.schedules-week-daycol {
    grid-row: 2;
    position: relative;
    border-right: 1px solid var(--bs-border-color, #eaeff4);
    height: calc(var(--week-hours) * var(--week-hour-height));
    min-height: calc(var(--week-hours) * var(--week-hour-height));
    cursor: cell;
}

.schedules-week-daycol:hover {
    background: color-mix(in srgb, var(--bs-primary, #5d87ff) 4%, transparent);
}

html.schedules-week-dragging .schedules-week-daycol {
    cursor: move;
}

html.schedules-week-resizing .schedules-week-daycol {
    cursor: ns-resize;
}

html.schedules-week-dragging .schedules-week-daycol:hover,
html.schedules-week-resizing .schedules-week-daycol:hover {
    background: transparent;
}

.schedules-week-hourline {
    height: var(--week-hour-height);
    border-bottom: 1px solid color-mix(in srgb, var(--bs-border-color, #eaeff4) 70%, transparent);
}

.schedules-week-now-rail {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    pointer-events: none;
    z-index: 3;
}

.schedules-week-now {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--now-pct);
    transform: translateY(-50%);
    height: 0;
}

.schedules-week-now-line {
    display: block;
    margin-left: var(--week-time-col);
    height: 2px;
    background: var(--chipr-brand-accent, #608c5a);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--chipr-brand-accent, #608c5a) 22%, transparent);
}

.schedules-week-now-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: var(--week-time-col);
    height: 0;
}

.schedules-week-now-dot {
    position: absolute;
    right: -0.28rem;
    top: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--chipr-brand-accent, #608c5a);
    transform: translateY(-50%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bs-body-bg, #fff) 85%, transparent);
}

.schedules-week-now-label {
    position: absolute;
    right: 0.06rem;
    top: 0;
    transform: translateY(calc(-100% - 0.35rem));
    text-align: right;
    font-size: 0.62rem;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: var(--chipr-brand-accent, #608c5a);
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 88%, transparent);
    padding: 0.08rem 0.04rem 0.08rem 0.14rem;
    border-radius: 0.2rem;
}

.schedules-week-block {
    position: absolute;
    left: 0.2rem;
    right: 0.2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 0;
    max-height: var(--block-size, none);
    height: var(--block-size, auto);
    padding: 0.32rem 0.35rem 0.24rem;
    border-radius: 0.35rem;
    border: 1px solid color-mix(in srgb, #608c5a 55%, var(--bs-border-color, #d0d0d0));
    background: color-mix(in srgb, #608c5a 22%, var(--bs-body-bg, #fff));
    color: var(--bs-body-color, #1a1a1a);
    box-shadow: 0 1px 0 color-mix(in srgb, #000 6%, transparent);
    font-size: 0.72rem;
    line-height: 1.25;
}

.schedules-week-block.is-draggable {
    cursor: move;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.schedules-week-resize {
    position: absolute;
    left: 0;
    right: 0;
    height: 0.55rem;
    z-index: 2;
    cursor: ns-resize;
    touch-action: none;
}

.schedules-week-resize--top {
    top: 0;
}

.schedules-week-resize--bottom {
    bottom: 0;
}

.schedules-week-resize::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    height: 2px;
    border-radius: 1px;
    background: color-mix(in srgb, currentColor 35%, transparent);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.schedules-week-resize--top::after {
    top: 0.14rem;
}

.schedules-week-resize--bottom::after {
    bottom: 0.14rem;
}

.schedules-week-block.is-draggable:hover .schedules-week-resize::after,
.schedules-week-block.is-drag-source .schedules-week-resize::after {
    opacity: 1;
}

.schedules-week-block.is-drag-source {
    opacity: 0.35;
}

.schedules-week-drop {
    position: absolute;
    left: 0.2rem;
    right: 0.2rem;
    z-index: 2;
    box-sizing: border-box;
    pointer-events: none;
    border-radius: 0.35rem;
    border: 2px dashed color-mix(in srgb, #608c5a 75%, var(--bs-border-color, #d0d0d0));
    background: color-mix(in srgb, #608c5a 18%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #608c5a 25%, transparent);
}

.schedules-week-drop.is-invalid {
    border-color: color-mix(in srgb, #b45309 70%, var(--bs-border-color, #d0d0d0));
    background: color-mix(in srgb, #b45309 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #b45309 25%, transparent);
}

.schedules-week-drop-label {
    display: block;
    padding: 0.28rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
    color: color-mix(in srgb, #608c5a 85%, var(--bs-body-color, #1a1a1a));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedules-week-drop.is-invalid .schedules-week-drop-label {
    color: color-mix(in srgb, #b45309 80%, var(--bs-body-color, #1a1a1a));
}

html.schedules-week-dragging,
html.schedules-week-dragging body {
    cursor: move !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

html.schedules-week-resizing,
html.schedules-week-resizing body {
    cursor: ns-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

html.schedules-week-dragging .schedules-week-scroll,
html.schedules-week-resizing .schedules-week-scroll {
    overflow: auto;
}

.schedules-week-block.is-disabled {
    opacity: 0.55;
    border-style: dashed;
    background: color-mix(in srgb, var(--bs-secondary-bg, #f6f9fc) 80%, var(--bs-body-bg, #fff));
}

.schedules-week-block.is-delayed {
    opacity: 0.72;
    border-style: dashed;
    border-color: color-mix(in srgb, #b45309 55%, var(--bs-border-color, #d0d0d0));
    background: color-mix(in srgb, #b45309 16%, var(--bs-body-bg, #fff));
}

.schedules-week-block.is-delayed .schedules-week-block-meta {
    color: color-mix(in srgb, #b45309 70%, var(--bs-secondary-color, #6b6b6b));
}

.schedules-week-block-title {
    font-weight: 650;
    min-height: 0;
    flex-shrink: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedules-week-block-meta {
    color: var(--bs-secondary-color, #6b6b6b);
    min-height: 0;
    flex-shrink: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedules-interval-strip .schedules-interval-list {
    display: grid;
    gap: 0.65rem;
}

.schedules-interval-item {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bs-border-color, #eaeff4);
    border-radius: 0.4rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 94%, var(--bs-secondary-bg, #f6f9fc));
}

.schedules-interval-item > div {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.schedules-interval-item.is-disabled {
    opacity: 0.6;
}

[data-bs-theme="dark"] .schedules-week-block {
    background: color-mix(in srgb, #608c5a 18%, #1a1a1a);
    border-color: color-mix(in srgb, #608c5a 45%, #404040);
}

[data-bs-theme="dark"] .schedules-week-block.is-delayed {
    background: color-mix(in srgb, #b45309 18%, #1a1a1a);
    border-color: color-mix(in srgb, #b45309 45%, #404040);
}

[data-bs-theme="dark"] .schedules-week-drop {
    border-color: color-mix(in srgb, #608c5a 65%, #404040);
    background: color-mix(in srgb, #608c5a 22%, transparent);
}

[data-bs-theme="dark"] .schedules-week-drop.is-invalid {
    border-color: color-mix(in srgb, #b45309 65%, #404040);
    background: color-mix(in srgb, #b45309 18%, transparent);
}

[data-bs-theme="dark"] .schedules-week-block--history {
    background: color-mix(in srgb, var(--history-accent) 22%, #1a1a1a);
    border-color: color-mix(in srgb, var(--history-accent) 45%, #404040);
}

[data-bs-theme="dark"] .schedules-week-dayhead.is-today,
[data-bs-theme="dark"] .schedules-week-daycol.is-today {
    background: color-mix(in srgb, #608c5a 12%, #141414);
}

[data-bs-theme="dark"] .schedules-week-now-label {
    background: color-mix(in srgb, #141414 88%, transparent);
}

[data-bs-theme="dark"] .schedules-week-now-dot {
    box-shadow: 0 0 0 2px color-mix(in srgb, #141414 85%, transparent);
}

@media (max-width: 767.98px) {
    .schedules-week {
        --week-hour-height: 4rem;
        --week-min-day-width: 6.5rem;
        --week-time-col: 2.75rem;
    }

    .schedules-week-block {
        font-size: 0.68rem;
        padding: 0.24rem 0.28rem 0.18rem;
    }
}

/* Timers dashboard grid | list */
.timers-view-toggle {
    width: auto;
}

.timers-view-toggle .btn {
    min-width: 5.5rem;
}

@media (max-width: 767.98px) {
    .timers-view-toggle {
        display: none;
    }
}

.timers-sort-control {
    flex-shrink: 0;
}

.timers-sort-select {
    width: auto;
    min-width: 7rem;
}

.timers-sort-select:focus,
.timers-sort-select:focus-visible {
    border-color: #608c5a;
    box-shadow: 0 0 0 0.25rem rgba(96, 140, 90, 0.25);
}

.orbit-timers-list {
    /* Each row body owns the same grid tracks (not nested subgrid through
       Bootstrap .card — flex column + contain:layout made subgrid collapse).
       Tracks are fr/fixed only so RUNNING vs Idle cannot change column widths. */
    --orbit-timer-row-inset: var(--bs-card-spacer-x, 1.875rem);
    --orbit-timer-col-battery: 4.75rem;
    --orbit-timer-col-actions: 20rem;
    --orbit-timer-row-columns:
        minmax(0, 1.25fr)                 /* identity */
        minmax(0, 0.7fr)                  /* badges / hub */
        minmax(0, 1.15fr)                 /* live / next */
        var(--orbit-timer-col-battery)    /* battery */
        minmax(var(--orbit-timer-col-actions), 1.1fr); /* actions */
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.65rem;
}

/* Timer cards: overflow visible so a non-portaled menu is not display-clipped
   to nothing. Do not use contain:layout — it makes position:fixed relative to
   the card (Popper/JS coords miss the chevron; menu ends up off-screen).
   Run/delay menus still portal to body (see timer-action-menus.js). */
#main-wrapper .body-wrapper .orbit-timer-row.card,
#main-wrapper .body-wrapper .orbit-timer-card {
    overflow: visible;
    contain: none;
    box-shadow: none;
}

/* Timer list/grid borders: color only (precedence running > fault > delay). */
.orbit-timer-row.orbit-timer-border--fault,
.orbit-timer-card.orbit-timer-border--fault {
    --bs-card-border-color: var(--chipr-fault, #dc2626);
    border-color: var(--chipr-fault, #dc2626) !important;
}

.orbit-timer-row.orbit-timer-border--running,
.orbit-timer-card.orbit-timer-border--running {
    --bs-card-border-color: var(--bs-success, #608c5a);
    border-color: var(--bs-success, #608c5a) !important;
}

.orbit-timer-row.orbit-timer-border--delay,
.orbit-timer-card.orbit-timer-border--delay {
    --bs-card-border-color: var(--bs-warning, #ffae1f);
    border-color: var(--bs-warning, #ffae1f) !important;
}

.orbit-timer-row.orbit-timer-border--paused,
.orbit-timer-card.orbit-timer-border--paused {
    --bs-card-border-color: #2563eb;
    border-color: #2563eb !important;
}

.orbit-timer-row.orbit-timer-focus,
.orbit-timer-card.orbit-timer-focus {
    outline: 2px solid var(--bs-primary, #5d87ff);
    outline-offset: 2px;
    animation: orbit-timer-focus-pulse 1.6s ease;
}

@keyframes orbit-timer-focus-pulse {
    from { box-shadow: 0 0 0 0 rgba(93, 135, 255, 0.45); }
    to { box-shadow: 0 0 0 12px rgba(93, 135, 255, 0); }
}

html[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--fault,
[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--fault,
html[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--fault,
[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--fault {
    --bs-card-border-color: var(--chipr-fault, #f87171);
    border-color: var(--chipr-fault, #f87171) !important;
}

html[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--running,
[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--running,
html[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--running,
[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--running {
    --bs-card-border-color: var(--bs-success, #7DB27A);
    border-color: var(--bs-success, #7DB27A) !important;
}

html[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--paused,
[data-bs-theme="dark"] .orbit-timer-row.orbit-timer-border--paused,
html[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--paused,
[data-bs-theme="dark"] .orbit-timer-card.orbit-timer-border--paused {
    --bs-card-border-color: #93c5fd;
    border-color: #93c5fd !important;
}

.orbit-timer-status--running {
    color: var(--bs-success, #608c5a) !important;
}

.orbit-timer-row-status .orbit-timer-status--running {
    font-size: 1.0625rem;
}

html[data-bs-theme="dark"] .orbit-timer-status--running,
[data-bs-theme="dark"] .orbit-timer-status--running {
    color: var(--bs-success, #7DB27A) !important;
}

.orbit-timer-status--paused {
    color: #2563eb !important;
}

html[data-bs-theme="dark"] .orbit-timer-status--paused,
[data-bs-theme="dark"] .orbit-timer-status--paused {
    color: #93c5fd !important;
}

.orbit-timer-row {
    width: 100%;
    margin-bottom: 0;
}

/* Beat Bootstrap .card { display:flex; flex-direction:column } and any
   .card-body padding utilities so list rows stay a single horizontal strip.
   Identical grid-template-columns on every row — not subgrid on .card. */
#main-wrapper .body-wrapper .orbit-timer-row > .card-body.orbit-timer-row-body,
.orbit-timer-row-body {
    display: grid;
    grid-template-columns: var(--orbit-timer-row-columns);
    grid-template-rows: auto;
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 0.45rem;
    width: 100%;
    min-width: 0;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-inline: var(--orbit-timer-row-inset);
}

.orbit-timer-row-identity {
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.2rem;
}

/* Name truncates; status/fault/delay stay on the same line as a unit. */
.orbit-timer-row-title {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.orbit-timer-row-title h5,
.orbit-timer-row-identity h5 {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.orbit-timer-row-model {
    min-width: 0;
}

.orbit-timer-row-identity .orbit-zone-row {
    min-width: 0;
}

.orbit-timer-row-hub:not(:has(*)) {
    /* Keep the badges track even when empty so later columns do not shift. */
    min-height: 0;
}

.orbit-timer-row-hub {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
}

.orbit-timer-row-hub .orbit-rain-delay-status,
.orbit-timer-row-hub .orbit-timer-health-status,
.orbit-timer-row-hub .orbit-low-flow-status {
    max-width: 100%;
}

.orbit-timer-row-status {
    grid-column: 3;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.orbit-timer-row-status > * {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orbit-timer-row-battery {
    grid-column: 4;
    justify-self: start;
    width: var(--orbit-timer-col-battery, 4.75rem);
    min-width: var(--orbit-timer-col-battery, 4.75rem);
    white-space: nowrap;
}

.orbit-timer-card-hub {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.orbit-timer-card .orbit-timer-card-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.orbit-timer-card .orbit-timer-card-actions > * {
    flex-shrink: 0;
}

.orbit-timer-next-schedule {
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

.orbit-timer-row-status .orbit-timer-next-schedule {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.orbit-timer-next-schedule .ti {
    font-size: 0.9em;
    opacity: 0.85;
}

.orbit-timer-row-actions {
    grid-column: 5;
    justify-self: stretch;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    white-space: nowrap;
    min-width: 0;
    margin-left: 0;
}

.orbit-timer-row-actions > * {
    flex-shrink: 0;
}

.orbit-timer-card-actions .orbit-timer-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-width: 2rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.orbit-timer-card-actions .orbit-timer-action-btn--primary {
    min-width: 2.75rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

.orbit-timer-card-actions .orbit-timer-action-label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.orbit-timer-card-actions .orbit-run-group .orbit-timer-action-btn--primary {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.orbit-timer-row-actions .orbit-run-group .orbit-timer-action-btn--primary,
.orbit-timer-row-actions .orbit-stop-btn.orbit-timer-action-btn--primary,
.orbit-timer-row-actions .orbit-delay-group .orbit-timer-action-btn--primary {
    min-width: 3.85rem;
    justify-content: center;
}

.orbit-timer-card-actions .orbit-run-group .orbit-timer-action-btn--split {
    min-width: 1.65rem;
    padding-left: 0.35rem;
    padding-right: 0.4rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.topbar .orbit-up-next-menu {
    position: relative;
    display: flex;
    align-items: center;
    overflow: visible;
}

.topbar .orbit-up-next-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0 0.7rem;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bs-body-color);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.topbar .orbit-up-next-toggle .ti {
    font-size: 1.2rem;
    line-height: 1;
}

.topbar .orbit-up-next-toggle:hover,
.topbar .orbit-up-next-toggle:focus-visible,
.topbar .orbit-up-next-toggle.is-open {
    background: rgba(var(--bs-body-color-rgb), 0.08);
    color: var(--bs-primary, #5d87ff);
}

.topbar .orbit-up-next-badge.popup-badge {
    position: relative;
    top: 0;
    right: 0;
    width: auto;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    background: var(--bs-primary, #608c5a);
    color: var(--brand-accent-on-surface, #2D2D2D);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15rem;
}

.topbar .orbit-up-next-toggle:hover .orbit-up-next-badge,
.topbar .orbit-up-next-toggle:focus-visible .orbit-up-next-badge,
.topbar .orbit-up-next-toggle.is-open .orbit-up-next-badge {
    color: var(--brand-accent-on-surface, #2D2D2D);
}

.topbar:has(.orbit-up-next-toggle.is-open) {
    z-index: 1051;
}

.orbit-up-next-backdrop {
    z-index: 1040;
}

.orbit-up-next-panel.url-preview-panel {
    width: min(22.5rem, 100vw);
    min-width: min(20rem, 100vw);
    max-width: 100vw;
}

.orbit-up-next-body {
    padding: 1rem;
}

.orbit-up-next-empty {
    padding: 1.5rem 0.75rem;
}

.orbit-schedule-next-list {
    list-style: none;
    margin: 0 0 0.85rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    counter-reset: schedule-next;
}

.orbit-schedule-next-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--bs-border-color, #eaeff4);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 94%, var(--bs-secondary-bg, #f6f9fc));
    counter-increment: schedule-next;
}

.orbit-schedule-next-item.is-running {
    border-color: color-mix(in srgb, var(--bs-primary, #5d87ff) 45%, var(--bs-border-color, #eaeff4));
    background: color-mix(in srgb, var(--bs-primary, #5d87ff) 8%, var(--bs-body-bg, #fff));
}

.orbit-schedule-next-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.orbit-schedule-next-item-main .fw-semibold::before {
    content: counter(schedule-next) ". ";
    color: var(--bs-secondary-color, #5a6a85);
    font-weight: 600;
}

.orbit-schedule-next-badge {
    background: var(--bs-primary, #5d87ff);
    color: #fff;
    font-weight: 600;
}

.orbit-schedule-next-item-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

@media (max-width: 767.98px) {
    .topbar .orbit-up-next-toggle-label {
        display: none;
    }

    .topbar .orbit-up-next-toggle {
        width: 40px;
        padding: 0;
        border-radius: 50%;
    }

    .topbar .orbit-up-next-badge.popup-badge {
        position: absolute;
        top: 2px;
        right: 2px;
    }
}

@media (max-width: 575.98px) {
    .orbit-schedule-next-item {
        flex-direction: column;
    }

    .orbit-schedule-next-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.orbit-timer-card-actions .orbit-delay-group .btn,
.orbit-timer-card-actions .orbit-mode-group .btn {
    min-width: 2.1rem;
}

.orbit-rain-delay-status {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: #92400e;
    background-color: rgba(255, 174, 31, 0.14);
    border: 1px solid rgba(255, 174, 31, 0.35);
}

.orbit-rain-delay-status__title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.orbit-rain-delay-status__remaining,
.orbit-rain-delay-status__until {
    display: block;
    white-space: nowrap;
}

html[data-bs-theme="dark"] .orbit-rain-delay-status {
    color: #fcd34d;
    background-color: rgba(255, 174, 31, 0.12);
    border-color: rgba(255, 174, 31, 0.28);
}

.orbit-rain-delay-status--compact {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-width: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.orbit-rain-delay-status--compact .orbit-rain-delay-status__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

button.orbit-rain-delay-status--button {
    appearance: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

button.orbit-rain-delay-status--button:hover,
button.orbit-rain-delay-status--button:focus-visible {
    filter: brightness(0.97);
}

.orbit-timer-health-status {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--chipr-fault, #dc2626);
    background-color: rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.1);
    border: 1px solid rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.35);
}

.orbit-timer-health-status__title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.orbit-timer-health-status__detail {
    display: block;
    white-space: nowrap;
}

html[data-bs-theme="dark"] .orbit-timer-health-status {
    color: var(--chipr-fault, #f87171);
    background-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.12);
    border-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.28);
}

.orbit-low-flow-status {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.32);
}

.orbit-low-flow-status__title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.orbit-low-flow-status__detail {
    display: block;
    white-space: nowrap;
}

html[data-bs-theme="dark"] .orbit-low-flow-status {
    color: #93c5fd;
    background-color: rgba(37, 99, 235, 0.16);
    border-color: rgba(147, 197, 253, 0.28);
}

.orbit-low-flow-status--compact {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

.orbit-low-flow-status--compact .orbit-low-flow-status__text {
    white-space: nowrap;
}

.orbit-timer-health-status--compact {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    min-width: 0;
    font-size: 0.75rem;
    white-space: nowrap;
}

.orbit-timer-health-status--compact .orbit-timer-health-status__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.orbit-timer-card-identity {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    min-width: 0;
}

/* Name left; Online / Offline + delay + Fault stay on the same line as a unit. */
.orbit-timer-card-title {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.orbit-timer-card-title h5 {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.orbit-timer-identity-badges {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    white-space: nowrap;
    border-radius: 0.375rem;
    overflow: hidden;
    flex-shrink: 0;
}

.orbit-timer-identity-badges .orbit-status-badge,
.orbit-timer-identity-badges .orbit-fault-badge,
.orbit-timer-identity-badges .orbit-rain-delay-badge {
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.orbit-timer-identity-badges > .orbit-status-badge:first-child,
.orbit-timer-identity-badges > .orbit-rain-delay-badge:first-child,
.orbit-timer-identity-badges > .orbit-fault-badge:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.orbit-timer-identity-badges > .orbit-status-badge:only-child,
.orbit-timer-identity-badges > .orbit-rain-delay-badge:only-child,
.orbit-timer-identity-badges > .orbit-fault-badge:only-child {
    border-radius: 0.375rem;
}

.orbit-timer-identity-badges > .orbit-status-badge:not(:only-child),
.orbit-timer-identity-badges > .orbit-rain-delay-badge:first-child:not(:only-child),
.orbit-timer-identity-badges > .orbit-fault-badge:first-child:not(:only-child) {
    border-right: none;
}

.orbit-timer-identity-badges > .orbit-rain-delay-badge:not(:last-child):not(:first-child),
.orbit-timer-identity-badges > .orbit-fault-badge:not(:last-child):not(:first-child) {
    border-left: none;
    border-right: none;
}

.orbit-timer-identity-badges > .orbit-fault-badge:last-child:not(:first-child),
.orbit-timer-identity-badges > .orbit-rain-delay-badge:last-child:not(:first-child) {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-left: none;
}

.orbit-timer-identity-badges__divider {
    width: 1px;
    flex-shrink: 0;
    align-self: stretch;
    background-color: rgba(0, 0, 0, 0.18);
}

html[data-bs-theme="dark"] .orbit-timer-identity-badges__divider {
    background-color: rgba(255, 255, 255, 0.2);
}

.orbit-fault-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    background-color: rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.1) !important;
    color: var(--chipr-fault, #dc2626) !important;
    border: 1px solid rgba(var(--chipr-fault-rgb, 220, 38, 38), 0.35);
}

html[data-bs-theme="dark"] .orbit-fault-badge {
    background-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.12) !important;
    color: var(--chipr-fault, #f87171) !important;
    border-color: rgba(var(--chipr-fault-rgb, 248, 113, 113), 0.28);
}

.orbit-rain-delay-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    background-color: rgba(255, 174, 31, 0.18) !important;
    color: #92400e !important;
    border: 1px solid rgba(255, 174, 31, 0.35);
}

button.badge.orbit-rain-delay-badge {
    appearance: none;
    cursor: pointer;
    line-height: inherit;
}

html[data-bs-theme="dark"] .orbit-rain-delay-badge {
    background-color: rgba(255, 174, 31, 0.16) !important;
    color: #fcd34d !important;
    border-color: rgba(255, 174, 31, 0.28);
}

.orbit-timer-card-actions .orbit-delay-group .btn-outline-warning.orbit-timer-action-btn:hover:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-outline-warning.orbit-timer-action-btn:focus-visible:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-outline-warning.orbit-timer-action-btn:active:not(:disabled):not(.disabled) {
    color: #1a1a1a !important;
}

.orbit-timer-card-actions .orbit-delay-group .orbit-timer-action-btn--primary {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--primary,
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--split {
    --bs-btn-color: #1a1a1a;
    --bs-btn-hover-color: #1a1a1a;
    --bs-btn-active-color: #1a1a1a;
    --bs-btn-disabled-color: #1a1a1a;
    color: #1a1a1a !important;
}

.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--primary:hover:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--primary:focus-visible:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--primary:active:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--split:hover:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--split:focus-visible:not(:disabled):not(.disabled),
.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--split:active:not(:disabled):not(.disabled) {
    color: #1a1a1a !important;
}

.orbit-timer-card-actions .orbit-delay-group .btn-warning.orbit-timer-action-btn--split.dropdown-toggle::after {
    border-top-color: #1a1a1a;
}

.orbit-timer-card-actions .orbit-delay-group .orbit-timer-action-btn--split {
    min-width: 1.65rem;
    padding-left: 0.35rem;
    padding-right: 0.4rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.orbit-timer-card-actions .orbit-delay-duration-menu,
.orbit-timer-card-actions .orbit-run-duration-menu,
.orbit-delay-duration-menu.orbit-timer-action-menu--portal,
.orbit-run-duration-menu.orbit-timer-action-menu--portal {
    min-width: max-content;
    white-space: nowrap;
}

/* Portal pin: JS sets top/left with !important (getBoundingClientRect).
   Do not use inset:auto !important — that overrides those coordinates and
   leaves a display:block menu at the static body position (off-screen / 0×0). */
.orbit-timer-action-menu.orbit-timer-action-menu--portal,
body > .orbit-timer-action-menu.orbit-timer-action-menu--portal {
    position: fixed !important;
    z-index: 20050 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    transform: none !important;
}

.orbit-timer-card-actions .orbit-delay-duration-menu .dropdown-item:active,
.orbit-timer-card-actions .orbit-delay-duration-menu .dropdown-item.active {
    background-color: #608c5a;
    color: #1a1a1a;
}

@media (max-width: 1199.98px) {
    .orbit-timers-list {
        --orbit-timer-col-actions: 16rem;
        --orbit-timer-row-columns:
            minmax(0, 1.1fr)
            minmax(0, 0.65fr)
            minmax(0, 1fr)
            var(--orbit-timer-col-battery)
            minmax(var(--orbit-timer-col-actions), 1fr);
    }

    #main-wrapper .body-wrapper .orbit-timer-row > .card-body.orbit-timer-row-body,
    .orbit-timer-row-body {
        align-items: center;
    }

    .orbit-timer-row-actions {
        justify-content: flex-end;
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .orbit-timers-list {
        --orbit-timer-row-columns: minmax(0, 1fr);
    }

    #main-wrapper .body-wrapper .orbit-timer-row > .card-body.orbit-timer-row-body,
    .orbit-timer-row-body {
        align-items: stretch;
        column-gap: 0;
        row-gap: 0.45rem;
    }

    .orbit-timer-row-identity,
    .orbit-timer-row-hub,
    .orbit-timer-row-status,
    .orbit-timer-row-battery,
    .orbit-timer-row-actions {
        grid-column: 1;
        width: 100%;
        max-width: none;
        margin-left: 0;
        justify-self: stretch;
    }

    .orbit-timer-row-battery {
        width: auto;
        min-width: 0;
    }

    .orbit-timer-row-actions {
        justify-content: flex-start;
    }
}

/*
 * Map page: fill remaining main-content height under topbar + body padding.
 * Body pad = --og-topbar-offset + 30px (see .body-wrapper); bottom gutter = --og-page-gutter-x.
 */
.orbit-map-page {
    display: flex;
    flex-direction: column;
    /* Prefer dvh so mobile browser chrome does not leave a short dead zone. */
    height: calc(100vh - var(--og-topbar-offset, 71px) - 30px - var(--og-page-gutter-x, 24px));
    height: calc(100dvh - var(--og-topbar-offset, 71px) - 30px - var(--og-page-gutter-x, 24px));
    min-height: 0;
    max-width: 100%;
}

/* Keep map (arc handles) interactive above the slideout backdrop; panel stays on top (z-index 1050). */
.orbit-map-page.orbit-spray-editing .orbit-map-frame {
    position: relative;
    z-index: 1045;
}

/* Map chrome border — on a frame outside Google Maps DOM so GM focus overlay cannot replace it. */
.orbit-map-frame {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    /* Floor so GM always has a paint box; flex-basis 0 lets the frame claim leftover height. */
    min-height: 240px;
    border: 1px solid var(--bs-card-border-color, var(--bs-gray-300, #d8d8d8));
    border-radius: var(--bs-border-radius, 0.375rem);
    overflow: hidden;
    transition: border-color 0.15s ease-in-out;
}

html[data-bs-theme="dark"] .orbit-map-frame,
[data-bs-theme="dark"] .orbit-map-frame {
    border-color: var(--bs-card-border-color, var(--bs-light-border-subtle, #333333));
}

/* Any mapped device IsWatering — same success green as timer cards / running pins */
.orbit-map-frame.orbit-map-frame--running {
    border-color: var(--bs-success, #608c5a);
}

html[data-bs-theme="dark"] .orbit-map-frame.orbit-map-frame--running,
[data-bs-theme="dark"] .orbit-map-frame.orbit-map-frame--running {
    border-color: var(--bs-success, #7DB27A);
}

/* Google Maps container — fill the flex frame (was fixed 520px). */
.orbit-map {
    flex: 1 1 0;
    width: 100%;
    min-height: 240px;
    position: relative;
    background-color: #e5e3df;
    overflow: hidden;
    border: 0;
    outline: none;
    border-radius: 0;
}

@media (max-width: 767.98px) {
    .orbit-map-frame,
    .orbit-map {
        min-height: 220px;
    }
}

.orbit-map:focus,
.orbit-map:focus-visible {
    outline: none;
}

/*
 * Google Maps paints an accessibility focus ring as an absolutely positioned overlay:
 *   .gm-style > div (after iframe) with inline border: 2px solid rgb(26, 115, 232)
 * That is the bright blue the map always showed — not Bootstrap border-primary.
 */
.orbit-map .gm-style iframe + div {
    border: none !important;
}

/*
 * Block theme/global CSS filters from tinting the map.
 * Intentional basemap grayscale is applied only to .orbit-map-basemap-tiles
 * (tile wrappers and/or canvas/img outside overlay panes — NOT overlayLayer / markerLayer).
 * Child filter:none cannot undo a parent filter; never grayscale a panes ancestor.
 */
.orbit-map .gm-style,
.orbit-map .gm-style > div,
.orbit-map .gm-style canvas,
.orbit-map .gm-style img {
    filter: none !important;
}

/*
 * Must beat the blanket canvas/img filter:none above (higher specificity).
 * Tag the wrapper OR the canvas/img — not both (avoid double desaturation).
 * JS also sets inline filter:grayscale(1)!important on tagged nodes.
 */
.orbit-map.orbit-map--grayscale .orbit-map-basemap-tiles,
.orbit-map.orbit-map--grayscale canvas.orbit-map-basemap-tiles,
.orbit-map.orbit-map--grayscale img.orbit-map-basemap-tiles {
    filter: grayscale(1) !important;
}

.orbit-sprinkler-timer-card--problem {
    border-color: var(--chipr-fault, #dc2626);
}

.orbit-sprinkler-timer-card--watch {
    border-color: var(--bs-warning, #ffae1f);
}

.orbit-sprinkler-timer-card--setup {
    border-color: rgba(37, 99, 235, 0.35);
}

.orbit-sprinkler-status-badge--problem {
    color: #fff;
    background-color: var(--chipr-fault, #dc2626);
}

.orbit-sprinkler-status-badge--watch {
    color: #1f2937;
    background-color: var(--bs-warning, #ffae1f);
}

.orbit-sprinkler-status-badge--setup {
    color: #1d4ed8;
    background-color: rgba(37, 99, 235, 0.12);
}

.orbit-sprinkler-status-badge--ok {
    color: #166534;
    background-color: rgba(22, 163, 74, 0.14);
}

.orbit-sprinkler-finding {
    padding: 0.45rem 0.65rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
}

.orbit-sprinkler-finding--issue {
    background-color: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
}

.orbit-sprinkler-finding--adjustment {
    background-color: rgba(255, 174, 31, 0.12);
    border-color: rgba(255, 174, 31, 0.28);
}

.orbit-sprinkler-finding--setup {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.22);
}

.orbit-yard-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.orbit-yard-status-badge--ok {
    color: #166534;
    background-color: rgba(22, 163, 74, 0.14);
}

.orbit-yard-status-badge--watch {
    color: #1f2937;
    background-color: var(--bs-warning, #ffae1f);
}

.orbit-yard-status-badge--problem {
    color: #fff;
    background-color: var(--chipr-fault, #dc2626);
}

html[data-bs-theme="dark"] .orbit-yard-status-badge--ok {
    color: #86efac;
}

html[data-bs-theme="dark"] .orbit-yard-status-badge--watch {
    color: #1f2937;
}

.url-preview-body .orbit-yard-attention__item:first-child {
    border-top: 0;
}

.orbit-yard-panel {
    overflow: hidden;
}

.orbit-yard-panel__head {
    padding: 1rem 1.15rem 0.7rem;
}

.orbit-yard-empty {
    padding: 0 1.15rem 1.15rem;
    color: var(--bs-secondary-color, #6c757d);
}

.orbit-yard-attention__item {
    border-top: 1px solid var(--bs-border-color, #dfe5ef);
}

.orbit-yard-attention__item.is-expanded {
    background: color-mix(in srgb, var(--bs-primary, #3F8F52) 8%, transparent);
}

.orbit-yard-attention__item--watch.is-expanded {
    background: color-mix(in srgb, var(--bs-warning, #ffae1f) 12%, transparent);
}

.orbit-yard-attention__item--problem.is-expanded {
    background: color-mix(in srgb, var(--chipr-fault, #dc2626) 8%, transparent);
}

.orbit-yard-attention--nested {
    padding: 0 0 0.35rem;
}

.orbit-yard-attention--nested .orbit-yard-attention__item:first-child {
    border-top: 1px solid var(--bs-border-color, #dfe5ef);
}

.orbit-yard-attention--nested .orbit-yard-attention__hit {
    padding-left: 2.15rem;
}

.orbit-yard-attention__hit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1.15rem 0.75rem 1rem;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.orbit-yard-attention__item--problem .orbit-yard-attention__hit {
    border-left-color: var(--chipr-fault, #dc2626);
}

.orbit-yard-attention__item--ok .orbit-yard-attention__hit {
    border-left-color: var(--bs-primary, #3F8F52);
}

.orbit-yard-attention__item--watch .orbit-yard-attention__hit {
    border-left-color: var(--bs-warning, #ffae1f);
}

.orbit-yard-attention__hit--static {
    cursor: default;
}

.orbit-yard-attention__hit--static:hover,
.orbit-yard-attention__hit--static:focus-visible {
    background: transparent;
}

.orbit-yard-action-kind {
    flex-shrink: 0;
    min-width: 3.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color, #6c757d);
}

.orbit-yard-attention__item--problem .orbit-yard-action-kind {
    color: var(--chipr-fault, #dc2626);
}

.orbit-yard-attention__item--ok .orbit-yard-action-kind {
    color: var(--bs-primary, #3F8F52);
}

.orbit-yard-attention__item--watch .orbit-yard-action-kind {
    color: var(--bs-warning, #ffae1f);
}

.orbit-yard-context {
    display: inline-flex;
    margin: 0.35rem 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.orbit-yard-context:hover,
.orbit-yard-context:focus-visible {
    color: var(--bs-primary, #3F8F52);
}

.orbit-yard-context:focus-visible {
    outline: 2px solid var(--bs-primary, #3F8F52);
    outline-offset: 2px;
}

.orbit-yard-attention__hit:hover,
.orbit-yard-attention__hit:focus-visible {
    color: inherit;
    text-decoration: none;
}

.orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):hover,
.orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):focus-visible {
    background: color-mix(in srgb, var(--bs-primary, #3F8F52) 8%, transparent);
}

.orbit-yard-attention__item--watch .orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):hover,
.orbit-yard-attention__item--watch .orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):focus-visible {
    background: color-mix(in srgb, var(--bs-warning, #ffae1f) 12%, transparent);
}

.orbit-yard-attention__item--problem .orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):hover,
.orbit-yard-attention__item--problem .orbit-yard-attention__hit:not(.orbit-yard-attention__hit--static):focus-visible {
    background: color-mix(in srgb, var(--chipr-fault, #dc2626) 8%, transparent);
}

.orbit-yard-attention__hit:focus-visible {
    outline: 2px solid var(--bs-primary, #3F8F52);
    outline-offset: -2px;
}

.orbit-yard-attention__copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.orbit-yard-attention__title {
    font-weight: 600;
    color: var(--bs-emphasis-color, inherit);
}

.orbit-yard-attention__item--ok .orbit-yard-attention__title {
    color: var(--bs-primary, #3F8F52);
}

.orbit-yard-attention__item--watch .orbit-yard-attention__title {
    color: var(--bs-warning, #ffae1f);
}

html[data-bs-theme="light"] .orbit-yard-attention__item--watch .orbit-yard-action-kind,
html[data-bs-theme="light"] .orbit-yard-attention__item--watch .orbit-yard-attention__title {
    color: #b45309;
}

.orbit-yard-attention__item--problem .orbit-yard-attention__title {
    color: var(--chipr-fault, #dc2626);
}

.orbit-yard-attention__detail {
    font-size: 0.9rem;
    color: var(--bs-secondary-color, #6c757d);
}

.orbit-yard-goto {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.7rem 1.15rem;
    border: 0;
    border-top: 1px solid var(--bs-border-color, #dfe5ef);
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.orbit-yard-goto:hover,
.orbit-yard-goto:focus-visible {
    color: inherit;
    text-decoration: none;
    background: color-mix(in srgb, var(--bs-primary, #3F8F52) 6%, transparent);
}

.orbit-yard-goto:focus-visible {
    outline: 2px solid var(--bs-primary, #3F8F52);
    outline-offset: -2px;
}

.orbit-yard-goto__icon {
    font-size: 1.15rem;
    width: 1.25rem;
    text-align: center;
    color: var(--bs-primary, #3F8F52);
    flex-shrink: 0;
}

.orbit-yard-goto__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    flex: 1;
}

.orbit-yard-goto__title {
    font-weight: 600;
}

.orbit-yard-goto__summary {
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #6c757d);
}

.orbit-yard-goto__chevron {
    color: var(--bs-secondary-color, #6c757d);
    flex-shrink: 0;
}

.orbit-yard-status-pip {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    background: #22c55e;
}

.orbit-yard-status-pip--ok {
    background: #22c55e;
}

.orbit-yard-status-pip--watch {
    background: var(--bs-warning, #ffae1f);
}

.orbit-yard-status-pip--problem {
    background: var(--chipr-fault, #dc2626);
}

/* Spray (overlayLayer) + pins (markerLayer) must stay full color. */
.orbit-map .orbit-map-overlay-pane,
.orbit-map .orbit-map-overlay-pane canvas,
.orbit-map .orbit-map-overlay-pane img,
.orbit-map .orbit-map-overlay-pane svg {
    filter: none !important;
}

/* Do not force opacity:1 on all gm-style children — that would un-hide GM's focus overlay. */
.orbit-map .gm-style canvas,
.orbit-map .gm-style img {
    opacity: 1 !important;
}

.orbit-zone-photos {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--bs-border-color, #dfe5ef);
}

.orbit-zone-photos__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.orbit-zone-photos__title {
    font-size: 0.8rem;
    font-weight: 600;
}

.orbit-zone-photos__composer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease;
}

.orbit-zone-photos__composer.is-open {
    grid-template-rows: 1fr;
}

.orbit-zone-photos__composer-inner {
    overflow: hidden;
    min-height: 0;
}

.orbit-zone-photos__composer.is-open .orbit-zone-photos__composer-inner {
    padding-bottom: 0.55rem;
}

.orbit-zone-photos__tag {
    max-width: 16rem;
    margin-bottom: 0.65rem;
}

.orbit-zone-photos__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.orbit-zone-photos__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.orbit-zone-photo-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.35rem;
    background: var(--bs-tertiary-bg, #f3f3f3);
    flex-shrink: 0;
}

.orbit-zone-photo-thumb--loading,
.orbit-zone-photo-thumb--missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color, #6c757d);
}

.orbit-zone-photos__meta {
    min-width: 0;
    flex: 1;
}

.orbit-zone-photos__taken {
    font-size: 0.85rem;
    font-weight: 600;
}

.orbit-sprinkler-timer-card .orbit-zone-photos {
    margin-top: 0.85rem;
}

