:root {
    --bg: #0f172a;
    --bg-shell-start: #09101f;
    --bg-shell-end: #0f172a;
    --bg-radial: rgba(79, 209, 197, 0.14);
    --panel: #111c34;
    --panel-soft: #16233f;
    --panel-strong: #0b1324;
    --sidebar-bg: rgba(9, 16, 31, 0.86);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(79, 209, 197, 0.08);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(79, 209, 197, 0.24);
    --text: #e5eefb;
    --muted: #9fb0cc;
    --accent: #4fd1c5;
    --accent-strong: #14b8a6;
    --danger: #f87171;
    --success: #34d399;
    --warning: #fbbf24;
    --shadow: 0 22px 44px rgba(3, 7, 18, 0.28);
    --shell-sidebar-width: 278px;
    --sidebar-pad-y: 16px;
    --sidebar-pad-x: 14px;
    --content-pad: 20px;
    --hero-padding: 20px;
    --panel-padding: 18px;
    --card-padding: 16px;
    --grid-gap: 14px;
    --section-gap: 18px;
    --nav-gap: 8px;
    --panel-radius: 20px;
    --card-radius: 18px;
    --control-radius: 12px;
    --pill-radius: 999px;
    --nav-pad-y: 10px;
    --nav-pad-x: 12px;
    --control-pad-y: 8px;
    --control-pad-x: 11px;
    --control-height: 40px;
    --table-cell-y: 11px;
    --table-cell-x: 10px;
    --pill-pad-y: 5px;
    --pill-pad-x: 10px;
    --font-size-base: 1rem;
}

@media (max-width: 980px) {
    .module-access-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .module-access-row__levels {
        justify-content: flex-start;
    }
}

html {
    font-size: 15px;
    overflow-x: hidden;
}

html[data-font-size="small"] {
    font-size: 13px;
}

html[data-font-size="medium"] {
    font-size: 15px;
}

html[data-font-size="large"] {
    font-size: 17px;
}

body[data-theme="executive"] {
    --bg-shell-start: #0d1118;
    --bg-shell-end: #151d29;
    --bg-radial: rgba(59, 130, 246, 0.12);
    --panel: #171d29;
    --panel-soft: #1e2635;
    --panel-strong: #121824;
    --sidebar-bg: rgba(13, 17, 24, 0.9);
    --card-bg: rgba(255, 255, 255, 0.025);
    --card-hover: rgba(59, 130, 246, 0.09);
    --border: rgba(148, 163, 184, 0.16);
    --border-strong: rgba(96, 165, 250, 0.26);
    --text: #edf2fb;
    --muted: #9ca9bf;
    --accent: #67e8f9;
    --accent-strong: #38bdf8;
}

body[data-theme="harbor"] {
    --bg-shell-start: #08131d;
    --bg-shell-end: #0f2230;
    --bg-radial: rgba(45, 212, 191, 0.12);
    --panel: #102130;
    --panel-soft: #153043;
    --panel-strong: #0c1a27;
    --sidebar-bg: rgba(8, 19, 29, 0.88);
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(45, 212, 191, 0.09);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(94, 234, 212, 0.28);
    --text: #e8f4fc;
    --muted: #98afbf;
    --accent: #5eead4;
    --accent-strong: #14b8a6;
}

body[data-theme="daylight"] {
    --bg-shell-start: #eef4fb;
    --bg-shell-end: #dfe8f4;
    --bg-radial: rgba(56, 189, 248, 0.10);
    --panel: #ffffff;
    --panel-soft: #f4f8fc;
    --panel-strong: #ebf1f7;
    --sidebar-bg: rgba(255, 255, 255, 0.92);
    --card-bg: rgba(10, 18, 34, 0.03);
    --card-hover: rgba(56, 189, 248, 0.08);
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(14, 165, 233, 0.22);
    --text: #132033;
    --muted: #60728c;
    --accent: #0ea5e9;
    --accent-strong: #0284c7;
    --shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

body[data-density="balanced"] {
    --shell-sidebar-width: 296px;
    --sidebar-pad-y: 18px;
    --sidebar-pad-x: 16px;
    --content-pad: 24px;
    --hero-padding: 24px;
    --panel-padding: 22px;
    --card-padding: 18px;
    --grid-gap: 18px;
    --section-gap: 22px;
    --nav-gap: 10px;
    --panel-radius: 24px;
    --card-radius: 20px;
    --control-radius: 14px;
    --nav-pad-y: 12px;
    --nav-pad-x: 14px;
    --control-pad-y: 10px;
    --control-pad-x: 12px;
    --control-height: 44px;
    --table-cell-y: 14px;
    --table-cell-x: 10px;
}

body[data-density="comfortable"] {
    --shell-sidebar-width: 310px;
    --sidebar-pad-y: 20px;
    --sidebar-pad-x: 18px;
    --content-pad: 28px;
    --hero-padding: 28px;
    --panel-padding: 24px;
    --card-padding: 20px;
    --grid-gap: 20px;
    --section-gap: 24px;
    --nav-gap: 10px;
    --panel-radius: 26px;
    --card-radius: 22px;
    --control-radius: 14px;
    --nav-pad-y: 13px;
    --nav-pad-x: 15px;
    --control-pad-y: 11px;
    --control-pad-x: 13px;
    --control-height: 46px;
    --table-cell-y: 15px;
    --table-cell-x: 11px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top right, var(--bg-radial), transparent 28%),
        linear-gradient(180deg, var(--bg-shell-start) 0%, var(--bg-shell-end) 100%);
    color: var(--text);
    font-size: var(--font-size-base);
    line-height: 1.45;
    overflow-x: hidden;
}

img,
svg,
canvas,
iframe {
    max-width: 100%;
}

.content,
.page-shell,
.page-stack,
.page-main-grid,
.settings-layout,
.settings-sections,
.panel,
.detail-card,
.hero,
.table-wrap,
.table-actions,
.table-inline-form,
.field,
form,
input,
select,
textarea,
button {
    min-width: 0;
    max-width: 100%;
}

textarea {
    resize: vertical;
}

.is-rtl {
    direction: rtl;
}

.is-rtl .hero-actions,
.is-rtl .panel-header,
.is-rtl .sidebar-meta,
.is-rtl .pill-group,
.is-rtl .table-actions,
.is-rtl .bulk-actions,
.is-rtl .sync-actions {
    direction: rtl;
}

.is-rtl .field input,
.is-rtl .field select,
.is-rtl .field textarea,
.is-rtl .muted,
.is-rtl p,
.is-rtl h1,
.is-rtl h2,
.is-rtl h3,
.is-rtl th,
.is-rtl td {
    text-align: right;
}

.is-rtl .sidebar {
    left: auto;
    right: 0;
    transform: translateX(110%);
}

.is-rtl.sidebar-open .sidebar {
    transform: translateX(0);
}

.is-rtl .sidebar-head,
.is-rtl .mobile-topbar,
.is-rtl .mobile-topbar__brand {
    direction: rtl;
}

body.sidebar-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    min-height: 100vh;
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(86vw, var(--shell-sidebar-width));
    padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
    border-right: 1px solid var(--border);
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
    z-index: 30;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
}

body.sidebar-open .sidebar {
    transform: translateX(0);
}

.sidebar-scroll {
    height: calc(100vh - 72px);
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: var(--section-gap);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand-logo {
    display: block;
    width: min(100%, 210px);
    height: auto;
}

.muted,
.lede,
.eyebrow,
.user-card small {
    color: var(--muted);
}

.nav {
    display: grid;
    gap: var(--nav-gap);
}

.sidebar-meta,
.pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: var(--section-gap);
}

.sync-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--section-gap);
}

.sync-actions form {
    margin: 0;
}

.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: var(--section-gap);
}

.bulk-actions input,
.bulk-actions select {
    width: auto;
    min-width: 180px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: var(--pill-pad-y) var(--pill-pad-x);
    border-radius: var(--pill-radius);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid var(--border-strong);
    color: color-mix(in srgb, var(--accent) 70%, var(--text));
    font-size: 0.85rem;
}

.pill-warning {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
    color: #ffedb0;
}

.pill-danger {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

.pill-danger-soft {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.22);
    color: #fecaca;
}

.pill-success {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.28);
    color: #bbf7d0;
}

.user-card {
    display: grid;
    gap: 4px;
    margin-bottom: var(--section-gap);
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
}

.nav a,
.button,
.icon-button,
.mobile-avatar {
    border: 1px solid var(--border);
    background: var(--card-bg);
    transition: 0.2s ease;
    font: inherit;
    color: inherit;
}

.nav a,
.button {
    min-height: var(--control-height);
    padding: var(--nav-pad-y) var(--nav-pad-x);
    border-radius: var(--control-radius);
}

.nav a.is-active {
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

.nav a:hover,
.button:hover,
.icon-button:hover,
.mobile-avatar:hover,
table tbody tr:hover {
    background: var(--card-hover);
}

.icon-button {
    width: var(--control-height);
    height: var(--control-height);
    border-radius: var(--control-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.sidebar-toggle {
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.sidebar-close {
    display: inline-flex;
    position: relative;
}

.sidebar-close span {
    position: absolute;
}

.sidebar-close span:first-child {
    transform: rotate(45deg);
}

.sidebar-close span:last-child {
    transform: rotate(-45deg);
}

.mobile-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 15;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: var(--sidebar-bg);
    backdrop-filter: blur(16px);
}

.mobile-topbar__brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-topbar__logo {
    display: block;
    width: min(40vw, 160px);
    height: auto;
}

.mobile-topbar__page {
    color: var(--muted);
    font-size: 0.92rem;
    white-space: nowrap;
}

.mobile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.62);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 20;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.content {
    padding: var(--content-pad);
    width: 100%;
    min-width: 0;
    max-width: none;
}

.hero,
.panel,
.detail-card,
.auth-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--panel-soft) 98%, transparent));
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    box-shadow: var(--shadow);
}

.hero {
    padding: var(--hero-padding);
    display: flex;
    justify-content: space-between;
    gap: var(--grid-gap);
    align-items: center;
    margin-bottom: var(--section-gap);
}

.hero h1,
.panel h1,
.panel h2,
.auth-card h1 {
    margin: 6px 0 10px;
}

.hero-actions,
.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #04221d;
    border-color: transparent;
}

.button.wide {
    width: 100%;
}

.card-grid,
.detail-grid,
.settings-grid,
.form-grid {
    display: grid;
    gap: var(--grid-gap);
}

.card-grid,
.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: var(--section-gap);
}

.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-wide,
.field-wide {
    grid-column: 1 / -1;
}

.address-autocomplete-field {
    position: relative;
}

.address-autocomplete-field input[data-address-autocomplete-input] {
    padding-right: 40px;
}

.address-autocomplete-field::after {
    content: "MAP";
    position: absolute;
    right: 14px;
    top: 38px;
    color: var(--muted);
    font-size: 0.92rem;
    pointer-events: none;
}

.metric-card {
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--panel-soft);
    border: 1px solid var(--border);
}

.metric-card-link {
    display: block;
    cursor: pointer;
}

.metric-card-link:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, transparent);
    transform: translateY(-1px);
}

.metric-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 10px;
}

.metric-card strong,
.detail-card strong {
    font-size: 1.5rem;
}

.metric-card small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
}

.metric-card-link {
    display: block;
    text-decoration: none;
}

.metric-card-meta-link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    color: var(--accent);
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 600;
}

.metric-card-meta-link::after {
    content: ">";
    margin-left: 6px;
    font-size: 1rem;
    line-height: 1;
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.sync-banner {
    margin-bottom: var(--section-gap);
}

.sync-banner-attention {
    border-color: rgba(251, 191, 36, 0.36);
    box-shadow: 0 24px 60px rgba(251, 191, 36, 0.08);
}

.sync-overview-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: var(--grid-gap);
}

.sync-overview-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    background: var(--card-bg);
    border: 1px solid var(--border);
}

.dashboard-command-center {
    margin-bottom: var(--section-gap);
}

.dashboard-command-grid {
    margin-bottom: 0;
}

.command-card {
    display: grid;
    gap: 12px;
    align-content: start;
}

.command-card .pill-group {
    margin-bottom: 2px;
}

.command-card .hero-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.command-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.command-detail-links a {
    color: var(--accent);
    font-size: 0.88rem;
    font-weight: 600;
}

.command-detail-links a:hover,
.command-detail-links a:focus-visible {
    text-decoration: underline;
}

.sync-overview-card span {
    color: var(--text);
}

.sync-overview-card small {
    color: var(--muted);
}

.panel,
.detail-card,
.auth-card {
    padding: var(--panel-padding);
}

.table-wrap {
    overflow: auto;
    overflow-y: hidden;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-strong) 68%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.table-wrap table.responsive-table-card,
.table-wrap table.responsive-table-has-controls {
    table-layout: fixed;
}

.table-link {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: var(--accent);
    font-weight: 700;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.orders-preview-editor {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.orders-preview-editor__sync {
    align-self: start;
}

.orders-preview-editor__line-list {
    display: grid;
    gap: 10px;
    max-height: min(52vh, 680px);
    overflow: auto;
    padding-right: 4px;
}

.orders-preview-line {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: var(--panel);
    display: grid;
    gap: 10px;
}

.orders-preview-line__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.orders-preview-line__grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
    gap: 10px;
    align-items: start;
}

.orders-preview-line__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.78rem;
    align-items: center;
}

.page-orders .orders-main {
    align-items: start;
}

.page-orders .orders-main > .page-stack {
    min-height: 0;
}

.page-orders #orders-list {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(66vh, 880px);
}

.page-orders #orders-list .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.page-orders #orders-preview {
    max-height: min(66vh, 880px);
    overflow: auto;
}

@media (max-width: 1100px) {
    .orders-preview-line__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-orders #orders-list,
    .page-orders #orders-preview {
        max-height: none;
        overflow: visible;
    }

    .orders-preview-editor__line-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

@media (max-width: 720px) {
    .orders-preview-line__head {
        flex-direction: column;
    }

    .orders-preview-line__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.table-link:hover {
    color: var(--accent);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions .button {
    padding: 8px 12px;
    min-height: 40px;
}

.table-inline-form {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.table-inline-form .button {
    width: 100%;
}

.visit-cadence-suggestion {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: calc(var(--card-radius) - 4px);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.visit-cadence-suggestion__eyebrow {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.visit-cadence-suggestion strong {
    font-size: 0.96rem;
}

.visit-cadence-suggestion small {
    color: var(--muted);
    line-height: 1.35;
}

.table-flag {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px 7px;
    border-radius: var(--pill-radius);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: color-mix(in srgb, var(--accent) 72%, var(--text));
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
}

.customer-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(220px, 280px));
    gap: var(--grid-gap);
    align-items: end;
    margin-bottom: var(--grid-gap);
}

.customer-sort-field {
    min-width: 0;
}

.customer-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.customer-toolbar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.customer-results {
    margin: 0;
}

.customer-search-empty {
    margin-top: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}

table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

th,
td {
    padding: var(--table-cell-y) var(--table-cell-x);
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table tbody tr {
    cursor: pointer;
    transition: 0.2s ease;
}

table tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

table tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
}

table tbody tr.no-hover {
    cursor: default;
}

table tbody tr.no-hover:hover {
    background: transparent;
}

table tbody tr.table-row-link {
    cursor: pointer;
}

table tbody tr.table-row-link:hover {
    background: color-mix(in srgb, var(--accent) 8%, var(--card-bg));
}

.table-filter-stack {
    display: grid;
    gap: 10px;
    min-width: 220px;
}

.table-filter-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.table-filter-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.table-filter-popover {
    position: relative;
}

.table-filter-popover__trigger {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: calc(var(--control-height) - 8px);
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    user-select: none;
}

.table-filter-popover__trigger::-webkit-details-marker {
    display: none;
}

.table-filter-popover__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 8;
    display: grid;
    gap: 6px;
    width: 116px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.table-filter-popover:not([open]) .table-filter-popover__panel {
    display: none;
}

.table-filter-controls select,
.table-filter-controls input {
    min-height: calc(var(--control-height) - 8px);
    font-size: 0.9rem;
}

.product-price-table th:not(:first-child),
.product-price-table td:not(:first-child) {
    text-align: right;
}

.product-price-table td strong {
    font-size: 1rem;
}

.empty-state {
    padding: calc(var(--panel-padding) + 4px);
    border: 1px dashed var(--border);
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--card-bg) 92%, transparent);
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.steps {
    margin: 0 0 20px;
    padding-left: 20px;
    color: var(--text);
    display: grid;
    gap: 10px;
}

.steps li {
    padding-left: 4px;
}

.code-block {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: var(--card-radius);
    background: rgba(8, 15, 30, 0.9);
    border: 1px solid var(--border);
    color: var(--text);
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "Consolas", "SFMono-Regular", monospace;
    font-size: 0.92rem;
}

.diagnostic-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.diagnostic-result p {
    margin: 0 0 10px;
}

.stack-form {
    display: grid;
    gap: var(--grid-gap);
}

.assistant-autocomplete {
    margin-top: 8px;
    display: grid;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    border-radius: var(--card-radius);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    background: rgba(8, 15, 30, 0.96);
    box-shadow: 0 18px 36px rgba(3, 7, 18, 0.24);
}

.assistant-autocomplete[hidden] {
    display: none;
}

.assistant-autocomplete__item {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--control-radius);
    background: var(--card-bg);
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.assistant-autocomplete__item:hover,
.assistant-autocomplete__item.is-active {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.assistant-autocomplete__title {
    font-weight: 700;
}

.assistant-autocomplete__meta {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.assistant-autocomplete__empty {
    padding: 10px 12px;
    border-radius: var(--control-radius);
    background: var(--card-bg);
    color: var(--muted);
    font-size: 0.92rem;
}

.assistant-detail-grid {
    align-items: start;
}

.assistant-selector-grid {
    margin-top: 16px;
    align-items: start;
}

.panel-header--compact {
    margin-bottom: 12px;
}

.receivables-filter-panel {
    display: grid;
    gap: 12px;
}

.receivables-filter-presets,
.active-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.receivables-suburb-search {
    position: relative;
}

.receivables-suburb-search .assistant-autocomplete {
    margin-top: 6px;
}

.pill-filter,
.pill-filter-reset {
    gap: 6px;
    font-weight: 600;
}

.pill-filter span {
    font-size: 0.95em;
    line-height: 1;
}

.pill-filter-reset {
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
    border-color: var(--border);
    color: var(--text);
}

.receivables-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 10px;
    align-items: end;
}

.receivables-filter-form .field {
    margin: 0;
}

.filter-multiselect {
    position: relative;
}

.filter-multiselect summary {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-strong) 84%, transparent);
    color: var(--text);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.filter-multiselect summary::-webkit-details-marker {
    display: none;
}

.filter-multiselect summary::after {
    content: "v";
    margin-left: auto;
    color: var(--muted);
    font-size: 0.76rem;
}

.filter-multiselect.has-selection summary {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
}

.filter-multiselect[open] summary {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.filter-multiselect__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 96%, rgba(7, 14, 24, 0.98));
    box-shadow: var(--shadow);
}

.filter-multiselect__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.filter-multiselect__actions .button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 0.74rem;
}

.filter-multiselect__option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 4px 2px;
    color: var(--text);
}

.filter-multiselect__option input {
    width: 14px;
    height: 14px;
    margin: 0;
}

.filter-multiselect__option span {
    color: inherit;
    font-size: 0.84rem;
    line-height: 1.2;
}

.receivables-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.receivables-filter-actions .button {
    min-width: 90px;
}

.receivables-export-form {
    display: grid;
    gap: 12px;
}

.receivables-export-bar,
.receivables-ledger__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.receivables-export-bar__left,
.receivables-export-bar__right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.assistant-corridor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.assistant-corridor-view-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.assistant-corridor-view-switch .button {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.88rem;
}

.assistant-anchor-field {
    display: grid;
    gap: 8px;
}

.assistant-anchor-mode-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-anchor-mode-switch .button {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.86rem;
}

.assistant-anchor-input-group {
    display: grid;
    gap: 8px;
}

.assistant-anchor-input-group.is-hidden {
    display: none;
}

.assistant-corridor-shell {
    display: grid;
    gap: 10px;
}

.assistant-corridor-list,
.assistant-selected-list {
    display: grid;
    gap: 10px;
}

.assistant-corridor-map-shell {
    display: grid;
    gap: 10px;
}

.assistant-corridor-map-empty[hidden],
.assistant-corridor-map-shell[hidden] {
    display: none;
}

.assistant-corridor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

.assistant-corridor-item.is-selected {
    border-color: color-mix(in srgb, var(--accent) 34%, transparent);
    background: color-mix(in srgb, var(--accent) 10%, var(--panel-soft));
}

.assistant-corridor-item.is-recommended {
    border-color: rgba(239, 68, 68, 0.28);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.18), color-mix(in srgb, var(--panel-soft) 92%, transparent));
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
}

.assistant-corridor-item__main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.assistant-corridor-item__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.assistant-corridor-item__main strong,
.assistant-corridor-item__main span,
.assistant-corridor-item__main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assistant-corridor-item__main span,
.assistant-corridor-item__main small {
    color: var(--muted);
}

.assistant-corridor-item__main small.is-danger {
    color: #fecaca;
    font-weight: 700;
}

.assistant-priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.74rem;
    font-weight: 700;
}

.assistant-corridor-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.assistant-route-map {
    width: 100%;
    min-height: 420px;
    border-radius: var(--card-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
}

.assistant-route-map--compact {
    min-height: 340px;
    border-radius: calc(var(--card-radius) - 2px);
}

.cmg-map-surface {
    position: relative;
    isolation: isolate;
}

.cmg-map-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 12;
    pointer-events: none;
}

.cmg-map-toolbar__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.cmg-map-toolbar__group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.88);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
    pointer-events: auto;
}

.cmg-map-toolbar__group--meta {
    gap: 10px;
    max-width: min(100%, 420px);
}

.cmg-map-toolbar__group--actions {
    justify-content: flex-end;
}

.cmg-map-toolbar__title {
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cmg-map-toolbar__status {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}

.cmg-map-toolbar__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    border: 1px solid rgba(191, 203, 217, 0.95);
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cmg-map-toolbar__button:hover,
.cmg-map-toolbar__button:focus-visible {
    border-color: rgba(14, 116, 144, 0.45);
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
    outline: none;
}

.cmg-map-toolbar__button.is-active {
    border-color: rgba(14, 165, 233, 0.2);
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #082f49;
}

@media (max-width: 820px) {
    .cmg-map-toolbar {
        top: 10px;
        left: 10px;
        right: 10px;
    }

    .cmg-map-toolbar__group {
        width: 100%;
    }

    .cmg-map-toolbar__group--actions {
        justify-content: flex-start;
    }

    .cmg-map-toolbar__button {
        flex: 1 1 auto;
    }
}

.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22) !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}

.assistant-map-card {
    display: grid;
    gap: 10px;
    min-width: 280px;
    max-width: 320px;
    padding: 16px;
    background: #f8fbff;
    color: #0f172a;
}

.assistant-map-card--light {
    background: #f8fbff;
    color: #0f172a;
}

.assistant-map-card__eyebrow {
    display: flex;
    justify-content: flex-start;
}

.assistant-map-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #075985;
    font-size: 0.74rem;
    font-weight: 700;
}

.assistant-map-card__badge--muted {
    background: rgba(148, 163, 184, 0.18);
    color: #334155;
}

.assistant-map-card__badge--danger {
    background: rgba(239, 68, 68, 0.16);
    color: #991b1b;
}

.assistant-map-card__title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
}

.assistant-map-card__meta,
.assistant-map-card__address,
.assistant-map-card__stats {
    color: #334155;
    line-height: 1.45;
}

.assistant-map-card__address {
    font-size: 0.92rem;
}

.assistant-map-card__stats {
    font-size: 0.88rem;
    font-weight: 600;
}

.assistant-map-card__stats.is-danger {
    color: #991b1b;
}

.assistant-map-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-map-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.assistant-map-card__button--link {
    border-color: rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #0f172a;
}

.assistant-map-card__button--primary {
    border-color: rgba(14, 165, 233, 0.22);
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #082f49;
}

.assistant-map-card__button--muted {
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(226, 232, 240, 0.92);
    color: #334155;
}

.assistant-map-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.assistant-map-meta--compact {
    margin-bottom: 6px;
}

.assistant-chat-panel {
    display: grid;
    gap: 16px;
}

.assistant-chat-clear-form {
    align-self: start;
}

.assistant-chat-shell {
    display: grid;
    gap: 16px;
}

.assistant-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.assistant-workspace__primary,
.assistant-workspace__sidebar {
    display: grid;
    gap: 16px;
    align-content: start;
}

.assistant-side-card {
    display: grid;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

.assistant-chat-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.assistant-chat-summary__block {
    display: grid;
    gap: 6px;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.assistant-chat-summary__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.assistant-chat-summary__note {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.assistant-route-requests {
    display: grid;
    gap: 12px;
}

.assistant-route-request-card {
    display: grid;
    gap: 10px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 88%, white);
}

.assistant-route-request-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.assistant-route-request-card__header .muted,
.assistant-route-request-card__body {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.assistant-route-request-card--spotlight {
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
    background: color-mix(in srgb, var(--accent-soft) 28%, var(--panel));
}

.assistant-route-request-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-request-spotlight {
    margin-top: 16px;
}

.assistant-request-spotlight__note {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--border));
    background: color-mix(in srgb, var(--warning) 10%, transparent);
    color: var(--text);
    font-size: 0.86rem;
    line-height: 1.5;
}

.assistant-chat-subheading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 8px;
}

.assistant-rule-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.assistant-learned-rules--compact {
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

.assistant-learned-rules--compact summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.assistant-learned-rules--compact summary::-webkit-details-marker {
    display: none;
}

.assistant-learned-rules--compact[open] summary {
    margin-bottom: 12px;
}

.assistant-rule-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--control-radius);
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.assistant-rule-list strong {
    font-size: 0.92rem;
    line-height: 1.4;
}

.assistant-rule-list span {
    color: var(--muted);
    white-space: nowrap;
    font-size: 0.84rem;
}

.assistant-chat-log {
    max-height: 420px;
    overflow-y: auto;
    display: grid;
    gap: 12px;
    padding-right: 2px;
}

.assistant-chat-log-wrap {
    display: grid;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-bg) 86%, transparent);
}

.assistant-chat-message--pinned {
    margin: 0;
}

.assistant-chat-log-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.assistant-chat-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.assistant-chat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.assistant-chat-message {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
}

.assistant-chat-message-user {
    background: color-mix(in srgb, var(--accent) 11%, transparent);
    border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}

.assistant-chat-message-assistant {
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

.assistant-chat-message-latest {
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent);
}

.assistant-chat-message__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.assistant-chat-message__meta span {
    color: var(--muted);
    font-size: 0.84rem;
}

.assistant-chat-message__body {
    line-height: 1.55;
}

.assistant-chat-form {
    display: grid;
    gap: 12px;
}

.assistant-chat-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.assistant-chat-actions .muted {
    margin: 0;
    max-width: 520px;
}

.empty-state.compact {
    padding: 18px;
}

.panel-subsection {
    display: grid;
    gap: 12px;
}

@media (max-width: 980px) {
    .assistant-chat-summary {
        grid-template-columns: 1fr;
    }

    .assistant-workspace {
        grid-template-columns: 1fr;
    }

    .assistant-chat-log-head {
        display: grid;
    }
}

.checkbox-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.choice-card {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.choice-card input {
    width: auto;
    margin: 0;
}

.choice-card__title {
    color: var(--text);
    font-weight: 700;
}

.choice-card__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.stack-list {
    display: grid;
    gap: 12px;
}

.table-meta-stack {
    display: grid;
    gap: 4px;
}

.pill-accent {
    border-color: rgba(95, 233, 255, 0.32);
    background: rgba(38, 197, 228, 0.12);
    color: var(--text-primary);
}

.list-item {
    display: grid;
    gap: 4px;
    padding: var(--card-padding);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    color: var(--muted);
    font-size: 0.92rem;
}

th input[type="checkbox"],
td input[type="checkbox"] {
    width: 18px;
    height: 18px;
    padding: 0;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    min-height: var(--control-height);
    border-radius: var(--control-radius);
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: var(--panel-strong);
    color: var(--text);
    padding: var(--control-pad-y) var(--control-pad-x);
    width: 100%;
}

textarea {
    min-height: 108px;
    resize: vertical;
}

.flash {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 0.28);
}

.flash-error {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.28);
}

.flash-info {
    background: rgba(79, 209, 197, 0.12);
    border-color: rgba(79, 209, 197, 0.28);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-wrap {
    width: 100%;
    max-width: 540px;
}

.auth-card {
    padding: calc(var(--panel-padding) + 4px);
}

.auth-header {
    margin-bottom: 18px;
    display: grid;
    gap: 10px;
}

.auth-logo {
    display: block;
    width: min(100%, 240px);
    height: auto;
    margin-bottom: 8px;
}

.page-shell {
    display: grid;
    gap: var(--section-gap);
}

.page-shell > section {
    margin: 0;
}

.page-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.92fr);
    gap: var(--section-gap);
    align-items: start;
}

.page-stack {
    display: grid;
    gap: var(--section-gap);
}

.settings-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: var(--section-gap);
    align-items: start;
}

.settings-directory {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 16px;
}

.settings-directory-links {
    display: grid;
    gap: 10px;
}

.settings-directory-links a {
    min-height: var(--control-height);
    display: inline-flex;
    align-items: center;
    padding: 0 var(--nav-pad-x);
    border-radius: var(--control-radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
}

.settings-directory-links a:hover {
    background: var(--card-hover);
    border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.settings-sections {
    display: grid;
    gap: var(--section-gap);
}

.settings-section {
    scroll-margin-top: 90px;
}

.settings-section .panel-header {
    margin-bottom: 16px;
}

.settings-section .panel-header p.muted,
.settings-directory .muted {
    max-width: 42ch;
}

body[data-theme="executive"] .shell {
    grid-template-columns: 248px 1fr;
}

body[data-theme="executive"] .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr);
    align-items: stretch;
}

body[data-theme="executive"] .hero-actions {
    display: grid;
    align-content: center;
    gap: 10px;
    padding-left: 18px;
    border-left: 1px solid var(--border);
}

body[data-theme="executive"] .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

body[data-theme="executive"] .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

body[data-theme="executive"] .panel-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

body[data-theme="executive"] .table-wrap {
    padding: 4px 0 0;
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}

body[data-theme="harbor"] .hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.9fr);
    overflow: hidden;
}

body[data-theme="harbor"] .hero::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.22), transparent 68%);
    pointer-events: none;
}

body[data-theme="harbor"] .hero-actions {
    display: grid;
    gap: 10px;
    align-content: center;
    padding: 14px;
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    border: 1px solid var(--border);
}

body[data-theme="harbor"] .metric-card {
    position: relative;
    overflow: hidden;
}

body[data-theme="harbor"] .metric-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

body[data-theme="harbor"] .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

body[data-theme="harbor"] .table-wrap {
    padding: 6px;
    border-radius: calc(var(--card-radius) + 2px);
    background: color-mix(in srgb, var(--panel-soft) 76%, transparent);
}

body[data-theme="daylight"] .shell {
    grid-template-columns: 258px minmax(0, 1fr);
}

body[data-theme="daylight"] .content {
    width: 100%;
}

body[data-theme="daylight"] .hero {
    display: block;
}

body[data-theme="daylight"] .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 16px;
}

body[data-theme="daylight"] .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

body[data-theme="daylight"] .detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

body[data-theme="daylight"] .panel-header {
    align-items: flex-end;
    margin-bottom: 14px;
}

body[data-theme="daylight"] .table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-soft) 96%, white);
    padding: 4px 0 0;
}

body[data-theme="daylight"] table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: color-mix(in srgb, var(--panel-soft) 96%, white);
}

body[data-theme="executive"] .page-main-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.88fr);
}

body[data-theme="executive"] .settings-layout {
    grid-template-columns: 248px minmax(0, 1fr);
}

body[data-theme="executive"] .panel-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

body[data-theme="executive"] .dashboard-activity {
    grid-template-columns: 1fr;
}

body[data-theme="executive"] .table-wrap {
    padding: 0;
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
}

body[data-theme="executive"] .settings-directory-links a {
    justify-content: space-between;
    font-weight: 600;
}

body[data-theme="harbor"] .page-main-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 1fr);
}

body[data-theme="harbor"] .settings-layout {
    grid-template-columns: 220px minmax(0, 1fr);
}

body[data-theme="harbor"] .customers-main {
    grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
}

body[data-theme="harbor"] .dashboard-activity {
    grid-template-columns: 1fr;
}

body[data-theme="harbor"] .settings-directory-links a {
    border-radius: calc(var(--control-radius) + 4px);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

body[data-theme="harbor"] .receivables-ledger {
    position: relative;
    overflow: hidden;
}

body[data-theme="harbor"] .receivables-ledger::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

body[data-theme="daylight"] .page-main-grid {
    grid-template-columns: 320px minmax(0, 1fr);
}

body[data-theme="daylight"] .settings-layout {
    grid-template-columns: 300px minmax(0, 1fr);
}

body[data-theme="daylight"] .dashboard-main {
    grid-template-columns: 340px minmax(0, 1fr);
}

body[data-theme="daylight"] .dashboard-primary-column {
    order: 2;
}

body[data-theme="daylight"] .dashboard-secondary-column {
    order: 1;
}

body[data-theme="daylight"] .customers-main,
body[data-theme="daylight"] .page-receivables {
    grid-template-columns: 340px minmax(0, 1fr);
}

body[data-theme="daylight"] .settings-directory-links a {
    background: white;
}

body[data-theme="midnight"] .mobile-topbar,
body[data-theme="executive"] .mobile-topbar,
body[data-theme="harbor"] .mobile-topbar,
body[data-theme="daylight"] .mobile-topbar {
    display: flex;
}

.customers-main--wide {
    gap: var(--section-gap);
}

.customers-directory--wide,
.customers-map--secondary {
    width: 100%;
}

.customers-map-canvas {
    width: 100%;
    min-height: 360px;
    border-radius: calc(var(--card-radius) - 2px);
    overflow: hidden;
}

.customers-directory .table-wrap {
    width: 100%;
}

.customers-directory table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

.customers-directory th,
.customers-directory td {
    white-space: normal;
    vertical-align: top;
}

.customers-directory td:nth-child(2),
.customers-directory th:nth-child(2) {
    min-width: 320px;
}

.customers-directory td:nth-child(4),
.customers-directory th:nth-child(4),
.customers-directory td:nth-child(5),
.customers-directory th:nth-child(5),
.customers-directory td:nth-child(6),
.customers-directory th:nth-child(6),
.customers-directory td:nth-child(7),
.customers-directory th:nth-child(7) {
    min-width: 120px;
}

.customers-directory .pill-group {
    margin-top: 8px;
    margin-bottom: 0;
}

.automation-hero,
.customer-automation-workspace,
.dashboard-automation-board {
    position: relative;
    overflow: hidden;
}

.automation-hero::after,
.customer-automation-workspace::after,
.dashboard-automation-board::after {
    content: "";
    position: absolute;
    inset: auto -60px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
    pointer-events: none;
}

.automation-lanes .detail-card,
.dashboard-automation-board .detail-card,
.customer-automation-workspace .detail-card {
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    border-color: color-mix(in srgb, var(--accent) 20%, var(--border));
}

.automation-lane {
    display: grid;
    gap: 12px;
    align-content: start;
}

.automation-lane strong {
    font-size: 1.8rem;
}

.customer-automation-workspace .card-grid {
    margin-bottom: 14px;
}

.customer-automation-workspace .metric-card {
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
}

.dashboard-automation-board .detail-grid,
.automation-lanes {
    margin-bottom: 0;
}

.item-image-preview {
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-strong) 76%, transparent);
    overflow: hidden;
    margin-bottom: 16px;
}

.item-image-preview img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    background: color-mix(in srgb, var(--panel) 94%, transparent);
}

@media (max-width: 1180px) {
    .page-dashboard,
    .page-customers,
    .page-receivables,
    .page-main-grid,
    .settings-layout {
        grid-template-columns: 1fr !important;
    }

    .dashboard-main,
    .customers-main,
    .settings-sections,
    .assistant-detail-grid,
    .item-detail-main,
    .settings-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .settings-directory {
        position: static;
    }
}

@media (max-width: 960px) {
    .sidebar-scroll {
        height: calc(100vh - 64px);
        padding-bottom: 18px;
    }

    .customer-toolbar {
        grid-template-columns: 1fr;
    }

    .customer-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-toolbar-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .mobile-topbar__brand {
        min-width: 0;
    }

    .mobile-topbar__logo,
    .mobile-topbar__page {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .content {
        padding: 16px;
    }

    .hero,
    .panel,
    .detail-card,
    .auth-card {
        border-radius: calc(var(--panel-radius) - 2px);
    }

    .hero,
    .panel-header,
    .list li,
    .sidebar-meta,
    .pill-group,
    .hero-actions,
    .sync-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero {
        padding: calc(var(--hero-padding) - 2px);
    }

    .panel,
    .detail-card,
    .auth-card {
        padding: calc(var(--panel-padding) - 2px);
    }

    .nav a,
    .button {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .table-wrap table.responsive-table-card,
    .table-wrap table.responsive-table-card thead,
    .table-wrap table.responsive-table-card tbody,
    .table-wrap table.responsive-table-card tr,
    .table-wrap table.responsive-table-card th,
    .table-wrap table.responsive-table-card td,
    .table-wrap table.responsive-table-has-controls,
    .table-wrap table.responsive-table-has-controls thead,
    .table-wrap table.responsive-table-has-controls tbody,
    .table-wrap table.responsive-table-has-controls tr,
    .table-wrap table.responsive-table-has-controls th,
    .table-wrap table.responsive-table-has-controls td {
        display: block;
        width: 100%;
    }

    .table-wrap table.responsive-table-card thead {
        display: none;
    }

    .table-wrap table.responsive-table-has-controls thead {
        display: block;
        margin-bottom: 12px;
    }

    .table-wrap table.responsive-table-has-controls thead tr {
        display: grid;
        gap: 12px;
    }

    .table-wrap table.responsive-table-has-controls thead th {
        display: none;
    }

    .table-wrap table.responsive-table-has-controls thead th.has-mobile-control {
        display: block;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .table-wrap table.responsive-table-has-controls .table-filter-stack {
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: var(--card-radius);
        background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
    }

    .table-wrap table.responsive-table-card tbody,
    .table-wrap table.responsive-table-has-controls tbody {
        display: grid;
        gap: 12px;
    }

    .table-wrap table.responsive-table-card tr,
    .table-wrap table.responsive-table-has-controls tbody tr {
        display: block;
        padding: 8px 0;
        border: 1px solid var(--border);
        border-radius: var(--card-radius);
        background: color-mix(in srgb, var(--panel-strong) 72%, transparent);
        overflow: hidden;
    }

    .table-wrap table.responsive-table-card td,
    .table-wrap table.responsive-table-has-controls tbody td {
        display: grid;
        grid-template-columns: minmax(110px, 42%) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        white-space: normal;
    }

    .table-wrap table.responsive-table-card td:last-child,
    .table-wrap table.responsive-table-has-controls tbody td:last-child {
        border-bottom: 0;
    }

    .table-wrap table.responsive-table-card td::before,
    .table-wrap table.responsive-table-has-controls tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        line-height: 1.35;
    }

    .table-wrap table.responsive-table-card td[data-label=""]::before,
    .table-wrap table.responsive-table-has-controls tbody td[data-label=""]::before {
        content: "";
    }

    .table-wrap table.responsive-table-card td > *,
    .table-wrap table.responsive-table-has-controls tbody td > * {
        min-width: 0;
    }

    .table-wrap table.responsive-table-card td .table-actions,
    .table-wrap table.responsive-table-has-controls tbody td .table-actions,
    .table-wrap table.responsive-table-card td .pill-group,
    .table-wrap table.responsive-table-has-controls tbody td .pill-group {
        margin: 0;
    }

    .table-wrap table.responsive-table-card td .button,
    .table-wrap table.responsive-table-has-controls tbody td .button,
    .table-wrap table.responsive-table-card td .field,
    .table-wrap table.responsive-table-has-controls tbody td .field,
    .table-wrap table.responsive-table-card td .table-inline-form,
    .table-wrap table.responsive-table-has-controls tbody td .table-inline-form {
        width: 100%;
    }

    .customers-map-canvas,
    .assistant-route-map {
        min-height: 280px;
    }

    .assistant-corridor-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .assistant-corridor-item__actions {
        width: 100%;
        justify-content: flex-start;
    }

    .receivables-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receivables-filter-actions {
        grid-column: 1 / -1;
    }

    .receivables-export-bar,
    .receivables-ledger__meta {
        flex-direction: column;
        align-items: stretch;
    }

    .assistant-corridor-view-switch,
    .receivables-filter-presets,
    .active-filter-bar {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .table-filter-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 12px;
    }

    .card-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 16px;
    }

    th,
    td {
        padding: 12px 8px;
    }

    .customer-filter-grid {
        grid-template-columns: 1fr;
    }

    .flash {
        margin-bottom: 12px;
    }

    .mobile-topbar__brand {
        gap: 8px;
    }

    .mobile-topbar__page {
        display: none;
    }

    .table-wrap table.responsive-table-card td,
    .table-wrap table.responsive-table-has-controls tbody td {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .table-wrap table.responsive-table-card td::before,
    .table-wrap table.responsive-table-has-controls tbody td::before {
        margin-bottom: 2px;
    }

    .customers-map-canvas,
    .assistant-route-map {
        min-height: 220px;
    }

    .receivables-filter-form {
        grid-template-columns: 1fr;
    }

    .receivables-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .receivables-export-bar__left,
    .receivables-export-bar__right {
        width: 100%;
        justify-content: flex-start;
    }

    .assistant-corridor-view-switch .button,
    .receivables-filter-actions .button {
        width: 100%;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mobile-topbar {
    display: grid;
    grid-template-columns: auto minmax(180px, 240px) minmax(280px, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.mobile-topbar__home {
    display: inline-flex;
    align-items: center;
}

.mobile-topbar__title-group {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.mobile-topbar__title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.mobile-topbar__logo {
    width: min(48vw, 196px);
}

.global-search {
    position: relative;
    min-width: 0;
}

.global-search__field {
    display: block;
}

.global-search__field input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
    color: var(--text);
    font: inherit;
}

.global-search__field input::placeholder {
    color: var(--muted);
}

.global-search__results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 92%, rgba(8, 15, 26, 0.92));
    box-shadow: var(--shadow);
}

.global-search__group {
    display: grid;
    gap: 6px;
}

.global-search__group-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.global-search__item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.global-search__item:hover,
.global-search__item.is-active {
    border-color: var(--border-strong);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.global-search__item-title {
    font-weight: 700;
}

.global-search__item-meta,
.global-search__footer-link,
.global-search__empty {
    color: var(--muted);
    font-size: 0.9rem;
}

.global-search__footer {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.button-compact {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 0.88rem;
}

.statement-shell {
    display: grid;
    gap: 18px;
}

.statement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--panel-radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--panel-soft) 84%, transparent));
}

.statement-toolbar {
    padding: 16px 18px;
}

.statement-toolbar__filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.statement-toolbar__actions {
    display: flex;
    align-items: end;
    gap: 10px;
}

.statement-summary-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(260px, 0.9fr);
    gap: 18px;
}

.statement-summary-card {
    display: grid;
    gap: 12px;
}

.statement-contact-list,
.statement-balance-list {
    display: grid;
    gap: 8px;
}

.statement-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.statement-ledger-panel,
.statement-email-panel {
    min-height: 100%;
}

.statement-email-form {
    display: grid;
    gap: 14px;
}

.statement-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.statement-checkbox input {
    width: auto;
    min-height: 0;
}

.statement-email-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-control-shell {
    display: grid;
    gap: 16px;
}

.assistant-control-header {
    align-items: center;
}

.assistant-control-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-control-form {
    display: grid;
    grid-template-columns: minmax(240px, 360px) auto;
    gap: 14px;
    align-items: end;
}

.assistant-control-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.assistant-control-inline__label {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.route-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.route-pack-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    background: color-mix(in srgb, var(--panel-strong) 74%, transparent);
}

.route-pack-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.route-pack-card__title {
    display: inline-block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
}

.route-pack-card__suburb {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.route-pack-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.route-pack-card__metrics div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 70%, transparent);
}

.route-pack-card__metrics span {
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.route-pack-card__metrics strong {
    font-size: 1rem;
    line-height: 1.2;
}

.route-pack-grid--saved .route-pack-card {
    background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.page-orders-entry {
    display: grid;
    gap: 18px;
}

.workspace-head--compact {
    padding: 14px 16px;
    gap: 12px;
}

.workspace-head--compact .workspace-head__title h1 {
    font-size: clamp(1.35rem, 1.8vw, 1.8rem);
}

.panel-compact {
    padding: 14px 16px;
}

.order-entry-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-card.compact {
    min-height: 0;
    padding: 12px 14px;
}

.order-customer-picker {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}

.order-customer-picker__field {
    position: relative;
}

.order-entry-autocomplete {
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow: auto;
    z-index: 35;
}

.order-entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.95fr);
    gap: 18px;
    align-items: stretch;
}

.order-entry-canvas,
.order-entry-sidebar {
    display: grid;
    gap: 18px;
}

.order-entry-canvas {
    align-self: start;
}

.order-entry-sidebar {
    position: relative;
    align-self: stretch;
    min-height: 100%;
}

.order-entry-canvas .panel,
.order-entry-sidebar .panel {
    min-width: 0;
}

.order-basket-toggle {
    display: none;
}

.order-basket-drawer {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.order-basket-drawer__backdrop,
.order-basket-panel__mobilebar {
    display: none;
}

.order-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.order-product-grid--catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-product-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.order-product-card__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(243,246,250,0.96));
    border: 1px solid color-mix(in srgb, var(--border) 78%, white 22%);
    aspect-ratio: 1.25 / 1;
    padding: 8px 16px;
}

.order-product-card__visual img,
.order-product-card__placeholder {
    width: 100%;
    height: 100%;
}

.order-product-card__visual img {
    display: block;
    object-fit: contain;
    object-position: center;
}

.order-product-card__placeholder {
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--accent) 78%, white 22%);
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,0.18), transparent 34%),
        linear-gradient(140deg, color-mix(in srgb, var(--accent) 42%, #0f172a 58%), color-mix(in srgb, var(--panel) 65%, black 35%));
}

.order-product-card__tag {
    position: absolute;
    left: 10px;
    top: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f8fbff;
    background: rgba(15, 23, 42, 0.76);
    backdrop-filter: blur(10px);
}

.order-product-card__body {
    display: grid;
    gap: 10px;
}

.order-product-card__head h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.order-product-card__head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.order-product-card__meta,
.order-product-card__pricing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.order-product-card__meta span,
.order-product-card__pricing > div {
    padding: 9px 10px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.order-product-card__meta span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.order-product-card__pricing > div {
    display: grid;
    gap: 4px;
}

.order-product-card__pricing span {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-product-card__pricing strong {
    font-size: 0.98rem;
}

.order-product-card__controls {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.92fr) auto;
    gap: 10px;
    align-items: end;
}

.field.compact span {
    font-size: 0.76rem;
    margin-bottom: 6px;
}

.field.compact input {
    min-height: 38px;
}

.order-catalog-search {
    min-width: min(260px, 100%);
}

.order-input-cell {
    min-width: 120px;
}

.order-input-cell input {
    min-width: 100px;
    text-align: right;
}

.order-action-cell {
    width: 1%;
    white-space: nowrap;
}

.order-action-cell .button {
    min-width: 84px;
}

.order-basket-panel {
    position: sticky;
    top: calc(var(--shell-topbar-height, 84px) + 14px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - var(--shell-topbar-height, 84px) - 30px);
    overflow: hidden;
}

.order-sync-panel {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.order-sync-panel__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-sync-panel__message {
    margin: 0;
    min-height: 1.2rem;
}

.order-sync-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-sync-panel.is-offline {
    border-color: color-mix(in srgb, #f59e0b 46%, var(--border) 54%);
    background: color-mix(in srgb, #fff7ed 68%, var(--panel-soft) 32%);
}

.order-sync-panel.is-pending {
    border-color: color-mix(in srgb, #2563eb 44%, var(--border) 56%);
}

.order-sync-panel.is-error {
    border-color: color-mix(in srgb, #ef4444 48%, var(--border) 52%);
}

.order-basket-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 0 6px;
}

.order-basket-summary > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.order-basket-table-wrap {
    flex: 1 1 auto;
    min-height: 180px;
    max-height: none;
    overflow: auto;
}

.order-basket-table input {
    min-width: 88px;
    text-align: right;
}

.order-basket-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: 6px;
}

.order-basket-totals > div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-strong) 76%, transparent);
    border: 1px solid var(--border);
}

.order-basket-totals span {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-orders-detail .orders-main {
    align-items: start;
}

.page-orders-detail .detail-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 1200px) {
    .mobile-topbar {
        grid-template-columns: auto minmax(160px, 220px) minmax(220px, 1fr) auto;
    }
}

@media (max-width: 980px) {
    .mobile-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .global-search {
        grid-column: 1 / -1;
        order: 4;
    }

    .statement-summary-grid,
    .statement-workspace,
    .statement-toolbar__filters,
    .assistant-control-form,
    .order-entry-layout,
    .order-entry-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .mobile-topbar {
        gap: 12px;
    }

    .mobile-topbar__title {
        font-size: 0.92rem;
    }

    .mobile-topbar__page {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .global-search__results {
        left: -12px;
        right: -12px;
    }

    .statement-header {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .statement-toolbar {
        padding: 14px;
    }

    .route-pack-card__head {
        flex-direction: column;
        align-items: stretch;
    }

    .route-pack-card__metrics,
    .order-customer-picker,
    .order-basket-summary,
    .order-basket-totals,
    .order-product-card__meta,
    .order-product-card__pricing,
    .order-product-card__controls {
        grid-template-columns: 1fr;
    }

    .order-input-cell {
        min-width: 0;
    }

    .order-entry-autocomplete {
        left: -4px;
        right: -4px;
    }
}

/* Software shell refresh */

.content {
    display: grid;
    gap: 14px;
}

.app-header {
    display: none;
    position: sticky;
    top: 0;
    z-index: 18;
    gap: 8px;
    padding: 8px 12px 10px;
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.app-header__top,
.app-header__nav,
.app-header__subnav {
    min-width: 0;
}

.app-header__top {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-brand__logo {
    display: block;
    width: min(100%, 110px);
    height: auto;
    flex: 0 0 auto;
}

.app-brand__meta {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.app-brand__meta strong {
    font-size: 0.92rem;
    line-height: 1.1;
}

.app-brand__meta span {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-header__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.app-header__meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
    color: var(--muted);
    font-size: 0.76rem;
}

.app-header__user {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 94%, transparent);
}

.app-header__user-name {
    font-weight: 700;
    line-height: 1.15;
    font-size: 0.88rem;
}

.app-header__user-role {
    color: var(--muted);
    font-size: 0.7rem;
}

.app-header__nav,
.app-header__subnav {
    min-width: 0;
}

.header-nav,
.header-subnav {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.header-nav::-webkit-scrollbar,
.header-subnav::-webkit-scrollbar {
    display: none;
}

.header-nav__link,
.header-subnav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    font-size: 0.9rem;
}

.header-nav__link:hover,
.header-subnav__link:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.header-nav__link.is-active {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 24%, transparent);
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.header-subnav__link {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.82rem;
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
    border-color: color-mix(in srgb, var(--border) 92%, transparent);
}

.header-subnav__link.is-active {
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.sidebar-subnav {
    margin-top: var(--section-gap);
    padding-top: var(--section-gap);
    border-top: 1px solid var(--border);
}

.sidebar-subnav__label {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav--submobile {
    gap: 6px;
}

.nav--submobile a {
    min-height: 42px;
    padding-inline: 14px;
}

.nav--support {
    margin-top: var(--section-gap);
    padding-top: var(--section-gap);
    border-top: 1px solid var(--border);
}

.page-shell {
    display: grid;
    gap: 14px;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 14px 18px;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto 28px -62px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%);
    opacity: 0.8;
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero .eyebrow {
    margin-bottom: 6px;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0 0 4px;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.08;
}

.page-hero .lede {
    margin: 0;
    max-width: 72ch;
    color: var(--muted);
    font-size: 0.92rem;
}

body[data-theme="midnight"] .page-hero .hero-actions,
body[data-theme="executive"] .page-hero .hero-actions,
body[data-theme="harbor"] .page-hero .hero-actions,
body[data-theme="daylight"] .page-hero .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 0;
    border: 0;
    background: transparent;
}

body[data-theme="midnight"] .app-header {
    background:
        linear-gradient(180deg, rgba(13, 19, 34, 0.96), rgba(9, 14, 24, 0.94));
}

body[data-theme="executive"] .app-header {
    background:
        linear-gradient(180deg, rgba(18, 24, 36, 0.98), rgba(16, 21, 31, 0.96));
    border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}

body[data-theme="harbor"] .app-header {
    background:
        linear-gradient(180deg, rgba(11, 24, 35, 0.96), rgba(8, 19, 29, 0.95));
}

body[data-theme="daylight"] .app-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.97));
}

body[data-theme="midnight"] .page-hero {
    background: linear-gradient(180deg, rgba(18, 28, 50, 0.98), rgba(14, 22, 39, 0.96));
}

body[data-theme="executive"] .page-hero {
    background:
        linear-gradient(180deg, rgba(24, 31, 44, 0.98), rgba(19, 25, 36, 0.96));
    border-color: color-mix(in srgb, var(--accent) 14%, var(--border));
}

body[data-theme="harbor"] .page-hero {
    background:
        linear-gradient(180deg, rgba(15, 35, 50, 0.98), rgba(14, 28, 39, 0.96));
}

body[data-theme="daylight"] .page-hero {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 252, 0.96));
}

body[data-theme="midnight"] .metric-card,
body[data-theme="executive"] .metric-card,
body[data-theme="harbor"] .metric-card,
body[data-theme="daylight"] .metric-card {
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body[data-theme="midnight"] .metric-card:hover,
body[data-theme="executive"] .metric-card:hover,
body[data-theme="harbor"] .metric-card:hover,
body[data-theme="daylight"] .metric-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 18%, var(--border));
}

.metric-card {
    padding: 12px 14px;
    border-radius: 16px;
}

.metric-card span {
    margin-bottom: 8px;
    font-size: 0.82rem;
}

.metric-card strong,
.detail-card strong {
    font-size: 1.15rem;
    line-height: 1.12;
}

.metric-card small {
    margin-top: 8px;
    font-size: 0.8rem;
}

.metric-card-meta-link {
    margin-top: 8px;
    font-size: 0.78rem;
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.panel,
.detail-card,
.auth-card {
    padding: 14px 16px;
}

.panel-header {
    gap: 8px;
    margin-bottom: 12px;
}

.panel-header h2 {
    margin: 2px 0 0;
    font-size: 1.24rem;
}

.panel-header .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
}

.button,
.nav a {
    min-height: 38px;
    padding: 8px 12px;
}

.button.primary,
.button {
    font-size: 0.9rem;
}

.global-search--desktop {
    width: min(100%, 720px);
    justify-self: center;
}

.global-search--desktop .global-search__field,
.global-search--mobile .global-search__field {
    min-height: 40px;
}

.global-search--desktop input,
.global-search--mobile input {
    height: 40px;
    border-radius: 14px;
    font-size: 0.92rem;
    padding-top: 0;
    padding-bottom: 0;
}

@media (min-width: 981px) {
    .sidebar,
    .sidebar-overlay,
    .mobile-topbar {
        display: none !important;
    }

    .app-header {
        display: grid;
    }

    .content {
        padding-top: 14px;
    }
}

@media (max-width: 980px) {
    .app-header {
        display: none !important;
    }

    .mobile-topbar {
        display: grid;
    }
}

@media (max-width: 760px) {
    .page-hero {
        grid-template-columns: 1fr;
        padding: 18px 18px 20px;
    }
}

/* 2026-04-18 dense workspace pass */

body {
    --workspace-border: rgba(124, 146, 185, 0.18);
    --workspace-surface: rgba(15, 23, 42, 0.54);
    --workspace-surface-strong: rgba(15, 23, 42, 0.72);
    --workspace-muted: rgba(197, 208, 226, 0.74);
}

.content,
.page-shell,
.page-stack,
.detail-grid,
.page-main-grid {
    gap: 12px;
}

.app-header {
    padding: 8px 14px 10px;
    border-radius: 16px;
}

.app-header__top {
    gap: 10px 16px;
    grid-template-columns: minmax(168px, 196px) minmax(320px, 1fr) auto;
}

.app-brand {
    gap: 10px;
}

.app-brand__logo {
    width: min(100%, 132px);
    filter: drop-shadow(0 8px 18px rgba(18, 182, 255, 0.14));
}

.app-brand__meta {
    gap: 2px;
}

.app-brand__eyebrow {
    font-size: 0.65rem;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--workspace-muted);
}

.app-brand__meta strong {
    font-size: 0.92rem;
    line-height: 1.05;
    font-weight: 700;
}

.app-header__controls {
    gap: 8px;
}

.app-header__meta-pill,
.app-header__user,
.header-nav__link,
.header-subnav__link {
    font-size: 0.84rem;
}

.global-search__field input {
    height: 38px;
    font-size: 0.94rem;
}

.header-nav {
    gap: 4px;
}

.header-nav__link {
    min-height: 32px;
    padding: 0 11px;
}

.header-subnav {
    gap: 6px;
}

.header-subnav__link {
    min-height: 28px;
    padding: 0 10px;
}

.workspace-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 18px;
    align-items: end;
    padding: 4px 2px 8px;
    border-bottom: 1px solid var(--workspace-border);
}

.workspace-head__identity {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.workspace-head__marker {
    width: 3px;
    min-width: 3px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(110, 227, 255, 0.95), rgba(38, 132, 255, 0.2));
    box-shadow: 0 0 0 1px rgba(110, 227, 255, 0.1);
}

.workspace-head__eyebrow {
    margin: 0 0 4px;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--workspace-muted);
}

.workspace-head__title {
    margin: 0;
    font-size: clamp(1.18rem, 1.8vw, 1.72rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.workspace-head__subtitle {
    margin: 4px 0 0;
    max-width: 72ch;
    font-size: 0.9rem;
    line-height: 1.34;
    color: var(--workspace-muted);
}

.workspace-head__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.workspace-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.workspace-stats--customers,
.workspace-stats--dashboard {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.workspace-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    border: 1px solid var(--workspace-border);
    border-radius: 14px;
    background: linear-gradient(180deg, var(--workspace-surface), rgba(11, 18, 33, 0.72));
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}

.workspace-stat:hover {
    border-color: rgba(95, 191, 255, 0.38);
    background: linear-gradient(180deg, rgba(17, 32, 58, 0.94), rgba(11, 18, 33, 0.92));
    transform: translateY(-1px);
}

.workspace-stat span {
    font-size: 0.72rem;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--workspace-muted);
}

.workspace-stat strong {
    font-size: clamp(1.16rem, 1.75vw, 1.55rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.workspace-stat small {
    font-size: 0.81rem;
    line-height: 1.25;
    color: var(--workspace-muted);
}

.workspace-linkbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
}

.workspace-linkbar__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--workspace-border);
    border-radius: 12px;
    background: rgba(10, 18, 33, 0.45);
    color: inherit;
    text-decoration: none;
}

.workspace-linkbar__item span {
    font-size: 0.8rem;
    line-height: 1.2;
    color: var(--workspace-muted);
}

.workspace-linkbar__item strong {
    font-size: 0.96rem;
    line-height: 1;
    white-space: nowrap;
}

.summary-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: grid;
    gap: 2px;
    padding: 9px 0;
    border-top: 1px solid var(--workspace-border);
}

.summary-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.summary-list strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.summary-list span {
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--workspace-muted);
}

.dashboard-main--summary {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard-summary-module {
    align-self: start;
}

.dashboard-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.dashboard-module {
    align-self: start;
}

.dashboard-module-grid--summary-only {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.workspace-stats--mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-module--compact .panel-header {
    align-items: flex-start;
}

.dashboard-module__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--workspace-border);
}

.dashboard-module__links a {
    font-size: 0.84rem;
}

.panel-header__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.panel-header__links a {
    font-size: 0.84rem;
}

.panel,
.detail-card,
.auth-card {
    padding: 12px 14px;
    border-radius: 16px;
}

.panel-header {
    margin-bottom: 10px;
    gap: 10px 16px;
}

.panel-header h2 {
    margin: 0;
    font-size: clamp(1rem, 1.3vw, 1.26rem);
    line-height: 1.1;
}

.eyebrow {
    margin-bottom: 5px;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.lede,
.muted {
    font-size: 0.9rem;
    line-height: 1.34;
}

.card-grid,
.compact-grid {
    gap: 8px;
}

.metric-card {
    padding: 10px 12px;
    border-radius: 14px;
}

.metric-card strong,
.detail-card strong {
    font-size: 1.08rem;
}

.metric-card span,
.metric-card small {
    font-size: 0.8rem;
}

.metric-card-meta-link {
    margin-top: 6px;
    font-size: 0.76rem;
}

.table-wrap {
    border-radius: 14px;
}

.table-wrap table {
    width: 100%;
    table-layout: fixed;
}

.table-wrap table thead th {
    padding: 11px 12px;
    font-size: 0.74rem;
    line-height: 1.1;
    letter-spacing: 0.12em;
}

.table-wrap table tbody td {
    padding: 10px 12px;
    font-size: 0.92rem;
    line-height: 1.28;
}

.compact-table {
    width: 100%;
    table-layout: fixed;
}

.compact-table th,
.compact-table td {
    vertical-align: top;
    overflow-wrap: anywhere;
}

.table-wrap table th,
.table-wrap table td {
    vertical-align: top;
    overflow-wrap: anywhere;
    white-space: normal;
    height: auto;
    line-height: 1.35;
}

.table-wrap table td .table-link,
.table-wrap table td strong {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.24;
}

.table-wrap table td small,
.table-wrap table td .muted {
    display: block;
    margin-top: 2px;
    font-size: 0.78rem;
    line-height: 1.25;
}

.table-wrap table td .pill-group,
.table-wrap table td .table-actions {
    margin-top: 6px;
}

.table-wrap table tbody tr {
    height: auto;
}

.table-wrap table td > *,
.table-wrap table th > * {
    min-width: 0;
    max-width: 100%;
}

.table-wrap table td br {
    display: none;
}

.compact-table--receivables {
    table-layout: fixed;
    min-width: 1120px;
}

.compact-table--receivables col.receivables-col--select {
    width: 44px;
}

.compact-table--receivables col.receivables-col--customer {
    width: 236px;
}

.compact-table--receivables col.receivables-col--suburb,
.compact-table--receivables col.receivables-col--zone,
.compact-table--receivables col.receivables-col--sales-rep {
    width: 150px;
}

.compact-table--receivables col.receivables-col--last-pay,
.compact-table--receivables col.receivables-col--risk {
    width: 108px;
}

.compact-table--receivables col.receivables-col--money {
    width: 112px;
}

.compact-table--receivables col.receivables-col--default {
    width: 128px;
}

.compact-table--receivables th,
.compact-table--receivables td {
    padding: 9px 10px;
}

.compact-table--receivables th {
    white-space: nowrap;
}

.compact-table--receivables td.table-cell-numeric {
    white-space: nowrap;
    overflow-wrap: normal;
    font-variant-numeric: tabular-nums;
}

.settings-display-module {
    gap: 14px;
}

.settings-display-module__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.settings-display-module__blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.settings-checkbox-grid {
    display: grid;
    gap: 8px;
}

.settings-check-row {
    display: grid;
    grid-template-columns: 16px 1fr;
    align-items: start;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line-color);
    border-radius: 12px;
    background: var(--panel-subtle);
}

.settings-check-row small {
    grid-column: 2;
    color: var(--muted-text);
}

.settings-check-row.is-locked {
    opacity: .86;
}

.settings-check-row__content {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.settings-label-input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-strong) 76%, transparent);
    color: var(--text);
    font: inherit;
}

.settings-display-scope-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.table-cell-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.table-cell-stack strong {
    font-size: 0.94rem;
    line-height: 1.24;
    overflow-wrap: anywhere;
}

.table-cell-meta {
    font-size: 0.78rem;
    line-height: 1.25;
    color: var(--muted);
}

.table-cell-numeric {
    white-space: nowrap;
    text-align: right;
}

.compact-table--controls th,
.compact-table--controls td {
    overflow-wrap: normal;
}

.table-meta-stack {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.customer-cell {
    min-width: 0;
}

.customer-cell__title-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.customer-cell__title-row .table-link {
    flex: 1 1 auto;
    min-width: 0;
}

.customer-info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.table-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.table-detail-link:hover {
    border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.customer-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: start center;
    padding: 48px 16px 16px;
}

.customer-info-overlay[hidden] {
    display: none;
}

.customer-info-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(6px);
}

.customer-info-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, calc(100vw - 32px));
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 28, 52, 0.98), rgba(11, 18, 33, 0.98));
    box-shadow: 0 24px 60px rgba(3, 7, 18, 0.42);
    overflow: hidden;
}

.customer-info-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.customer-info-dialog__header h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
}

.customer-info-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
}

.customer-info-dialog__body {
    padding: 16px 18px 18px;
}

.customer-info-card {
    display: grid;
    gap: 14px;
}

.customer-info-card__pills {
    margin: 0;
}

.customer-info-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.customer-info-card__stat,
.customer-info-card__note {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.customer-info-card__stat span,
.customer-info-card__note span {
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.customer-info-card__stat strong,
.customer-info-card__note strong {
    font-size: 0.88rem;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 118;
    display: grid;
    place-items: start center;
    padding: 48px 16px 16px;
}

.detail-overlay[hidden] {
    display: none;
}

.detail-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, 0.68);
    backdrop-filter: blur(6px);
}

.detail-dialog {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(17, 28, 52, 0.98), rgba(11, 18, 33, 0.98));
    box-shadow: 0 24px 60px rgba(3, 7, 18, 0.42);
    overflow: hidden;
}

.detail-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--border);
}

.detail-dialog__header h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
}

.detail-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
}

.detail-dialog__body {
    overflow: auto;
    padding: 16px 18px 18px;
}

.detail-dialog--wide {
    width: min(980px, calc(100vw - 32px));
}

.inventory-quick-edit {
    display: grid;
    gap: 18px;
}

.inventory-quick-edit__layout {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    align-items: start;
}

.inventory-quick-edit__media,
.inventory-quick-edit__fields {
    display: grid;
    gap: 12px;
}

.inventory-quick-edit__image {
    position: relative;
    min-height: 220px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(243,246,250,0.98));
    overflow: hidden;
}

.inventory-quick-edit__image img,
.inventory-quick-edit__image-fallback {
    width: 100%;
    height: 100%;
}

.inventory-quick-edit__image img {
    display: block;
    object-fit: contain;
    object-position: center;
    padding: 10px 20px;
}

.inventory-quick-edit__image-fallback {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.inventory-quick-edit__media-meta {
    display: grid;
    gap: 2px;
}

.inventory-quick-edit__media-meta strong {
    font-size: 1rem;
    line-height: 1.2;
}

.inventory-quick-edit__media-meta span {
    color: var(--muted);
    font-size: 0.83rem;
}

.inventory-quick-edit__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-checkbox {
    display: grid;
    gap: 8px;
}

.field-checkbox__control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
}

.field-checkbox__control input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.clipboard-upload-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.clipboard-upload-tools__button {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
}

.clipboard-upload-tools__button--ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.clipboard-upload-tools__button--ghost:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.clipboard-upload-tools__status {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.25;
}

.clipboard-upload-tools__status[data-status-mode="success"] {
    color: #53d38b;
}

.clipboard-upload-tools__status[data-status-mode="warning"] {
    color: #dca34a;
}

.clipboard-upload-preview,
.clipboard-upload-drop-target {
    position: relative;
    display: grid;
    place-items: center;
    margin-top: 10px;
    border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--border) 58%);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
    overflow: hidden;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.clipboard-upload-preview {
    min-height: 164px;
    padding: 10px;
    cursor: pointer;
}

.clipboard-upload-drop-target {
    cursor: pointer;
}

.clipboard-upload-preview.is-dragover,
.clipboard-upload-drop-target.is-dragover {
    border-color: color-mix(in srgb, var(--accent) 78%, white 22%);
    background: color-mix(in srgb, var(--accent) 10%, var(--panel-soft) 90%);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
    transform: translateY(-1px);
}

.clipboard-upload-preview__image {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: contain;
    object-position: center;
}

.clipboard-upload-preview__placeholder {
    padding: 0 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.inventory-quick-edit__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.inventory-quick-edit__actions-end {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-card-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-card-stat,
.detail-card-note {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.detail-card-note {
    grid-column: 1 / -1;
}

.detail-card-stat span,
.detail-card-note span {
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.detail-card-stat strong,
.detail-card-note strong,
.detail-card-note small {
    overflow-wrap: anywhere;
}

.detail-card-note small {
    color: var(--muted);
}

body[data-theme="xero"] .detail-overlay__backdrop {
    background: rgba(15, 25, 40, 0.24);
}

body[data-theme="xero"] .detail-dialog {
    background: #ffffff;
    color: #15324f;
    border-color: rgba(15, 48, 80, 0.14);
    box-shadow: 0 24px 48px rgba(15, 48, 80, 0.18);
}

body[data-theme="xero"] .detail-dialog__close {
    background: #ffffff;
    color: #23405d;
}

body[data-theme="xero"] .inventory-quick-edit__image,
body[data-theme="xero"] .field-checkbox__control {
    background: linear-gradient(180deg, #ffffff, #f3f7fb);
    border-color: rgba(23, 43, 77, 0.12);
}

body[data-theme="xero"] .clipboard-upload-tools__status {
    color: #6b7b93;
}

body[data-theme="xero"] .clipboard-upload-tools__status[data-status-mode="success"] {
    color: #1c8f5f;
}

body[data-theme="xero"] .clipboard-upload-tools__status[data-status-mode="warning"] {
    color: #9b6c00;
}

body[data-theme="xero"] .clipboard-upload-tools__button--ghost {
    color: #617289;
    border-color: rgba(23, 43, 77, 0.14);
    background: #ffffff;
}

body[data-theme="xero"] .clipboard-upload-preview,
body[data-theme="xero"] .clipboard-upload-drop-target {
    background: #f7fbfe;
    border-color: rgba(22, 120, 194, 0.28);
}

body[data-theme="xero"] .clipboard-upload-preview.is-dragover,
body[data-theme="xero"] .clipboard-upload-drop-target.is-dragover {
    border-color: rgba(22, 120, 194, 0.78);
    background: #eef8ff;
    box-shadow: 0 0 0 3px rgba(22, 120, 194, 0.12);
}

body[data-theme="xero"] .clipboard-upload-preview__placeholder {
    color: #6b7b93;
}

body[data-theme="xero"] .inventory-quick-edit__image-fallback {
    color: #1678c2;
}

body[data-theme="xero"] .detail-card-stat,
body[data-theme="xero"] .detail-card-note {
    background: #f7fafc;
    border-color: rgba(15, 48, 80, 0.12);
}

body[data-theme="xero"] .detail-card-stat span,
body[data-theme="xero"] .detail-card-note span,
body[data-theme="xero"] .detail-card-note small {
    color: #64748b;
}

body.customer-info-open {
    overflow: hidden;
}

.pill-group {
    gap: 5px;
}

.pill {
    min-height: 24px;
    padding: 0 9px;
    font-size: 0.74rem;
}

.button,
.nav a {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.86rem;
}

.page-orders .panel,
.page-items .panel,
.page-receivables .panel,
.page-customers .panel,
.page-dashboard .panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(11, 18, 33, 0.88));
}

[data-theme="executive"] .workspace-head__marker {
    background: linear-gradient(180deg, rgba(240, 248, 255, 0.92), rgba(119, 128, 153, 0.28));
}

[data-theme="harbor"] .workspace-head__marker {
    background: linear-gradient(180deg, rgba(91, 234, 212, 0.95), rgba(29, 120, 212, 0.22));
}

[data-theme="daylight"] .workspace-head__marker {
    background: linear-gradient(180deg, rgba(42, 109, 255, 0.9), rgba(42, 109, 255, 0.2));
}

[data-theme="daylight"] .workspace-stat,
[data-theme="daylight"] .workspace-linkbar__item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.98));
}

[data-theme="daylight"] .workspace-head__subtitle,
[data-theme="daylight"] .workspace-head__eyebrow,
[data-theme="daylight"] .workspace-stat span,
[data-theme="daylight"] .workspace-stat small,
[data-theme="daylight"] .workspace-linkbar__item span,
[data-theme="daylight"] .app-brand__eyebrow {
    color: rgba(57, 72, 98, 0.74);
}

@media (max-width: 980px) {
    .workspace-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .workspace-head__actions {
        justify-content: flex-start;
    }

    .workspace-stats,
    .workspace-linkbar {
        grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    }

    .workspace-stats--mini {
        grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    }

    .customer-info-card__grid {
        grid-template-columns: 1fr;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.integration-summary-grid {
    margin-bottom: 0;
}

.integration-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.integration-provider-card {
    gap: 10px;
}

.integration-provider-card__header,
.integration-audit-item__header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.integration-provider-card .pill-group,
.integration-audit-item .pill-group {
    margin-bottom: 0;
}

.integration-meta-list {
    display: grid;
    gap: 4px;
}

.integration-meta-list .muted {
    margin: 0;
}

.integration-policy-field {
    min-width: 210px;
}

.integration-policy-field span {
    display: none;
}

.integration-diagnostics-grid {
    margin-bottom: 0;
}

.integration-audit-list {
    display: grid;
    gap: 10px;
}

.integration-audit-item {
    padding: 14px 16px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card-bg) 92%, transparent);
}

.integration-audit-item p {
    margin: 6px 0 0;
}

@media (max-width: 980px) {
    .integration-provider-card__header,
    .integration-audit-item__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .integration-policy-field {
        min-width: 0;
    }
}

/* 2026-04-19 global compact typography pass */
body {
    font-size: 1rem;
}

body[data-density="comfortable"] {
    --content-pad: 22px;
    --hero-padding: 18px;
    --panel-padding: 18px;
    --card-padding: 16px;
    --grid-gap: 14px;
    --section-gap: 16px;
    --control-height: 42px;
    --table-cell-y: 11px;
    --table-cell-x: 10px;
}

.app-header {
    padding: 6px 12px 8px;
    border-radius: 14px;
}

.app-header__top {
    gap: 8px 12px;
    grid-template-columns: minmax(148px, 180px) minmax(280px, 1fr) auto;
}

.app-brand {
    gap: 8px;
}

.app-brand__logo {
    width: 124px;
}

.app-brand__eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.16em;
}

.app-brand__meta strong {
    font-size: 0.92rem;
    line-height: 1.06;
}

.app-header__meta-pill,
.app-header__user,
.header-nav__link,
.header-subnav__link,
.button,
.nav a {
    font-size: 0.82rem;
}

.app-header__meta-pill {
    min-height: 30px;
    padding: 0 9px;
}

.app-header__user {
    padding: 5px 9px;
}

.app-header__user-name {
    font-size: 0.82rem;
}

.app-header__user-role {
    font-size: 0.66rem;
}

.header-nav__link {
    min-height: 30px;
    padding: 0 10px;
}

.header-subnav__link {
    min-height: 26px;
    padding: 0 9px;
    font-size: 0.76rem;
}

.global-search__field input {
    height: 34px;
    font-size: 0.88rem;
    padding: 0 14px;
}

.mobile-topbar__logo {
    width: min(42vw, 170px);
}

.mobile-topbar__title {
    font-size: 0.92rem;
}

.mobile-topbar__page {
    font-size: 0.82rem;
}

.flash {
    padding: 11px 14px;
    font-size: 0.86rem;
}

.page-hero,
.workspace-head {
    gap: 10px 14px;
}

.page-hero {
    padding: 12px 16px;
}

.workspace-head__eyebrow,
.page-hero .eyebrow,
.panel-header .eyebrow,
.eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
}

.workspace-head__title,
.page-hero h1 {
    font-size: clamp(1.02rem, 1.4vw, 1.42rem);
    line-height: 1.04;
}

.workspace-head__subtitle,
.page-hero .lede,
.lede,
.muted {
    font-size: 0.82rem;
    line-height: 1.3;
}

.hero-actions,
.workspace-head__actions {
    gap: 6px 8px;
}

.workspace-stats {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
}

.workspace-stats--dashboard,
.workspace-stats--customers {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.workspace-stats--mini {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-stat {
    gap: 4px;
    padding: 8px 10px;
    border-radius: 12px;
}

.workspace-stat span {
    font-size: 0.64rem;
    line-height: 1;
    letter-spacing: 0.1em;
}

.workspace-stat strong {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1;
}

.workspace-stat small {
    font-size: 0.74rem;
    line-height: 1.2;
}

.workspace-linkbar__item {
    padding: 8px 10px;
}

.workspace-linkbar__item span {
    font-size: 0.66rem;
}

.workspace-linkbar__item strong {
    font-size: 0.9rem;
}

.dashboard-module-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.dashboard-module-grid--summary-only {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.dashboard-module .panel-header,
.dashboard-module--compact .panel-header {
    margin-bottom: 8px;
    gap: 8px 12px;
}

.dashboard-module .panel-header p.muted {
    font-size: 0.8rem;
    line-height: 1.28;
}

.dashboard-module__links,
.panel-header__links {
    gap: 6px 10px;
    margin-top: 8px;
    padding-top: 8px;
}

.dashboard-module__links a,
.panel-header__links a,
.panel-header > a {
    font-size: 0.76rem;
}

.panel,
.detail-card,
.auth-card {
    padding: 10px 12px;
    border-radius: 14px;
}

.panel-header {
    margin-bottom: 8px;
    gap: 8px 12px;
}

.panel-header h2,
.hero h1,
.panel h1,
.panel h2,
.auth-card h1 {
    font-size: clamp(0.98rem, 1.1vw, 1.12rem);
    line-height: 1.08;
}

.metric-card {
    padding: 9px 10px;
    border-radius: 12px;
}

.metric-card span,
.metric-card small {
    font-size: 0.76rem;
    line-height: 1.2;
}

.metric-card strong,
.detail-card strong {
    font-size: 1rem;
    line-height: 1.08;
}

.metric-card-meta-link {
    margin-top: 5px;
    font-size: 0.72rem;
}

.summary-list {
    gap: 6px;
}

.summary-list li {
    gap: 1px;
    padding: 7px 0;
}

.summary-list strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.summary-list span {
    font-size: 0.76rem;
    line-height: 1.22;
}

.table-wrap {
    border-radius: 12px;
}

.table-wrap table thead th {
    padding: 9px 10px;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.1em;
}

.table-wrap table tbody td {
    padding: 8px 10px;
    font-size: 0.84rem;
    line-height: 1.22;
}

.table-wrap table td .table-link,
.table-wrap table td strong {
    font-size: 0.84rem;
    line-height: 1.18;
}

.table-wrap table td small,
.table-wrap table td .muted {
    margin-top: 1px;
    font-size: 0.72rem;
    line-height: 1.18;
}

.pill {
    font-size: 0.72rem;
    padding: 4px 8px;
}

@media (max-width: 980px) {
    .workspace-stats,
    .workspace-linkbar,
    .workspace-stats--dashboard,
    .workspace-stats--customers,
    .dashboard-module-grid,
    .dashboard-module-grid--summary-only {
        grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    }

    .workspace-stats--mini {
        grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    }
}

.page-dashboard--dense {
    gap: 10px;
}

.page-dashboard--dense .workspace-head,
.page-dashboard--dense .workspace-head--dashboard-min {
    gap: 6px 10px;
    align-items: center;
    padding-bottom: 6px;
}

.page-dashboard--dense .workspace-head__identity {
    gap: 9px;
}

.page-dashboard--dense .workspace-head__marker {
    height: 24px;
}

.page-dashboard--dense .workspace-head__title {
    font-size: 0.96rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-dashboard--dense .workspace-head__subtitle,
.page-dashboard--dense .workspace-head__eyebrow {
    display: none;
}

.page-dashboard--dense .workspace-head__actions .button {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 0.76rem;
}

.page-dashboard--dense .workspace-stats--dashboard {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.page-dashboard--dense .workspace-stats--dashboard .workspace-stat,
.page-dashboard--dense .dashboard-health-strip .workspace-linkbar__item {
    padding: 7px 9px;
    border-radius: 10px;
}

.page-dashboard--dense .workspace-stats--dashboard .workspace-stat span,
.page-dashboard--dense .dashboard-health-strip .workspace-linkbar__item span {
    font-size: 0.58rem;
    letter-spacing: 0.1em;
}

.page-dashboard--dense .workspace-stats--dashboard .workspace-stat strong,
.page-dashboard--dense .dashboard-health-strip .workspace-linkbar__item strong {
    font-size: 0.88rem;
    line-height: 1;
}

.page-dashboard--dense .workspace-stats--dashboard .workspace-stat small {
    display: none;
}

.page-dashboard--dense .dashboard-health-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.page-dashboard--dense .dashboard-module-grid--summary-only {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.page-dashboard--dense .dashboard-module {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
}

.page-dashboard--dense .panel-header {
    margin-bottom: 6px;
    gap: 4px 10px;
    align-items: center;
}

.page-dashboard--dense .panel-header h2 {
    font-size: 0.82rem;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-dashboard--dense .workspace-stats--mini {
    gap: 6px;
}

.page-dashboard--dense .workspace-stats--mini .workspace-stat {
    gap: 3px;
    padding: 7px 8px;
    border-radius: 10px;
}

.page-dashboard--dense .workspace-stats--mini .workspace-stat span {
    font-size: 0.56rem;
    line-height: 1;
    letter-spacing: 0.08em;
}

.page-dashboard--dense .workspace-stats--mini .workspace-stat strong {
    font-size: 0.9rem;
    line-height: 1;
}

.page-dashboard--dense .workspace-stats--mini .workspace-stat small {
    display: none;
}

.page-dashboard--dense .dashboard-module__links {
    gap: 4px 8px;
    margin-top: 6px;
    padding-top: 6px;
}

.page-dashboard--dense .dashboard-module__links a,
.page-dashboard--dense .panel-header > a {
    font-size: 0.7rem;
    line-height: 1;
}

@media (max-width: 1400px) {
    .page-dashboard--dense .dashboard-module-grid--summary-only {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .page-dashboard--dense .workspace-stats--dashboard,
    .page-dashboard--dense .dashboard-health-strip,
    .page-dashboard--dense .dashboard-module-grid--summary-only {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
}

.checkbox-grid--compact {
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.choice-card {
    gap: 4px;
    padding: 12px;
}

.choice-card__title {
    font-size: 0.92rem;
}

.choice-card__meta {
    font-size: 0.78rem;
}

th input[type="checkbox"],
td input[type="checkbox"] {
    width: 15px;
    height: 15px;
}

.form-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-grid--compact {
    gap: 10px;
}

.panel-header--compact {
    margin-bottom: 10px;
    gap: 8px 12px;
}

.button.button-compact {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.customer-overview-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.85fr);
    gap: 14px;
    margin-bottom: var(--section-gap);
}

.customer-overview-main,
.customer-overview-actions {
    padding: 16px;
}

.customer-overview-main__head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.customer-overview-main__head h1 {
    margin: 4px 0 6px;
    font-size: 1.5rem;
    line-height: 1.08;
}

.customer-overview-main__pills {
    margin-bottom: 0;
}

.customer-overview-balance {
    min-width: 160px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

.customer-overview-balance span,
.customer-overview-fact span {
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.customer-overview-balance strong {
    font-size: 1.25rem;
    line-height: 1.05;
}

.customer-overview-balance small,
.customer-overview-fact small {
    color: var(--muted);
    font-size: 0.8rem;
}

.customer-overview-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.customer-overview-fact {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.customer-overview-fact strong {
    font-size: 0.96rem;
    line-height: 1.15;
}

.customer-overview-actions {
    display: grid;
    gap: 12px;
    align-content: start;
}

.customer-overview-actions__group {
    display: grid;
    gap: 8px;
}

.customer-overview-actions__grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-overview-actions__grid form {
    margin: 0;
}

.customer-overview-actions__grid .button {
    width: 100%;
    justify-content: center;
}

.customer-section-toggle {
    padding: 0;
}

.customer-section-toggle__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.customer-section-toggle__summary::-webkit-details-marker {
    display: none;
}

.customer-section-toggle__summary::after {
    content: "+";
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    margin-left: auto;
}

.customer-section-toggle[open] .customer-section-toggle__summary::after {
    content: "v";
}

.customer-section-toggle__summary h2 {
    margin: 4px 0 0;
    font-size: 1rem;
    line-height: 1.15;
}

.customer-section-toggle__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.customer-section-toggle__body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

.customer-automation-workspace__summary {
    margin-bottom: 10px;
}

.customer-profile-form--compact input,
.customer-profile-form--compact select,
.customer-profile-form--compact textarea {
    min-height: 34px;
    padding: 6px 9px;
}

.customer-profile-form--compact textarea {
    min-height: 84px;
}

.customer-profile-form--compact .field span {
    font-size: 0.82rem;
}

.field-inline-toggle {
    align-content: start;
}

.inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: var(--panel-strong);
}

.inline-toggle input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
}

.inline-toggle span {
    color: var(--text);
    font-size: 0.84rem;
}

.customer-detail-compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    align-items: start;
}

.customer-detail-compact-grid .detail-card {
    min-height: 0;
    padding: 12px;
    border-radius: 14px;
}

.customer-detail-compact-grid .detail-card h2 {
    margin: 0 0 8px;
    font-size: 0.94rem;
    line-height: 1.2;
}

.customer-detail-compact-list p {
    margin: 0;
    padding: 3px 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.28;
}

.customer-detail-compact-list p + p {
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.customer-detail-compact-list p:has(> strong) {
    display: grid;
    grid-template-columns: minmax(78px, max-content) minmax(0, 1fr);
    gap: 6px;
}

.customer-detail-compact-list p > strong {
    color: var(--text);
    font-size: inherit !important;
    line-height: inherit !important;
    white-space: nowrap;
}

.customer-detail-visit-card .muted {
    margin: 0 0 8px;
    font-size: 0.78rem;
}

/* 2026-05-03 customer detail workspace compaction */
.customer-command-deck.customer-command-deck--overview-shell {
    gap: 16px;
    padding: 18px 20px;
    border-radius: 18px;
}

.customer-command-deck--overview-shell .customer-command-deck__lead {
    gap: 16px;
    padding-bottom: 14px;
}

.customer-command-deck--overview-shell .customer-command-deck__content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.customer-command-deck--overview-shell .customer-command-deck__facts {
    grid-column: 1 / span 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.customer-command-deck--overview-shell .customer-command-deck__fact,
.customer-command-deck--overview-shell .customer-command-deck__actions-card {
    padding: 13px 14px;
    border-radius: 16px;
}

.customer-command-deck--overview-shell .customer-command-deck__fact {
    gap: 5px;
}

.customer-command-deck--overview-shell .customer-command-deck__more {
    grid-column: 1 / -1;
    border-radius: 16px;
}

.customer-command-deck--overview-shell .customer-command-deck__more-grid {
    gap: 10px;
    padding: 0 12px 12px;
}

.customer-command-deck--overview-shell .customer-command-deck__actions {
    gap: 12px;
}

.customer-command-deck--overview-shell .customer-command-deck__balance {
    min-width: 220px;
}

.customer-priority-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    grid-auto-rows: minmax(0, auto);
}

.customer-priority-ledger__card {
    min-height: 320px;
    height: auto;
    padding: 14px;
    gap: 12px;
    overflow: hidden;
}

.customer-priority-ledger__card--statement {
    grid-column: span 2;
}

.customer-section-toggle {
    border-radius: 18px;
}

.customer-section-toggle__summary {
    gap: 14px;
    padding: 16px 18px;
}

.customer-section-toggle__body {
    padding: 0 18px 18px;
}

.customer-detail-compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.customer-detail-compact-grid .detail-card {
    padding: 14px;
    border-radius: 16px;
}

@media (max-width: 1180px) {
    .customer-command-deck--overview-shell .customer-command-deck__content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-command-deck--overview-shell .customer-command-deck__facts,
    .customer-priority-ledger,
    .customer-detail-compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-command-deck--overview-shell .customer-command-deck__facts,
    .customer-priority-ledger__card--statement {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .customer-command-deck.customer-command-deck--overview-shell {
        padding: 14px;
    }

    .customer-command-deck--overview-shell .customer-command-deck__lead,
    .customer-command-deck--overview-shell .customer-command-deck__content,
    .customer-command-deck--overview-shell .customer-command-deck__facts,
    .customer-command-deck--overview-shell .customer-command-deck__more-grid,
    .customer-priority-ledger,
    .customer-detail-compact-grid {
        grid-template-columns: 1fr;
    }

    .customer-command-deck--overview-shell .customer-command-deck__balance,
    .customer-priority-ledger__card,
    .customer-priority-ledger__card--statement {
        min-width: 0;
        grid-column: auto;
    }

    .customer-section-toggle__summary,
    .customer-section-toggle__meta {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

.customer-detail-visit-card .stack-form {
    gap: 8px;
}

.customer-detail-visit-card .field span {
    font-size: 0.72rem;
}

.customer-detail-visit-card select,
.customer-detail-visit-card .button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.78rem;
}

.panel[data-customer-panel="profile-form"],
.panel[data-customer-panel="automation-form"] {
    max-height: 76vh;
    overflow: auto;
}

.panel[data-customer-panel="profile-form"] .panel-header,
.panel[data-customer-panel="automation-form"] .panel-header {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-bottom: 8px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--panel) 88%, transparent));
    backdrop-filter: blur(8px);
}

.panel[data-customer-panel="profile-form"] .panel-header h2,
.panel[data-customer-panel="automation-form"] .panel-header h2 {
    font-size: 1rem;
}

.panel[data-customer-panel="profile-form"] .hero-actions,
.panel[data-customer-panel="automation-form"] .hero-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-top: 10px;
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--panel) 96%, transparent) 22%);
}

.customer-section-toggle .diagnostic-result {
    margin-top: 8px;
}

@media (max-width: 1180px) {
    .customer-overview-shell,
    .customer-overview-facts,
    .form-grid--compact,
    .customer-overview-actions__grid {
        grid-template-columns: 1fr;
    }

    .customer-overview-main__head,
    .customer-section-toggle__summary,
    .panel-header--compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-section-toggle__meta {
        justify-content: flex-start;
    }
}

/* 2026-04-19 mobile and tablet efficiency pass */

html,
body {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (max-width: 900px) {
    html[data-font-size="small"] {
        font-size: 12.5px;
    }

    html[data-font-size="medium"] {
        font-size: 14.5px;
    }

    html[data-font-size="large"] {
        font-size: 16.5px;
    }
}

.content > *,
.page-shell > *,
.page-stack > *,
.panel,
.detail-card,
.metric-card,
.workspace-stat,
.workspace-linkbar__item,
.table-wrap,
.hero,
.page-hero {
    min-width: 0;
}

.workspace-head__title,
.customer-overview-main__head h1,
.order-product-card__head h3,
.assistant-corridor-item__title,
.assistant-map-card__title,
.table-link,
table td strong,
table td a,
.global-search__item-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.global-search__results,
.assistant-autocomplete,
.order-entry-autocomplete {
    max-width: min(100vw - 20px, 100%);
}

.customer-section-toggle[open] .customer-section-toggle__summary::after {
    content: "v";
}

@media (max-width: 1180px) {
    body {
        --section-gap: 10px;
        --grid-gap: 10px;
    }

    .content,
    .page-shell,
    .page-stack,
    .detail-grid,
    .page-main-grid {
        gap: 10px;
    }

    .content {
        padding: 12px;
    }

    .panel,
    .detail-card,
    .metric-card,
    .auth-card,
    .workspace-stat {
        padding: 12px;
    }

    .hero,
    .page-hero {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px 16px 18px;
    }

    .workspace-head {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 10px;
        padding-bottom: 6px;
    }

    .workspace-head__actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .workspace-head__actions::-webkit-scrollbar {
        display: none;
    }

    .workspace-head__actions .button {
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 10px;
    }

    .workspace-stats,
    .workspace-stats--customers,
    .workspace-stats--dashboard,
    .card-grid,
    .compact-grid,
    .dashboard-health-strip,
    .dashboard-module-grid--summary-only,
    .detail-grid,
    .detail-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-linkbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .catalog-item-list,
    .catalog-public-grid,
    .catalog-public-grid--featured,
    .catalog-builder-hero__gallery,
    .catalog-builder-showcase__grid,
    .catalog-public-hero__gallery,
    .catalog-studio__poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .workspace-linkbar__item,
    .workspace-stat {
        min-width: 0;
    }

    .settings-directory-links {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .settings-directory-links::-webkit-scrollbar {
        display: none;
    }

    .settings-directory-links a {
        white-space: nowrap;
    }

    .customer-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .customer-toolbar .field-wide {
        grid-column: 1 / -1;
    }

    .bulk-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .bulk-actions > * {
        width: 100%;
        min-width: 0;
    }

    .table-filter-stack {
        min-width: 0;
        gap: 6px;
    }

    .table-filter-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-filter-controls select {
        grid-column: 1 / -1;
    }

    .customer-overview-shell {
        grid-template-columns: 1fr;
    }

    .customer-overview-main,
    .customer-overview-actions {
        padding: 14px;
    }

    .customer-overview-actions {
        order: 2;
    }

    .customer-overview-actions__grid,
    .form-grid,
    .form-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-section-toggle__body {
        padding: 0 14px 14px;
    }

    .panel[data-customer-panel="profile-form"],
    .panel[data-customer-panel="automation-form"] {
        max-height: none;
        overflow: visible;
    }

    .order-entry-layout {
        grid-template-columns: 1fr !important;
    }

    .order-entry-sidebar {
        order: 0;
        position: static;
    }

    body.order-basket-open {
        overflow: hidden;
    }

    .order-basket-toggle {
        position: fixed;
        right: max(14px, env(safe-area-inset-right));
        bottom: calc(14px + env(safe-area-inset-bottom));
        z-index: 38;
        display: grid;
        gap: 4px;
        min-width: 164px;
        padding: 12px 14px;
        border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
        border-radius: 18px;
        background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 96%, transparent), color-mix(in srgb, var(--panel-soft) 92%, transparent));
        box-shadow: 0 20px 34px rgba(2, 6, 23, 0.34);
        text-align: left;
    }

    .order-entry-sidebar.is-basket-open .order-basket-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .order-basket-toggle__label {
        font-size: 0.74rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .order-basket-toggle__meta {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
    }

    .order-basket-toggle__meta strong {
        font-size: 0.96rem;
    }

    .order-basket-toggle__meta span {
        color: var(--muted);
        font-size: 0.8rem;
    }

    .order-basket-drawer {
        position: fixed;
        inset: 0;
        z-index: 37;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .order-entry-sidebar.is-basket-open .order-basket-drawer {
        opacity: 1;
        pointer-events: auto;
    }

    .order-basket-drawer__backdrop {
        position: absolute;
        inset: 0;
        display: block;
        border: 0;
        background: rgba(2, 6, 23, 0.64);
        opacity: 0;
        transition: opacity 0.18s ease;
    }

    .order-entry-sidebar.is-basket-open .order-basket-drawer__backdrop {
        opacity: 1;
    }

    .order-basket-panel {
        position: absolute;
        top: 10px;
        right: 10px;
        bottom: 10px;
        width: min(420px, calc(100vw - 20px));
        max-height: calc(100dvh - 20px);
        border-radius: 22px;
        transform: translateX(calc(100% + 24px));
        transition: transform 0.22s ease;
        box-shadow: 0 28px 54px rgba(2, 6, 23, 0.38);
        z-index: 1;
    }

    .order-entry-sidebar.is-basket-open .order-basket-panel {
        transform: translateX(0);
    }

    .order-basket-panel__mobilebar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 4px;
        border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    }

    .order-basket-panel__mobilebar strong {
        display: block;
        font-size: 0.94rem;
        line-height: 1.2;
    }

    .order-basket-panel__close {
        position: relative;
        width: 36px;
        height: 36px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
        flex: 0 0 auto;
    }

    .order-basket-panel__close span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        height: 1.5px;
        background: currentColor;
        border-radius: 999px;
    }

    .order-basket-panel__close span:first-child {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .order-basket-panel__close span:last-child {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    .order-customer-picker {
        grid-template-columns: 1fr auto;
        align-items: end;
    }

    .order-customer-picker__field {
        grid-column: 1 / -1;
    }

    .order-product-grid,
    .order-product-grid--catalog {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-product-card__controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-product-card__controls .button {
        grid-column: 1 / -1;
    }

    .assistant-control-pills {
        display: flex;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .assistant-control-pills::-webkit-scrollbar {
        display: none;
    }

    .assistant-control-pills .pill {
        flex: 0 0 auto;
    }

    .assistant-route-map,
    .customers-map-canvas {
        min-height: 260px;
    }
}

@media (max-width: 980px) {
    body {
        --section-gap: 9px;
        --grid-gap: 9px;
        --panel-padding: 12px;
        --table-cell-x: 10px;
        --table-cell-y: 9px;
        --control-height: 40px;
    }

    .content {
        padding: 10px var(--mobile-gutter, 12px) calc(24px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .mobile-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px 10px;
    }

    .mobile-topbar__brand {
        gap: 8px;
        min-width: 0;
    }

    .mobile-topbar__logo {
        width: min(32vw, 124px);
    }

    .mobile-topbar__title {
        font-size: 0.84rem;
    }

    .mobile-topbar__page {
        font-size: 0.72rem;
        line-height: 1.1;
    }

    .mobile-avatar {
        width: 36px;
        height: 36px;
    }

    .global-search__field input {
        min-height: 40px;
        padding: 0 12px;
        font-size: 0.92rem;
    }

    .global-search__results {
        top: calc(100% + 6px);
        padding: 10px;
        border-radius: 14px;
    }

    .workspace-head__title {
        font-size: 1.18rem;
    }

    .workspace-head__subtitle {
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .workspace-head__marker {
        height: 32px;
    }

    .workspace-stats,
    .workspace-stats--customers,
    .workspace-stats--dashboard,
    .card-grid,
    .compact-grid,
    .dashboard-module-grid--summary-only,
    .detail-grid,
    .detail-grid--compact,
    .workspace-linkbar {
        grid-template-columns: 1fr;
    }

    .workspace-stat {
        padding: 10px 12px;
        gap: 4px;
    }

    .workspace-stat strong {
        font-size: 1rem;
        line-height: 1.05;
    }

    .workspace-stat small,
    .metric-card small {
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .metric-card strong {
        font-size: 1.1rem;
    }

    .customer-toolbar,
    .bulk-actions,
    .customer-overview-facts,
    .customer-overview-actions__grid,
    .order-entry-metrics,
    .form-grid,
    .form-grid--compact {
        grid-template-columns: 1fr;
    }

    .customer-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .customer-toolbar-meta {
        gap: 8px;
        margin-bottom: 8px;
    }

    .table-wrap table.responsive-table-card td,
    .table-wrap table.responsive-table-has-controls tbody td {
        grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
        gap: 8px;
        padding: 8px 10px;
    }

    .table-wrap table.responsive-table-card td::before,
    .table-wrap table.responsive-table-has-controls tbody td::before {
        font-size: 0.72rem;
    }

    .customer-overview-main__head {
        gap: 10px;
    }

    .customer-overview-main__head h1 {
        font-size: 1.18rem;
    }

    .customer-overview-balance {
        min-width: 0;
        width: 100%;
    }

    .customer-section-toggle__summary {
        padding: 12px 14px;
    }

    .customer-section-toggle__summary h2 {
        font-size: 0.94rem;
    }

    .panel-header,
    .panel-header--compact {
        gap: 8px;
    }

    .order-product-grid,
    .order-product-grid--catalog {
        grid-template-columns: 1fr;
    }

    .order-product-card {
        gap: 10px;
        padding: 10px;
    }

    .order-product-card__visual {
        min-height: 104px;
    }

    .order-product-card__meta,
    .order-product-card__pricing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-basket-summary,
    .order-basket-totals {
        grid-template-columns: 1fr;
    }

    .order-basket-toggle {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
        min-width: 0;
        bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .order-basket-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-height: min(88dvh, 720px);
        border-radius: 24px 24px 0 0;
        transform: translateY(calc(100% + 24px));
    }

    .order-entry-sidebar.is-basket-open .order-basket-panel {
        transform: translateY(0);
    }

    .settings-directory {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    body {
        --mobile-gutter: 10px;
        --panel-padding: 10px;
        --panel-radius: 16px;
        --card-radius: 14px;
        --section-gap: 8px;
        --grid-gap: 8px;
        --control-height: 38px;
    }

    .content {
        padding-inline: var(--mobile-gutter);
    }

    .mobile-topbar {
        gap: 8px;
    }

    .mobile-topbar__logo {
        width: min(28vw, 100px);
    }

    .mobile-topbar__title {
        font-size: 0.78rem;
    }

    .mobile-topbar__page {
        font-size: 0.68rem;
    }

    .mobile-avatar {
        width: 34px;
        height: 34px;
    }

    .global-search__field input {
        min-height: 38px;
        padding: 0 11px;
        font-size: 0.88rem;
    }

    .workspace-head {
        gap: 8px;
    }

    .workspace-head__eyebrow {
        margin-bottom: 2px;
        font-size: 0.62rem;
    }

    .workspace-head__title {
        font-size: 1.04rem;
    }

    .workspace-head__subtitle {
        display: none;
    }

    .workspace-head__actions {
        gap: 6px;
    }

    .workspace-head__actions .button,
    .button.button-compact,
    .button {
        min-height: 34px;
        padding: 0 9px;
        font-size: 0.78rem;
    }

    .workspace-stat span,
    .workspace-linkbar__item span,
    .metric-card span {
        font-size: 0.66rem;
    }

    .workspace-stat strong,
    .metric-card strong {
        font-size: 0.96rem;
    }

    .workspace-stat small,
    .metric-card small {
        font-size: 0.72rem;
    }

    .customer-filter-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap table.responsive-table-card td,
    .table-wrap table.responsive-table-has-controls tbody td {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 8px 9px;
    }

    .table-wrap table.responsive-table-card td::before,
    .table-wrap table.responsive-table-has-controls tbody td::before {
        font-size: 0.68rem;
    }

    .customer-overview-main,
    .customer-overview-actions {
        padding: 12px;
    }

    .customer-overview-actions__grid,
    .form-grid,
    .form-grid--compact,
    .order-entry-metrics,
    .order-product-card__meta,
    .order-product-card__pricing,
    .order-product-card__controls {
        grid-template-columns: 1fr;
    }

    .customer-section-toggle__summary {
        padding: 10px 12px;
    }

    .customer-section-toggle__body {
        padding: 0 12px 12px;
    }

    .panel[data-customer-panel="profile-form"] .hero-actions,
    .panel[data-customer-panel="automation-form"] .hero-actions {
        position: static;
        padding-top: 8px;
    }

    .assistant-route-map,
    .customers-map-canvas {
        min-height: 220px;
    }
}

/* 2026-04-19 stronger compact desktop and tax visibility pass */
@media (min-width: 981px) {
    .content {
        padding-top: 10px;
    }

    .app-header {
        gap: 6px;
        padding: 4px 10px 6px;
        border-radius: 12px;
    }

    .app-header__top {
        gap: 8px 12px;
        grid-template-columns: minmax(132px, 164px) minmax(300px, 560px) auto;
    }

    .app-brand {
        gap: 6px;
    }

    .app-brand__logo {
        width: min(100%, 116px);
    }

    .app-brand__eyebrow {
        display: none;
    }

    .app-brand__meta strong {
        font-size: 0.9rem;
        line-height: 1.05;
    }

    .app-header__controls {
        gap: 6px;
    }

    .app-header__meta-pill {
        min-height: 28px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .app-header__user {
        padding: 4px 8px;
    }

    .app-header__user-name {
        font-size: 0.8rem;
    }

    .app-header__user-role {
        font-size: 0.62rem;
    }

    .global-search--desktop {
        width: min(100%, 560px);
    }

    .global-search__field input,
    .global-search--desktop input,
    .global-search--mobile input {
        min-height: 32px;
        height: 32px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 0.84rem;
    }

    .header-nav,
    .header-subnav {
        gap: 4px;
    }

    .header-nav__link {
        min-height: 28px;
        padding: 0 9px;
        font-size: 0.77rem;
    }

    .header-subnav__link {
        min-height: 24px;
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .workspace-head {
        gap: 6px 10px;
        padding-bottom: 4px;
    }

    .workspace-head__identity {
        gap: 8px;
    }

    .workspace-head__marker {
        height: 22px;
    }

    .workspace-head__eyebrow {
        margin-bottom: 2px;
        font-size: 0.58rem;
    }

    .workspace-head__title {
        font-size: clamp(0.98rem, 1.2vw, 1.22rem);
    }

    .workspace-head__subtitle {
        margin-top: 2px;
        font-size: 0.76rem;
        line-height: 1.18;
    }

    .workspace-head__actions .button,
    .button,
    .button.button-compact,
    .nav a {
        min-height: 30px;
        padding: 0 9px;
        font-size: 0.76rem;
    }

    .workspace-stats--dashboard {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }

    .workspace-stat {
        gap: 3px;
        padding: 7px 9px;
        border-radius: 10px;
    }

    .workspace-stat span {
        font-size: 0.58rem;
        letter-spacing: 0.09em;
    }

    .workspace-stat strong {
        font-size: 0.9rem;
        line-height: 1;
    }

    .workspace-stat small {
        font-size: 0.7rem;
        line-height: 1.14;
    }

    .page-dashboard--dense {
        gap: 8px;
    }

    .page-dashboard--dense .workspace-head,
    .page-dashboard--dense .workspace-head--dashboard-min {
        gap: 4px 8px;
        padding-bottom: 4px;
    }

    .page-dashboard--dense .workspace-head__marker {
        height: 18px;
    }

    .page-dashboard--dense .workspace-head__title {
        font-size: 0.88rem;
        letter-spacing: 0.08em;
    }

    .page-dashboard--dense .workspace-stats--dashboard .workspace-stat,
    .page-dashboard--dense .dashboard-health-strip .workspace-linkbar__item {
        padding: 6px 8px;
        border-radius: 9px;
    }

    .page-dashboard--dense .dashboard-health-strip {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .page-dashboard--dense .dashboard-module-grid--summary-only {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .page-dashboard--dense .dashboard-module {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .page-dashboard--dense .panel-header {
        margin-bottom: 4px;
        gap: 4px 8px;
    }

    .page-dashboard--dense .panel-header h2 {
        font-size: 0.76rem;
        line-height: 1.08;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .page-dashboard--dense .panel-header a,
    .page-dashboard--dense .dashboard-module__links a {
        font-size: 0.68rem;
    }

    .page-dashboard--dense .workspace-stats--mini {
        gap: 5px;
    }

    .page-dashboard--dense .workspace-stats--mini .workspace-stat {
        padding: 6px 7px;
    }

    .page-dashboard--dense .workspace-stats--mini .workspace-stat span {
        font-size: 0.54rem;
    }

    .page-dashboard--dense .workspace-stats--mini .workspace-stat strong {
        font-size: 0.84rem;
    }

    .page-dashboard--dense .workspace-stats--mini .workspace-stat small {
        display: none;
    }
}

.order-product-card__meta span,
.table-meta-stack span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* 2026-04-19 customer workspace and permissions compact pass */
.customer-overview-shell--workspace {
    grid-template-columns: minmax(0, 2.1fr) minmax(300px, 0.95fr);
    gap: 12px;
}

.customer-overview-main--workspace,
.customer-overview-actions--workspace,
.customer-panel-drawer {
    padding: 12px 14px;
}

.customer-overview-main--workspace .customer-overview-main__head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.customer-overview-main--workspace .customer-overview-main__head h1 {
    margin-bottom: 4px;
    font-size: clamp(1.15rem, 1.8vw, 1.5rem);
}

.customer-overview-main--workspace .customer-overview-main__pills {
    gap: 6px;
}

.customer-overview-facts--workspace {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.customer-overview-facts--workspace .customer-overview-fact {
    min-height: 0;
    padding: 10px 11px;
    border-radius: 12px;
}

.customer-overview-facts--workspace .customer-overview-fact span {
    font-size: 0.68rem;
}

.customer-overview-facts--workspace .customer-overview-fact strong {
    font-size: 0.94rem;
    line-height: 1.15;
}

.customer-overview-facts--workspace .customer-overview-fact small {
    font-size: 0.74rem;
    line-height: 1.25;
}

.customer-overview-actions--workspace {
    display: grid;
    gap: 12px;
    align-content: start;
}

.customer-overview-actions__grid--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.customer-overview-actions__grid--dense .button,
.customer-overview-actions__grid--dense form {
    width: 100%;
}

.customer-overview-actions__inline-form {
    display: contents;
}

.customer-overview-actions__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.customer-command-deck {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: var(--section-gap);
}

.customer-command-deck__lead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.customer-command-deck__identity {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.customer-command-deck__identity h1 {
    margin: 0;
    font-size: clamp(1.22rem, 1.4vw, 1.54rem);
    line-height: 1.08;
}

.customer-command-deck__address-line {
    margin: 0;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.3;
}

.customer-command-deck__contact-line {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
}

.customer-command-deck__pills {
    gap: 6px;
}

.customer-command-deck__pills .pill {
    padding: 5px 9px;
    font-size: 0.72rem;
}

.customer-command-deck__balance {
    min-width: 210px;
    display: grid;
    gap: 4px;
    align-content: start;
    padding: 11px 12px;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 90%, transparent);
}

.customer-command-deck__balance span {
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.customer-command-deck__balance strong {
    font-size: 1.22rem;
    line-height: 1.05;
}

.customer-command-deck__balance-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted);
    font-size: 0.78rem;
}

.customer-command-deck__content {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(250px, 0.86fr);
    gap: 12px;
    align-items: start;
}

.customer-command-deck__facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.customer-command-deck__fact {
    display: grid;
    gap: 4px;
    min-height: 0;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
    background: color-mix(in srgb, var(--panel-soft) 88%, transparent);
}

.customer-command-deck__fact--wide {
    grid-column: 1 / -1;
}

.customer-command-deck__fact span {
    color: var(--muted);
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.customer-command-deck__fact strong {
    font-size: 0.94rem;
    line-height: 1.18;
}

.customer-command-deck__fact small {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.3;
}

.customer-command-deck__more {
    grid-column: span 2;
    border: 1px dashed color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    overflow: hidden;
}

.customer-command-deck__more[open] {
    background: color-mix(in srgb, var(--panel-soft) 90%, transparent);
}

.customer-command-deck__more-summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    gap: 2px;
    padding: 11px 12px;
}

.customer-command-deck__more-summary::-webkit-details-marker {
    display: none;
}

.customer-command-deck__more-summary span {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
}

.customer-command-deck__more-summary small {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.customer-command-deck__more-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
}

.customer-command-deck__actions {
    display: grid;
    gap: 10px;
    align-content: start;
}

.customer-command-deck__actions-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
}

.customer-command-deck__actions-head {
    display: grid;
    gap: 2px;
}

.customer-command-deck__actions-head strong {
    font-size: 0.95rem;
    line-height: 1.15;
}

.customer-command-deck__actions-more {
    display: grid;
    gap: 8px;
    padding-top: 2px;
}

.customer-command-deck__actions-more summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    list-style: none;
}

.customer-command-deck__actions-more summary::-webkit-details-marker {
    display: none;
}

.customer-command-deck__actions-foot {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.customer-command-deck__actions-foot span {
    white-space: nowrap;
}

.customer-priority-ledger {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
    grid-auto-rows: 1fr;
}

.customer-priority-ledger__card {
    display: grid;
    gap: 10px;
    min-height: 0;
    height: 590px;
    padding: 12px;
    align-content: start;
    align-items: start;
    grid-auto-rows: min-content;
    align-self: start;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.customer-priority-ledger__card--statement {
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.customer-priority-ledger__card > .panel-header {
    align-items: flex-start;
    min-height: 68px;
    gap: 10px 14px;
    margin-bottom: 6px;
}

.customer-priority-ledger__header-copy {
    display: grid;
    gap: 4px;
    align-content: start;
    min-height: 0;
}

.customer-priority-ledger__header-copy .eyebrow {
    margin-bottom: 0;
}

.customer-priority-ledger__header-copy h2 {
    margin: 0;
}

.customer-priority-ledger__header-copy .muted {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.3;
}

.customer-priority-ledger__statement-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.customer-priority-ledger__statement-form--top {
    margin-bottom: 10px;
}

.customer-priority-ledger__statement-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
    align-items: start;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 92%, var(--panel-soft) 8%);
}

.customer-priority-ledger__statement-summary-copy {
    display: grid;
    gap: 4px;
}

.customer-priority-ledger__statement-summary-copy strong {
    font-size: 0.94rem;
    line-height: 1.18;
}

.customer-priority-ledger__statement-summary-copy span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.32;
}

.customer-priority-ledger__statement-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -2px 0 10px;
}

.customer-priority-ledger__statement-form .field {
    gap: 5px;
}

.customer-priority-ledger__statement-form .field span {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.customer-priority-ledger__statement-form input {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 0.84rem;
}

.customer-priority-ledger__statement-form .button {
    min-height: 36px;
    white-space: nowrap;
}

.customer-priority-ledger__statement-note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.customer-priority-ledger__statement-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 14px;
    margin-top: 2px;
}

.customer-priority-ledger__statement-foot .muted {
    font-size: 0.76rem;
    line-height: 1.3;
}

.customer-priority-ledger__statement-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.customer-priority-ledger__statement-metric {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel) 86%, var(--panel-soft) 14%);
}

.customer-priority-ledger__statement-metric span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.customer-priority-ledger__statement-metric strong {
    font-size: 0.95rem;
    line-height: 1.15;
}

.customer-priority-ledger__statement-metric--wide {
    grid-column: span 4;
}

.customer-priority-ledger__statement-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.customer-priority-ledger__statement-actions--top {
    margin-bottom: 0;
    justify-content: flex-end;
}

.customer-priority-ledger__statement-email-form {
    display: inline-flex;
}

.customer-history-list {
    display: grid;
    gap: 8px;
    align-content: start;
    align-self: start;
    min-height: 0;
}

.customer-history-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
}

.customer-history-list__copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.customer-history-list__copy strong,
.customer-history-list__copy span {
    min-width: 0;
}

.customer-history-list__copy strong {
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.22;
}

.customer-history-list__copy span {
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.25;
}

.customer-history-list__amount {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1.1;
}

.table-flag--invoice-status {
    margin-left: 8px;
    font-weight: 700;
}

.table-flag--paid {
    color: #d3f7dc;
    background: #0f5a2a;
    border-color: rgba(15, 90, 42, 0.42);
}

.table-flag--partial {
    color: #8a5600;
    background: #fff1c7;
    border-color: rgba(196, 146, 0, 0.28);
}

.table-flag--overdue {
    color: #a11d2c;
    background: #ffe0e3;
    border-color: rgba(196, 29, 44, 0.24);
}

.table-flag--current {
    color: #0f5f96;
    background: #e7f3ff;
    border-color: rgba(15, 95, 150, 0.2);
}

.customer-history-list__item--paid {
    background: linear-gradient(180deg, rgba(15, 90, 42, 0.06), rgba(15, 90, 42, 0.02));
    border: 1px solid rgba(15, 90, 42, 0.14);
    border-radius: 14px;
    padding: 10px 12px;
}

.customer-invoice-history__row--paid td {
    color: #0f5a2a;
    font-weight: 600;
}

.card-grid--compact .metric-card {
    padding: 10px 12px;
}

.card-grid--compact .metric-card span {
    font-size: 0.7rem;
}

.card-grid--compact .metric-card strong {
    font-size: 1rem;
}

.customer-panel-drawer .panel-header {
    margin-bottom: 10px;
}

.customer-panel-drawer .panel-header h2 {
    font-size: 1rem;
    margin: 2px 0 0;
}

.customer-panel-drawer .panel-header .muted {
    font-size: 0.76rem;
}

.customer-profile-form--compact .detail-grid--compact {
    gap: 10px;
}

.customer-profile-form--compact .detail-grid,
.customer-profile-form--compact .detail-grid--compact {
    gap: 8px;
}

.customer-profile-form--compact .field span,
.stack-form .field span {
    margin-bottom: 5px;
    font-size: 0.74rem;
}

.customer-profile-form--compact input,
.customer-profile-form--compact select,
.customer-profile-form--compact textarea,
.stack-form input,
.stack-form select,
.stack-form textarea {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
}

.customer-profile-form--compact textarea,
.stack-form textarea {
    min-height: 82px;
    resize: vertical;
}

.customer-profile-form--compact input[type="datetime-local"],
.customer-profile-form--compact input[type="date"],
.customer-profile-form--compact input[type="time"],
.stack-form input[type="datetime-local"],
.stack-form input[type="date"],
.stack-form input[type="time"] {
    min-height: 38px;
}

.inline-toggle {
    gap: 8px;
    padding: 8px 10px;
    min-height: 38px;
    border-radius: 12px;
}

.customer-profile-form--compact .inline-toggle {
    min-height: 42px;
    padding: 8px 12px;
    gap: 10px;
}

.inline-toggle input[type="checkbox"],
.choice-card input[type="checkbox"],
.role-choice input[type="checkbox"],
th input[type="checkbox"],
td input[type="checkbox"] {
    width: 15px;
    height: 15px;
    min-width: 15px;
    accent-color: var(--accent);
}

.customer-profile-form--compact .inline-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
}

.customer-section-toggle__summary {
    padding: 10px 12px;
}

.customer-section-toggle__summary h2 {
    font-size: 0.94rem;
}

.customer-section-toggle__meta {
    gap: 6px;
}

.customer-section-toggle__body {
    padding: 0 12px 12px;
}

.customer-automation-workspace__summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.customer-automation-workspace__summary .metric-card,
.customer-automation-workspace .detail-card {
    padding: 10px 11px;
}

.customer-automation-workspace__summary .metric-card strong,
.customer-automation-workspace .detail-card strong {
    font-size: 0.96rem;
}

.customer-automation-workspace__summary .metric-card small,
.customer-automation-workspace .detail-card p {
    font-size: 0.75rem;
    line-height: 1.25;
}

.order-basket-table th:nth-child(4),
.order-basket-table td:nth-child(4),
.order-basket-table th:nth-child(5),
.order-basket-table td:nth-child(5) {
    text-align: right;
}

.order-basket-table td:nth-child(4) .table-meta-stack {
    align-items: flex-end;
}

.order-basket-table td:nth-child(4) strong {
    font-size: 0.8rem;
}

.role-choice-list {
    display: grid;
    gap: 8px;
}

.role-choice {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.role-choice__body {
    display: grid;
    gap: 2px;
}

.role-choice__title {
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

.role-choice__meta {
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.25;
}

.module-access-matrix {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.module-access-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.module-access-row__identity {
    display: grid;
    gap: 4px;
}

.module-access-row__identity strong {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.2;
}

.module-access-row__levels {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.module-access-choice {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 0.8rem;
    line-height: 1.1;
}

.module-access-choice input[type="radio"] {
    width: 14px;
    height: 14px;
    margin: 0;
    flex: 0 0 14px;
}

.list-item--compact {
    gap: 3px;
    padding: 9px 10px;
}

@media (max-width: 1180px) {
    .customer-command-deck__lead,
    .customer-command-deck__content {
        grid-template-columns: 1fr;
    }

    .customer-command-deck__fact--wide {
        grid-column: span 1;
    }

    .customer-command-deck__balance {
        min-width: 0;
    }

    .customer-command-deck__actions {
        order: -1;
    }

    .customer-overview-shell--workspace,
    .customer-overview-facts--workspace,
    .customer-overview-actions__grid--dense,
    .customer-automation-workspace__summary {
        grid-template-columns: 1fr;
    }

    .customer-priority-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-priority-ledger__card {
        height: 560px;
    }

    .customer-command-deck__facts,
    .customer-command-deck__more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .customer-command-deck {
        padding: 12px;
    }

    .customer-command-deck__identity h1 {
        font-size: 1.1rem;
    }

    .customer-command-deck__actions-card {
        padding: 10px;
    }

    .customer-priority-ledger,
    .customer-command-deck__facts,
    .customer-command-deck__more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-priority-ledger__statement-form {
        grid-template-columns: 1fr;
    }

    .customer-priority-ledger__statement-summary {
        grid-template-columns: 1fr;
    }

    .customer-priority-ledger__statement-actions--top {
        justify-content: flex-start;
    }

    .customer-priority-ledger__card {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .order-basket-table th:nth-child(4),
    .order-basket-table td:nth-child(4) {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .customer-command-deck__content {
        gap: 10px;
    }

    .customer-priority-ledger,
    .customer-command-deck__facts,
    .customer-command-deck__more-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .customer-command-deck__fact,
    .customer-command-deck__more-summary,
    .customer-command-deck__actions-card {
        padding: 9px 10px;
    }

    .customer-command-deck__fact span,
    .customer-command-deck__balance span {
        font-size: 0.62rem;
    }

    .customer-command-deck__fact strong {
        font-size: 0.86rem;
    }

    .customer-command-deck__fact small,
    .customer-command-deck__actions-foot {
        font-size: 0.69rem;
    }

    .customer-command-deck__actions-more summary {
        font-size: 0.74rem;
    }

    .customer-history-list__item {
        align-items: start;
        flex-direction: column;
    }

    .customer-history-list__amount {
        align-self: flex-start;
    }
}

@media (max-width: 420px) {
    .customer-priority-ledger,
    .customer-command-deck__facts,
    .customer-command-deck__more-grid {
        grid-template-columns: 1fr;
    }

    .customer-priority-ledger__statement-metrics {
        grid-template-columns: 1fr;
    }

    .customer-priority-ledger__statement-metric--wide {
        grid-column: auto;
    }
}

.global-search__results[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .customer-priority-ledger__statement-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-priority-ledger__statement-metric--wide {
        grid-column: span 2;
    }
}

/* 2026-04-20 Xero-inspired default theme */
body[data-theme="xero"] {
    --bg-shell-start: #eef3f7;
    --bg-shell-end: #eef3f7;
    --bg-radial: rgba(13, 118, 189, 0.04);
    --panel: #ffffff;
    --panel-soft: #ffffff;
    --panel-strong: #f7f9fb;
    --sidebar-bg: #0f7fc8;
    --card-bg: #ffffff;
    --card-hover: rgba(16, 126, 195, 0.06);
    --border: rgba(23, 43, 77, 0.10);
    --border-strong: rgba(13, 118, 189, 0.26);
    --text: #1f2f46;
    --muted: #6b7a90;
    --accent: #1178be;
    --accent-strong: #0c6cab;
    --danger: #d82f3f;
    --success: #1a8f4c;
    --warning: #d59b00;
    --shadow: 0 8px 20px rgba(31, 47, 70, 0.06);
    --panel-radius: 12px;
    --card-radius: 10px;
    --control-radius: 8px;
    --table-cell-y: 10px;
    --table-cell-x: 10px;
    background:
        radial-gradient(circle at top right, var(--bg-radial), transparent 28%),
        linear-gradient(180deg, var(--bg-shell-start) 0%, var(--bg-shell-end) 100%);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

body[data-theme="xero"] .content {
    padding-top: 0;
}

body[data-theme="xero"] .app-header {
    gap: 7px;
    padding: 3px 10px 4px;
    background: linear-gradient(180deg, #0f83ce 0%, #0a74b9 100%);
    border: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(13, 118, 189, 0.12);
}

body[data-theme="xero"] .app-header__top {
    grid-template-columns: auto minmax(240px, 1fr) auto;
    gap: 6px 12px;
    align-items: center;
}

body[data-theme="xero"] .app-brand {
    gap: 8px;
    max-width: 260px;
}

body[data-theme="xero"] .app-header__top {
    grid-template-columns: minmax(190px, 236px) fit-content(360px) auto;
}

body[data-theme="xero"] .app-brand__logo,
body[data-theme="xero"] .mobile-topbar__logo,
body[data-theme="xero"] .brand-logo {
    filter: brightness(0) invert(1);
}

body[data-theme="xero"] .app-brand__logo {
    width: 120px;
    max-width: 120px;
}

body[data-theme="xero"] .brand-logo {
    width: min(100%, 176px);
}

body[data-theme="xero"] .app-brand__meta {
    display: grid !important;
    gap: 2px;
}

body[data-theme="xero"] .app-brand__eyebrow {
    display: block;
    margin: 0;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body[data-theme="xero"] .app-brand__meta strong {
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1.02;
    font-weight: 700;
}

body[data-theme="xero"] .mobile-topbar__logo {
    width: min(52vw, 220px) !important;
}

body[data-theme="xero"] .global-search__field input,
body[data-theme="xero"] .global-search--desktop input,
body[data-theme="xero"] .global-search--mobile input {
    background: #ffffff;
    color: #1f2f46;
    border: 1px solid rgba(10, 51, 84, 0.14);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

body[data-theme="xero"] .global-search__field input::placeholder {
    color: #7d8ca3;
}

body[data-theme="xero"] .global-search__results {
    background: #ffffff;
    color: #1f2f46;
    border: 1px solid rgba(23, 43, 77, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 26px rgba(31, 47, 70, 0.10);
}

body[data-theme="xero"] .app-header__controls {
    gap: 4px;
}

body[data-theme="xero"] .app-header__meta-pill,
body[data-theme="xero"] .app-header__user,
body[data-theme="xero"] .app-header__controls .button {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    box-shadow: none;
}

body[data-theme="xero"] .app-header__user-name,
body[data-theme="xero"] .app-header__user-role {
    color: #ffffff;
}

body[data-theme="xero"] .header-nav__link {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

body[data-theme="xero"] .header-nav__link:hover,
body[data-theme="xero"] .header-nav__link:focus-visible {
    background: rgba(0, 0, 0, 0.10);
    color: #ffffff;
}

body[data-theme="xero"] .header-nav__link.is-active {
    background: rgba(0, 0, 0, 0.20);
    color: #ffffff;
}

body[data-theme="xero"] .app-header__subnav {
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

body[data-theme="xero"] .header-subnav__link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

body[data-theme="xero"] .header-subnav__link:hover,
body[data-theme="xero"] .header-subnav__link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

body[data-theme="xero"] .header-subnav__link.is-active {
    background: #ffffff;
    border-color: #ffffff;
    color: #0b74b9;
}

body[data-theme="xero"] .mobile-topbar {
    background: linear-gradient(180deg, #0f83ce 0%, #0a74b9 100%);
    border: 0;
    box-shadow: 0 8px 18px rgba(13, 118, 189, 0.18);
}

body[data-theme="xero"] .mobile-topbar__title,
body[data-theme="xero"] .mobile-topbar__page {
    color: #ffffff;
}

body[data-theme="xero"] .mobile-avatar,
body[data-theme="xero"] .sidebar-toggle,
body[data-theme="xero"] .icon-button {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

body[data-theme="xero"] .sidebar-toggle span,
body[data-theme="xero"] .sidebar-close span {
    background: #ffffff;
}

body[data-theme="xero"] .sidebar {
    background: linear-gradient(180deg, #0f83ce 0%, #0a74b9 100%);
    border-right: 0;
}

body[data-theme="xero"] .sidebar-overlay {
    background: rgba(8, 28, 47, 0.26);
}

body[data-theme="xero"] .sidebar .pill,
body[data-theme="xero"] .sidebar .user-card,
body[data-theme="xero"] .sidebar .nav a {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.14);
}

body[data-theme="xero"] .sidebar .pill,
body[data-theme="xero"] .sidebar .nav a,
body[data-theme="xero"] .sidebar .user-card {
    background: rgba(255, 255, 255, 0.08);
}

body[data-theme="xero"] .sidebar .nav a.is-active,
body[data-theme="xero"] .sidebar .nav a:hover {
    background: rgba(0, 0, 0, 0.18);
}

body[data-theme="xero"] .sidebar .user-card small,
body[data-theme="xero"] .sidebar-subnav__label {
    color: rgba(255, 255, 255, 0.72);
}

body[data-theme="xero"] .hero,
body[data-theme="xero"] .panel,
body[data-theme="xero"] .detail-card,
body[data-theme="xero"] .auth-card,
body[data-theme="xero"] .metric-card,
body[data-theme="xero"] .workspace-stat,
body[data-theme="xero"] .workspace-linkbar__item,
body[data-theme="xero"] .sync-overview-card,
body[data-theme="xero"] .customer-command-deck,
body[data-theme="xero"] .customer-command-deck__balance,
body[data-theme="xero"] .customer-command-deck__fact,
body[data-theme="xero"] .customer-mini-stat,
body[data-theme="xero"] .dashboard-module,
body[data-theme="xero"] .empty-state,
body[data-theme="xero"] .customer-info-dialog,
body[data-theme="xero"] .customer-info-card,
body[data-theme="xero"] .visit-cadence-suggestion {
    background: #ffffff;
    border-color: rgba(23, 43, 77, 0.10);
    box-shadow: 0 8px 18px rgba(31, 47, 70, 0.06);
}

body[data-theme="xero"] .page-shell,
body[data-theme="xero"] .page-stack,
body[data-theme="xero"] .page-main-grid {
    gap: 14px;
}

body[data-theme="xero"] .workspace-head {
    padding: 8px 0 6px;
}

body[data-theme="xero"] .workspace-head__marker {
    background: linear-gradient(180deg, #0f83ce 0%, #0a74b9 100%);
    border-radius: 999px;
}

body[data-theme="xero"] .workspace-head__eyebrow,
body[data-theme="xero"] .panel-header .eyebrow,
body[data-theme="xero"] .metric-card span,
body[data-theme="xero"] .workspace-stat span,
body[data-theme="xero"] .workspace-linkbar__item span {
    color: #74839a;
}

body[data-theme="xero"] .workspace-head__title,
body[data-theme="xero"] .panel h1,
body[data-theme="xero"] .panel h2,
body[data-theme="xero"] .hero h1,
body[data-theme="xero"] .detail-card strong,
body[data-theme="xero"] .metric-card strong,
body[data-theme="xero"] .workspace-stat strong,
body[data-theme="xero"] .workspace-linkbar__item strong {
    color: #1f2f46;
}

body[data-theme="xero"] .workspace-head__subtitle,
body[data-theme="xero"] .muted,
body[data-theme="xero"] .lede,
body[data-theme="xero"] .metric-card small,
body[data-theme="xero"] .workspace-stat small,
body[data-theme="xero"] .workspace-linkbar__item small,
body[data-theme="xero"] .detail-card p {
    color: #6b7a90;
}

body[data-theme="xero"] .button,
body[data-theme="xero"] .nav a {
    background: #ffffff;
    border-color: rgba(23, 43, 77, 0.12);
    color: #24405d;
    box-shadow: none;
}

body[data-theme="xero"] .button:hover,
body[data-theme="xero"] .nav a:hover,
body[data-theme="xero"] .icon-button:hover,
body[data-theme="xero"] .mobile-avatar:hover {
    background: #f4f9fd;
}

body[data-theme="xero"] .button.primary {
    background: linear-gradient(180deg, #1493e2 0%, #0f7fc8 100%);
    border-color: #0f7fc8;
    color: #ffffff;
}

body[data-theme="xero"] .pill {
    background: #eef7fd;
    border-color: #d1e7f5;
    color: #0c6eac;
}

body[data-theme="xero"] .pill-warning {
    background: #fff6dd;
    border-color: #f3dd96;
    color: #8a6400;
}

body[data-theme="xero"] .pill-danger,
body[data-theme="xero"] .pill-danger-soft {
    background: #fff1f3;
    border-color: #f5cad0;
    color: #c4354a;
}

.order-health-pill {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.order-health-pill--hold,
.order-health-pill--risk {
    background: #fde5e8 !important;
    border-color: #e79aa7 !important;
    color: #b42333 !important;
}

.order-health-pill--watch {
    background: #fff0cf !important;
    border-color: #e7bf67 !important;
    color: #9a5b00 !important;
}

.order-health-pill--stable {
    background: #e0f4e6 !important;
    border-color: #89c79b !important;
    color: #17663a !important;
}

body[data-theme="xero"] .order-health-pill--hold,
body[data-theme="xero"] .order-health-pill--risk {
    background: #fde5e8 !important;
    border-color: #e79aa7 !important;
    color: #b42333 !important;
}

body[data-theme="xero"] .order-health-pill--watch {
    background: #fff0cf !important;
    border-color: #e7bf67 !important;
    color: #9a5b00 !important;
}

body[data-theme="xero"] .order-health-pill--stable {
    background: #e0f4e6 !important;
    border-color: #89c79b !important;
    color: #17663a !important;
}

body[data-theme="xero"] .pill-success {
    background: #ecfdf3;
    border-color: #b7ebc6;
    color: #1d7a43;
}

body[data-theme="xero"] .table-wrap {
    background: #ffffff;
    border-color: rgba(23, 43, 77, 0.10);
    box-shadow: 0 8px 18px rgba(31, 47, 70, 0.05);
}

body[data-theme="xero"] table thead th {
    background: #f7f9fb;
    color: #75849b;
}

body[data-theme="xero"] th,
body[data-theme="xero"] td {
    color: #22384e;
    border-bottom-color: #e8edf2;
}

body[data-theme="xero"] table tbody tr:nth-child(even) {
    background: #ffffff;
}

body[data-theme="xero"] table tbody tr:hover {
    background: #f3f9fd;
}

body[data-theme="xero"] .table-link,
body[data-theme="xero"] .metric-card-meta-link,
body[data-theme="xero"] .command-detail-links a,
body[data-theme="xero"] .dashboard-module__links a {
    color: #0d7ac1;
}

body[data-theme="xero"] input,
body[data-theme="xero"] select,
body[data-theme="xero"] textarea {
    background: #ffffff;
    color: #1f2f46;
    border-color: rgba(23, 43, 77, 0.14);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

body[data-theme="xero"] input::placeholder,
body[data-theme="xero"] textarea::placeholder {
    color: #8391a6;
}

body[data-theme="xero"] .field span {
    color: #66778f;
}

body[data-theme="xero"] .flash {
    background: #ffffff;
    border-color: rgba(23, 43, 77, 0.10);
    color: #1f2f46;
    box-shadow: 0 8px 18px rgba(31, 47, 70, 0.05);
}

body[data-theme="xero"] .flash-success {
    background: #edf9f1;
    border-color: #caead5;
    color: #1c6b3b;
}

body[data-theme="xero"] .flash-error {
    background: #fff1f3;
    border-color: #f5c9d0;
    color: #b73646;
}

.inventory-filter-strip,
.inventory-bulk-bar,
.sync-setup-grid {
    display: grid;
    gap: 10px;
}

.inventory-filter-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    align-items: end;
}

.inventory-filter-strip__actions,
.inventory-bulk-bar__actions {
    display: flex;
    gap: 8px;
    align-items: end;
}

.inventory-bulk-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr)) auto;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 92%, transparent);
}

.sync-setup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-card--compact {
    min-height: 0;
    padding: 10px 12px;
}

.code-block--compact {
    margin: 6px 0 0;
    min-height: 0;
    max-height: none;
    padding: 10px 12px;
    font-size: 0.76rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.page-inventory-items .table-wrap th:first-child,
.page-inventory-items .table-wrap td:first-child {
    width: 38px;
}

body[data-theme="xero"] .page-inventory .panel,
body[data-theme="xero"] .page-inventory-items .panel,
body[data-theme="xero"] .page-settings .settings-section .detail-card--compact {
    background: #ffffff;
}

body[data-theme="xero"] .inventory-bulk-bar,
body[data-theme="xero"] .inventory-filter-strip,
body[data-theme="xero"] .sync-setup-grid {
    gap: 10px;
}

body[data-theme="xero"] .inventory-bulk-bar {
    background: #f7fbfe;
    border-color: rgba(23, 43, 77, 0.10);
}

.workspace-stats--inventory {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.inventory-overview-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    align-items: start;
}

.inventory-filter-strip--wide {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.detail-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.page-item-detail--inventory .page-main-grid {
    align-items: start;
}

.item-detail-main--inventory {
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
}

.page-item-detail--inventory .workspace-stat small,
.page-inventory-overview .workspace-stat small,
.page-inventory-items .workspace-stat small {
    min-height: 0;
}

.choice-card--compact {
    min-height: auto;
    padding: 10px 12px;
}

.choice-card--compact .choice-card__title {
    font-size: 0.9rem;
}

.choice-card--compact .choice-card__meta {
    font-size: 0.76rem;
}

.page-inventory-overview .panel .table-wrap,
.page-item-detail--inventory .panel .table-wrap {
    max-width: 100%;
}

.page-inventory-overview .stack-list .list-item,
.page-item-detail--inventory .stack-list .list-item {
    gap: 4px;
}

body[data-theme="xero"] .page-inventory-overview,
body[data-theme="xero"] .page-inventory-items,
body[data-theme="xero"] .page-item-detail--inventory {
    background: transparent;
}

body[data-theme="xero"] .page-inventory-overview .workspace-stat,
body[data-theme="xero"] .page-inventory-items .workspace-stat,
body[data-theme="xero"] .page-item-detail--inventory .workspace-stat {
    background: #ffffff;
}

body[data-theme="xero"] .page-item-detail--inventory .item-image-preview,
body[data-theme="xero"] .page-item-detail--inventory .choice-card {
    background: #f8fbff;
}

body[data-theme="xero"] .code-block,
body[data-theme="xero"] .code-block--compact {
    background: #f7f9fb;
    color: #1f2f46;
    border: 1px solid rgba(23, 43, 77, 0.10);
    box-shadow: none;
}

body[data-theme="xero"] .customer-info-overlay__backdrop {
    background: rgba(15, 25, 40, 0.24);
}

body[data-theme="xero"] .customer-info-dialog__close {
    background: #ffffff;
    color: #23405d;
}

@media (min-width: 981px) {
    body[data-theme="xero"] .app-header {
        padding: 3px 12px 4px;
        border-radius: 0 0 7px 7px;
    }

    body[data-theme="xero"] .app-header__top {
        grid-template-columns: minmax(180px, 228px) fit-content(320px) auto;
    }

    body[data-theme="xero"] .global-search--desktop {
        width: clamp(220px, 16vw, 320px);
        justify-self: start;
    }

    body[data-theme="xero"] .global-search--desktop .global-search__field input {
        min-height: 28px;
        height: 28px;
        padding: 0 9px;
        font-size: 0.78rem;
        border-radius: 13px;
    }

    body[data-theme="xero"] .header-nav__link {
        min-height: 24px;
        padding: 0 9px;
        font-size: 0.74rem;
    }

    body[data-theme="xero"] .header-subnav__link {
        min-height: 21px;
        padding: 0 8px;
        font-size: 0.68rem;
    }
}

@media (max-width: 980px) {
    body[data-theme="xero"] .content {
        padding-top: 10px;
    }

    body[data-theme="xero"] .sidebar {
        width: min(88vw, 320px);
    }

    body[data-theme="xero"] .mobile-topbar {
        border-radius: 12px;
    }

    .inventory-filter-strip,
    .inventory-bulk-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .inventory-filter-strip__actions,
    .inventory-bulk-bar__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .sync-setup-grid {
        grid-template-columns: 1fr;
    }

    .inventory-overview-grid,
    .item-detail-main--inventory {
        grid-template-columns: 1fr;
    }

    .inventory-quick-edit__layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .inventory-filter-strip,
    .inventory-bulk-bar {
        grid-template-columns: 1fr;
    }

    .workspace-stats--inventory,
    .inventory-filter-strip--wide {
        grid-template-columns: 1fr;
    }

    .inventory-quick-edit__grid,
    .inventory-quick-edit__actions {
        grid-template-columns: 1fr;
    }

    .inventory-quick-edit__actions {
        display: grid;
    }

    .inventory-quick-edit__actions-end {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* 2026-04-19 header cleanup */
@media (min-width: 981px) {
    .app-header {
        gap: 8px;
        padding: 8px 14px 10px;
        border-radius: 16px;
    }

    .app-header__top {
        grid-template-columns: auto minmax(420px, 1fr) auto;
        gap: 12px 16px;
        align-items: center;
    }

    .app-brand {
        gap: 0;
        min-width: 0;
        max-width: 120px;
    }

    .app-brand__logo {
        width: 96px;
        max-width: 96px;
    }

    .app-brand__meta {
        display: none;
    }

    .global-search--desktop {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .global-search--desktop .global-search__field {
        display: block;
        width: 100%;
    }

    .global-search--desktop .global-search__field input {
        width: 100%;
        min-height: 38px;
        height: 38px;
        padding: 0 14px;
        border-radius: 13px;
    }

    .app-header__controls {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .app-header__meta-pill,
    .app-header__user,
    .app-header__controls .button {
        flex: 0 0 auto;
    }

    .app-header__nav {
        padding-top: 2px;
    }

    .header-nav {
        gap: 6px;
    }

    .header-nav__link {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .app-header__subnav {
        padding-top: 0;
    }

    .header-subnav {
        gap: 6px;
    }

    .header-subnav__link {
        min-height: 26px;
        padding: 0 9px;
        font-size: 0.72rem;
    }
}

.app-header__emulation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 10px;
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border) 76%);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.app-header__emulation-label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--heading);
}

.order-product-groups {
    display: grid;
    gap: 14px;
}

.order-product-group {
    display: grid;
    gap: 10px;
}

.order-product-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.order-product-group__header h3 {
    margin: 2px 0 0;
    font-size: 1rem;
}

.order-product-group__eyebrow {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.order-product-finder__controls {
    display: flex;
    align-items: end;
    gap: 12px;
    width: min(100%, 620px);
}

.order-product-finder__field {
    flex: 1 1 auto;
}

.order-product-card.is-search-focus {
    border-color: color-mix(in srgb, var(--accent) 64%, var(--border) 36%);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent 72%);
}

.inventory-category-row td {
    padding: 10px 12px;
    background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.inventory-category-row__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inventory-category-row__label strong {
    font-size: 0.92rem;
}

.inventory-category-row__label span {
    font-size: 0.74rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.role-emulator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.role-emulator-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.role-emulator-card--muted {
    background: color-mix(in srgb, var(--panel) 92%, transparent);
}

body[data-theme="xero"] .app-header__emulation {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(9, 49, 93, 0.3);
}

body[data-theme="xero"] .app-header__emulation-label {
    color: #ffffff;
}

@media (max-width: 1180px) {
    .order-product-finder__controls {
        width: 100%;
    }
}

@media (max-width: 860px) {
    .order-product-finder__controls {
        flex-direction: column;
        align-items: stretch;
    }

    .app-header__emulation {
        width: 100%;
        justify-content: space-between;
    }
}

.compact-table {
    table-layout: fixed;
    width: 100%;
}

.compact-table th,
.compact-table td {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
    line-height: 1.35;
}

.compact-table .table-cell-numeric {
    white-space: nowrap;
}

.is-compact-view .workspace-stat {
    padding: 10px 12px;
}

.is-compact-view .workspace-stat strong {
    font-size: 1.15rem;
}

.is-compact-view .compact-table th,
.is-compact-view .compact-table td {
    padding-top: 8px;
    padding-bottom: 8px;
}

.settings-display-module__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.settings-display-module__blocks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.settings-display-scope-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.74rem;
}

.settings-sortable-list {
    display: grid;
    gap: 8px;
}

.settings-sortable-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-soft) 90%, transparent);
    transition: border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.settings-sortable-row.is-hidden {
    opacity: 0.62;
}

.settings-sortable-row.is-dragging {
    opacity: 0.72;
    border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.settings-sortable-row--dashboard,
.settings-sortable-row--featured {
    grid-template-columns: 28px minmax(0, 1fr);
}

.settings-sortable-handle {
    width: 28px;
    min-height: 28px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--muted);
    cursor: grab;
}

.settings-check-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.settings-check-row small {
    grid-column: 2;
    color: var(--muted);
}

.settings-check-row__content {
    display: grid;
    gap: 6px;
}

.settings-label-input {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
}

.settings-inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    color: var(--text);
}

.settings-dashboard-row {
    display: grid;
    gap: 10px;
}

.settings-dashboard-row__body {
    display: grid;
    gap: 4px;
}

.settings-dashboard-row__body small {
    color: var(--muted);
}

.settings-dashboard-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-featured-manager {
    display: grid;
    gap: 10px;
}

.settings-featured-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-featured-item small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
}

.settings-sortable-list--featured .settings-sortable-row {
    background: color-mix(in srgb, var(--accent) 6%, var(--panel-soft));
}

.page-items .inventory-category-row--featured td {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.order-product-group--featured {
    margin-bottom: 14px;
}

.order-product-card--featured {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.dashboard-module.is-compact-view .workspace-stat {
    padding: 8px 10px;
}

.dashboard-module.is-compact-view .workspace-stat strong {
    font-size: 1rem;
}

@media (max-width: 1100px) {
    .settings-display-module__blocks {
        grid-template-columns: 1fr;
    }
}

.catalog-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.catalog-template-card,
.catalog-public-card,
.catalog-section-card,
.catalog-builder-showcase {
    border: 1px solid rgba(116, 137, 166, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.catalog-template-card {
    overflow: hidden;
}

.catalog-template-card__visual {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(220px, 0.95fr);
    gap: 16px;
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.94), transparent 45%),
        linear-gradient(135deg, rgba(12, 88, 184, 0.9), rgba(68, 180, 255, 0.72));
    color: #f8fbff;
}

.catalog-template-card--food-service .catalog-template-card__visual {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.94), transparent 45%),
        linear-gradient(135deg, rgba(16, 113, 84, 0.95), rgba(92, 214, 170, 0.72));
}

.catalog-template-card--promo .catalog-template-card__visual {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.92), transparent 42%),
        linear-gradient(135deg, rgba(113, 30, 166, 0.92), rgba(255, 98, 152, 0.72));
}

.catalog-template-card__visual-copy,
.catalog-template-card__body,
.catalog-public-card__body,
.catalog-builder-showcase__copy,
.catalog-builder-showcase__body {
    display: grid;
    gap: 10px;
}

.catalog-template-card__visual-copy h3 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.05;
    color: inherit;
}

.catalog-template-card__visual-copy p {
    margin: 0;
    color: rgba(248, 251, 255, 0.9);
}

.catalog-template-card__mosaic {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 92px;
    gap: 10px;
}

.catalog-template-card__mosaic-tile {
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
}

.catalog-template-card__mosaic-tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.catalog-template-card__mosaic-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,246,250,0.98));
    padding: 10px 16px;
}

.catalog-template-card__mosaic-tile span {
    font-size: 1.4rem;
    font-weight: 800;
    color: rgba(248, 251, 255, 0.84);
}

.catalog-template-card__body {
    padding: 18px 20px 20px;
}

.catalog-template-card__body p {
    margin: 0;
}

.catalog-template-card__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(248, 251, 255, 0.82);
}

.catalog-template-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #5d6f84;
    font-size: 0.86rem;
}

.catalog-template-card__category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-template-card__category-list span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(12, 88, 184, 0.08);
    color: #215385;
    font-size: 0.82rem;
    font-weight: 600;
}

.catalog-builder-showcase {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.35fr);
    gap: 18px;
    padding: 20px;
}

.catalog-builder-showcase__copy h2 {
    margin: 0;
    font-size: 1.55rem;
}

.catalog-builder-showcase__copy p {
    margin: 0;
    color: #566576;
}

.catalog-builder-showcase__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.catalog-builder-showcase__card {
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(237, 243, 249, 0.98));
    border: 1px solid rgba(116, 137, 166, 0.14);
}

.catalog-builder-showcase__image {
    display: grid;
    place-items: center;
    height: 136px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(241,246,251,0.98));
}

.catalog-builder-showcase__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 10px 16px;
}

.catalog-builder-showcase__image span {
    font-size: 1.65rem;
    font-weight: 800;
    color: #8ca2ba;
}

.catalog-builder-showcase__body {
    padding: 12px;
    gap: 4px;
}

.catalog-builder-showcase__body strong {
    font-size: 0.86rem;
    line-height: 1.2;
}

.catalog-builder-showcase__body span {
    color: #2d6db5;
    font-weight: 700;
    font-size: 0.88rem;
}

.catalog-builder-hero {
    display: grid;
    grid-template-columns: minmax(300px, 0.86fr) minmax(0, 1.14fr);
    gap: 18px;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid rgba(116, 137, 166, 0.16);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.86), transparent 28%),
        linear-gradient(135deg, rgba(18, 122, 206, 0.96), rgba(74, 171, 244, 0.92));
    box-shadow: 0 26px 52px rgba(23, 76, 122, 0.14);
}

.catalog-builder-hero__copy {
    display: grid;
    gap: 12px;
    align-content: start;
    color: #ffffff;
}

.catalog-builder-hero__copy h2 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 3rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
}

.catalog-builder-hero__copy p {
    margin: 0;
    color: rgba(247, 251, 255, 0.92);
}

.catalog-builder-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-builder-hero__meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
}

.catalog-builder-hero .pill {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.catalog-builder-hero__gallery {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.catalog-builder-hero-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 28px rgba(15, 63, 108, 0.12);
}

.catalog-builder-hero-card__image {
    display: grid;
    place-items: center;
    height: 160px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(253, 254, 255, 1), rgba(238, 245, 251, 1));
}

.catalog-builder-hero-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.catalog-builder-hero-card__image span {
    font-size: 1.7rem;
    font-weight: 800;
    color: #8ca2ba;
}

.catalog-builder-hero-card__body {
    display: grid;
    gap: 4px;
    padding: 12px;
}

.catalog-builder-hero-card__body strong {
    font-size: 0.86rem;
    line-height: 1.2;
    color: #1f2f46;
}

.catalog-builder-hero-card__body span {
    color: #2d6db5;
    font-weight: 700;
    font-size: 0.88rem;
}

.catalog-builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.catalog-builder-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 18px;
}

.catalog-builder-meta {
    margin-bottom: 18px;
}

.catalog-audience-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-section-list {
    display: grid;
    gap: 18px;
}

.catalog-section-card {
    padding: 18px;
    display: grid;
    gap: 16px;
}

.catalog-section-card.is-hidden,
.catalog-item-row.is-hidden {
    opacity: 0.62;
}

.catalog-section-card.is-dragging,
.catalog-item-row.is-dragging {
    opacity: 0.42;
}

.catalog-section-card__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.catalog-section-card__title {
    display: grid;
    gap: 4px;
}

.catalog-section-card__title small {
    color: #6d8094;
}

.catalog-section-card__title-input {
    width: 100%;
    border: 1px solid rgba(116, 137, 166, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.96);
    font: inherit;
    font-weight: 700;
    color: #1f2f46;
}

.catalog-item-list,
.catalog-public-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.catalog-item-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(116, 137, 166, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(244, 248, 252, 0.96));
}

.catalog-item-row__media,
.catalog-public-card__image,
.catalog-public-hero__tile-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(116, 137, 166, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,246,250,0.98));
}

.catalog-item-row__media {
    height: 176px;
}

.catalog-item-row__media img,
.catalog-public-card__image img,
.catalog-public-hero__tile-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 10px 18px;
}

.catalog-item-row__body {
    display: grid;
    gap: 10px;
}

.catalog-item-row__body-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.catalog-item-row__copy {
    display: grid;
    gap: 4px;
}

.catalog-item-row__copy strong {
    font-size: 1rem;
    line-height: 1.22;
}

.catalog-item-row__pricing {
    display: grid;
    gap: 2px;
    justify-items: end;
}

.catalog-item-row__pricing span {
    color: #1459a5;
    font-weight: 800;
}

.catalog-item-row__pricing small {
    color: #7f8ea0;
    font-size: 0.76rem;
}

.catalog-item-row__handle {
    justify-self: start;
}

.catalog-item-row__actions {
    display: grid;
    gap: 8px;
    justify-items: start;
}

.catalog-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.page-catalog-public {
    max-width: 1460px;
}

.catalog-public-hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
    margin-bottom: 20px;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.95), transparent 36%),
        linear-gradient(140deg, rgba(12, 88, 184, 0.9), rgba(58, 181, 255, 0.72));
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    color: #f8fbff;
}

.catalog-public-hero__copy {
    display: grid;
    gap: 12px;
    align-content: start;
}

.catalog-public-hero__title {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.35rem);
    line-height: 0.98;
    color: inherit;
}

.catalog-public-hero__intro {
    margin: 0;
    max-width: 54ch;
    color: rgba(248, 251, 255, 0.9);
    font-size: 1rem;
}

.catalog-public-hero .pill {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.18);
    color: #f8fbff;
}

.catalog-public-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

.catalog-public-hero__stats div {
    min-width: 140px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    gap: 4px;
}

.catalog-public-hero__stats span {
    font-size: 0.8rem;
    color: rgba(248, 251, 255, 0.84);
}

.catalog-public-hero__stats strong {
    font-size: 1.3rem;
    line-height: 1;
    color: #ffffff;
}

.catalog-public-hero__gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 160px;
    gap: 12px;
}

.catalog-public-hero__tile {
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.catalog-public-hero__tile:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.catalog-public-hero__tile-image {
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.catalog-public-hero__tile-body {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: rgba(12, 33, 56, 0.3);
    backdrop-filter: blur(6px);
}

.catalog-public-hero__tile-body strong {
    font-size: 0.86rem;
    line-height: 1.2;
    color: #ffffff;
}

.catalog-public-hero__tile-body span {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.catalog-public-section {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(116, 137, 166, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.catalog-public-section__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
}

.catalog-public-section__header h2 {
    margin: 0;
    font-size: 1.55rem;
}

.catalog-public-section__count {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(12, 88, 184, 0.08);
    color: #2e567f;
    font-size: 0.82rem;
    font-weight: 700;
}

.catalog-public-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.catalog-public-grid--featured {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.catalog-public-card {
    overflow: hidden;
}

.catalog-public-card--featured .catalog-public-card__image {
    height: 240px;
}

.catalog-public-card__image {
    height: 210px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.catalog-public-card__body {
    padding: 16px 16px 18px;
}

.catalog-public-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #74859a;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.catalog-public-card__body h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
}

.catalog-public-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.catalog-public-card__footer strong {
    color: #1459a5;
    font-size: 1.04rem;
}

.catalog-public-card__footer span {
    color: #5a7d55;
    font-weight: 700;
    font-size: 0.82rem;
}

body[data-theme="xero"] .catalog-template-card,
body[data-theme="xero"] .catalog-public-card,
body[data-theme="xero"] .catalog-section-card,
body[data-theme="xero"] .catalog-public-section,
body[data-theme="xero"] .catalog-builder-showcase {
    background: rgba(255, 255, 255, 0.98);
}

.catalog-studio {
    display: grid;
    gap: 20px;
}

.catalog-studio__poster {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    padding: 20px;
    border-radius: 30px;
    border: 1px solid rgba(116, 137, 166, 0.16);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.86), transparent 28%),
        linear-gradient(135deg, rgba(12, 88, 184, 0.96), rgba(68, 180, 255, 0.84));
    box-shadow: 0 18px 40px rgba(12, 72, 128, 0.16);
}

.catalog-studio__poster-copy {
    display: grid;
    gap: 12px;
    align-content: start;
    color: #ffffff;
}

.catalog-studio__poster-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 2.9vw, 3.2rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.catalog-studio__poster-copy p {
    margin: 0;
    color: rgba(247, 251, 255, 0.92);
}

.catalog-studio__poster-meta,
.catalog-studio__poster-audience {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-studio__poster-meta span,
.catalog-studio__poster-audience span {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.catalog-studio__poster-meta span {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.catalog-studio__poster-audience span {
    background: rgba(8, 42, 84, 0.3);
    color: rgba(255, 255, 255, 0.92);
}

.catalog-studio__poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 176px;
    gap: 12px;
}

.catalog-studio__poster-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 28px rgba(15, 63, 108, 0.12);
}

.catalog-studio__poster-card.is-primary {
    grid-column: span 2;
    grid-row: span 2;
}

.catalog-studio__poster-image {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 16px;
    background: linear-gradient(180deg, rgba(253, 254, 255, 1), rgba(238, 245, 251, 1));
}

.catalog-studio__poster-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.catalog-studio__poster-image span {
    font-size: 1.8rem;
    font-weight: 800;
    color: #8ca2ba;
}

.catalog-studio__poster-body {
    display: grid;
    gap: 4px;
    padding: 12px 14px 14px;
}

.catalog-studio__poster-body strong {
    font-size: 0.92rem;
    line-height: 1.22;
    color: #1f2f46;
}

.catalog-studio__poster-body span {
    color: #2d6db5;
    font-weight: 700;
    font-size: 0.92rem;
}

.catalog-studio__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.72fr) minmax(330px, 0.88fr);
    gap: 18px;
    align-items: start;
}

.catalog-studio__side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 18px;
}

.catalog-studio__settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.catalog-section-card__index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(12, 88, 184, 0.08);
    color: #1f5ea1;
    font-size: 0.84rem;
    font-weight: 800;
}

.catalog-item-row {
    grid-template-columns: 108px 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 118px;
}

.catalog-item-row__media {
    width: 108px;
    height: 108px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(253, 254, 255, 1), rgba(238, 245, 251, 1));
    border: 1px solid rgba(116, 137, 166, 0.12);
}

.catalog-item-row__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 10px;
}

.catalog-item-row__body {
    display: flex;
    align-items: center;
}

.catalog-item-row__copy {
    display: grid;
    gap: 8px;
}

.catalog-item-row__copy strong {
    font-size: 1rem;
    line-height: 1.26;
    color: #17324c;
}

.catalog-item-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6c8198;
    font-size: 0.84rem;
}

.catalog-item-row__meta span:last-child {
    color: #0f72ca;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .catalog-builder-layout,
    .catalog-builder-showcase,
    .catalog-builder-hero,
    .catalog-public-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-builder-side {
        position: static;
    }

    .catalog-public-hero__gallery,
    .catalog-builder-hero__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-studio__layout,
    .catalog-studio__poster {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio__side {
        position: static;
    }
}

@media (max-width: 820px) {
    .catalog-template-card__visual,
    .catalog-public-section__header,
    .catalog-item-row__body-top {
        grid-template-columns: minmax(0, 1fr);
        flex-direction: column;
        align-items: start;
    }

    .catalog-public-hero__gallery,
    .catalog-builder-hero__gallery,
    .catalog-builder-showcase__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-studio__settings {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio__poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .catalog-public-hero__tile:first-child {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .catalog-template-grid,
    .catalog-item-list,
    .catalog-public-grid,
    .catalog-public-grid--featured,
    .catalog-builder-hero__gallery,
    .catalog-builder-showcase__grid,
    .catalog-public-hero__gallery {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio__poster-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio__poster-card.is-primary {
        grid-column: span 1;
        grid-row: span 1;
    }

    .catalog-item-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-public-hero__tile:first-child {
        grid-column: span 1;
        grid-row: span 1;
    }

    .catalog-section-card__header {
        grid-template-columns: minmax(0, 1fr);
    }
}

.catalog-brand-preview-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: 26px;
    border: 1px solid rgba(167, 186, 204, 0.36);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.88), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--catalog-brand-surface, #F7F3EA) 78%, white 22%) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.catalog-brand-preview-card__logo {
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(236, 243, 248, 0.92) 100%);
    border: 1px solid rgba(167, 186, 204, 0.32);
    overflow: hidden;
}

.catalog-brand-preview-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 12px;
}

.catalog-brand-preview-card__logo span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--catalog-brand-accent, #163A63);
}

.catalog-brand-preview-card__copy {
    display: grid;
    gap: 8px;
}

.catalog-brand-preview-card__copy h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--catalog-brand-accent, #163A63);
}

.catalog-brand-preview-card__copy p:last-child {
    margin: 0;
    color: #6a7c90;
}

.catalog-studio-shell {
    display: grid;
    gap: 24px;
}

.catalog-studio-hero {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 22px;
    padding: 26px;
    border-radius: 34px;
    border: 1px solid rgba(167, 186, 204, 0.34);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 26%),
        linear-gradient(135deg, color-mix(in srgb, var(--catalog-brand-accent, #163A63) 90%, #0b3b68 10%) 0%, color-mix(in srgb, var(--catalog-brand-primary, #C63F34) 35%, #1f90df 65%) 100%);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.catalog-studio-hero__brand {
    display: grid;
    align-content: start;
    gap: 16px;
    color: #ffffff;
}

.catalog-studio-hero__brand-badge {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 32px rgba(11, 55, 99, 0.18);
}

.catalog-studio-hero__brand-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 14px;
}

.catalog-studio-hero__brand-badge span {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--catalog-brand-accent, #163A63);
}

.catalog-studio-hero__brand-copy {
    display: grid;
    gap: 10px;
}

.catalog-studio-hero__brand-copy h2 {
    margin: 0;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: clamp(2.2rem, 3.2vw, 3.6rem);
    line-height: 0.94;
    letter-spacing: -0.05em;
}

.catalog-studio-hero__brand-copy p,
.catalog-studio-hero__brand-copy small {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.catalog-studio-hero__audience {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-studio-hero__audience span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.catalog-studio-hero__preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-content: start;
}

.catalog-product-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    min-height: 100%;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(188, 202, 216, 0.44);
    box-shadow: 0 16px 30px rgba(13, 63, 111, 0.12);
}

.catalog-product-card__image {
    display: grid;
    place-items: center;
    height: 232px;
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--catalog-brand-surface, #F7F3EA) 52%, #edf4f9 48%) 100%);
}

.catalog-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.catalog-product-card__image span {
    font-size: 2rem;
    font-weight: 800;
    color: #8ea4ba;
}

.catalog-product-card__body {
    display: grid;
    gap: 8px;
    padding: 16px 16px 18px;
}

.catalog-product-card__body h3 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.22;
    color: #17324c;
}

.catalog-product-card__body p {
    margin: 0;
    color: #6a7c90;
    line-height: 1.5;
}

.catalog-product-card__body strong {
    font-size: 1.12rem;
    color: var(--catalog-brand-primary, #C63F34);
}

.catalog-studio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.58fr) minmax(320px, 0.86fr);
    gap: 20px;
    align-items: start;
}

.catalog-studio-main {
    overflow: hidden;
}

.catalog-studio-side {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 18px;
}

.catalog-studio-settings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.catalog-audience-grid,
.catalog-brand-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-side-note {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
    border: 1px solid rgba(182, 198, 214, 0.4);
}

.catalog-side-note strong {
    color: #17324c;
}

.catalog-side-note span {
    color: #6a7c90;
    font-size: 0.86rem;
}

.catalog-builder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

@media (max-width: 1180px) {
    .catalog-studio-hero,
    .catalog-studio-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio-side {
        position: static;
    }
}

@media (max-width: 920px) {
    .catalog-brand-preview-card,
    .catalog-studio-settings {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-studio-hero__preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .catalog-studio-hero {
        padding: 18px;
        border-radius: 26px;
    }

    .catalog-studio-hero__preview {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-product-card__image {
        height: 220px;
    }
}

/* 2026-04-22 catalog rhythm cleanup */

.catalog-studio-shell .settings-inline-toggle,
.catalog-section-card .settings-inline-toggle,
.catalog-item-row .settings-inline-toggle {
    gap: 6px;
    min-height: 24px;
    font-size: 0.8rem;
    line-height: 1.2;
}

.catalog-studio-shell .settings-inline-toggle input[type="checkbox"],
.catalog-studio-shell .settings-inline-toggle input[type="radio"],
.catalog-section-card .settings-inline-toggle input[type="checkbox"],
.catalog-section-card .settings-inline-toggle input[type="radio"],
.catalog-item-row .settings-inline-toggle input[type="checkbox"],
.catalog-item-row .settings-inline-toggle input[type="radio"] {
    width: 15px;
    height: 15px;
    min-height: 0;
    margin: 0;
    flex: 0 0 15px;
}

.catalog-item-list--studio {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.catalog-item-row {
    grid-template-columns: 92px 28px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    min-height: 0;
    padding: 14px;
}

.catalog-item-row__media {
    width: 92px;
    height: 92px;
    border-radius: 18px;
}

.catalog-item-row__media img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    padding: 10px 12px;
}

.catalog-item-row__body {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.catalog-item-row__copy {
    min-width: 0;
    gap: 6px;
}

.catalog-item-row__copy strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.26em);
    font-size: 0.96rem;
    line-height: 1.26;
    overflow-wrap: anywhere;
}

.catalog-item-row__pack {
    margin: 0;
    color: #6c8198;
    font-size: 0.83rem;
    line-height: 1.34;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    min-height: 1.34em;
}

.catalog-item-row__price {
    white-space: nowrap;
    color: #0f72ca;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.2;
    align-self: center;
}

.catalog-item-row__actions {
    justify-items: end;
    align-content: start;
}

.catalog-item-row__actions .table-detail-link {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.8rem;
}

.catalog-product-card,
.catalog-showcase__product-card,
.catalog-public-card,
.catalog-open-card {
    min-width: 0;
    grid-template-rows: 248px minmax(124px, auto);
}

.catalog-product-card__image,
.catalog-showcase__product-image,
.catalog-public-card__image,
.catalog-open-card__image {
    height: 248px;
    min-height: 248px;
    padding: 18px 22px;
    overflow: hidden;
}

.catalog-product-card__image img,
.catalog-showcase__product-image img,
.catalog-public-card__image img,
.catalog-open-card__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.catalog-product-card__body,
.catalog-showcase__product-body,
.catalog-public-card__body,
.catalog-open-card__body {
    align-content: start;
}

.catalog-product-card__body h3,
.catalog-showcase__product-body h3,
.catalog-public-card__body h3,
.catalog-open-card__body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.24em);
    line-height: 1.24;
    overflow-wrap: anywhere;
}

.catalog-product-card__body p,
.catalog-showcase__pack,
.catalog-public-card__body p,
.catalog-open-card__body p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    min-height: 1.45em;
    line-height: 1.45;
}

.catalog-studio__poster-card,
.catalog-showcase__hero-card,
.catalog-open-hero-card {
    min-width: 0;
}

.catalog-studio__poster-body strong,
.catalog-showcase__hero-body strong,
.catalog-open-hero-card__body strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.22em);
    line-height: 1.22;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .catalog-item-list--studio {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .catalog-item-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .catalog-item-row__handle {
        display: none;
    }

    .catalog-item-row__body,
    .catalog-item-row__actions {
        grid-column: 2;
    }

    .catalog-item-row__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-item-row__actions {
        justify-items: start;
    }
}

/* 2026-04-22 catalog studio final layout override */

.catalog-item-list--studio {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.catalog-section-card__header {
    grid-template-columns: 34px 28px minmax(0, 1fr) auto;
    align-items: center;
}

.catalog-section-card .catalog-compact-toggle input,
.catalog-item-row .catalog-compact-toggle input {
    width: 16px;
    height: 16px;
}

.catalog-section-card .settings-inline-toggle span,
.catalog-item-row .settings-inline-toggle span {
    font-size: 0.74rem;
    line-height: 1.15;
}

.catalog-item-row {
    grid-template-columns: 92px 22px minmax(0, 1fr) 78px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.catalog-item-row__media {
    width: 92px;
    height: 92px;
    align-self: center;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(180deg, #fcfdff 0%, #eef4f9 100%);
}

.catalog-item-row__media img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
    object-position: center;
    padding: 10px 12px;
}

.catalog-item-row__body {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-content: center;
}

.catalog-item-row__copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.catalog-item-row__copy strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.26em);
    line-height: 1.26;
    overflow-wrap: anywhere;
}

.catalog-item-row__pack {
    margin: 0;
    min-height: 1.34em;
}

.catalog-item-row__price {
    justify-self: start;
    align-self: start;
    white-space: nowrap;
}

.catalog-item-row__actions {
    width: 78px;
    min-width: 78px;
    justify-items: end;
    align-content: center;
    gap: 6px;
}

.catalog-item-row__actions .settings-inline-toggle {
    min-height: 18px;
    font-size: 0.68rem;
}

.catalog-item-row__actions .table-detail-link {
    min-height: 28px;
    min-width: 70px;
    padding: 0 8px;
    font-size: 0.72rem;
}

.catalog-product-card,
.catalog-product-card--studio {
    display: grid;
    grid-template-rows: 276px minmax(122px, auto);
}

.catalog-product-card__image {
    height: 276px;
    min-height: 276px;
    padding: 22px 24px;
}

.catalog-product-card__image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    object-fit: contain;
    object-position: center;
}

.catalog-product-card__body {
    display: grid;
    align-content: start;
    gap: 8px;
    border-top: 1px solid rgba(188, 202, 216, 0.28);
}

.catalog-product-card__body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(2 * 1.24em);
}

@media (max-width: 720px) {
    .catalog-section-card__header {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-item-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .catalog-item-row__handle {
        display: none;
    }

    .catalog-item-row__body,
    .catalog-item-row__actions {
        grid-column: 2;
    }

    .catalog-item-row__actions {
        width: auto;
        min-width: 0;
        justify-items: start;
    }
}

/* 2026-04-23 authoritative catalog studio row system */

.catalog-item-list--studio {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
}

.catalog-section-card__header {
    grid-template-columns: 34px 28px minmax(0, 1fr) auto !important;
    align-items: center !important;
}

.catalog-section-card .catalog-compact-toggle input,
.catalog-item-row .catalog-compact-toggle input {
    width: 14px !important;
    height: 14px !important;
}

.catalog-section-card .settings-inline-toggle span,
.catalog-item-row .settings-inline-toggle span {
    font-size: 0.72rem !important;
    line-height: 1.12 !important;
}

.catalog-item-row {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) 94px !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    min-height: 112px !important;
}

.catalog-item-row__media {
    width: 88px !important;
    height: 88px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #fcfdff 0%, #eef4f9 100%) !important;
}

.catalog-item-row__asset,
.catalog-product-card__asset {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.catalog-item-row__body {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
}

.catalog-item-row__copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 6px !important;
}

.catalog-item-row__copy strong {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    min-height: calc(2 * 1.24em) !important;
    line-height: 1.24 !important;
    overflow-wrap: anywhere !important;
    margin: 0 !important;
}

.catalog-item-row__pack {
    margin: 0 !important;
    min-height: 1.32em !important;
    color: #6e8194;
}

.catalog-item-row__price {
    justify-self: end !important;
    align-self: center !important;
    white-space: nowrap !important;
    font-weight: 800;
    color: #0f67c4;
}

.catalog-item-row__actions {
    width: 94px !important;
    min-width: 94px !important;
    display: grid !important;
    justify-items: end !important;
    align-content: center !important;
    gap: 6px !important;
}

.catalog-item-row__handle {
    justify-self: end !important;
}

.catalog-item-row__actions .table-detail-link {
    min-height: 28px !important;
    min-width: 72px !important;
    padding: 0 8px !important;
    font-size: 0.72rem !important;
}

.catalog-product-card,
.catalog-product-card--studio {
    display: grid !important;
    grid-template-rows: 236px minmax(116px, auto) !important;
}

.catalog-product-card__image {
    height: 236px !important;
    min-height: 236px !important;
    display: grid !important;
    place-items: center !important;
    padding: 20px 22px !important;
}

.catalog-product-card__body {
    display: grid !important;
    align-content: start !important;
    gap: 8px !important;
}

.catalog-product-card__body h3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    min-height: calc(2 * 1.22em) !important;
    margin: 0 !important;
}

@media (max-width: 720px) {
    .catalog-section-card__header {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .catalog-item-row {
        grid-template-columns: 80px minmax(0, 1fr) !important;
        align-items: start !important;
    }

    .catalog-item-row__body {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
    }

    .catalog-item-row__actions {
        grid-column: 2 !important;
        width: auto !important;
        min-width: 0 !important;
        justify-items: start !important;
        grid-auto-flow: column;
        align-items: center;
    }
}

/* 2026-04-23 final readability and live ops standard */

.live-ops-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.live-ops-panel {
    min-width: 0;
}

.live-ops-panel--map,
.live-ops-panel--list {
    min-height: 100%;
}

.live-ops-map {
    min-height: 460px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, #edf4fa 0%, #dfeaf5 100%);
    border: 1px solid rgba(167, 190, 211, 0.34);
}

.live-ops-map-card {
    min-width: 320px;
    max-width: 360px;
}

.live-ops-detail-dialog {
    width: min(1120px, calc(100vw - 32px));
}

.live-ops-map-card .assistant-map-card__title {
    margin-bottom: 2px;
}

.live-ops-map-card__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.live-ops-map-card__summary > div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(242, 247, 252, 0.92);
    border: 1px solid rgba(204, 216, 230, 0.92);
}

.live-ops-map-card__summary span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.live-ops-map-card__summary strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.live-ops-map-card__section {
    display: grid;
    gap: 10px;
}

.live-ops-map-card__section-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.live-ops-map-card__nearby-list {
    display: grid;
    gap: 8px;
}

.live-ops-map-card__nearby-row {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(247, 250, 252, 0.96);
    border: 1px solid rgba(214, 223, 234, 0.95);
}

.live-ops-map-card__nearby-main,
.live-ops-map-card__nearby-metrics {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.live-ops-map-card__nearby-main strong,
.live-ops-map-card__nearby-main span,
.live-ops-map-card__nearby-metrics span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.live-ops-map-card__nearby-main strong {
    font-size: 0.94rem;
    line-height: 1.3;
}

.live-ops-map-card__nearby-main span,
.live-ops-map-card__nearby-metrics span {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
}

.live-ops-map-card__nearby-metrics span:last-child {
    color: #b45309;
    font-weight: 700;
}

.live-ops-map-card__empty {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(247, 250, 252, 0.96);
    border: 1px dashed rgba(192, 204, 217, 0.9);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.live-ops-expanded {
    display: grid;
    gap: 18px;
}

.live-ops-expanded__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.live-ops-expanded__identity,
.live-ops-expanded__summary {
    display: grid;
    gap: 12px;
}

.live-ops-expanded__name {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
}

.live-ops-expanded__meta {
    color: var(--muted);
    font-size: 0.96rem;
}

.live-ops-expanded__reason {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(242, 247, 252, 0.92);
    border: 1px solid rgba(204, 216, 230, 0.92);
    color: var(--text);
    line-height: 1.45;
}

.live-ops-expanded__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-ops-expanded__summary > div {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(242, 247, 252, 0.92);
    border: 1px solid rgba(204, 216, 230, 0.92);
}

.live-ops-expanded__summary span,
.live-ops-expanded__section-title {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.live-ops-expanded__summary strong {
    font-size: 1.02rem;
    line-height: 1.25;
}

.live-ops-expanded__section,
.live-ops-expanded__list {
    display: grid;
    gap: 12px;
}

.live-ops-expanded__row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.85fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(247, 250, 252, 0.96);
    border: 1px solid rgba(214, 223, 234, 0.95);
}

.live-ops-expanded__customer,
.live-ops-expanded__amounts {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.live-ops-expanded__customer strong,
.live-ops-expanded__customer span,
.live-ops-expanded__customer small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.live-ops-expanded__customer strong {
    font-size: 1rem;
    line-height: 1.3;
}

.live-ops-expanded__customer span,
.live-ops-expanded__customer small {
    color: var(--muted);
    line-height: 1.4;
}

.live-ops-expanded__amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-ops-expanded__amounts > div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 226, 236, 0.92);
}

.live-ops-expanded__amounts span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.live-ops-expanded__amounts strong {
    font-size: 0.96rem;
    line-height: 1.24;
}

.live-location-consent {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 18px;
}

.live-location-consent[hidden] {
    display: none;
}

.live-location-consent__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 25, 40, 0.34);
    backdrop-filter: blur(8px);
}

.live-location-consent__dialog {
    position: relative;
    width: min(520px, calc(100vw - 36px));
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 48, 80, 0.16);
    box-shadow: 0 24px 64px rgba(15, 48, 80, 0.22);
    color: #15324f;
}

.live-location-consent__mark {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #0782c8, #14b8a6);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.live-location-consent__body {
    display: grid;
    gap: 8px;
}

.live-location-consent__body h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.15;
}

.live-location-consent__body p:not(.eyebrow),
.live-location-consent__hint {
    margin: 0;
    color: #58708a;
    line-height: 1.5;
}

.live-location-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.live-location-consent-open {
    overflow: hidden;
}

.live-ops-coordinate-button {
    padding: 6px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.live-ops-detail-dialog.is-ping-map-open {
    width: min(1340px, calc(100vw - 32px));
}

.live-ops-detail-dialog.is-ping-map-open .detail-dialog__body {
    overflow: hidden;
    padding: 12px 14px 14px;
}

.live-ops-ping-overlay {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(380px, 0.72fr);
    gap: 18px;
    align-items: stretch;
    height: min(78vh, 820px);
    min-height: 600px;
}

.live-ops-ping-overlay__map {
    min-height: 0;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(204, 216, 230, 0.95);
    background: #eef4f8;
    position: sticky;
    top: 0;
}

.live-ops-ping-overlay__side {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    align-content: stretch;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.live-ops-ping-overlay__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.live-ops-ping-overlay__summary > div {
    display: grid;
    gap: 5px;
    padding: 13px 15px;
    border-radius: 18px;
    background: rgba(242, 247, 252, 0.94);
    border: 1px solid rgba(204, 216, 230, 0.92);
}

.live-ops-ping-overlay__summary span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.live-ops-ping-overlay__summary strong {
    font-size: 1.05rem;
    line-height: 1.22;
}

.live-ops-ping-overlay__section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    overflow: hidden;
}

.live-ops-ping-overlay__list {
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    align-content: start;
}

.live-ops-replay-hero .lede {
    max-width: 760px;
}

.live-ops-replay-filter {
    margin-bottom: 16px;
}

.live-ops-replay-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.live-ops-replay-rail,
.live-ops-replay-main,
.live-ops-replay-map-panel,
.live-ops-replay-report,
.live-ops-replay-run-report {
    min-width: 0;
}

.live-ops-replay-rail {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 14px;
}

.live-ops-replay-main {
    display: grid;
    gap: 16px;
}

.live-ops-replay-summary {
    padding: 18px 18px 16px;
}

.live-ops-replay-summary__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.live-ops-replay-summary__header h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.08;
}

.live-ops-replay-summary__chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.live-ops-replay-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(194, 206, 219, 0.9);
    background: rgba(245, 248, 251, 0.96);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-ops-replay-chip--status {
    color: #0f172a;
}

.live-ops-replay-total-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.live-ops-replay-total-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(196, 210, 224, 0.92);
    background: rgba(248, 250, 252, 0.98);
}

.live-ops-replay-total-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-ops-replay-total-card strong {
    font-size: 1.25rem;
    line-height: 1.1;
}

.live-ops-replay-users {
    display: grid;
    gap: 10px;
    padding-right: 4px;
}

.live-ops-replay-users--compact {
    max-height: min(62vh, 720px);
    overflow: auto;
}

.live-ops-replay-user {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(247, 250, 252, 0.96);
    border: 1px solid rgba(214, 223, 234, 0.95);
    color: var(--text);
    text-decoration: none;
}

.live-ops-replay-user:hover,
.live-ops-replay-user.is-active {
    border-color: rgba(14, 165, 233, 0.52);
    box-shadow: 0 10px 24px rgba(14, 116, 144, 0.1);
}

.live-ops-replay-user__top,
.live-ops-replay-user__meta,
.live-ops-replay-user__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.live-ops-replay-user__top strong {
    flex: 1;
    min-width: 0;
    font-size: 0.98rem;
    line-height: 1.2;
}

.live-ops-replay-user__meta,
.live-ops-replay-user__foot {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.live-ops-replay-user__status {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: #94a3b8;
}

.live-ops-replay-user__status--active {
    background: #10b981;
}

.live-ops-replay-user__status--suspended,
.live-ops-replay-user__status--inactive,
.live-ops-replay-user__status--offline {
    background: #ef4444;
}

.live-ops-replay-user__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.live-ops-replay-raw {
    border: 1px solid rgba(196, 210, 224, 0.9);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.96);
    overflow: hidden;
}

.live-ops-replay-raw summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.live-ops-replay-raw summary::-webkit-details-marker {
    display: none;
}

.live-ops-replay-ping-list {
    display: grid;
    gap: 8px;
    max-height: min(42vh, 440px);
    overflow: auto;
    padding: 0 12px 12px;
}

.live-ops-replay-ping-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 16px;
    border: 1px solid rgba(214, 223, 232, 0.92);
    background: #ffffff;
}

.live-ops-replay-ping-row__main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.live-ops-replay-ping-row__main strong {
    font-size: 0.88rem;
    line-height: 1.15;
}

.live-ops-replay-ping-row__main span,
.live-ops-replay-ping-row__main small {
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.live-ops-replay-map-panel {
    overflow: hidden;
}

.live-ops-replay-map-actions {
    flex-wrap: wrap;
}

.live-ops-replay-map {
    min-height: 680px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(167, 190, 211, 0.34);
    background: linear-gradient(180deg, #edf4fa 0%, #dfeaf5 100%);
}

.live-ops-replay-map-caption {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.8rem;
}

.live-ops-replay-run-table {
    min-width: 980px;
    table-layout: fixed;
}

.live-ops-replay-run-table th,
.live-ops-replay-run-table td {
    padding: 9px 10px;
    line-height: 1.32;
    vertical-align: top;
}

.live-ops-replay-run-table th:nth-child(1),
.live-ops-replay-run-table td:nth-child(1) {
    width: 92px;
}

.live-ops-replay-run-table th:nth-child(2),
.live-ops-replay-run-table td:nth-child(2) {
    width: 120px;
}

.live-ops-replay-run-table th:nth-child(4),
.live-ops-replay-run-table td:nth-child(4),
.live-ops-replay-run-table th:nth-child(5),
.live-ops-replay-run-table td:nth-child(5),
.live-ops-replay-run-table th:nth-child(6),
.live-ops-replay-run-table td:nth-child(6),
.live-ops-replay-run-table th:nth-child(7),
.live-ops-replay-run-table td:nth-child(7) {
    width: 110px;
}

.live-ops-replay-report {
    margin-bottom: 8px;
}

.live-ops-replay-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.live-ops-replay-report-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.live-ops-replay-report-card h3 {
    margin: 0;
    font-size: 0.98rem;
}

.live-ops-replay-intel-table {
    table-layout: fixed;
    min-width: 820px;
}

.live-ops-replay-intel-table th,
.live-ops-replay-intel-table td {
    padding: 8px 10px;
    line-height: 1.28;
}

.live-ops-replay-intel-table th:first-child,
.live-ops-replay-intel-table td:first-child {
    width: 42px;
}

.live-ops-replay-popup {
    display: grid;
    gap: 5px;
    min-width: 210px;
    color: #0f172a;
    font-size: 0.84rem;
}

.live-ops-replay-popup strong {
    font-size: 0.98rem;
}

.live-ops-replay-popup span {
    color: #64748b;
}

.live-ops-replay-popup__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
}

.live-ops-replay-popup__actions a {
    color: #0284c7;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 980px) {
    .live-ops-replay-workspace,
    .live-ops-replay-total-grid,
    .live-ops-replay-report-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .live-ops-replay-rail {
        position: static;
    }

    .live-ops-replay-map {
        min-height: 460px;
    }

    .live-ops-replay-users--compact,
    .live-ops-replay-ping-list {
        max-height: none;
    }
}

@media print {
    .shell-nav,
    .workspace-head,
    .hero-actions,
    [data-orders-selected-count],
    .live-ops-replay-filter,
    .live-ops-replay-rail {
        display: none !important;
    }

    .live-ops-replay-workspace {
        display: block;
    }

    .live-ops-replay-map {
        min-height: 420px;
    }

    .page-orders-print .workspace-head {
        display: grid !important;
    }
}

.live-ops-expanded__row--compact {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 0.82fr) auto;
    padding: 12px 14px;
}

.live-ops-customer-card {
    display: grid;
    gap: 11px;
    min-width: 0;
    padding: 14px 15px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96));
    border: 1px solid rgba(203, 213, 225, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.live-ops-customer-card.is-overdue {
    background: linear-gradient(180deg, rgba(255, 247, 247, 0.98), rgba(255, 241, 242, 0.9));
    border-color: rgba(248, 113, 113, 0.48);
}

.live-ops-customer-card--popup {
    width: min(360px, 82vw);
}

.live-ops-customer-card__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.live-ops-customer-card__identity {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.live-ops-customer-card__badge {
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-ops-customer-card.is-overdue .live-ops-customer-card__badge {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
}

.live-ops-customer-card__name {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.24;
    overflow-wrap: break-word;
    word-break: normal;
}

.live-ops-customer-card__meta {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: break-word;
    word-break: normal;
}

.live-ops-customer-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.live-ops-customer-card__metrics > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(217, 226, 236, 0.95);
}

.live-ops-customer-card__metrics span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.live-ops-customer-card__metrics strong {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.live-ops-customer-card.is-overdue .live-ops-customer-card__metrics > div:last-child strong {
    color: #b91c1c;
}

.live-ops-map-card__nearby-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
}

.live-ops-map-card__nearby-row .assistant-map-card__button {
    justify-self: start;
}

.live-ops-map-card__nearby-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-ops-map-card__nearby-main strong,
.live-ops-map-card__nearby-main span {
    word-break: normal;
}

@media (max-width: 760px) {
    .live-ops-customer-card__top {
        grid-template-columns: minmax(0, 1fr);
    }

    .live-ops-customer-card__top .assistant-map-card__button {
        justify-self: start;
    }
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.table-wrap table,
.table-wrap .compact-table {
    width: 100%;
    table-layout: fixed;
}

.table-wrap th,
.table-wrap td,
.table-wrap .compact-table th,
.table-wrap .compact-table td {
    vertical-align: top;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-height: 1.35 !important;
}

.table-wrap td strong,
.table-wrap td small,
.table-wrap td .muted,
.table-wrap td a,
.table-wrap td span {
    max-width: 100%;
}

.table-wrap .table-cell-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.table-wrap .table-cell-stack strong {
    line-height: 1.28;
}

.table-wrap .table-cell-numeric,
.table-wrap .compact-table .table-cell-numeric {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.table-wrap .button,
.table-wrap .table-detail-link {
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .live-ops-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .live-ops-map {
        min-height: 340px;
    }

    .live-ops-replay-summary__header,
    .live-ops-replay-user__top,
    .live-ops-replay-user__meta,
    .live-ops-replay-user__foot,
    .live-ops-replay-map-caption {
        align-items: flex-start;
        flex-direction: column;
    }

    .live-ops-replay-ping-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .live-ops-replay-map {
        min-height: 380px;
    }

    .live-ops-map-card {
        min-width: 280px;
        max-width: 320px;
    }

    .live-ops-map-card__summary,
    .live-ops-map-card__nearby-row,
    .live-ops-expanded__hero,
    .live-ops-expanded__summary,
    .live-ops-expanded__row,
    .live-ops-expanded__amounts,
    .live-ops-ping-overlay,
    .live-ops-ping-overlay__summary {
        grid-template-columns: 1fr;
    }

    .live-ops-ping-overlay {
        min-height: 0;
        height: auto;
    }

    .live-ops-ping-overlay__map {
        min-height: 380px;
        position: relative;
    }
}

/* 2026-04-23 final readability and operations pass */
.receivables-aging-note {
    margin-top: -4px;
}

.panel--compact {
    padding: 12px 16px;
}

.panel--soft {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(203, 216, 232, 0.82);
}

.table-wrap table th,
.table-wrap table td,
.table-wrap .compact-table th,
.table-wrap .compact-table td {
    vertical-align: top !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    line-height: 1.42 !important;
    height: auto !important;
}

.table-wrap .table-cell-stack,
.table-wrap .table-cell-stack--primary,
.table-wrap .table-meta-stack,
.table-wrap .table-cell-meta,
.table-wrap .table-link,
.table-wrap .table-detail-link,
.table-wrap .button,
.table-wrap .button-compact,
.table-wrap .pill {
    min-width: 0;
}

.table-wrap .table-cell-stack > strong,
.table-wrap .table-cell-stack > span,
.table-wrap .table-cell-stack > small,
.table-wrap .table-meta-stack > span,
.table-wrap .table-link,
.table-wrap .table-detail-link {
    max-width: 100%;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.table-wrap .button,
.table-wrap .button-compact {
    white-space: nowrap;
}

.table-wrap .table-cell-numeric,
.table-wrap .compact-table .table-cell-numeric {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.route-export-trigger-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

body.is-app-preview .app-header {
    display: none !important;
}

body.is-app-preview .sidebar,
body.is-app-preview .sidebar-overlay {
    display: block !important;
}

body.is-app-preview .mobile-topbar {
    display: grid !important;
}

body.is-app-preview .content {
    padding: 10px;
}

body.is-app-preview .page-shell {
    gap: 10px;
}

body.is-app-preview .hero,
body.is-app-preview .page-hero {
    padding: 14px;
    margin-bottom: 10px;
}

html.is-native-shell,
body.is-native-shell {
    overscroll-behavior: none;
}

body.is-native-shell {
    min-height: 100dvh;
}

body.is-native-shell .shell {
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
}

body.is-native-shell .mobile-topbar {
    padding-top: max(12px, env(safe-area-inset-top, 0));
}

body.is-native-shell .content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0));
}

body.is-native-shell .app-header,
body.is-native-shell .sidebar,
body.is-native-shell .sidebar-overlay {
    display: none !important;
}

body.is-native-shell .mobile-topbar {
    display: grid !important;
}

.native-app-statusbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
}

.native-app-statusbar__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(14, 37, 73, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #36506b;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 12px 24px rgba(16, 24, 40, 0.06);
}

.native-app-statusbar__pill[data-state="online"],
.native-app-statusbar__pill[data-state="live"],
.native-app-statusbar__pill[data-state="ios"],
.native-app-statusbar__pill[data-state="android"] {
    color: #0e624f;
    border-color: rgba(14, 98, 79, 0.18);
    background: rgba(224, 247, 240, 0.96);
}

.native-app-statusbar__pill[data-state="pending"],
.native-app-statusbar__pill[data-state="fallback"] {
    color: #7b5f11;
    border-color: rgba(168, 125, 19, 0.18);
    background: rgba(255, 248, 220, 0.96);
}

.native-app-statusbar__pill[data-state="draft"] {
    color: #155e75;
    border-color: rgba(14, 116, 144, 0.18);
    background: rgba(224, 242, 254, 0.96);
}

.native-app-statusbar__pill[data-state="offline"],
.native-app-statusbar__pill[data-state="blocked"] {
    color: #a03a2c;
    border-color: rgba(190, 75, 61, 0.18);
    background: rgba(255, 236, 233, 0.96);
}

.native-app-tabbar {
    position: fixed;
    left: max(12px, env(safe-area-inset-left, 0));
    right: max(12px, env(safe-area-inset-right, 0));
    bottom: max(12px, env(safe-area-inset-bottom, 0));
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 26px;
    background: rgba(15, 28, 49, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 50px rgba(5, 15, 35, 0.32);
    backdrop-filter: blur(14px);
}

.native-app-tabbar__item {
    display: grid;
    gap: 4px;
    justify-items: center;
    align-content: center;
    min-height: 60px;
    padding: 8px 6px;
    border-radius: 18px;
    color: rgba(232, 240, 255, 0.72);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.native-app-tabbar__item:hover,
.native-app-tabbar__item:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-1px);
}

.native-app-tabbar__item.is-active {
    background: linear-gradient(135deg, var(--accent, #0B7BC1), var(--accent-strong, #0f63ae));
    color: #ffffff;
}

.native-app-tabbar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.native-app-tabbar__label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.native-dashboard-workspace {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(11, 123, 193, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
}

.native-dashboard-workspace__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.native-dashboard-workspace__hero h2 {
    margin: 0.25rem 0 0;
    font-size: 1.4rem;
}

.native-dashboard-workspace__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.native-dashboard-metric {
    border: 1px solid rgba(12, 32, 56, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    padding: 1rem;
}

.native-dashboard-metric span,
.native-dashboard-action span {
    display: block;
    color: var(--muted);
}

.native-dashboard-metric strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.3rem;
}

.native-dashboard-metric small {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
}

.native-dashboard-workspace__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.native-dashboard-action {
    display: grid;
    gap: 0.3rem;
    min-height: 112px;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(12, 32, 56, 0.08);
    background: rgba(255, 255, 255, 0.92);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 18px 44px rgba(7, 30, 56, 0.07);
}

.native-dashboard-action strong {
    font-size: 1rem;
}

.native-dashboard-action--primary {
    border-color: rgba(11, 123, 193, 0.22);
    background: linear-gradient(180deg, rgba(230, 245, 255, 0.96), rgba(255, 255, 255, 0.96));
}

body.is-native-shell .workspace-head__actions {
    display: none;
}

body.is-native-shell .native-dashboard-workspace .button {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .native-dashboard-workspace__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .native-dashboard-workspace__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .native-dashboard-workspace__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .native-dashboard-workspace__stats,
    .native-dashboard-workspace__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .native-dashboard-action {
        min-height: 96px;
    }
}

.app-emulator-shell {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: var(--section-gap);
    align-items: start;
}

.app-emulator-controls {
    display: grid;
    gap: var(--section-gap);
}

.app-emulator-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.app-emulator-toggle-group .button.is-active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    border-color: transparent;
}

.app-emulator-metrics {
    margin-bottom: 0;
}

.app-emulator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.app-emulator-preview {
    display: grid;
    gap: 12px;
}

.app-emulator-preview__toolbar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.app-emulator-preview__badges,
.app-emulator-preview__toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.app-emulator-stage {
    min-height: 880px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: calc(var(--panel-radius) + 4px);
    background:
        radial-gradient(circle at top, color-mix(in srgb, var(--accent) 14%, transparent), transparent 36%),
        linear-gradient(180deg, color-mix(in srgb, var(--panel-soft) 96%, transparent), color-mix(in srgb, var(--panel) 98%, transparent));
    overflow: hidden;
}

.app-emulator-canvas {
    min-height: var(--app-emulator-canvas-height, 852px);
    display: grid;
    place-items: start center;
    transition: min-height 0.2s ease;
}

.app-emulator-frame {
    --app-emulator-width: 393px;
    --app-emulator-height: 852px;
    --app-emulator-scale: 1;
    width: var(--app-emulator-width);
    height: var(--app-emulator-height);
    transform: scale(var(--app-emulator-scale));
    transform-origin: top center;
    border-radius: 36px;
    padding: 12px;
    background: linear-gradient(180deg, #0f172a, #111827);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.35);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
}

.app-emulator-frame--tablet {
    border-radius: 30px;
    padding: 10px;
}

.app-emulator-frame__status {
    min-height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.84);
}

.app-emulator-frame__screen {
    min-height: 0;
    overflow: hidden;
    border-radius: 26px;
    background: #f8fbff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.app-emulator-frame__screen iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f8fbff;
}

.app-emulator-shell.is-immersive {
    position: fixed;
    inset: 0;
    z-index: 2200;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 18px;
    background:
        linear-gradient(180deg, rgba(6, 11, 22, 0.96), rgba(10, 18, 34, 0.98)),
        radial-gradient(circle at top, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%);
}

body.app-emulator-immersive-open {
    overflow: hidden;
}

.app-emulator-shell.is-immersive .app-emulator-controls {
    display: none;
}

.app-emulator-shell.is-immersive .app-emulator-preview {
    min-height: calc(100vh - 36px);
    grid-template-rows: auto minmax(0, 1fr);
}

.app-emulator-shell.is-immersive .app-emulator-preview__toolbar {
    padding: 4px 0 10px;
}

.app-emulator-shell.is-immersive [data-app-emulator-launch] {
    display: none;
}

.app-emulator-shell:not(.is-immersive) [data-app-emulator-close] {
    display: none;
}

.app-emulator-shell.is-immersive .app-emulator-stage {
    min-height: calc(100vh - 96px);
    height: calc(100vh - 96px);
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(10, 18, 34, 0.72), rgba(11, 23, 43, 0.86));
}

.app-emulator-shell.is-immersive .app-emulator-canvas {
    min-height: calc(100vh - 144px);
    place-items: center;
}

.app-emulator-shell.is-immersive .app-emulator-frame {
    box-shadow: 0 40px 110px rgba(2, 6, 23, 0.52);
}

@media (max-width: 1400px) {
    .app-emulator-shell {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .app-emulator-stage {
        min-height: 760px;
    }
}

@media (max-width: 1180px) {
    .app-emulator-shell {
        grid-template-columns: 1fr;
    }

    .app-emulator-stage {
        min-height: 720px;
    }
}

@media (max-width: 640px) {
    .app-emulator-stage {
        padding: 12px;
        min-height: 620px;
    }

    .app-emulator-actions {
        flex-direction: column;
    }

    .app-emulator-actions .button {
        width: 100%;
    }

    .app-emulator-shell.is-immersive {
        padding: 10px;
    }

    .app-emulator-shell.is-immersive .app-emulator-stage {
        min-height: calc(100vh - 86px);
        height: calc(100vh - 86px);
        padding: 12px;
    }
}

/* 2026-04-25 app compactness pass */
body.is-native-shell,
body.is-app-preview {
    --content-pad: 14px;
    --hero-padding: 14px;
    --panel-padding: 12px;
    --card-padding: 10px;
    --grid-gap: 10px;
    --section-gap: 12px;
    --nav-gap: 6px;
    --panel-radius: 16px;
    --card-radius: 14px;
    --control-radius: 10px;
    --nav-pad-y: 8px;
    --nav-pad-x: 10px;
    --control-pad-y: 6px;
    --control-pad-x: 9px;
    --control-height: 34px;
    --table-cell-y: 8px;
    --table-cell-x: 8px;
    --pill-pad-y: 4px;
    --pill-pad-x: 8px;
}

body.is-native-shell .content,
body.is-app-preview .content,
body.is-native-shell .page-shell,
body.is-app-preview .page-shell,
body.is-native-shell .page-stack,
body.is-app-preview .page-stack,
body.is-native-shell .page-main-grid,
body.is-app-preview .page-main-grid,
body.is-native-shell .detail-grid,
body.is-app-preview .detail-grid {
    gap: 10px;
}

body.is-native-shell .panel,
body.is-app-preview .panel,
body.is-native-shell .detail-card,
body.is-app-preview .detail-card,
body.is-native-shell .metric-card,
body.is-app-preview .metric-card,
body.is-native-shell .workspace-stat,
body.is-app-preview .workspace-stat,
body.is-native-shell .list-item,
body.is-app-preview .list-item {
    padding: 10px 12px;
    border-radius: 14px;
}

body.is-native-shell .workspace-head,
body.is-app-preview .workspace-head,
body.is-native-shell .panel-header,
body.is-app-preview .panel-header,
body.is-native-shell .panel-header--compact,
body.is-app-preview .panel-header--compact,
body.is-native-shell .workspace-stats,
body.is-app-preview .workspace-stats,
body.is-native-shell .workspace-linkbar,
body.is-app-preview .workspace-linkbar {
    gap: 8px;
}

body.is-native-shell .button,
body.is-app-preview .button,
body.is-native-shell .button.button-compact,
body.is-app-preview .button.button-compact,
body.is-native-shell .nav a,
body.is-app-preview .nav a,
body.is-native-shell .pill,
body.is-app-preview .pill,
body.is-native-shell .table-detail-link,
body.is-app-preview .table-detail-link,
body.is-native-shell .native-app-statusbar__pill,
body.is-app-preview .native-app-statusbar__pill,
body.is-native-shell .native-app-tabbar__item,
body.is-app-preview .native-app-tabbar__item {
    min-height: 30px;
    font-size: 0.74rem;
}

body.is-native-shell .workspace-head__eyebrow,
body.is-app-preview .workspace-head__eyebrow,
body.is-native-shell .workspace-head__title,
body.is-app-preview .workspace-head__title,
body.is-native-shell .workspace-head__subtitle,
body.is-app-preview .workspace-head__subtitle,
body.is-native-shell .mobile-topbar__title,
body.is-app-preview .mobile-topbar__title,
body.is-native-shell .mobile-topbar__page,
body.is-app-preview .mobile-topbar__page,
body.is-native-shell .panel-header h2,
body.is-app-preview .panel-header h2,
body.is-native-shell .workspace-linkbar__item,
body.is-app-preview .workspace-linkbar__item,
body.is-native-shell .button,
body.is-app-preview .button,
body.is-native-shell .nav a,
body.is-app-preview .nav a,
body.is-native-shell .pill,
body.is-app-preview .pill,
body.is-native-shell .table-link,
body.is-app-preview .table-link,
body.is-native-shell .table-detail-link,
body.is-app-preview .table-detail-link,
body.is-native-shell .native-app-tabbar__label,
body.is-app-preview .native-app-tabbar__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.is-native-shell .workspace-head__title,
body.is-app-preview .workspace-head__title,
body.is-native-shell .panel-header h2,
body.is-app-preview .panel-header h2,
body.is-native-shell .mobile-topbar__title,
body.is-app-preview .mobile-topbar__title {
    font-size: clamp(0.96rem, 1.1vw, 1.18rem);
    line-height: 1.12;
}

body.is-native-shell .workspace-head__subtitle,
body.is-app-preview .workspace-head__subtitle,
body.is-native-shell .table-meta-stack,
body.is-app-preview .table-meta-stack,
body.is-native-shell .table-cell-stack,
body.is-app-preview .table-cell-stack {
    gap: 4px;
}

body.is-native-shell .workspace-stat span,
body.is-app-preview .workspace-stat span,
body.is-native-shell .workspace-stat small,
body.is-app-preview .workspace-stat small,
body.is-native-shell .muted,
body.is-app-preview .muted {
    font-size: 0.7rem;
    line-height: 1.15;
}

body.is-native-shell .workspace-stat strong,
body.is-app-preview .workspace-stat strong,
body.is-native-shell .table-cell-stack strong,
body.is-app-preview .table-cell-stack strong {
    font-size: 0.92rem;
    line-height: 1.12;
}

body.is-native-shell .field input,
body.is-native-shell .field select,
body.is-native-shell .field textarea,
body.is-app-preview .field input,
body.is-app-preview .field select,
body.is-app-preview .field textarea {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 0.82rem;
}

body.is-native-shell .compact-table th,
body.is-native-shell .compact-table td,
body.is-native-shell .table-wrap table th,
body.is-native-shell .table-wrap table td,
body.is-app-preview .compact-table th,
body.is-app-preview .compact-table td,
body.is-app-preview .table-wrap table th,
body.is-app-preview .table-wrap table td {
    padding: 8px 8px;
    font-size: 0.78rem;
    line-height: 1.24;
}

body.is-native-shell .mobile-topbar,
body.is-app-preview .mobile-topbar {
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 14px;
}

body.is-native-shell .mobile-topbar__brand,
body.is-app-preview .mobile-topbar__brand {
    gap: 8px;
}

body.is-native-shell .mobile-topbar__logo,
body.is-app-preview .mobile-topbar__logo {
    width: min(26vw, 116px);
}

body.is-native-shell .native-app-statusbar,
body.is-app-preview .native-app-statusbar {
    gap: 6px;
    margin-bottom: 10px;
}

body.is-native-shell .native-app-statusbar__pill,
body.is-app-preview .native-app-statusbar__pill {
    min-height: 28px;
    padding: 6px 10px;
    font-size: 0.72rem;
}

body.is-native-shell .native-app-tabbar,
body.is-app-preview .native-app-tabbar {
    gap: 6px;
    padding: 8px;
    border-radius: 20px;
}

body.is-native-shell .native-app-tabbar__item,
body.is-app-preview .native-app-tabbar__item {
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 14px;
}

body.is-native-shell .native-app-tabbar__icon,
body.is-app-preview .native-app-tabbar__icon {
    width: 28px;
    height: 28px;
    font-size: 0.76rem;
}

body.is-native-shell .native-app-tabbar__label,
body.is-app-preview .native-app-tabbar__label {
    font-size: 0.66rem;
    line-height: 1;
}

body.is-native-shell .order-product-card,
body.is-app-preview .order-product-card,
body.is-native-shell .catalog-public-card,
body.is-app-preview .catalog-public-card,
body.is-native-shell .catalog-product-card,
body.is-app-preview .catalog-product-card {
    padding: 10px;
    border-radius: 14px;
}

body.is-native-shell .order-product-card__visual,
body.is-app-preview .order-product-card__visual {
    min-height: 110px;
}

body.is-native-shell .catalog-public-card__image,
body.is-app-preview .catalog-public-card__image,
body.is-native-shell .catalog-product-card__image,
body.is-app-preview .catalog-product-card__image {
    min-height: 120px;
}

body.is-native-shell .order-product-card__head h3,
body.is-app-preview .order-product-card__head h3,
body.is-native-shell .catalog-public-card__body h3,
body.is-app-preview .catalog-public-card__body h3,
body.is-native-shell .catalog-product-card__body h3,
body.is-app-preview .catalog-product-card__body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.35em;
    line-height: 1.18;
}

body.is-native-shell .order-product-card__head p,
body.is-app-preview .order-product-card__head p,
body.is-native-shell .catalog-public-card__body p,
body.is-app-preview .catalog-public-card__body p,
body.is-native-shell .catalog-product-card__body p,
body.is-app-preview .catalog-product-card__body p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 2026-04-25 responsive compact follow-up */
@media (max-width: 1280px) {
    body:not(.is-native-shell):not(.is-app-preview) {
        --content-pad: 14px;
        --hero-padding: 14px;
        --panel-padding: 12px;
        --card-padding: 10px;
        --grid-gap: 10px;
        --section-gap: 12px;
        --nav-gap: 6px;
        --panel-radius: 16px;
        --card-radius: 14px;
        --control-radius: 10px;
        --control-height: 34px;
        --table-cell-y: 8px;
        --table-cell-x: 8px;
    }

    body:not(.is-native-shell):not(.is-app-preview) .content,
    body:not(.is-native-shell):not(.is-app-preview) .page-shell,
    body:not(.is-native-shell):not(.is-app-preview) .page-main-grid,
    body:not(.is-native-shell):not(.is-app-preview) .detail-grid,
    body:not(.is-native-shell):not(.is-app-preview) .dashboard-grid,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-linkbar,
    body:not(.is-native-shell):not(.is-app-preview) .action-grid {
        gap: 10px;
    }

    body:not(.is-native-shell):not(.is-app-preview) .panel,
    body:not(.is-native-shell):not(.is-app-preview) .detail-card,
    body:not(.is-native-shell):not(.is-app-preview) .metric-card,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-stat,
    body:not(.is-native-shell):not(.is-app-preview) .list-item {
        padding: 10px;
        border-radius: 14px;
    }

    body:not(.is-native-shell):not(.is-app-preview) .button,
    body:not(.is-native-shell):not(.is-app-preview) .button.button-compact,
    body:not(.is-native-shell):not(.is-app-preview) .nav a,
    body:not(.is-native-shell):not(.is-app-preview) .pill,
    body:not(.is-native-shell):not(.is-app-preview) .table-detail-link,
    body:not(.is-native-shell):not(.is-app-preview) .table-link,
    body:not(.is-native-shell):not(.is-app-preview) .tab-item {
        min-height: 32px;
        font-size: 0.76rem;
    }

    body:not(.is-native-shell):not(.is-app-preview) .workspace-head__eyebrow,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-head__title,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-head__subtitle,
    body:not(.is-native-shell):not(.is-app-preview) .panel-header h2,
    body:not(.is-native-shell):not(.is-app-preview) .button,
    body:not(.is-native-shell):not(.is-app-preview) .nav a,
    body:not(.is-native-shell):not(.is-app-preview) .pill,
    body:not(.is-native-shell):not(.is-app-preview) .table-link,
    body:not(.is-native-shell):not(.is-app-preview) .table-detail-link,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-linkbar__item,
    body:not(.is-native-shell):not(.is-app-preview) .table-wrap th {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body:not(.is-native-shell):not(.is-app-preview) .workspace-head__title,
    body:not(.is-native-shell):not(.is-app-preview) .panel-header h2 {
        font-size: clamp(0.98rem, 1.2vw, 1.18rem);
        line-height: 1.14;
    }

    body:not(.is-native-shell):not(.is-app-preview) .muted,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-stat span,
    body:not(.is-native-shell):not(.is-app-preview) .workspace-stat small {
        font-size: 0.72rem;
        line-height: 1.15;
    }

    body:not(.is-native-shell):not(.is-app-preview) .field input,
    body:not(.is-native-shell):not(.is-app-preview) .field select,
    body:not(.is-native-shell):not(.is-app-preview) .field textarea {
        min-height: 34px;
        padding: 6px 9px;
        font-size: 0.82rem;
    }

    body:not(.is-native-shell):not(.is-app-preview) .compact-table th,
    body:not(.is-native-shell):not(.is-app-preview) .compact-table td,
    body:not(.is-native-shell):not(.is-app-preview) .table-wrap table th,
    body:not(.is-native-shell):not(.is-app-preview) .table-wrap table td {
        padding: 8px 8px;
        font-size: 0.78rem;
        line-height: 1.24;
        vertical-align: top;
    }

    body:not(.is-native-shell):not(.is-app-preview) .order-product-card,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-public-card,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-product-card {
        padding: 10px;
        border-radius: 14px;
    }

    body:not(.is-native-shell):not(.is-app-preview) .order-product-card__head h3,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-public-card__body h3,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-product-card__body h3 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.35em;
        line-height: 1.18;
    }

    body:not(.is-native-shell):not(.is-app-preview) .order-product-card__head p,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-public-card__body p,
    body:not(.is-native-shell):not(.is-app-preview) .catalog-product-card__body p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 820px) {
    body:not(.is-native-shell):not(.is-app-preview) {
        --content-pad: 12px;
        --hero-padding: 12px;
        --panel-padding: 10px;
        --card-padding: 9px;
        --grid-gap: 8px;
        --section-gap: 10px;
        --control-height: 32px;
        --table-cell-y: 7px;
        --table-cell-x: 7px;
    }

    body:not(.is-native-shell):not(.is-app-preview) .button,
    body:not(.is-native-shell):not(.is-app-preview) .button.button-compact,
    body:not(.is-native-shell):not(.is-app-preview) .nav a,
    body:not(.is-native-shell):not(.is-app-preview) .pill,
    body:not(.is-native-shell):not(.is-app-preview) .table-detail-link,
    body:not(.is-native-shell):not(.is-app-preview) .table-link {
        min-height: 30px;
        font-size: 0.72rem;
    }

    body:not(.is-native-shell):not(.is-app-preview) .workspace-head__title,
    body:not(.is-native-shell):not(.is-app-preview) .panel-header h2 {
        font-size: 0.98rem;
    }

    body:not(.is-native-shell):not(.is-app-preview) .compact-table th,
    body:not(.is-native-shell):not(.is-app-preview) .compact-table td,
    body:not(.is-native-shell):not(.is-app-preview) .table-wrap table th,
    body:not(.is-native-shell):not(.is-app-preview) .table-wrap table td {
        font-size: 0.74rem;
        padding: 7px 7px;
    }
}

/* 2026-04-25 app-first order and catalog density controls */
.order-entry-appbar,
.catalog-showcase__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.order-entry-appbar__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel-soft) 82%, transparent);
}

.order-entry-appbar__status strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.2;
}

.order-entry-appbar__status small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.35;
}

.order-entry-appbar__status.is-ready {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border) 65%);
}

.order-entry-appbar__status.is-warning {
    border-color: color-mix(in srgb, #f59e0b 55%, var(--border) 45%);
    background: color-mix(in srgb, #f59e0b 8%, var(--panel-soft) 92%);
}

.product-density-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
}

.product-density-toolbar__label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.product-density-toolbar__buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 88%, transparent);
}

.product-density-button {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.product-density-button:hover,
.product-density-button:focus-visible {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--text);
    outline: none;
}

.product-density-button.is-active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 86%, white 14%), color-mix(in srgb, var(--accent-strong, var(--accent)) 84%, black 16%));
    color: #f8fbff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

[data-product-density-root][data-product-density="2"] .order-product-grid,
[data-product-density-root][data-product-density="2"] .order-product-grid--catalog,
[data-product-density-root][data-product-density="2"] .catalog-showcase__product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-product-density-root][data-product-density="3"] .order-product-grid,
[data-product-density-root][data-product-density="3"] .order-product-grid--catalog,
[data-product-density-root][data-product-density="3"] .catalog-showcase__product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

[data-product-density-root][data-product-density="4"] .order-product-grid,
[data-product-density-root][data-product-density="4"] .order-product-grid--catalog,
[data-product-density-root][data-product-density="4"] .catalog-showcase__product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

[data-product-density-root] .catalog-showcase__product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

[data-product-density-root] .catalog-showcase__product-card {
    display: grid;
    min-width: 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--catalog-brand-accent, #163A63) 10%, #d8e1eb 90%);
    background: #ffffff;
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.08);
}

[data-product-density-root] .catalog-showcase__product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fa 100%);
}

[data-product-density-root] .catalog-showcase__product-asset {
    width: 100%;
    height: 100%;
    min-height: 188px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

[data-product-density-root] .catalog-showcase__product-body {
    display: grid;
    gap: 8px;
    padding: 14px 16px 16px;
}

[data-product-density-root] .catalog-showcase__product-body h3 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.24;
}

[data-product-density-root] .catalog-showcase__product-footer strong {
    font-size: 1.02rem;
}

@media (max-width: 1180px) {
    .order-entry-appbar,
    .catalog-showcase__controls {
        grid-template-columns: 1fr;
    }

    .product-density-toolbar {
        justify-content: space-between;
        width: 100%;
    }

    .product-density-toolbar__buttons {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}

@media (max-width: 820px) {
    .order-entry-appbar__status {
        align-items: flex-start;
        flex-direction: column;
    }

    .order-entry-appbar__status .button {
        width: 100%;
    }

    .product-density-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-density-toolbar__buttons {
        width: 100%;
        justify-content: space-between;
    }

    .product-density-button {
        flex: 1 1 0;
        text-align: center;
    }
}

/* 2026-04-25 order basket cleanup and light dropdown pass */

select,
option,
optgroup {
    background: #ffffff;
    color: #15324f;
}

.assistant-autocomplete,
.order-entry-autocomplete {
    background: #ffffff;
    border: 1px solid rgba(15, 48, 80, 0.14);
    box-shadow: 0 18px 36px rgba(15, 48, 80, 0.16);
}

.assistant-autocomplete__item {
    background: #ffffff;
    color: #15324f;
}

.assistant-autocomplete__item:hover,
.assistant-autocomplete__item.is-active {
    background: #eef6fd;
    border-color: rgba(14, 165, 233, 0.2);
}

.assistant-autocomplete__meta,
.assistant-autocomplete__empty {
    color: #60728c;
}

.assistant-autocomplete__empty {
    background: #f6f9fc;
}

.order-sync-panel--minimal {
    gap: 12px;
    padding: 14px 16px;
}

.order-sync-panel--minimal .order-sync-panel__customer {
    display: grid;
    gap: 4px;
}

.order-sync-panel--minimal .order-sync-panel__customer h2,
.order-basket-panel__customer {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
}

.order-sync-panel--minimal .order-sync-panel__pills {
    display: none;
}

.order-sync-panel--minimal .order-sync-panel__message {
    min-height: 0;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

.order-sync-panel--minimal .order-sync-panel__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.order-sync-panel--minimal .order-sync-panel__actions .button {
    min-width: 0;
    width: 100%;
}

.order-basket-table-wrap {
    min-height: 200px;
}

.order-confirmation-dialog {
    width: min(460px, calc(100vw - 32px));
}

.order-confirmation-dialog__body {
    display: grid;
    gap: 14px;
}

.order-confirmation-dialog__message {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
}

.order-confirmation-dialog__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.order-confirmation-dialog__meta > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 78%, transparent);
}

.order-confirmation-dialog__meta span {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.order-confirmation-dialog__meta strong {
    font-size: 1rem;
    line-height: 1.2;
}

.order-confirmation-dialog__hint {
    margin: 0;
}

.order-confirmation-dialog__footer {
    justify-content: flex-end;
}

@media (max-width: 820px) {
    .order-sync-panel--minimal .order-sync-panel__actions,
    .order-confirmation-dialog__meta {
        grid-template-columns: 1fr;
    }
}

.command-center-page {
    gap: 10px;
}

.command-center-grid {
    align-items: start;
    grid-auto-rows: 1fr;
}

.command-center-panel {
    display: grid;
    gap: 10px;
    height: 520px;
    min-height: 0;
    align-content: start;
    overflow: hidden;
}

.command-center-list {
    display: grid;
    gap: 8px;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.command-center-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 50, 79, 0.12);
    border-left: 4px solid #8fa9c2;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    color: #16324c;
    text-decoration: none;
    min-width: 0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.command-center-item__top,
.command-center-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.command-center-item__top strong {
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.2;
    color: #0f2740;
}

.command-center-item__severity {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(95, 191, 255, 0.24);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #24557f;
    background: #eef6fd;
}

.command-center-item p {
    margin: 0;
    color: #35506b;
    font-size: 0.8rem;
    line-height: 1.35;
}

.command-center-item__meta {
    color: #6d8197;
    font-size: 0.72rem;
}

.command-center-item__action {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0b76c5;
}

.command-center-item__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.command-center-item__tools form {
    margin: 0;
}

.button--micro {
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.command-center-item.severity-critical {
    border-color: rgba(190, 30, 45, 0.18);
    border-left-color: #be1e2d;
    background: linear-gradient(180deg, #fff8f8, #fff1f2);
}

.command-center-item.severity-high {
    border-color: rgba(201, 124, 0, 0.18);
    border-left-color: #c97c00;
    background: linear-gradient(180deg, #fffaf2, #fff5e7);
}

.command-center-item.severity-low {
    border-color: rgba(21, 122, 61, 0.16);
    border-left-color: #157a3d;
    background: linear-gradient(180deg, #f7fcf8, #eff9f2);
}

.command-center-item.severity-critical .command-center-item__severity {
    color: #a61b28;
    border-color: rgba(190, 30, 45, 0.22);
    background: #ffe7ea;
}

.command-center-item.severity-high .command-center-item__severity {
    color: #8a5600;
    border-color: rgba(201, 124, 0, 0.24);
    background: #fff0cf;
}

.command-center-item.severity-low .command-center-item__severity {
    color: #15633a;
    border-color: rgba(21, 122, 61, 0.22);
    background: #e8f8ee;
}

@media (max-width: 1180px) {
    .command-center-panel {
        height: 480px;
    }
}

@media (max-width: 720px) {
    .command-center-panel {
        height: auto;
        overflow: visible;
    }

    .command-center-list {
        overflow: visible;
        padding-right: 0;
    }
}

/* Command center readability reset */
.command-center-page {
    gap: 12px;
}

.command-center-grid {
    align-items: stretch;
    grid-auto-rows: 1fr;
}

.command-center-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    height: 590px;
    min-height: 0;
    overflow: hidden;
}

.command-center-panel .panel-header {
    min-height: 58px;
    align-items: start;
}

.command-center-panel .empty-state {
    display: grid;
    align-content: center;
    height: 100%;
}

.command-center-list {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.command-center-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 13px;
    border: 1px solid rgba(15, 50, 79, 0.10);
    border-left: 5px solid #8aa4bf;
    border-radius: 14px;
    background: #ffffff;
    color: #17324a;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.command-center-item:hover,
.command-center-item:focus-visible {
    border-color: rgba(15, 50, 79, 0.16);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.command-center-item__top,
.command-center-item__meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.command-center-item__top strong {
    min-width: 0;
    color: #10263b;
    font-size: 0.89rem;
    line-height: 1.28;
}

.command-center-item p {
    margin: 0;
    color: #415c76;
    font-size: 0.79rem;
    line-height: 1.42;
}

.command-center-item__meta {
    color: #72879b;
    font-size: 0.71rem;
    line-height: 1.25;
}

.command-center-item__action {
    color: #0b76c5;
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.2;
}

.command-center-item__severity {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 50, 79, 0.08);
    background: #f4f7fb;
    color: #3b5873;
    font-size: 0.61rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-center-item__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.command-center-item__tools form {
    margin: 0;
}

.command-center-item.severity-critical {
    border-left-color: #d83b45;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
}

.command-center-item.severity-critical .command-center-item__severity {
    background: #fff0f2;
    border-color: rgba(216, 59, 69, 0.18);
    color: #b32531;
}

.command-center-item.severity-high {
    border-left-color: #e38a14;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf2 100%);
}

.command-center-item.severity-high .command-center-item__severity {
    background: #fff3df;
    border-color: rgba(227, 138, 20, 0.22);
    color: #8b5d12;
}

.command-center-item.severity-medium {
    border-left-color: #2a8dd8;
}

.command-center-item.severity-medium .command-center-item__severity {
    background: #edf6fd;
    border-color: rgba(42, 141, 216, 0.16);
    color: #2b6a98;
}

.command-center-item.severity-low {
    border-left-color: #2d9b59;
    background: linear-gradient(180deg, #ffffff 0%, #f7fcf8 100%);
}

.command-center-item.severity-low .command-center-item__severity {
    background: #ebf8f0;
    border-color: rgba(45, 155, 89, 0.16);
    color: #216944;
}

@media (max-width: 1180px) {
    .command-center-panel {
        height: 540px;
    }
}

@media (max-width: 720px) {
    .command-center-panel {
        height: auto;
        grid-template-rows: auto auto;
        overflow: visible;
    }

    .command-center-list {
        overflow: visible;
        padding-right: 0;
    }
}

/* AI brief surfaces */
.ai-brief {
    display: grid;
    gap: 12px;
}

.ai-brief__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 50, 79, 0.10);
    background: #f6f9fc;
    color: #466178;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.ai-pill--risk {
    background: #edf6fd;
    color: #205d8a;
}

.ai-brief__headline {
    margin: 0;
    color: #10263b;
    font-size: 1.03rem;
    line-height: 1.35;
}

.ai-brief__grid {
    display: grid;
    gap: 12px;
}

.ai-brief__grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-brief__card {
    display: grid;
    gap: 8px;
    padding: 14px 15px;
    border: 1px solid rgba(15, 50, 79, 0.08);
    border-radius: 16px;
    background: #fbfdff;
}

.ai-brief__card p,
.ai-brief__card small {
    margin: 0;
}

.ai-brief__card p {
    color: #415c76;
    font-size: 0.84rem;
    line-height: 1.5;
}

.ai-brief__list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #415c76;
    font-size: 0.82rem;
    line-height: 1.48;
}

.command-center-ai {
    border-color: rgba(15, 50, 79, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.command-center-ai .panel-header {
    align-items: start;
}

.dashboard-ai-snapshot {
    margin-top: 14px;
}

.assistant-route-brief .ai-brief__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assistant-route-brief .ai-brief__card:last-child {
    grid-column: 1 / -1;
}

@media (max-width: 920px) {
    .ai-brief__grid--two {
        grid-template-columns: 1fr;
    }

    .assistant-route-brief .ai-brief__grid {
        grid-template-columns: 1fr;
    }

    .assistant-route-brief .ai-brief__card:last-child {
        grid-column: auto;
    }
}


.assistant-request-desk,
.assistant-request-queue {
    display: grid;
    gap: 16px;
}

.assistant-request-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.assistant-request-form {
    display: grid;
    gap: 12px;
}

.assistant-request-guidance {
    display: grid;
    gap: 10px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: color-mix(in srgb, var(--card-bg) 88%, transparent);
}

.assistant-request-guidance ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.assistant-request-queue .panel-header {
    margin-bottom: 12px;
}

@media (max-width: 980px) {
    .assistant-request-layout {
        grid-template-columns: 1fr;
    }
}

.system360-chat {
    bottom: 22px;
    left: 22px;
    position: fixed;
    z-index: 80;
}

.system360-chat__bubble {
    align-items: center;
    background: #121826;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.28);
    color: #fff;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-height: 54px;
    padding: 9px 15px 9px 10px;
}

.system360-chat__bubble strong {
    display: block;
    font-size: 0.92rem;
    line-height: 1;
}

.system360-chat__bubble small {
    color: rgba(255, 255, 255, 0.72);
    display: block;
    font-size: 0.72rem;
    line-height: 1.1;
    margin-top: 3px;
}

.system360-chat__pulse {
    background: #22c55e;
    border-radius: 999px;
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.16);
    height: 13px;
    width: 13px;
}

.system360-chat__panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    bottom: 70px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
    display: flex;
    flex-direction: column;
    left: 0;
    max-height: min(620px, calc(100vh - 105px));
    overflow: hidden;
    position: absolute;
    width: min(420px, calc(100vw - 28px));
}

.system360-chat__panel[hidden] {
    display: none;
}

.system360-chat__header {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
}

.system360-chat__header h2 {
    font-size: 1rem;
    margin: 2px 0 0;
}

.system360-chat__close {
    font-size: 1.2rem;
}

.system360-chat__messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 14px;
}

.system360-chat__message {
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.42;
    max-width: 92%;
    padding: 10px 12px;
    white-space: pre-wrap;
}

.system360-chat__message p {
    margin: 0;
}

.system360-chat__message--assistant {
    align-self: flex-start;
    background: var(--panel-soft);
}

.system360-chat__message--user {
    align-self: flex-end;
    background: #10213f;
    color: #fff;
}

.system360-chat__outputs {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    white-space: normal;
}

.system360-chat__output,
.system360-chat__candidate {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 9px;
}

.system360-chat__output small,
.system360-chat__candidate small {
    color: var(--muted);
}

.system360-chat__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.system360-chat__actions a {
    background: var(--accent-strong);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 8px;
    text-decoration: none;
}

.system360-chat__form {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr auto;
    padding: 12px;
}

.system360-chat__form textarea {
    min-height: 46px;
    resize: none;
}

@media (max-width: 720px) {
    .system360-chat {
        bottom: 18px;
        left: 14px;
    }

    .system360-chat__panel {
        bottom: 66px;
        max-height: min(560px, calc(100vh - 92px));
        width: calc(100vw - 28px);
    }
}

.invoice-export-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto;
    gap: 16px;
    align-items: center;
}

.invoice-export-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.invoice-report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.invoice-report-filters .field-wide {
    grid-column: 1 / -1;
}

.invoice-report-filters__actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.invoice-report-table td strong,
.invoice-report-table td small,
.invoice-report-table td .table-actions,
.invoice-report-table td .button {
    min-width: 0;
}

.invoice-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--panel-soft) 84%, transparent);
    color: var(--text);
}

.invoice-status-pill--paid {
    background: color-mix(in srgb, #1f9d55 18%, var(--panel-soft));
    border-color: color-mix(in srgb, #1f9d55 34%, var(--border));
}

.invoice-status-pill--open {
    background: color-mix(in srgb, #2563eb 14%, var(--panel-soft));
    border-color: color-mix(in srgb, #2563eb 30%, var(--border));
}

.invoice-status-pill--overdue {
    background: color-mix(in srgb, #dc2626 16%, var(--panel-soft));
    border-color: color-mix(in srgb, #dc2626 34%, var(--border));
}

@media (max-width: 960px) {
    .workspace-head__actions,
    .hero-actions,
    .sync-actions,
    .table-actions,
    .invoice-export-panel__actions,
    .invoice-report-filters__actions {
        flex-wrap: wrap;
        overflow: visible;
    }

    .workspace-head__actions .button,
    .hero-actions .button,
    .sync-actions .button,
    .table-actions .button,
    .invoice-export-panel__actions .button,
    .invoice-report-filters__actions .button {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .panel-header {
        align-items: flex-start;
    }

    .panel-header > div,
    .workspace-linkbar__item,
    .workspace-stat,
    .metric-card,
    .detail-card {
        min-width: 0;
    }

    .table-filter-controls,
    .invoice-report-filters {
        grid-template-columns: 1fr;
    }

    .table-filter-controls select,
    .table-filter-controls input,
    .invoice-report-filters .field-wide {
        grid-column: auto;
    }

    .invoice-export-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 860px) {
    .workspace-stats,
    .workspace-stats--customers,
    .workspace-stats--dashboard,
    .card-grid,
    .compact-grid,
    .dashboard-health-strip,
    .dashboard-module-grid--summary-only,
    .detail-grid,
    .detail-grid--compact,
    .workspace-linkbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .workspace-head__actions .button,
    .hero-actions .button,
    .sync-actions .button,
    .table-actions .button,
    .invoice-export-panel__actions .button,
    .invoice-report-filters__actions .button {
        flex-basis: 100%;
    }
}

.system360-review-table td strong { display: block; }
.system360-review-table td small { display: block; margin-top: 4px; }

.page-orders .workspace-head__actions {
    gap: 8px;
}

.page-orders .workspace-stats {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.page-orders .workspace-stat {
    padding: 8px 10px;
    gap: 4px;
}

.page-orders .workspace-stat strong {
    font-size: 1rem;
}

.page-orders .workspace-stat small {
    font-size: 0.72rem;
}

.page-orders .table-meta-stack {
    gap: 4px;
}

.page-orders .table-meta-stack span,
.page-orders .table-cell-stack small {
    font-size: 0.74rem;
    line-height: 1.2;
}

.page-orders .pill {
    padding: 3px 7px;
    font-size: 0.66rem;
}

.page-orders .table-cell-stack--primary {
    gap: 2px;
}

.page-orders .table-link {
    font-size: 0.84rem;
    line-height: 1.15;
}

.page-orders .order-accounting-code {
    font-size: 0.78rem;
    line-height: 1.15;
    color: var(--text);
    font-weight: 700;
}

.page-orders .list-item {
    gap: 5px;
    padding: 10px 11px;
}

.page-orders .list-item strong {
    font-size: 0.84rem;
    line-height: 1.2;
}

.page-orders .list-item span {
    font-size: 0.75rem;
    line-height: 1.2;
}

.page-orders .list-item .button {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.76rem;
}

.orders-table__select-cell {
    width: 38px;
    min-width: 38px;
    text-align: center;
}

.orders-table--single-line td,
.orders-table--single-line th {
    white-space: normal;
    vertical-align: top;
}

.orders-table--single-line .table-cell-inline,
.orders-table--single-line .table-meta-inline {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 4px;
}

.orders-table--single-line .table-cell-inline > *,
.orders-table--single-line .table-meta-inline > * {
    min-width: 0;
    flex: 0 0 auto;
}

.orders-table--single-line .table-link,
.orders-table--single-line .order-accounting-code {
    white-space: normal;
    overflow-wrap: anywhere;
}

.orders-table--single-line .muted {
    display: inline;
    margin: 0;
}

.orders-table--single-line .table-detail-link {
    margin-left: 0;
    flex-basis: 100%;
    width: max-content;
}

.orders-table--single-line .table-cell-inline--numeric {
    justify-content: flex-end;
}

.orders-table--single-line .table-cell-inline--numeric strong {
    white-space: nowrap;
}

.orders-table--single-line .pill,
.orders-table--single-line .order-accounting-code {
    flex: 0 0 auto;
}

.page-orders-print {
    display: grid;
    gap: 16px;
}

.print-order-stack {
    display: grid;
    gap: 18px;
}

.print-order-page {
    display: block;
}

.print-order-sheet {
    display: grid;
    gap: 16px;
    background: #fff;
    color: #122033;
    border: 1px solid #d7dfec;
    border-radius: 10px;
    padding: 18mm 16mm;
    min-height: 257mm;
    box-sizing: border-box;
    break-inside: avoid;
    page-break-inside: avoid;
}

.print-order-sheet__header,
.print-order-sheet__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.print-order-sheet__eyebrow {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #496482;
}

.print-order-sheet__brand h2 {
    margin: 0 0 8px;
    font-size: 1.28rem;
    line-height: 1.15;
}

.print-order-address,
.print-order-party,
.print-order-sheet__notes {
    display: grid;
    gap: 3px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.print-order-kv {
    display: grid;
    gap: 8px;
    min-width: 210px;
}

.print-order-kv div {
    display: grid;
    gap: 2px;
}

.print-order-kv dt,
.print-order-party__label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #5a708a;
}

.print-order-kv dd {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
}

.print-order-sheet__parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.print-order-party {
    padding: 10px 12px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #f8fbff;
}

.print-order-lines th,
.print-order-lines td {
    padding-top: 9px;
    padding-bottom: 9px;
}

.print-order-lines th {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.print-order-lines td strong {
    font-size: 0.86rem;
    line-height: 1.3;
}

.print-order-sheet__totals {
    display: grid;
    gap: 6px;
    min-width: 220px;
}

.print-order-sheet__totals div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.84rem;
}

.print-order-sheet__totals strong {
    font-size: 0.95rem;
}

.print-order-sheet__total {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 2px solid #1f5d93;
}

.print-order-sheet__total strong {
    font-size: 1.08rem;
}

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    html,
    body {
        background: #fff !important;
    }

    .page-shell.page-orders-print,
    .print-order-stack,
    .print-order-page {
        display: block !important;
    }

    .page-orders-print {
        gap: 0;
    }

    .print-toolbar {
        display: none !important;
    }

    .print-order-sheet {
        display: block !important;
        width: 100%;
        border: 0;
        border-radius: 0;
        min-height: 0;
        padding: 10mm 8mm;
        box-shadow: none;
        overflow: hidden;
    }

    .print-order-page--break {
        break-after: page;
        page-break-after: always;
    }
}

.field-checkbox__control,
.inline-toggle,
.settings-inline-toggle {
    padding: 4px 0;
    min-height: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.field-checkbox__control input,
.inline-toggle input[type="checkbox"],
.choice-card input[type="checkbox"],
.role-choice input[type="checkbox"],
.settings-inline-toggle input[type="checkbox"],
.settings-inline-toggle input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
}

.field-checkbox__control span,
.inline-toggle span,
.settings-inline-toggle span {
    font-size: 0.82rem;
    line-height: 1.15;
}

.checkbox-inline,
.module-access-choice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding: 4px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

.checkbox-inline input[type="checkbox"],
.module-access-choice input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    margin: 0;
}

.checkbox-inline span,
.module-access-choice span {
    font-size: 0.8rem;
    line-height: 1.12;
}

/* CMG_LIVE_CSS_PROBE_20260502 */

/* 2026-05-01 enterprise shell refresh */

body[data-theme="xero"] {
    --bg-shell-start: #edf2f7;
    --bg-shell-end: #edf2f7;
    --bg-radial: rgba(15, 123, 193, 0.08);
    --panel: #ffffff;
    --panel-soft: #f7f9fc;
    --panel-strong: #edf3f9;
    --sidebar-bg: rgba(255, 255, 255, 0.96);
    --card-bg: rgba(15, 23, 42, 0.03);
    --card-hover: rgba(15, 123, 193, 0.06);
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 123, 193, 0.20);
    --text: #10263b;
    --muted: #667a92;
    --accent: #0f7bc1;
    --accent-strong: #0664a2;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    --workspace-border: rgba(15, 23, 42, 0.08);
    --workspace-muted: #667a92;
    --heading: #10263b;
}

body[data-theme="xero"] {
    background:
        radial-gradient(circle at top right, var(--bg-radial), transparent 26%),
        linear-gradient(180deg, var(--bg-shell-start) 0%, var(--bg-shell-end) 100%);
}

body[data-theme="xero"] .content {
    padding: 18px 22px 28px;
}

body[data-theme="xero"] .panel,
body[data-theme="xero"] .detail-card,
body[data-theme="xero"] .auth-card,
body[data-theme="xero"] .metric-card,
body[data-theme="xero"] .workspace-stat,
body[data-theme="xero"] .workspace-linkbar__item,
body[data-theme="xero"] .list-item {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body[data-theme="xero"] .metric-card,
body[data-theme="xero"] .workspace-stat,
body[data-theme="xero"] .workspace-linkbar__item,
body[data-theme="xero"] .list-item {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .app-header {
    background: linear-gradient(180deg, #0f7bc1 0%, #0b6eaf 100%);
    border: 0;
    border-radius: 18px;
    box-shadow: 0 14px 26px rgba(8, 69, 110, 0.18);
}

body[data-theme="xero"] .app-brand__eyebrow,
body[data-theme="xero"] .app-brand__page,
body[data-theme="xero"] .app-header__meta-pill,
body[data-theme="xero"] .app-header__user-role {
    color: rgba(235, 245, 255, 0.82);
}

body[data-theme="xero"] .app-brand__meta strong,
body[data-theme="xero"] .app-header__user-name {
    color: #ffffff;
}

body[data-theme="xero"] .app-brand__page {
    display: block;
    margin-top: 1px;
    font-size: 0.72rem;
    line-height: 1.2;
}

body[data-theme="xero"] .global-search__field input {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #10263b;
    box-shadow: none;
}

body[data-theme="xero"] .header-nav__link {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: rgba(235, 245, 255, 0.84);
    font-weight: 600;
}

body[data-theme="xero"] .header-nav__link:hover,
body[data-theme="xero"] .header-nav__link.is-active {
    background: transparent;
    color: #ffffff;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.96);
}

body[data-theme="xero"] .app-header__subnav {
    margin-top: 4px;
    padding: 10px 12px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .header-subnav {
    gap: 6px;
    flex-wrap: nowrap;
}

body[data-theme="xero"] .header-subnav__link {
    min-height: 28px;
    padding: 0 11px;
    border-color: rgba(15, 23, 42, 0.08);
    background: #f3f7fb;
    color: #5a6f86 !important;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="xero"] .header-subnav__link:hover,
body[data-theme="xero"] .header-subnav__link.is-active {
    color: #0f7bc1;
    border-color: rgba(15, 123, 193, 0.22);
    background: rgba(15, 123, 193, 0.06);
    box-shadow: none;
}

body[data-theme="xero"] .header-subnav__link:not(.is-active) {
    opacity: 1;
}

body[data-theme="xero"] .workspace-head--overview-shell {
    padding: 18px 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

body[data-theme="xero"] .workspace-head--overview-shell .workspace-head__marker {
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(15, 123, 193, 0.14), rgba(15, 123, 193, 0.04));
    box-shadow: inset 0 0 0 1px rgba(15, 123, 193, 0.12);
}

body[data-theme="xero"] .workspace-head--overview-shell .workspace-head__title {
    font-size: clamp(1.4rem, 2vw, 2rem);
    letter-spacing: -0.03em;
}

body[data-theme="xero"] .dashboard-health-strip,
body[data-theme="xero"] .dashboard-trust-strip {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body[data-theme="xero"] .page-dashboard .workspace-stats--dashboard {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

body[data-theme="xero"] .page-dashboard .workspace-stat {
    padding: 14px 15px;
    gap: 6px;
}

body[data-theme="xero"] .page-dashboard .workspace-stat span {
    color: #6d8298;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

body[data-theme="xero"] .page-dashboard .workspace-stat strong {
    font-size: clamp(1.15rem, 1.5vw, 1.42rem);
}

body[data-theme="xero"] .dashboard-module-grid--summary-only {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

body[data-theme="xero"] .dashboard-module {
    padding: 16px 16px 14px;
}

body[data-theme="xero"] .dashboard-module__links a,
body[data-theme="xero"] .panel-header > a {
    color: #0f7bc1;
    font-weight: 700;
}

body[data-theme="xero"] .panel-header h2,
body[data-theme="xero"] .workspace-head__title,
body[data-theme="xero"] .hero h1,
body[data-theme="xero"] .panel h1 {
    color: #10263b;
}

body[data-theme="xero"] .button.primary {
    background: linear-gradient(180deg, #0f7bc1 0%, #0664a2 100%);
    color: #ffffff;
}

body[data-theme="xero"] .button:not(.primary) {
    background: #ffffff;
    color: #335067;
    border-color: rgba(15, 23, 42, 0.10);
}

body[data-theme="xero"] .button:not(.primary):hover {
    border-color: rgba(15, 123, 193, 0.20);
    color: #0f7bc1;
}

@media (min-width: 981px) {
    body[data-theme="xero"]:not(.is-native-shell):not(.is-app-preview) .app-header {
        display: grid;
    }

    body[data-theme="xero"]:not(.is-native-shell):not(.is-app-preview) .mobile-topbar {
        display: none;
    }
}

@media (max-width: 980px) {
    body[data-theme="xero"] .content {
        padding: 12px 12px 20px;
    }

    body[data-theme="xero"] .workspace-head--overview-shell {
        padding: 14px;
    }
}

body[data-theme="xero"] .workspace-head--filter-shell {
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

body[data-theme="xero"] .workspace-head--filter-shell .workspace-head__actions {
    justify-content: flex-start;
}

body[data-theme="xero"] .orders-workbench-panel {
    border-radius: 18px;
    background: #ffffff;
}

body[data-theme="xero"] .page-orders .orders-main {
    grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.92fr);
    gap: 14px;
}

body[data-theme="xero"] .page-orders #orders-list,
body[data-theme="xero"] .page-orders #orders-preview {
    max-height: min(68vh, 920px);
}

body[data-theme="xero"] .page-orders #orders-queue {
    margin-top: 4px;
}

body[data-theme="xero"] .page-orders .table-wrap {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="xero"] .page-orders .orders-preview-editor__line-list {
    max-height: min(46vh, 620px);
}

body[data-theme="xero"] .page-orders .orders-preview-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body[data-theme="xero"] .page-orders .orders-preview-summary-card {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
}

body[data-theme="xero"] .page-orders .orders-preview-summary-pills {
    gap: 6px;
}

body[data-theme="xero"] .page-orders .orders-preview-summary-pills > span:not(.pill) {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #5f7188;
    font-size: 0.72rem;
    line-height: 1;
}

body[data-theme="xero"] .page-orders .orders-preview-line {
    border-radius: 12px;
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
    padding: 10px 12px;
}

body[data-theme="xero"] .page-orders .detail-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .page-orders .diagnostic-result {
    padding: 12px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

body[data-theme="xero"] .page-receivables .workspace-stats--mini {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

body[data-theme="xero"] .page-receivables .receivables-filter-panel,
body[data-theme="xero"] .page-receivables .receivables-ledger,
body[data-theme="xero"] .page-receivables .receivables-aging-note {
    background: #ffffff;
}

body[data-theme="xero"] .page-receivables .receivables-filter-presets .pill,
body[data-theme="xero"] .page-receivables .active-filter-bar .pill {
    background: #f7f9fc;
    border-color: rgba(15, 23, 42, 0.08);
    color: #335067;
}

body[data-theme="xero"] .page-receivables .receivables-filter-form {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body[data-theme="xero"] .page-receivables .receivables-export-bar {
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

body[data-theme="xero"] .page-receivables .table-wrap {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

body[data-theme="xero"] .page-receivables table tbody tr:hover {
    background: rgba(15, 123, 193, 0.04);
}

body[data-theme="xero"] .workspace-head--reports-shell,
body[data-theme="xero"] .workspace-head--settings-shell {
    margin-bottom: 14px;
}

body[data-theme="xero"] .page-settings .settings-directory--shell,
body[data-theme="xero"] .page-settings .settings-section,
body[data-theme="xero"] .page-reports .panel,
body[data-theme="xero"] .page-reports .metric-card,
body[data-theme="xero"] .customer-command-deck--overview-shell {
    background: #ffffff;
}

body[data-theme="xero"] .page-settings .settings-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
}

body[data-theme="xero"] .page-settings .workspace-head__title,
body[data-theme="xero"] .page-settings .panel h1,
body[data-theme="xero"] .page-settings .panel h2 {
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: 0;
}

body[data-theme="xero"] .page-settings .workspace-head__eyebrow,
body[data-theme="xero"] .page-settings .panel-header .eyebrow {
    font-size: 10px;
    letter-spacing: 0.08em;
}

body[data-theme="xero"] .page-settings .detail-card strong,
body[data-theme="xero"] .page-settings .sync-overview-card strong,
body[data-theme="xero"] .page-settings .integration-provider-card strong {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
}

body[data-theme="xero"] .page-settings .detail-card,
body[data-theme="xero"] .page-settings .sync-overview-card,
body[data-theme="xero"] .page-settings .integration-provider-card {
    padding: 14px 16px;
    border-radius: 14px;
}

body[data-theme="xero"] .page-settings .settings-directory-links a {
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 500;
}

body[data-theme="xero"] .page-settings .header-subnav__link,
body[data-theme="xero"] .page-settings .header-nav__link {
    font-size: 0.84rem;
}

body[data-theme="xero"] .page-settings .form-grid {
    gap: 12px;
}

body[data-theme="xero"] .page-settings select,
body[data-theme="xero"] .page-settings input,
body[data-theme="xero"] .page-settings textarea {
    font-size: 0.94rem;
}

body[data-theme="xero"] .page-settings .settings-directory-links a {
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #335067;
    font-weight: 600;
}

body[data-theme="xero"] .page-settings .settings-directory-links a:hover {
    border-color: rgba(15, 123, 193, 0.18);
    color: #0f7bc1;
    background: rgba(15, 123, 193, 0.04);
}

body[data-theme="xero"] .workspace-head--users-shell,
body[data-theme="xero"] .workspace-head--settings-shell,
body[data-theme="xero"] .workspace-head--reports-shell {
    margin-bottom: 14px;
}

body[data-theme="xero"] .page-settings .detail-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .page-settings .form-grid,
body[data-theme="xero"] .page-receivables .detail-grid,
body[data-theme="xero"] .page-reports .detail-grid {
    gap: 14px;
}

body[data-theme="xero"] .page-reports .metric-card-link:hover {
    border-color: rgba(15, 123, 193, 0.16);
    background: rgba(15, 123, 193, 0.03);
}

body[data-theme="xero"] .page-reports .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body[data-theme="xero"] .page-dashboard.page-invoice-report .invoice-export-panel,
body[data-theme="xero"] .page-dashboard.page-invoice-report .panel,
body[data-theme="xero"] .page-dashboard.page-invoice-report .workspace-stat,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .invoice-export-panel,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .panel,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .workspace-stat,
body[data-theme="xero"] .page-dashboard.page-invoice-report .workspace-linkbar__item {
    background: #ffffff;
}

body[data-theme="xero"] .page-dashboard.page-invoice-report .invoice-export-panel__actions,
body[data-theme="xero"] .page-dashboard.page-invoice-report .invoice-report-filters__actions,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .invoice-export-panel__actions,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .invoice-report-filters__actions {
    gap: 8px;
}

body[data-theme="xero"] .page-dashboard.page-invoice-report .system360-review-table tbody tr:hover {
    background: rgba(15, 123, 193, 0.04);
}

body[data-theme="xero"] .page-dashboard .dashboard-overview-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-theme="xero"] .page-dashboard--home {
    max-width: 1280px;
    margin: 0 auto;
}

body[data-theme="xero"] .page-dashboard--home .workspace-head--home-shell {
    margin-bottom: 10px;
}

body[data-theme="xero"] .dashboard-home-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

body[data-theme="xero"] .dashboard-home-notice__content {
    display: grid;
    gap: 4px;
    color: #5f758d;
}

body[data-theme="xero"] .dashboard-home-notice__content strong {
    color: #16273a;
    font-size: 0.96rem;
}

body[data-theme="xero"] .dashboard-home-notice__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

body[data-theme="xero"] .dashboard-home-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

body[data-theme="xero"] .dashboard-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

body[data-theme="xero"] .dashboard-home-card,
body[data-theme="xero"] .dashboard-lower-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 272px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

body[data-theme="xero"] .dashboard-home-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

body[data-theme="xero"] .dashboard-home-card__header h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    color: #16273a;
}

body[data-theme="xero"] .dashboard-home-card__header p {
    margin: 0;
    color: #688099;
    font-size: 0.9rem;
    line-height: 1.45;
}

body[data-theme="xero"] .dashboard-home-card__menu {
    color: #0f7bc1;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

body[data-theme="xero"] .dashboard-home-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

body[data-theme="xero"] .dashboard-home-card__metrics--split,
body[data-theme="xero"] .dashboard-home-card__metrics--triple {
    align-items: start;
}

body[data-theme="xero"] .dashboard-home-card__metrics--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-theme="xero"] .dashboard-home-card__metrics div {
    display: grid;
    gap: 4px;
}

body[data-theme="xero"] .dashboard-home-card__metrics strong {
    font-size: 1.95rem;
    line-height: 1;
    color: #16273a;
}

body[data-theme="xero"] .dashboard-home-card__metrics span,
body[data-theme="xero"] .dashboard-home-card__footer span,
body[data-theme="xero"] .dashboard-home-bars__item span,
body[data-theme="xero"] .dashboard-home-list__row span,
body[data-theme="xero"] .dashboard-home-brief span {
    color: #688099;
    font-size: 0.84rem;
}

body[data-theme="xero"] .dashboard-home-card__rule {
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .dashboard-home-card__footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

body[data-theme="xero"] .dashboard-home-card__footer strong,
body[data-theme="xero"] .dashboard-home-bars__item strong,
body[data-theme="xero"] .dashboard-home-list__row strong {
    color: #16273a;
    font-size: 1rem;
}

body[data-theme="xero"] .dashboard-home-bars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body[data-theme="xero"] .dashboard-home-bars__item {
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .dashboard-home-list {
    display: grid;
    gap: 10px;
    flex: 1;
}

body[data-theme="xero"] .dashboard-home-list__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .dashboard-home-list__row:last-child {
    border-bottom: 0;
}

body[data-theme="xero"] .dashboard-home-brief {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    flex: 1;
}

body[data-theme="xero"] .dashboard-home-brief ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: #3d5368;
}

body[data-theme="xero"] .dashboard-home-brief li {
    margin-bottom: 8px;
    line-height: 1.45;
}

body[data-theme="xero"] .dashboard-home-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

body[data-theme="xero"] .dashboard-home-lower {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

body[data-theme="xero"] .dashboard-lower-card {
    min-height: 0;
    gap: 14px;
}

body[data-theme="xero"] .page-dashboard .dashboard-focus-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 16px;
    margin: 16px 0;
    align-items: start;
}

body[data-theme="xero"] .page-dashboard .dashboard-trust-panel .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-theme="xero"] .page-dashboard .dashboard-module-grid--primary {
    margin-top: 4px;
}

body[data-theme="xero"] .page-dashboard .dashboard-module-grid--secondary {
    margin-top: 14px;
}

body[data-theme="xero"] .page-dashboard .dashboard-module-grid--secondary .panel-header h2 {
    font-size: 1rem;
}

body[data-theme="xero"] .page-dashboard .dashboard-module-grid--secondary .workspace-stat small {
    display: none;
}

body[data-theme="xero"] .page-dashboard.page-invoice-integrity .workspace-linkbar__item,
body[data-theme="xero"] .page-dashboard.page-invoice-integrity .table-wrap {
    background: #ffffff;
}

body[data-theme="xero"] .page-dashboard.page-invoice-integrity table tbody tr:hover {
    background: rgba(15, 123, 193, 0.04);
}

body[data-theme="xero"] .customer-command-deck--overview-shell {
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__lead {
    gap: 16px;
}

body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__balance,
body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__fact,
body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__actions-card {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__balance {
    box-shadow: none;
}

body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__address-line,
body[data-theme="xero"] .customer-command-deck--overview-shell .customer-command-deck__contact-line {
    color: #5f758d;
}

body[data-theme="xero"] .page-settings .workspace-stats,
body[data-theme="xero"] .page-users .settings-grid,
body[data-theme="xero"] .page-users .panel,
body[data-theme="xero"] .page-users .role-emulator-card {
    background: #ffffff;
}

body[data-theme="xero"] .page-users .role-emulator-card,
body[data-theme="xero"] .page-users .choice-card {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

body[data-theme="xero"] .page-users .table-wrap,
body[data-theme="xero"] .page-settings .table-wrap {
    border-color: rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

/* 2026-05-03 customer detail workspace reset */
.customer-detail-workspace {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin-top: 16px;
}

.customer-detail-workspace > * {
    min-width: 0;
    margin: 0;
}

.customer-detail-workspace__full {
    grid-column: 1 / -1;
}

.customer-detail-workspace__main {
    grid-column: span 2;
}

.customer-detail-workspace__side {
    grid-column: span 1;
}

.customer-detail-workspace__summary .customer-detail-compact-grid--collapsed {
    grid-template-columns: 1fr;
}

.customer-detail-workspace__summary .customer-detail-compact-list {
    padding: 14px 15px;
}

.customer-detail-workspace__summary .customer-detail-compact-list p {
    padding: 6px 0;
}

.customer-detail-workspace__forms[hidden],
.customer-detail-workspace > [hidden] {
    display: none !important;
}

.customer-detail-workspace .customer-priority-ledger {
    gap: 16px;
    align-items: start;
}

.customer-detail-workspace .customer-priority-ledger__card {
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.customer-detail-workspace .customer-priority-ledger__card--statement {
    grid-column: span 2;
}

.customer-detail-workspace .customer-section-toggle,
.customer-detail-workspace .customer-panel-drawer,
.customer-detail-workspace .customer-priority-ledger__card,
.customer-detail-workspace .detail-card,
.customer-detail-workspace .metric-card {
    border-radius: 18px;
}

.customer-detail-workspace .customer-section-toggle,
.customer-detail-workspace .customer-panel-drawer {
    height: 100%;
}

.customer-detail-workspace .customer-section-toggle__summary {
    padding: 15px 16px;
    gap: 12px;
}

.customer-detail-workspace .customer-section-toggle__body {
    padding: 0 16px 16px;
}

.customer-detail-workspace .detail-grid,
.customer-detail-workspace .card-grid,
.customer-detail-workspace .stack-list {
    gap: 12px;
}

.customer-detail-workspace .panel-header,
.customer-detail-workspace .panel-header--compact {
    margin-bottom: 10px;
}

.customer-detail-workspace .panel-header h2,
.customer-detail-workspace .customer-section-toggle__summary h2,
.customer-detail-workspace .detail-card h2 {
    font-size: 1rem;
    line-height: 1.2;
}

.customer-detail-workspace .customer-detail-compact-grid,
.customer-detail-workspace .customer-detail-compact-grid--collapsed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.customer-detail-workspace .customer-detail-compact-grid .panel,
.customer-detail-workspace .customer-detail-compact-grid .detail-card {
    min-height: 0;
}

.customer-detail-workspace__automation .detail-grid,
.customer-detail-workspace__commercials .detail-grid,
.customer-detail-workspace__operations .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-detail-workspace__automation .panel,
.customer-detail-workspace__commercials .panel,
.customer-detail-workspace__operations .panel {
    min-width: 0;
}

.customer-detail-workspace__ai .ai-brief__grid,
.customer-detail-workspace__history .detail-grid {
    grid-template-columns: 1fr;
}

.customer-detail-workspace .table-wrap {
    overflow-x: auto;
}

body[data-theme="xero"] .customer-detail-workspace .customer-section-toggle,
body[data-theme="xero"] .customer-detail-workspace .customer-panel-drawer,
body[data-theme="xero"] .customer-detail-workspace .customer-priority-ledger__card,
body[data-theme="xero"] .customer-detail-workspace .detail-card,
body[data-theme="xero"] .customer-detail-workspace .metric-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

body[data-theme="xero"] .customer-detail-workspace .customer-section-toggle__body,
body[data-theme="xero"] .customer-detail-workspace .customer-priority-ledger__card,
body[data-theme="xero"] .customer-detail-workspace .customer-panel-drawer {
    background: #ffffff;
}

@media (max-width: 1180px) {
    .customer-detail-workspace {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-detail-workspace__full,
    .customer-detail-workspace__main {
        grid-column: 1 / -1;
    }

    .customer-detail-workspace__side {
        grid-column: span 1;
    }

    .customer-detail-workspace .customer-detail-compact-grid,
    .customer-detail-workspace .customer-detail-compact-grid--collapsed,
    .customer-detail-workspace .customer-priority-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-detail-workspace__summary .customer-detail-compact-grid--collapsed,
    .customer-detail-workspace__ai .ai-brief__grid,
    .customer-detail-workspace__history .detail-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-workspace .customer-priority-ledger__card--statement {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .customer-detail-workspace {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .customer-detail-workspace__full,
    .customer-detail-workspace__main,
    .customer-detail-workspace__side,
    .customer-detail-workspace .customer-priority-ledger__card--statement {
        grid-column: auto;
    }

    .customer-detail-workspace .customer-detail-compact-grid,
    .customer-detail-workspace .customer-detail-compact-grid--collapsed,
    .customer-detail-workspace .customer-priority-ledger {
        grid-template-columns: 1fr;
    }

    .customer-detail-workspace__automation .detail-grid,
    .customer-detail-workspace__commercials .detail-grid,
    .customer-detail-workspace__operations .detail-grid,
    .customer-detail-workspace__ai .ai-brief__grid,
    .customer-detail-workspace__history .detail-grid {
        grid-template-columns: 1fr;
    }

    .customer-detail-workspace .customer-section-toggle__summary,
    .customer-detail-workspace .customer-section-toggle__meta {
        align-items: flex-start;
        justify-content: flex-start;
    }
}

@media (max-width: 1100px) {
    body[data-theme="xero"] .page-settings .settings-layout {
        grid-template-columns: 1fr;
    }
}

/* 2026-05-03 restore classic customer detail flow */
.customer-detail-workspace {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

.customer-detail-workspace__full,
.customer-detail-workspace__main,
.customer-detail-workspace__side,
.customer-detail-workspace__automation,
.customer-detail-workspace__ai,
.customer-detail-workspace__summary,
.customer-detail-workspace__commercials,
.customer-detail-workspace__operations,
.customer-detail-workspace__history {
    grid-column: 1 / -1;
}

.customer-detail-workspace .customer-priority-ledger {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.customer-detail-workspace .customer-priority-ledger__card,
.customer-detail-workspace .customer-priority-ledger__card--statement {
    grid-column: auto;
    min-height: 360px !important;
    height: 360px !important;
    max-height: 360px !important;
    overflow: auto !important;
}

.customer-detail-workspace .customer-section-toggle {
    border-radius: 18px;
}

.customer-detail-workspace .customer-section-toggle__summary {
    padding: 14px 16px;
}

.customer-detail-workspace .customer-section-toggle__body {
    padding: 0 16px 16px;
}

.customer-detail-workspace .customer-detail-compact-grid--collapsed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-detail-workspace .customer-panel-drawer {
    grid-column: 1 / -1;
}

body[data-theme="xero"] .customer-detail-workspace .customer-priority-ledger__card,
body[data-theme="xero"] .customer-detail-workspace .customer-priority-ledger__card--statement,
body[data-theme="xero"] .customer-detail-workspace .customer-section-toggle,
body[data-theme="xero"] .customer-detail-workspace .customer-panel-drawer {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

@media (max-width: 1280px) {
    .customer-detail-workspace .customer-priority-ledger {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-detail-workspace .customer-detail-compact-grid--collapsed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .customer-detail-workspace .customer-priority-ledger,
    .customer-detail-workspace .customer-detail-compact-grid--collapsed {
        grid-template-columns: 1fr;
    }

    .customer-detail-workspace .customer-priority-ledger__card,
    .customer-detail-workspace .customer-priority-ledger__card--statement {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

body[data-theme="xero"] .page-settings .catalog-brand-preview-card,
body[data-theme="xero"] .page-settings .integration-provider-card,
body[data-theme="xero"] .page-settings .app-emulator-shell,
body[data-theme="xero"] .page-settings .app-emulator-controls .panel,
body[data-theme="xero"] .page-settings .app-emulator-preview,
body[data-theme="xero"] .page-system-diagnostic .panel,
body[data-theme="xero"] .page-system-diagnostic .workspace-stat {
    background: #ffffff;
}

body[data-theme="xero"] .page-settings .catalog-brand-preview-card,
body[data-theme="xero"] .page-settings .integration-provider-card,
body[data-theme="xero"] .page-settings .app-emulator-shell,
body[data-theme="xero"] .page-system-diagnostic .list-item {
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

body[data-theme="xero"] .page-settings .integration-summary-grid .detail-card,
body[data-theme="xero"] .page-settings .integration-provider-card,
body[data-theme="xero"] .page-settings .catalog-brand-preview-card__copy,
body[data-theme="xero"] .page-settings .app-emulator-controls .detail-card,
body[data-theme="xero"] .page-settings .app-emulator-preview__toolbar {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="xero"] .page-customers .customers-directory th,
body[data-theme="xero"] .page-customers .customers-directory td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body[data-theme="xero"] .page-customers .customers-directory th:first-child,
body[data-theme="xero"] .page-customers .customers-directory td:first-child {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    padding-left: 10px;
    padding-right: 6px;
    text-align: center;
}

body[data-theme="xero"] .page-customers .customers-directory td:nth-child(2),
body[data-theme="xero"] .page-customers .customers-directory th:nth-child(2) {
    min-width: 280px;
    width: 280px;
}

body[data-theme="xero"] .page-customers .customer-cell,
body[data-theme="xero"] .page-customers .customer-cell__title-row {
    min-width: 0;
}

body[data-theme="xero"] .page-customers .customer-cell__title-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

body[data-theme="xero"] .page-customers .customer-cell__title-row .table-link {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    line-height: 1.2;
}

body[data-theme="xero"] .page-customers .customer-info-trigger {
    width: 18px;
    height: 18px;
    min-width: 18px;
    font-size: 0.68rem;
    line-height: 1;
}

body[data-theme="xero"] .page-customers .customers-directory table {
    table-layout: fixed;
}

body[data-theme="xero"] .page-customers .customers-directory th:first-child,
body[data-theme="xero"] .page-customers .customers-directory td:first-child {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    padding-left: 10px;
    padding-right: 6px;
    text-align: center;
}

body[data-theme="xero"] .page-customers .customers-directory td:first-child {
    vertical-align: middle;
}

body[data-theme="xero"] .page-customers .customers-directory td:first-child input[type="checkbox"] {
    display: block;
    margin: 0 auto;
}

body[data-theme="xero"] .page-customers .customer-cell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
}

body[data-theme="xero"] .page-customers .customer-cell__title-row {
    display: contents;
}

body[data-theme="xero"] .page-customers .table-detail-link {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    line-height: 1;
}

body[data-theme="xero"] .page-customers th input[type="checkbox"],
body[data-theme="xero"] .page-customers td input[type="checkbox"] {
    width: 13px;
    height: 13px;
    min-width: 13px;
    margin: 0;
}

body[data-theme="xero"] .page-customers .bulk-actions {
    gap: 8px;
    align-items: center;
}

body[data-theme="xero"] .page-customers .bulk-actions input,
body[data-theme="xero"] .page-customers .bulk-actions select {
    min-width: 132px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.76rem;
    border-radius: 10px;
}

body[data-theme="xero"] .page-customers .bulk-actions .button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.76rem;
}

body[data-theme="xero"] .page-customers .customer-toolbar {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(150px, 190px));
    gap: 10px;
}

body[data-theme="xero"] .page-customers .customer-sort-field select,
body[data-theme="xero"] .page-customers .customer-toolbar .field-wide input[type="search"] {
    min-height: 34px;
    height: 34px;
    font-size: 0.78rem;
    border-radius: 10px;
}

body[data-theme="xero"] .page-customers .table-filter-controls select,
body[data-theme="xero"] .page-customers .table-filter-controls input {
    min-height: 28px;
    height: 28px;
    padding: 0 7px;
    font-size: 0.72rem;
    border-radius: 10px;
}

body[data-theme="xero"] .page-customers .table-filter-stack {
    gap: 4px;
}

body[data-theme="xero"] .page-customers .table-filter-title {
    font-size: 0.64rem;
    line-height: 1.1;
    letter-spacing: 0.08em;
}

body[data-theme="xero"] .page-customers .table-filter-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

body[data-theme="xero"] .page-customers .table-filter-controls select {
    width: 32px;
    min-width: 32px;
    padding-left: 6px;
    padding-right: 16px;
    text-indent: -9999px;
    background-position: right 6px center;
}

body[data-theme="xero"] .page-customers .table-filter-controls input {
    width: 42px;
    min-width: 42px;
}

body[data-theme="xero"] .page-customers .table-filter-popover__trigger {
    min-height: 28px;
    height: 28px;
    min-width: 26px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    color: #486277;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

body[data-theme="xero"] .page-customers .table-filter-popover__panel {
    width: 118px;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

body[data-theme="xero"] .page-customers .table-filter-popover__panel input {
    width: 100%;
    min-width: 0;
}

body[data-theme="xero"] .page-customers .customers-directory th.has-mobile-control {
    padding-top: 10px;
    padding-bottom: 10px;
    vertical-align: middle;
}

body[data-theme="xero"] .page-orders .orders-table__select-cell {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-left: 8px;
    padding-right: 6px;
    text-align: center;
}

body[data-theme="xero"] .page-orders .orders-table__select-cell .checkbox-inline {
    justify-content: center;
    gap: 0;
    padding: 0;
}

body[data-theme="xero"] .page-orders .orders-table__select-cell input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
}

body[data-theme="xero"] .page-orders .orders-table--single-line td,
body[data-theme="xero"] .page-orders .orders-table--single-line th {
    padding-top: 8px;
    padding-bottom: 8px;
}

body[data-theme="xero"] .page-orders .orders-table--single-line .table-link,
body[data-theme="xero"] .page-orders .orders-table--single-line .order-accounting-code {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

body[data-theme="xero"] .page-orders .orders-table--single-line .table-detail-link {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.7rem;
}

body[data-theme="xero"] .page-orders .orders-preview-line__head strong {
    font-size: 0.84rem;
}

body[data-theme="xero"] .page-orders .orders-preview-line__grid {
    gap: 8px;
}

body[data-theme="xero"] .page-orders .orders-preview-line .field.compact span,
body[data-theme="xero"] .page-orders .orders-preview-line__meta span,
body[data-theme="xero"] .page-orders .orders-preview-editor__sync span {
    font-size: 0.72rem;
}

body[data-theme="xero"] .page-orders .orders-preview-line input,
body[data-theme="xero"] .page-orders .orders-preview-line select {
    min-height: 32px;
    height: 32px;
    font-size: 0.78rem;
    border-radius: 10px;
}

body[data-theme="xero"] .page-orders .orders-preview-line .checkbox-inline {
    gap: 6px;
}

body[data-theme="xero"] .page-orders .orders-preview-editor__sync {
    margin-bottom: 10px;
}

body[data-theme="xero"] .page-orders .xui-lower-window__metrics .pill,
body[data-theme="xero"] .page-orders .workspace-head__actions .button-counter {
    font-size: 0.68rem;
}

body[data-theme="xero"] .page-settings .diagnostic-result {
    margin-top: 10px;
}

body[data-theme="xero"] .page-receivables .compact-table--receivables col.receivables-col--select {
    width: 30px;
}

body[data-theme="xero"] .page-receivables .compact-table--receivables th:first-child,
body[data-theme="xero"] .page-receivables .compact-table--receivables td:first-child {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-left: 8px;
    padding-right: 6px;
    text-align: center;
}

body[data-theme="xero"] .page-receivables .compact-table--receivables th input[type="checkbox"],
body[data-theme="xero"] .page-receivables .compact-table--receivables td input[type="checkbox"] {
    width: 13px;
    height: 13px;
    min-width: 13px;
    margin: 0;
}

body[data-theme="xero"] .page-receivables .compact-table--receivables td strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

body[data-theme="xero"] .page-settings .settings-integrations .form-grid {
    gap: 10px;
}

body[data-theme="xero"] .page-settings .settings-integrations .field input,
body[data-theme="xero"] .page-settings .settings-integrations .field select {
    min-height: 38px;
    font-size: 0.82rem;
}

body[data-theme="xero"] .page-settings .settings-diagnostics .detail-grid {
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-theme="xero"] .page-settings .settings-diagnostics .detail-card {
    padding: 12px 14px;
}

body[data-theme="xero"] .page-settings .settings-diagnostics .detail-card strong {
    font-size: 0.95rem;
}

body[data-theme="xero"] .page-settings .settings-diagnostics .diagnostic-result {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #ffffff;
    font-size: 0.78rem;
}

body[data-theme="xero"] .page-settings .settings-diagnostics .diagnostic-result p {
    margin: 0 0 6px;
}

body[data-theme="xero"] .page-settings .settings-diagnostics .code-block {
    margin-top: 8px;
    max-height: 180px;
    overflow: auto;
    padding: 10px 12px;
    font-size: 0.72rem;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    body[data-theme="xero"] .page-settings .settings-diagnostics .detail-grid {
        grid-template-columns: 1fr;
    }
}

body[data-theme="xero"] .page-settings .integration-provider-grid,
body[data-theme="xero"] .page-settings .integration-policy-grid {
    gap: 14px;
}

body[data-theme="xero"] .page-settings .app-emulator-shell {
    padding: 14px;
    border-radius: 18px;
}

body[data-theme="xero"] .page-settings .app-emulator-preview__toolbar {
    border-radius: 14px;
}

body[data-theme="xero"] .page-settings .app-emulator-frame {
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

body[data-theme="xero"] .page-dashboard.page-invoice-report .workspace-head--reports-shell,
body[data-theme="xero"] .page-system-diagnostic .workspace-head--reports-shell {
    margin-bottom: 14px;
}

body[data-theme="xero"] .page-system-diagnostic .stack-list {
    gap: 12px;
}

body[data-theme="xero"] .page-system-diagnostic .list-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
}

body[data-theme="xero"] .page-system-diagnostic .list-item:hover {
    background: rgba(15, 123, 193, 0.03);
}

@media (max-width: 1200px) {
    body[data-theme="xero"] .dashboard-home-summary,
    body[data-theme="xero"] .dashboard-home-grid,
    body[data-theme="xero"] .dashboard-home-lower,
    body[data-theme="xero"] .page-dashboard .dashboard-overview-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body[data-theme="xero"] .page-dashboard .dashboard-focus-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    body[data-theme="xero"] .dashboard-home-notice,
    body[data-theme="xero"] .dashboard-home-card__header,
    body[data-theme="xero"] .dashboard-home-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    body[data-theme="xero"] .dashboard-home-summary,
    body[data-theme="xero"] .dashboard-home-grid,
    body[data-theme="xero"] .dashboard-home-lower,
    body[data-theme="xero"] .dashboard-home-card__metrics,
    body[data-theme="xero"] .dashboard-home-card__metrics--triple,
    body[data-theme="xero"] .dashboard-home-bars,
    body[data-theme="xero"] .dashboard-home-brief {
        grid-template-columns: 1fr;
    }
}

/* 2026-05-03 enterprise foundation pass */
html {
    font-size: 14px;
}

html[data-font-size="small"] {
    font-size: 12px;
}

html[data-font-size="medium"] {
    font-size: 14px;
}

html[data-font-size="large"] {
    font-size: 16px;
}

:root {
    --content-pad: 18px;
    --hero-padding: 18px;
    --panel-padding: 14px;
    --card-padding: 12px;
    --grid-gap: 12px;
    --section-gap: 16px;
    --nav-gap: 8px;
    --panel-radius: 16px;
    --card-radius: 14px;
    --control-radius: 10px;
    --control-height: 38px;
    --table-cell-y: 10px;
    --table-cell-x: 10px;
}

body[data-density="balanced"],
body[data-density="comfortable"] {
    --content-pad: 18px;
    --hero-padding: 18px;
    --panel-padding: 14px;
    --card-padding: 12px;
    --grid-gap: 12px;
    --section-gap: 16px;
    --panel-radius: 16px;
    --card-radius: 14px;
    --control-radius: 10px;
    --control-height: 38px;
    --table-cell-y: 10px;
}

.page-main-grid,
.settings-layout,
.settings-sections,
.panel-grid,
.dashboard-module-grid,
.dashboard-module-grid--secondary {
    gap: 12px !important;
}

.panel,
.detail-card,
.hero,
.table-wrap,
.settings-card,
.settings-directory,
.workspace-stat,
.dashboard-home-card,
.dashboard-lower-card {
    border-radius: 14px !important;
    padding: 14px !important;
}

.panel-header,
.panel-header--compact {
    gap: 8px !important;
    margin-bottom: 10px !important;
}

.panel h1,
.panel h2,
.panel-header h2,
.workspace-head__title {
    font-size: 18px !important;
    line-height: 1.12 !important;
}

.workspace-head {
    gap: 10px !important;
    margin-bottom: 12px !important;
}

.workspace-head__eyebrow,
.panel-header .eyebrow,
.field span,
label {
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
}

.workspace-head__subtitle,
.panel p,
.muted,
small {
    font-size: 12px !important;
    line-height: 1.42 !important;
}

.button,
button,
input[type="submit"],
input[type="button"] {
    min-height: 32px !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
}

.pill {
    min-height: 22px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
}

input,
select,
textarea {
    min-height: 36px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
}

textarea {
    min-height: 84px !important;
}

.table-wrap table thead th {
    padding: 10px !important;
    font-size: 10px !important;
    line-height: 1 !important;
}

.table-wrap table tbody td {
    padding: 10px !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
}

.table-wrap table td strong,
.table-wrap table td .table-link {
    font-size: 12px !important;
    line-height: 1.24 !important;
}

.table-wrap table td small,
.table-wrap table td .muted {
    font-size: 11px !important;
}

/* 2026-05-03 final enterprise typography pass */
body,
input,
select,
textarea,
button {
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
}

.workspace-head__title,
.panel h1,
.panel h2,
.panel-header h2,
.dashboard-home-card__header h2,
.xui-widget__title {
    font-size: 14px !important;
    line-height: 1.14 !important;
}

.workspace-head__subtitle,
.panel p,
.muted,
small,
.button,
button,
input,
select,
textarea {
    font-size: 11px !important;
}

.dashboard-home-card__metric strong,
.workspace-stat strong,
.xui-kpi-card strong,
.xui-mini-kpi strong,
.metric-card strong {
    font-size: 17px !important;
    line-height: 1.08 !important;
}

/* 2026-05-03 global hard type ceiling */
body,
body *:not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon) {
    font-family: Verdana, Tahoma, Arial, sans-serif !important;
}

body,
body p,
body span,
body small,
body label,
body input,
body select,
body textarea,
body button,
body .button,
body .pill,
body .table-link,
body td,
body th {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

body .workspace-head__title,
body .panel h1,
body .panel h2,
body .panel-header h2,
body .dashboard-home-card__header h2,
body .customer-command-deck__identity h1,
body .customer-command-deck__balance strong,
body .customer-command-deck__fact strong,
body .workspace-stat strong,
body .xui-kpi-card strong,
body .xui-mini-kpi strong,
body .metric-card strong,
body .xui-home-banner__title,
body .xui-widget__title {
    font-size: 16px !important;
    line-height: 1.2 !important;
}

body .workspace-head__eyebrow,
body .eyebrow,
body .xui-widget__eyebrow,
body .xui-home-banner__eyebrow {
    font-size: 10px !important;
    line-height: 1.3 !important;
}

html[data-font-size="small"],
html[data-font-size="medium"],
html[data-font-size="large"] {
    font-size: 12px !important;
}

/* 2026-05-03 statement enterprise foundation */
.statement-shell--enterprise {
    display: grid;
    gap: 10px;
}

.statement-header--enterprise {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

/* 2026-05-03 b2b compact density pass */
body[data-theme="xero"] .page-orders-entry .order-entry-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

body[data-theme="xero"] .page-orders-entry .metric-card.compact {
    min-height: 0;
    padding: 10px 12px;
}

body[data-theme="xero"] .page-orders-entry .metric-card.compact strong {
    font-size: 13px;
    line-height: 1.2;
}

body[data-theme="xero"] .page-orders-entry .order-entry-appbar {
    padding: 10px 12px;
}

body[data-theme="xero"] .page-orders-entry .order-product-group__header {
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

body[data-theme="xero"] .page-orders-entry .order-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body[data-theme="xero"] .page-orders-entry .order-product-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    min-height: 0;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__visual {
    min-height: 88px;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__head h3 {
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__head p,
body[data-theme="xero"] .page-orders-entry .order-product-card__meta span,
body[data-theme="xero"] .page-orders-entry .order-product-card__pricing span {
    font-size: 10px;
    line-height: 1.3;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__pricing strong {
    font-size: 12px;
    line-height: 1.2;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__controls {
    grid-template-columns: 84px 96px auto;
    gap: 8px;
}

body[data-theme="xero"] .page-orders-entry .order-product-card__controls .button {
    white-space: nowrap;
}

.statement-header--enterprise .statement-header__title {
    display: grid;
    gap: 4px;
}

.statement-header--enterprise .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.statement-summary-grid--enterprise {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) repeat(6, minmax(120px, 0.7fr));
    gap: 10px;
    align-items: start;
}

.statement-summary-card {
    align-content: start;
}

.statement-summary-card--customer {
    grid-column: span 2;
}

.statement-summary-grid--enterprise > * {
    align-self: start;
}

.statement-workspace--enterprise {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.9fr);
    gap: 12px;
    align-items: start;
}

.statement-contact-list strong,
.statement-balance-list strong {
    font-size: inherit;
    line-height: inherit;
}

@media (max-width: 1280px) {
    .statement-summary-grid--enterprise {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .statement-summary-card--customer {
        grid-column: span 2;
    }

    .statement-workspace--enterprise {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .statement-summary-grid--enterprise,
    .statement-toolbar__filters {
        grid-template-columns: 1fr;
    }

    .statement-summary-card--customer {
        grid-column: auto;
    }
}

[hidden],
.customer-panel-drawer[hidden],
[data-customer-panel][hidden] {
    display: none !important;
}
