:root { color-scheme: light dark; font-family: system-ui, sans-serif; background: light-dark(#f3f5f7,#141a21); color: light-dark(#17212d,#e5edf5); }
* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 48rem; margin: 3rem auto; padding: 1.5rem; }
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
section { padding: 1.5rem; margin-top: 1.5rem; border: 1px solid light-dark(#ccd5df,#455363); border-radius: .6rem; background: light-dark(white,#202934); }
dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; }
dd { margin: 0; }
button { min-height: 44px; padding: .6rem 1rem; border: 1px solid light-dark(#596b80,#97a9bd); border-radius: .3rem; color: inherit; background: transparent; cursor: pointer; }
button:focus-visible { outline: 3px solid #3886dd; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.badge { padding: .2rem .5rem; border-radius: .25rem; }
.online { background: light-dark(#d7f1e0,#184330); color: light-dark(#175b32,#bce8cb); }
.offline, .error { color: light-dark(#9d2222,#ffb6b6); }
@media (max-width: 480px) { .shell { margin: 1rem auto; padding: 1rem; } }
:root[data-theme="Light"] { color-scheme: light; }
:root[data-theme="Dark"] { color-scheme: dark; }
.identity-shell { max-width: 76rem; }
.identity-shell .shell { margin: 0; padding: 0; max-width: none; }
nav, .actions, .filters { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; align-items: end; }
label { display: flex; flex-direction: column; gap: .4rem; margin: .8rem 0; }
input, select { font: inherit; color: inherit; background: light-dark(white,#141a21); border: 1px solid light-dark(#596b80,#97a9bd); border-radius: .3rem; padding: .65rem; min-height: 44px; max-width: 100%; }
input:focus-visible, select:focus-visible { outline: 3px solid #3886dd; outline-offset: 2px; }
form { max-width: 32rem; }
.check { flex-direction: row; align-items: center; }
.check input { min-height: auto; width: 1.2rem; height: 1.2rem; }
fieldset { border: 1px solid light-dark(#ccd5df,#455363); margin: 1rem 0; }
.development-notice { border-left: 4px solid light-dark(#825900,#e6c460); padding: .8rem; background: light-dark(#fff3d3,#3b331c); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: .8rem; text-align: left; border-bottom: 1px solid light-dark(#ccd5df,#455363); }
.device { padding: 1rem 0; border-bottom: 1px solid light-dark(#ccd5df,#455363); overflow-wrap: anywhere; }
code, small { overflow-wrap: anywhere; }
textarea { font: inherit; color: inherit; background: light-dark(white,#141a21); border: 1px solid light-dark(#596b80,#97a9bd); border-radius: .3rem; padding: .65rem; resize: vertical; width: 100%; }
textarea:focus-visible, summary:focus-visible { outline: 3px solid #3886dd; outline-offset: 2px; }
summary { cursor: pointer; padding: 1rem 0; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.order-filters { max-width: none; }
.order-cards { display: none; }
.scope-summary { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.match-notice { border-left: 4px solid light-dark(#825900,#e6c460); padding: 1rem; background: light-dark(#fff3d3,#3b331c); }
.valve-facts { max-width: 42rem; }
.valve-facts dd { text-align: right; overflow-wrap: anywhere; min-width: 0; }
button[aria-pressed="true"] { background: light-dark(#e2edf8,#324c66); border-width: 2px; }
@media (max-width: 720px) {
    .order-table { display: none; }
    .order-cards { display: block; }
    section { padding: 1rem; }
    .filters > label { flex: 1 1 12rem; }
    header { flex-wrap: wrap; }
}
.checklist-workspace { max-width: 60rem; }
.checklist-item { overflow-wrap: anywhere; }
.checklist-item form { max-width: 35rem; }
.checklist-item select, .checklist-item textarea, .checklist-item input { width: 100%; box-sizing: border-box; }
.checklist-phase { margin-block: 1rem; padding: .75rem; border: 1px solid light-dark(#ccd5df,#455363); border-radius: .5rem; }
.checklist-phase summary { cursor: pointer; min-height: 44px; padding: .5rem; }
.checklist-item button, .checklist-item a { min-height: 44px; display: inline-flex; align-items: center; }
.checklist-workspace progress { width: 100%; }

.checklist-item a { color: light-dark(#174b8c,#9bcaff); margin-right: .75rem; }

/* Canonical command center tokens. Shared by web, native and training. */
:root {
 --color-background: light-dark(#eef3f6,#091722);
 --color-surface: light-dark(#ffffff,#102431);
 --color-surface-elevated: light-dark(#f8fbfd,#152c3b);
 --color-sidebar: light-dark(#e8eff3,#0d202e);
 --color-border: light-dark(#cddbe3,#294353);
 --color-text-primary: light-dark(#163044,#ecf4f8);
 --color-text-secondary: light-dark(#536b7c,#a6bccb);
 --color-accent: light-dark(#147348,#43d98d);
 --color-accent-hover: light-dark(#105f3b,#6ce3a5);
 --color-success: light-dark(#17764b,#56d49a);
 --color-warning: light-dark(#8c5a00,#efbf62);
 --color-danger: light-dark(#b13245,#fa8997);
 --color-critical: var(--color-danger);
 --color-info: light-dark(#176ba4,#68b8f0);
 --color-confirmed: light-dark(#6845a7,#ba9af5);
 --app-bg: var(--color-background); --surface: var(--color-surface); --surface-raised: var(--color-surface-elevated);
 --surface-hover: light-dark(#e6eff3,#1c3648); --surface-selected: light-dark(#dcefe6,#173d35);
 --sidebar-bg: var(--color-sidebar); --text-main: var(--color-text-primary); --text-muted: var(--color-text-secondary);
 --border-subtle: var(--color-border); --accent: var(--color-accent); --accent-contrast: light-dark(#ffffff,#072519);
 --badge-success-bg: light-dark(#e0f2e9,#163b31); --badge-success-text: var(--color-success);
 --badge-warning-bg: light-dark(#fff0d4,#3d3422); --badge-warning-text: var(--color-warning);
 --badge-error-bg: light-dark(#fbe7eb,#402834); --badge-error-text: var(--color-danger);
 --badge-neutral-bg: light-dark(#e8eff3,#263d4c); --badge-neutral-text: var(--text-muted);
 --radius-small: .45rem; --radius-card: .8rem; --radius-panel: 1rem;
 --shadow-card: 0 6px 20px rgb(3 15 25 / .06); --shadow-overlay: -12px 0 50px rgb(0 8 18 / .3);
 --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem;
 --font-small: .75rem; --font-body: .875rem; --font-title: clamp(1.55rem,2.1vw,2rem);
 --icon-small: 1rem; --icon-normal: 1.25rem; --icon-large: 1.65rem;
 --motion-fast: 160ms; --motion-normal: 220ms;
}

body { background: var(--app-bg); color: var(--text-main); font-family: Inter, "Segoe UI", system-ui, sans-serif; }
.identity-shell { width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 0; }
.identity-shell > .auth-header { max-width: 76rem; margin: 0 auto; padding: 1.5rem 1.75rem .5rem; }
.identity-shell > section, .identity-shell > .access-shell { max-width: 42rem; margin: 2rem auto; padding: 0 1.5rem; }
.identity-shell > section { box-sizing: content-box; }
.identity-shell > .access-shell > section { margin-top: 0; }
.identity-shell.auth-layout { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100svh; padding: 1.5rem 1rem; gap: 1rem; }
.identity-shell.auth-layout > .auth-header { display: flex; justify-content: flex-end; width: min(100%, 30rem); padding: 0; margin: 0; }
.identity-shell.auth-layout > section.auth-card { box-sizing: border-box; width: min(100%, 30rem); margin: 0; padding: clamp(1.25rem, 3vw, 2rem); }
.auth-card h2 { margin-top: 0; font-size: 1.55rem; }
.auth-card input { width: 100%; }
.auth-card form button[type="submit"] { width: 100%; background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); margin-block: .5rem 1rem; }
.auth-card form button[type="submit"]:hover:enabled { background: var(--color-accent-hover); color: var(--accent-contrast); }
.auth-card > button { margin: .25rem .25rem .25rem 0; }
.auth-layout > .error, .auth-layout > p[role="status"] { max-width: 30rem; width: 100%; margin: 0; }
.copyright-footer { padding: 1rem .5rem; color: var(--text-muted); font-size: .75rem; text-align: center; }
.page-content > .copyright-footer { margin-top: 1.5rem; }
@media (max-width: 480px) { .identity-shell.auth-layout { padding: 1rem .75rem; } }
.identity-shell input, .identity-shell select, .identity-shell textarea { background: var(--surface); color: var(--text-main); border-color: var(--border-subtle); }
.identity-shell button, .identity-shell a { transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.identity-shell button:hover:enabled { background: var(--surface-hover); border-color: var(--accent); }
.identity-shell button:active:enabled { transform: translateY(1px); }
.app-frame { --sidebar-width: 258px; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); background: var(--app-bg); }
.app-frame.is-collapsed { --sidebar-width: 78px; }
.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; display: flex; flex-direction: column; min-width: 0; padding: 1rem .8rem .85rem; background: var(--sidebar-bg); border-right: 1px solid var(--border-subtle); }
.sidebar-brand { min-height: 3.3rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: 0 .35rem .75rem; border-bottom: 1px solid var(--border-subtle); }
.brand-home { min-width: 0; display: inline-flex; align-items: center; gap: .65rem; padding: .25rem; border: 0; background: transparent; color: var(--text-main); font-weight: 750; font-size: 1.02rem; }
.brand-home:hover { background: transparent !important; }
.brand-mark { width: 2rem; height: 2rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: .65rem; background: #1769aa; color: #fff; font-size: 1.05rem; }
.sidebar-collapse, .icon-action, .mobile-menu, .sidebar-signout { width: 2.5rem; min-width: 2.5rem; min-height: 2.5rem; display: inline-grid; place-items: center; padding: .4rem; border: 0; border-radius: .6rem; background: transparent; }
.sidebar-collapse .app-icon { transition: transform .16s ease; }
.is-collapsed .sidebar-collapse .app-icon { transform: rotate(180deg); }
.sidebar-navigation { flex: 1; min-height: 0; overflow-y: auto; padding: .9rem 0; }
.sidebar nav.sidebar-navigation { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; overflow-x: hidden; }
.nav-group { margin: 0 0 1.1rem; padding: 0; border: 0; }
.sidebar .nav-group { width: 100%; flex: 0 0 auto; background: transparent; }
.nav-group h2 { margin: .2rem .7rem .4rem; color: var(--text-muted); font-size: .65rem; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; }
.nav-link { width: 100%; min-height: 2.65rem; display: flex; align-items: center; gap: .8rem; padding: .55rem .72rem; border: 0; border-radius: .65rem; background: transparent; color: var(--text-muted); text-align: left; font-size: .9rem; font-weight: 550; }
.nav-link[href] { text-decoration: none; }
.nav-link[href]:hover { background: var(--surface-hover); color: var(--text-main); }
.nav-link[href]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-link:hover:enabled { background: var(--surface-hover); color: var(--text-main); border-color: transparent; }
.nav-link[aria-current="page"] { background: var(--surface-selected); color: var(--accent); font-weight: 700; }
.app-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.nav-link .app-icon { width: 1.15rem; height: 1.15rem; }
.nav-count, .notification-badge { min-width: 1.2rem; height: 1.2rem; display: inline-grid; place-items: center; margin-left: auto; padding: 0 .3rem; border-radius: 999px; background: #1769aa; color: #fff; font-size: .68rem; font-weight: 750; }
.sidebar-account { display: flex; align-items: center; gap: .65rem; min-height: 3.7rem; padding: .6rem .4rem 0; border-top: 1px solid var(--border-subtle); }
.avatar { width: 2rem; height: 2rem; display: inline-grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--surface-selected); color: var(--accent); font-size: .72rem; font-weight: 750; }
.account-label, .user-popover-heading > span:last-child { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: .16rem; overflow: hidden; }
.account-label strong, .user-popover-heading strong { overflow: hidden; color: var(--text-main); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.account-label small, .user-popover-heading small { overflow: hidden; color: var(--text-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-signout { margin-left: auto; }
.app-frame.is-collapsed .brand-name, .app-frame.is-collapsed .nav-group h2, .app-frame.is-collapsed .nav-label, .app-frame.is-collapsed .account-label, .app-frame.is-collapsed .sidebar-signout { display: none; }
.app-frame.is-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }
.app-frame.is-collapsed .brand-home { width: 2.5rem; justify-content: center; padding: .2rem; }
.app-frame.is-collapsed .sidebar-collapse { position: absolute; top: .95rem; right: .15rem; width: 1.35rem; min-width: 1.35rem; min-height: 1.8rem; padding: .2rem; }
.app-frame.is-collapsed .sidebar-collapse .app-icon { width: .9rem; }
.app-frame.is-collapsed .sidebar nav.sidebar-navigation { align-items: center; }
.app-frame.is-collapsed .nav-group { display: flex; flex-direction: column; align-items: center; margin-bottom: .65rem; }
.app-frame.is-collapsed .nav-link { width: 2.65rem; justify-content: center; gap: 0; padding: .55rem 0; }
.app-frame.is-collapsed .nav-count { position: absolute; top: -.2rem; right: -.2rem; min-width: .9rem; height: .9rem; margin: 0; padding: 0 .12rem; border: 1px solid var(--sidebar-bg); font-size: .52rem; }
.app-frame.is-collapsed .nav-link { position: relative; }
.app-frame.is-collapsed .sidebar-account { justify-content: center; padding-inline: 0; }
.app-main { min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 4.5rem; display: flex; align-items: center; gap: 1.5rem; padding: .65rem clamp(1rem, 2.6vw, 2.25rem); background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--border-subtle); backdrop-filter: blur(14px); }
.topbar-context { min-width: 10rem; display: flex; flex: 1; flex-direction: column; gap: .15rem; }
.topbar-context strong { font-size: .98rem; letter-spacing: -.01em; }
.topbar-context small { color: var(--text-muted); font-size: .74rem; }
.topbar-search { width: min(25vw, 20rem); min-width: 12rem; height: 2.5rem; display: flex; align-items: center; gap: .55rem; padding: 0 .7rem; border: 1px solid var(--border-subtle); border-radius: .65rem; color: var(--text-muted); background: var(--app-bg); }
.topbar-search input { width: 100%; min-height: unset; padding: 0; border: 0; outline: 0; background: transparent; font-size: .8rem; }
.topbar-search input:disabled { opacity: .8; }
.topbar-actions { display: flex; align-items: center; gap: .35rem; }
.notification-trigger { position: relative; }
.notification-badge { position: absolute; top: -.1rem; right: -.08rem; min-width: 1rem; height: 1rem; border: 2px solid var(--surface); font-size: .58rem; }
.account-trigger { min-height: 2.7rem; display: flex; align-items: center; gap: .55rem; padding: .25rem .45rem; border: 0; border-radius: .7rem; background: transparent; color: var(--text-main); }
.account-trigger-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; font-weight: 600; }
.popover-anchor { position: relative; }
.topbar-popover { position: absolute; top: calc(100% + .7rem); right: 0; z-index: 50; width: min(23rem, calc(100vw - 1.5rem)); padding: .8rem; border: 1px solid var(--border-subtle); border-radius: .9rem; background: var(--surface-raised); box-shadow: 0 16px 40px rgb(8 19 32 / .18); }
.topbar-popover > header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .2rem .25rem .55rem; border-bottom: 1px solid var(--border-subtle); }
.topbar-popover h2 { margin: 0; font-size: .95rem; }
.quick-notice { width: 100%; display: flex; flex-direction: column; gap: .25rem; padding: .75rem .45rem; border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: transparent; color: var(--text-main); text-align: left; }
.quick-notice strong { font-size: .8rem; }
.quick-notice small, .popover-empty { color: var(--text-muted); font-size: .72rem; }
.popover-footer { width: 100%; margin-top: .55rem; border: 0; color: var(--accent); font-weight: 700; }
.user-popover { width: min(19rem, calc(100vw - 1.5rem)); }
.user-popover-heading { display: flex; align-items: center; gap: .7rem; padding: .4rem .35rem .8rem; border-bottom: 1px solid var(--border-subtle); }
.menu-action { width: 100%; min-height: 2.65rem; display: flex; align-items: center; gap: .6rem; padding: .5rem .45rem; border: 0; border-radius: .55rem; background: transparent; color: var(--text-main); text-align: left; }
.menu-action .app-icon { color: var(--text-muted); }
.menu-setting { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: .4rem 0; color: var(--text-muted); font-size: .8rem; }
.menu-setting select { width: auto; min-width: 8rem; min-height: 2.4rem; margin: 0; padding: .35rem .55rem; }
.segmented { display: flex; gap: .2rem; padding: .2rem; border-radius: .55rem; background: var(--app-bg); }
.segmented button { min-height: 2rem; padding: .25rem .55rem; border: 0; border-radius: .4rem; background: transparent; font-size: .72rem; }
.segmented button[aria-pressed="true"] { background: var(--surface-selected); color: var(--accent); }
.signout-action { margin-top: .5rem; border-top: 1px solid var(--border-subtle); border-radius: 0; color: light-dark(#a53131, #ff9d9d); }
.page-content { width: min(100%, 1600px); margin: 0 auto; padding: clamp(1rem, 2.4vw, 2.2rem); }
.page-content section { margin-top: 1rem; border-color: var(--border-subtle); border-radius: .9rem; background: var(--surface); box-shadow: 0 2px 10px rgb(15 30 48 / .035); }
.page-content .shell { max-width: none; margin: 0; padding: 0; }
.page-content .shell > header { margin: 0 0 1rem; }
.page-content button:not(.nav-link):not(.brand-home):not(.icon-action):not(.account-trigger):not(.menu-action):not(.quick-notice):not(.popover-footer):not(.sidebar-collapse):not(.sidebar-signout):not(.mobile-menu):not(.segmented button) { border-radius: .55rem; }
.mobile-menu, .mobile-scrim { display: none; }
.access-shell { padding: 1.25rem; border-radius: .9rem; background: var(--surface); }
.access-shell > header { display: flex; align-items: center; justify-content: space-between; }
.access-shell h1 { font-size: 1.2rem; }
@media (max-width: 1024px) {
    .app-frame { --sidebar-width: 228px; }
    .topbar { gap: .75rem; }
    .topbar-search { width: min(22vw, 16rem); min-width: 10rem; }
    .page-content { padding: 1.2rem; }
}
@media (max-width: 760px) {
    .app-frame, .app-frame.is-collapsed { display: block; }
    .sidebar, .app-frame.is-collapsed .sidebar { position: fixed; inset: 0 auto 0 0; width: min(19rem, calc(100vw - 3.5rem)); height: 100dvh; transform: translateX(-105%); visibility: hidden; transition: transform .2s ease; box-shadow: 16px 0 36px rgb(0 0 0 / .15); }
    .mobile-open .sidebar { transform: translateX(0); visibility: visible; }
    .mobile-scrim { position: fixed; inset: 0; z-index: 25; display: block; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgb(8 15 24 / .5); }
    .mobile-menu { display: inline-grid; }
    .sidebar-collapse { display: none; }
    .is-collapsed .brand-name, .is-collapsed .nav-group h2, .is-collapsed .nav-label, .is-collapsed .account-label, .is-collapsed .sidebar-signout, .is-collapsed .nav-count { display: initial; }
    .is-collapsed .nav-group h2 { display: block; }
    .is-collapsed .nav-link { justify-content: flex-start; padding-inline: .72rem; }
    .app-frame.is-collapsed.mobile-open .brand-name, .app-frame.is-collapsed.mobile-open .nav-label, .app-frame.is-collapsed.mobile-open .account-label, .app-frame.is-collapsed.mobile-open .sidebar-signout, .app-frame.is-collapsed.mobile-open .nav-count { display: initial; }
    .app-frame.is-collapsed.mobile-open .nav-group h2 { display: block; }
    .app-frame.is-collapsed.mobile-open .sidebar nav.sidebar-navigation { align-items: stretch; }
    .app-frame.is-collapsed.mobile-open .nav-group { align-items: stretch; margin-bottom: 1.1rem; }
    .app-frame.is-collapsed.mobile-open .nav-link { width: 100%; justify-content: flex-start; gap: .8rem; padding: .55rem .72rem; }
    .app-frame.is-collapsed.mobile-open .nav-count { position: static; min-width: 1.2rem; height: 1.2rem; margin-left: auto; padding: 0 .3rem; border: 0; font-size: .68rem; }
    .app-frame.is-collapsed.mobile-open .sidebar-account { justify-content: flex-start; padding-inline: .4rem; }
    .topbar { min-height: 4rem; gap: .35rem; padding: .45rem .7rem; }
    .topbar-context { min-width: 0; }
    .topbar-context strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-context small, .topbar-search, .account-trigger-name, .topbar-actions > .icon-action:first-child { display: none; }
    .topbar-actions { margin-left: auto; }
    .account-trigger { padding: .2rem; }
    .page-content { padding: .75rem; }
    .page-content section { padding: .9rem; }
    .identity-shell > .auth-header { padding: 1rem 1rem .3rem; }
}

/* Premium industrial service dashboard and shared visual language. */
body { font-size: .94rem; line-height: 1.48; }
h1, h2, h3, h4 { color: var(--text-main); letter-spacing: -.025em; }
h1 { font-size: clamp(1.7rem, 2.4vw, 2.35rem); line-height: 1.12; font-weight: 740; }
h2 { font-size: clamp(1.12rem, 1.4vw, 1.4rem); font-weight: 680; }
h3 { font-size: 1rem; font-weight: 650; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible { outline-color: var(--accent); }
.app-icon { width: 1.18rem; height: 1.18rem; }
.brand-mark { background: #171649; color: #38d75b; box-shadow: 0 5px 14px rgb(23 22 73 / .24); }
.nav-link { transition: background-color .16s ease, color .16s ease, transform .16s ease; }
.nav-link[aria-current="page"] { position: relative; background: color-mix(in srgb, var(--accent) 13%, var(--sidebar-bg)); color: var(--accent); }
.nav-link[aria-current="page"]::before { position: absolute; inset: .48rem auto .48rem 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); content: ""; }
.online-avatar { position: relative; }
.online-avatar::after { position: absolute; right: -1px; bottom: -1px; width: .55rem; height: .55rem; border: 2px solid var(--sidebar-bg); border-radius: 50%; background: var(--color-success); content: ""; }
.page-content { width: min(100%, 1840px); padding: clamp(1.25rem, 2.45vw, 2.75rem); }
.page-content section { border: 1px solid color-mix(in srgb, var(--border-subtle) 86%, transparent); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.page-content > .home-page > .page-heading { margin: .15rem 0 1.25rem; }
.page-heading h1 { margin: .15rem 0 .3rem; font-size: clamp(1.85rem, 2.65vw, 2.55rem); letter-spacing: -.04em; }
.page-heading p { max-width: 52rem; }
.page-heading .eyebrow, .home-dashboard .eyebrow { color: var(--accent); font-weight: 760; }
.page-heading-actions { display: flex; align-items: center; gap: .6rem; }
.system-status-card { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.1rem; margin: 0 0 1.2rem !important; padding: .8rem 1.05rem !important; border-radius: .8rem !important; background: color-mix(in srgb, var(--surface-raised) 68%, var(--app-bg)) !important; box-shadow: none !important; }
.system-status-card h2 { margin: 0; font-size: .77rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.system-status-card dl { display: flex; flex: 1; flex-wrap: wrap; gap: .35rem 1.1rem; margin: 0; }
.system-status-card dl > div { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem 0; }
.system-status-card dt, .system-status-card dd { font-size: .78rem; }
.system-status-card button { min-height: 2rem; margin-left: auto; padding: .35rem .7rem; font-size: .76rem; }
.system-status-card .online { background: var(--badge-success-bg); color: var(--badge-success-text); }
.system-status-card .badge { font-size: .72rem; }
.home-dashboard { display: grid; gap: 1.15rem; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .85rem; }
.metric-card { min-width: 0; padding: 1rem 1.1rem; border: 1px solid var(--border-subtle); border-radius: .9rem; background: linear-gradient(145deg, var(--surface-raised), var(--surface)); box-shadow: 0 5px 16px rgb(12 30 48 / .035); }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--text-muted); font-size: .78rem; font-weight: 600; }
.metric-icon { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: .7rem; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); }
.metric-value { display: block; margin-top: .45rem; font-size: clamp(1.8rem, 2.2vw, 2.35rem); line-height: 1.05; font-weight: 760; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-card > small { display: block; margin-top: .36rem; color: var(--text-muted); font-size: .73rem; }
.deployment-card { position: relative; isolation: isolate; min-height: 18rem; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .85fr); gap: 1rem; overflow: hidden; padding: clamp(1.35rem, 2.5vw, 2.25rem); border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border-subtle)); border-radius: 1.2rem; background: radial-gradient(ellipse at 84% 6%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 45%), linear-gradient(140deg, var(--surface-raised), var(--surface)); box-shadow: 0 12px 32px rgb(10 34 58 / .08); }
.deployment-copy { position: relative; z-index: 1; align-self: center; }
.deployment-copy > .eyebrow { display: flex; align-items: center; gap: .5rem; margin: 0 0 .8rem; color: var(--accent); font-size: .72rem; font-weight: 770; letter-spacing: .1em; }
.deployment-copy > .eyebrow .app-icon { width: 1rem; height: 1rem; }
.deployment-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.deployment-title-row h2 { margin: 0; font-size: clamp(1.65rem, 2.7vw, 2.6rem); font-weight: 760; letter-spacing: -.045em; }
.deployment-date { display: flex; align-items: center; gap: .48rem; margin: .55rem 0 1.15rem; color: var(--text-secondary); font-size: .92rem; }
.deployment-facts { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.2rem; }
.deployment-facts > span { min-width: 7.1rem; display: flex; flex-direction: column; gap: .06rem; padding: .65rem .85rem; border-left: 1px solid var(--border-subtle); }
.deployment-facts > span:first-child { padding-left: 0; border-left: 0; }
.deployment-facts strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.deployment-facts small { color: var(--text-muted); font-size: .72rem; }
.primary-action { min-height: 2.6rem; display: inline-flex; align-items: center; gap: .55rem; padding: .58rem .95rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-contrast); font-weight: 680; }
.primary-action:hover:enabled { border-color: var(--color-accent-hover) !important; background: var(--color-accent-hover) !important; color: var(--accent-contrast); }
.primary-action .app-icon { width: 1rem; height: 1rem; }
.deployment-readiness { position: relative; z-index: 1; align-self: stretch; }
.deployment-readiness > section { height: 100%; margin: 0 !important; padding: 1.1rem !important; border: 1px solid var(--border-subtle) !important; border-radius: .95rem !important; background: color-mix(in srgb, var(--surface) 86%, transparent) !important; box-shadow: none !important; }
.readiness-heading h3 { margin: .12rem 0 .8rem; font-size: 1.08rem; }
.readiness-heading .eyebrow { margin: 0; font-size: .64rem; }
.readiness-overview { display: flex; align-items: center; gap: .85rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border-subtle); }
.progress-ring { --progress: 0%; width: 6.1rem; height: 6.1rem; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) var(--progress), color-mix(in srgb, var(--border-subtle) 76%, var(--surface)) 0); }
.progress-ring > span { width: 4.8rem; height: 4.8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-raised); }
.progress-ring strong { font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.progress-ring small { color: var(--text-muted); font-size: .66rem; }
.readiness-summary { display: grid; gap: .25rem; color: var(--text-muted); font-size: .74rem; }
.readiness-summary strong { color: var(--text-main); font-size: .88rem; }
.readiness-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .75rem; padding-top: .7rem; }
.readiness-item { min-width: 0; display: grid; grid-template-columns: .55rem minmax(0, 1fr); align-items: center; gap: .26rem .4rem; font-size: .7rem; }
.readiness-item > span:nth-child(2) { overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.readiness-item strong { grid-column: 2; color: var(--text-main); font-size: .66rem; font-weight: 550; }
.readiness-dot { width: .42rem; height: .42rem; grid-row: span 2; border-radius: 50%; background: var(--color-success); }
.readiness-dot.is-open { background: var(--color-warning); }
.personal-readiness { display: flex; align-items: center; gap: .45rem; margin-top: .7rem; padding-top: .65rem; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: .74rem; }
.personal-readiness .app-icon { color: var(--accent); }
.personal-readiness strong { margin-left: auto; color: var(--text-main); }
.readiness-hint { margin: .65rem 0 0; color: var(--text-muted); font-size: .66rem; }
.deployment-visual { position: relative; min-height: 14rem; display: grid; place-items: center; color: color-mix(in srgb, var(--accent) 78%, var(--color-text-primary)); }
.deployment-visual > .app-icon { width: min(42%, 9rem); height: auto; opacity: .92; stroke-width: 1; }
.orbit { position: absolute; width: min(90%, 22rem); aspect-ratio: 1; border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: 50%; transform: rotate(-22deg) scaleY(.44); }
.orbit-two { width: min(76%, 18rem); transform: rotate(32deg) scaleY(.55); }
.attention-panel, .upcoming-section { margin: 0 !important; padding: 1.2rem 1.35rem !important; }
.section-heading { align-items: center; }
.section-heading .eyebrow { margin: 0 0 .18rem; color: var(--accent); font-size: .65rem; font-weight: 760; letter-spacing: .1em; }
.section-heading h2 { margin: 0; }
.attention-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: .6rem; }
.attention-item { width: 100%; min-width: 0; display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--border-subtle); border-radius: .75rem; background: var(--surface-raised); color: var(--text-main); text-align: left; }
.attention-item > span:nth-child(2) { min-width: 0; display: grid; flex: 1; gap: .18rem; }
.attention-item strong { font-size: .81rem; }
.attention-item small { color: var(--text-muted); font-size: .7rem; }
.attention-icon { width: 2rem; height: 2rem; display: grid; flex: 0 0 auto; place-items: center; border-radius: .65rem; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--accent); }
.attention-icon.warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.upcoming-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .75rem; }
.upcoming-trip-card { min-width: 0; display: grid; justify-items: start; gap: .48rem; padding: 1rem; border: 1px solid var(--border-subtle); border-radius: .8rem; background: var(--surface-raised); color: var(--text-main); text-align: left; }
.upcoming-trip-card > strong { font-size: 1.02rem; }
.upcoming-trip-date, .upcoming-trip-meta { display: flex; align-items: center; gap: .4rem; color: var(--text-muted); font-size: .74rem; }
.status-badge { padding: .3rem .62rem; border-radius: 999px; background: var(--badge-neutral-bg); color: var(--badge-neutral-text); font-size: .72rem; font-weight: 680; }
.status-confirmed { background: var(--badge-success-bg); color: var(--badge-success-text); }
.empty-state-card { min-height: 9rem; display: flex; align-items: center; gap: .85rem; padding: 1.1rem; border: 1px dashed var(--border-subtle); border-radius: .8rem; background: color-mix(in srgb, var(--surface) 72%, var(--app-bg)); }
.empty-state-card > div:nth-child(2) { min-width: 0; }
.empty-state-card strong { font-size: .86rem; }
.empty-state-card p { margin: .18rem 0 0; color: var(--text-muted); font-size: .75rem; }
.empty-state-icon { width: 2.3rem; height: 2.3rem; display: grid; flex: 0 0 auto; place-items: center; border-radius: .75rem; background: var(--badge-success-bg); color: var(--badge-success-text); }
.empty-state-action { margin-left: auto; }
.diagnostic-row:hover, .upcoming-trip-card:hover, .attention-item:hover { border-color: color-mix(in srgb, var(--accent) 48%, var(--border-subtle)); }
.page-content > .home-page > .page-heading { align-items: center; }
.page-content > .home-page .home-dashboard { margin-top: 0; }
.page-content section > nav[aria-label] { display: flex; flex-wrap: nowrap; gap: .25rem; margin: 1rem 0 1.1rem; padding: .3rem; overflow-x: auto; border-bottom: 1px solid var(--border-subtle); }
.page-content section > nav[aria-label] button { min-height: 2.5rem; flex: 0 0 auto; padding: .55rem .9rem; border: 0; border-radius: .55rem .55rem 0 0; background: transparent; color: var(--text-muted); font-size: .82rem; font-weight: 620; }
.page-content section > nav[aria-label] button[aria-pressed="true"] { position: relative; border: 0; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent); }
.page-content section > nav[aria-label] button[aria-pressed="true"]::after { position: absolute; right: .45rem; bottom: 0; left: .45rem; height: 2px; border-radius: 2px; background: var(--accent); content: ""; }
.entity-hero { align-items: center; margin: .55rem 0 .75rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border-subtle); border-radius: .9rem; background: radial-gradient(ellipse at right center, color-mix(in srgb, var(--accent) 10%, transparent), transparent 50%), var(--surface-raised); }
.entity-hero > div { min-width: 0; }
.entity-hero .eyebrow { margin: 0 0 .3rem; color: var(--accent); font-size: .68rem; font-weight: 740; letter-spacing: .1em; }
.entity-hero h2 { margin: 0; font-size: clamp(1.55rem, 2.15vw, 2.05rem); font-weight: 760; letter-spacing: -.04em; }
.entity-hero p:not(.eyebrow) { margin: .35rem 0 0; color: var(--text-muted); }
.detail-actions { display: flex; gap: .45rem; }
.trip-summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .9rem 0 1rem; }
.trip-summary-metrics .metric-card { padding: .75rem .9rem; }
.trip-summary-metrics .metric-value { font-size: 1.7rem; }
.detail-facts { width: min(100%, 54rem); display: grid; grid-template-columns: minmax(9rem, .45fr) minmax(0, 1fr); align-items: center; gap: .25rem 1rem; margin: 1rem 0; }
.detail-facts dt { padding: .35rem 0; color: var(--text-muted); font-size: .8rem; }
.detail-facts dd { padding: .35rem 0; color: var(--text-main); font-weight: 620; }
.order-detail .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-scope-metrics { margin: .2rem 0 1rem; }
.order-scope-metrics .metric-card { padding: .75rem .95rem; }
.order-scope-metrics .metric-value { font-size: 1.7rem; }
.valve-detail > header { margin: .55rem 0 .75rem; padding: 1.1rem 1.2rem; border: 1px solid var(--border-subtle); border-radius: .9rem; background: radial-gradient(ellipse at right center, color-mix(in srgb, var(--accent) 10%, transparent), transparent 50%), var(--surface-raised); }
.valve-detail > header h2 { margin: 0; font-size: clamp(1.55rem, 2.15vw, 2.05rem); }
.valve-facts { width: min(100%, 56rem); display: grid; grid-template-columns: minmax(9rem, .42fr) minmax(0, 1fr); align-items: center; gap: .25rem 1rem; margin: .8rem 0; }
.valve-facts dt { color: var(--text-muted); font-size: .8rem; }
.valve-facts dd { padding: .45rem 0; color: var(--text-main); font-weight: 600; }
.valve-history-entry { position: relative; margin-left: .5rem; padding: .75rem 0 .8rem 1.25rem; border-bottom: 0; border-left: 1px solid var(--border-subtle); }
.valve-history-entry::before { position: absolute; top: 1.15rem; left: -.34rem; width: .62rem; height: .62rem; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); content: ""; }
.valve-history-entry > strong { color: var(--accent); font-size: .74rem; }
.valve-history-entry h3 { margin: .15rem 0; }
.scope-summary, .order-scope-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.scope-summary > p { margin: 0; padding: .8rem; border: 1px solid var(--border-subtle); border-radius: .8rem; background: var(--surface-raised); }
.capacity-workspace { display: grid; gap: .9rem; }
.capacity-workspace > .page-heading { margin: 0; }
.planner-search { display: flex; align-items: end; gap: .6rem; max-width: none; }
.planner-search label { flex: 1; }
.planner-filters { align-items: end; }
.planner-filters label { flex: 1 1 10rem; }
.planner-board { overflow: hidden; padding: 1.1rem; border: 1px solid var(--border-subtle); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
.planner-board-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.planner-board-heading .eyebrow { margin: 0 0 .12rem; color: var(--accent); font-size: .65rem; font-weight: 760; letter-spacing: .1em; }
.planner-board-heading h2 { margin: 0; }
.planner-board-heading p:last-child { margin: .2rem 0 0; color: var(--text-muted); font-size: .75rem; }
.planner-period { display: flex; gap: 1rem; color: var(--text-muted); font-size: .72rem; }
.planner-legend { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin: .65rem 0 .8rem; color: var(--text-muted); font-size: .7rem; }
.planner-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.planner-legend i { width: .55rem; height: .55rem; display: inline-block; border-radius: .18rem; background: var(--badge-success-text); }
.planner-legend i.reserved { background: var(--color-accent); }
.planner-legend i.unavailable { background: var(--badge-warning-text); }
.planner-row { display: grid; grid-template-columns: minmax(11rem, .27fr) minmax(0, 1fr); gap: .35rem 1rem; padding: .78rem 0; border-top: 1px solid var(--border-subtle); }
.planner-person { display: flex; align-items: center; gap: .6rem; }
.planner-person > span:last-child { min-width: 0; display: grid; gap: .1rem; }
.planner-person strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.planner-person small { color: var(--text-muted); font-size: .68rem; }
.planner-track { position: relative; min-height: 2.2rem; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: .5rem; background: color-mix(in srgb, var(--app-bg) 72%, var(--surface)); }
.planner-track-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); pointer-events: none; }
.planner-track-grid span { border-left: 1px dashed color-mix(in srgb, var(--border-subtle) 80%, transparent); }
.planner-booking { position: absolute; z-index: 1; min-width: .6rem; height: 1.55rem; display: flex; align-items: center; padding: 0 .4rem; overflow: hidden; border: 1px solid color-mix(in srgb, var(--color-success) 45%, transparent); border-radius: .42rem; background: var(--badge-success-bg); color: var(--badge-success-text); font-size: .68rem; font-weight: 650; white-space: nowrap; }
.planner-booking.reserved { border-color: color-mix(in srgb, var(--accent) 42%, transparent); background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--accent); }
.planner-booking.unavailable { border-color: color-mix(in srgb, var(--color-warning) 44%, transparent); background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.planner-free { position: relative; z-index: 1; padding-left: .55rem; color: var(--color-success); font-size: .68rem; font-weight: 700; }
.planner-booking-list { grid-column: 2; display: grid; gap: .28rem; }
.planner-booking-note { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .55rem; color: var(--text-muted); font-size: .7rem; }
.planner-booking-note .status-badge { padding: .18rem .48rem; font-size: .65rem; }
.status-confirmed { background: var(--badge-success-bg); color: var(--badge-success-text); }
.status-reserved, .status-pendingapproval, .status-partiallyapproved, .status-approved { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.status-submitted, .status-inprogress, .status-processing { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.status-rejected, .status-cancelled, .status-failed { background: var(--badge-error-bg); color: var(--badge-error-text); }
.status-draft, .status-completed, .status-active { background: var(--badge-neutral-bg); color: var(--badge-neutral-text); }
.planner-pagination { padding-top: .75rem; border-top: 1px solid var(--border-subtle); }
.absence-editor { margin: 0 !important; }
.absence-editor form { max-width: none; }
@media (max-width: 760px) {
    .trip-summary-metrics, .order-detail .metric-grid, .order-scope-metrics, .scope-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .trip-summary-metrics .metric-card:last-child, .order-scope-metrics .metric-card:last-child { grid-column: 1 / -1; }
    .planner-row { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
    .planner-booking-list { grid-column: 1; }
    .planner-person { padding-bottom: .1rem; }
}
@media (max-width: 480px) {
    .planner-search { align-items: stretch; flex-direction: column; }
    .planner-search button { align-self: flex-start; }
    .planner-board { padding: .75rem; }
    .planner-board-heading { align-items: flex-start; flex-direction: column; }
    .planner-period { width: 100%; justify-content: space-between; }
    .entity-hero { align-items: flex-start; flex-direction: column; padding: .9rem; }
    .detail-actions { flex-wrap: wrap; }
}
.table-wrap { border: 1px solid var(--border-subtle); border-radius: .8rem; }
table { font-size: .84rem; }
th { color: var(--text-muted); background: color-mix(in srgb, var(--surface-raised) 74%, var(--app-bg)); font-size: .72rem; font-weight: 700; letter-spacing: .035em; }
td, th { border-color: var(--border-subtle); }
.badge, .online, .offline { border-radius: 999px; }
.nav-group { transition: opacity .16s ease; }
.deployment-card, .metric-card, .attention-panel, .upcoming-section { animation: surface-in .2s ease-out both; }
@keyframes surface-in { from { opacity: .92; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 920px) {
    .deployment-card { grid-template-columns: minmax(0, 1fr); }
    .deployment-visual { min-height: 8rem; }
    .deployment-visual > .app-icon { width: 5.5rem; }
    .progress-ring { width: 5.4rem; height: 5.4rem; }
    .progress-ring > span { width: 4.3rem; height: 4.3rem; }
}
@media (max-width: 560px) {
    .page-content { padding: .85rem; }
    .page-content > .home-page > .page-heading { margin: .1rem 0 .8rem; }
    .system-status-card { gap: .35rem .65rem; }
    .system-status-card h2 { flex-basis: 100%; }
    .system-status-card dl { gap: .25rem .65rem; }
    .system-status-card button { margin-left: 0; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
    .metric-card { padding: .8rem; }
    .metric-card-top { align-items: flex-start; font-size: .68rem; }
    .metric-icon { width: 1.8rem; height: 1.8rem; }
    .metric-value { font-size: 1.7rem; }
    .deployment-card { min-height: unset; padding: 1rem; }
    .deployment-title-row h2 { font-size: 1.55rem; }
    .deployment-facts > span { min-width: 0; flex: 1; padding: .45rem .55rem; }
    .deployment-facts strong { font-size: 1rem; }
    .deployment-facts small { font-size: .62rem; }
    .readiness-breakdown { grid-template-columns: 1fr; }
    .attention-panel, .upcoming-section { padding: .95rem !important; }
    .attention-item { padding: .62rem; }
}
@media (prefers-reduced-motion: reduce) { .deployment-card, .metric-card, .attention-panel, .upcoming-section { animation: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Message diagnostics: quick operational scanning with technical identifiers kept behind disclosure. */
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 0 0 1.1rem; }
.page-heading h1 { margin: .12rem 0 .25rem; font-size: clamp(1.35rem, 2vw, 1.8rem); letter-spacing: -.025em; }
.page-heading p { margin: .25rem 0; color: var(--text-muted); }
.page-heading .eyebrow { font-size: .72rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.button-secondary { min-height: 2.45rem; border: 1px solid var(--border-subtle); background: var(--surface); color: var(--text-main); }
.diagnostics-card, .mail-preview-card { padding: 1rem 1.15rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .7rem; }
.section-heading h2, .mail-preview-card h2 { margin: 0; font-size: 1.05rem; }
.section-heading p, .mail-preview-card > p { margin: .25rem 0 0; color: var(--text-muted); font-size: .87rem; }
.section-heading label { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.section-heading select { width: auto; min-width: 10rem; margin: 0; }
.diagnostic-row { padding: .85rem 0; border-top: 1px solid var(--border-subtle); }
.diagnostic-summary { display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(9rem, auto) auto auto; align-items: center; gap: 1rem; }
.diagnostic-copy { display: grid; gap: .22rem; min-width: 0; }
.diagnostic-copy strong { overflow-wrap: anywhere; }
.diagnostic-copy > span, .diagnostic-summary time, .attempt-count { color: var(--text-muted); font-size: .84rem; }
.status-badge { width: fit-content; display: inline-flex; align-items: center; gap: .32rem; padding: .28rem .55rem; border-radius: 99px; background: var(--badge-neutral-bg); color: var(--badge-neutral-text); font-size: .76rem; font-weight: 650; }
.status-badge .app-icon { width: .9rem; height: .9rem; }
.status-badge.sent { background: var(--badge-success-bg); color: var(--badge-success-text); }
.status-badge.pending, .status-badge.processing { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.status-badge.failed { background: var(--badge-error-bg); color: var(--badge-error-text); }
.diagnostic-row details { margin-top: .55rem; color: var(--text-muted); font-size: .82rem; }
.diagnostic-row details summary { cursor: pointer; width: fit-content; }
.diagnostic-row dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .8rem; margin: .6rem 0 0; }
.diagnostic-row dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.diagnostic-error { color: var(--badge-error-text); font-size: .84rem; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: .8rem; padding-top: .75rem; border-top: 1px solid var(--border-subtle); }
.mail-preview-row { padding: .7rem 0; border-top: 1px solid var(--border-subtle); }
.mail-preview-row summary { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; cursor: pointer; }
.mail-preview-row summary small { color: var(--text-muted); }
.empty-state { padding: 1rem 0; color: var(--text-muted); }
.map-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.75rem; margin:1rem 0; }
.metric-card { display:grid; gap:.3rem; padding:1rem; border:1px solid var(--border-subtle); border-radius:var(--radius-card, .8rem); background:var(--surface); }
.metric-card span { color:var(--text-muted); font-size:.84rem; }.metric-card strong { font-size:1.45rem; }
.map-layout { display:grid; grid-template-columns:minmax(13rem,17rem) minmax(0,1fr); gap:1rem; align-items:stretch; }
.map-filter-panel { display:grid; align-content:start; gap:.75rem; padding:1rem; border:1px solid var(--border-subtle); border-radius:var(--radius-card, .8rem); background:var(--surface); }
.map-filter-panel h3 { margin:0; }.map-stage-wrap,.map-picker-panel { min-width:0; overflow:hidden; border:1px solid var(--border-subtle); border-radius:var(--radius-card, .8rem); background:var(--surface); }
.map-stage { width:100%; height:min(68vh,680px); min-height:360px; background:var(--surface-raised, #e9eef3); z-index:0; }
.map-stage.map-picker { height:340px; min-height:280px; }.map-picker-panel { padding:1rem; margin:1rem 0; }
.vexve-map-marker { background:transparent; border:0; }.vexve-map-marker span { display:grid; place-items:center; width:34px; height:34px; border:2px solid white; border-radius:50%; box-shadow:0 2px 9px #10243a66; background:#174b75; color:white; font-weight:700; }
.vexve-map-marker.valve span { background:#a95523; }.vexve-map-marker.cluster span { width:40px;height:40px;background:#394a59; }
.customer-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,17rem),1fr)); gap:.85rem; margin:1rem 0; }
.customer-grid { grid-auto-rows:1fr; }
.customer-card { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(2.6rem,auto) auto auto; align-items:start; align-content:start; gap:.7rem; }.customer-card p { margin:.2rem 0; }
.customer-card .customer-logo-box { justify-self:center; }
:root { --customer-logo-overview-width:120px; --customer-logo-overview-height:64px; --customer-logo-detail-width:220px; --customer-logo-detail-height:100px; --customer-logo-popup-width:80px; --customer-logo-popup-height:40px; }
.customer-logo-box { flex-shrink:0; width:var(--customer-logo-overview-width); height:var(--customer-logo-overview-height); display:flex; align-items:center; justify-content:center; padding:.5rem; box-sizing:border-box; background:#fafcfe; border:1px solid #d6e0e7; border-radius:.65rem; overflow:hidden; color:#334e65; }
.customer-logo-box--detail { width:min(100%,var(--customer-logo-detail-width)); height:var(--customer-logo-detail-height); }
.customer-logo-box--popup { width:var(--customer-logo-popup-width); height:var(--customer-logo-popup-height); padding:.25rem; }
.customer-logo-box img { display:block; width:100%; height:100%; max-width:100%; max-height:100%; object-fit:contain; object-position:center; }
.customer-logo-initials { font-size:1.25rem; font-weight:700; letter-spacing:.08em; }
.customer-logo-actions { display:flex; align-items:center; flex-wrap:wrap; gap:1rem; margin:1rem 0; }
.site-geocoding-workflow { margin:1rem 0; }.site-geocoding-workflow .check { align-items:flex-start; }
.customer-logo,.customer-logo-placeholder { width:4rem;height:4rem;object-fit:contain;border:1px solid var(--border-subtle);border-radius:.65rem;background:white;padding:.25rem; }
.customer-logo-placeholder { display:grid;place-items:center;color:var(--text-muted);font-weight:700;font-size:1.3rem; }.customer-logo-inline { max-width:10rem;max-height:4rem;object-fit:contain; }
.entity-hero { display:flex;align-items:center;gap:1rem; }.approval-card { display:grid;gap:.55rem;padding:1rem;margin:.8rem 0;border:1px solid var(--border-subtle);border-radius:var(--radius-card, .8rem);background:var(--surface); }
.approval-card header { display:flex;justify-content:space-between;align-items:flex-start;gap:1rem; }.approval-card header h3,.approval-card p { margin:.2rem 0; }
.approval-card textarea { min-height:5rem; }
@media (max-width: 760px) {
    .page-heading, .section-heading { align-items: stretch; flex-direction: column; }
    .page-heading { gap: .6rem; }
    .page-heading > button { width: fit-content; }
    .diagnostic-summary { grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .65rem; }
    .diagnostic-copy { grid-column: 1 / -1; }
    .diagnostic-summary time { grid-column: 1; }
    .status-badge { grid-column: 2; grid-row: 2; }
    .attempt-count { grid-column: 1 / -1; }
    .section-heading label { align-items: flex-start; flex-direction: column; }
    .section-heading select { width: 100%; }
    .mail-preview-row summary { align-items: flex-start; flex-direction: column; }
    .map-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.map-layout { grid-template-columns:1fr; }.map-stage { height:55vh; min-height:320px; }.map-stage.map-picker { min-height:250px; }
    .approval-card header { flex-direction:column; }.entity-hero { flex-wrap:wrap; }
}
.customer-tabs{display:flex;gap:.5rem;overflow-x:auto;padding:.75rem 0;border-bottom:1px solid var(--border-subtle);margin:1rem 0 1.5rem}.customer-tabs button{white-space:nowrap}.customer-tabs button[aria-pressed=true]{background:var(--surface-selected);color:var(--color-accent);border-color:var(--color-accent)}
.customer-summary-grid,.site-card-grid,.valve-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem;margin:1.5rem 0}.contact-card,.site-card,.valve-result-card,.site-master-detail{background:var(--surface);border:1px solid var(--border-subtle);border-radius:16px;padding:1.25rem;margin:.75rem 0}.valve-result-card header,.contact-card header{display:flex;justify-content:space-between;gap:1rem;align-items:center}.valve-result-card dl{display:grid;gap:.75rem}.valve-result-card dl div{display:grid;grid-template-columns:1fr 1.6fr;gap:.75rem}.valve-result-card dt{color:var(--color-text-secondary);font-size:.8rem}.valve-result-card dd{margin:0;overflow-wrap:anywhere}.valve-technical-line{font-weight:600}.valve-context,.valve-location-step{padding:1rem;border:1px solid var(--border-subtle);border-radius:12px;margin:1rem 0}.valve-context strong{display:block;margin:.5rem 0}.advanced-valve-filters{margin:.75rem 0}.advanced-valve-filters summary,.site-backfill summary{cursor:pointer;font-weight:600;padding:.75rem 0}.valve-search-main{flex:2;min-width:0}.valve-search-main input{font-size:1.05rem;min-height:48px}.site-backfill{margin-top:2rem;border-top:1px solid var(--border-subtle)}.customer-metrics{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}.topbar-search input{min-width:0}.topbar-search button{flex-shrink:0}
@media(max-width:640px){.customer-master-detail .entity-hero{flex-wrap:wrap}.valve-result-grid{grid-template-columns:1fr}.valve-result-card dl div{grid-template-columns:1fr}.customer-tabs{margin-inline:-.5rem}.valve-search-screen .filters{grid-template-columns:1fr}.customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.valve-search-screen form{max-width:none}.valve-search-screen .order-filters>.filters:first-child{display:grid;grid-template-columns:minmax(0,1fr) auto auto}.advanced-valve-filters>.filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));align-items:start}.advanced-valve-filters .customer-site-selector{grid-column:1/-1}.customer-site-selector input,.customer-site-selector select{max-width:100%}.customer-tabs{flex-wrap:nowrap}.leaflet-popup-content{max-height:320px;overflow:auto;overflow-wrap:anywhere}
@media(max-width:1100px){.map-layout{grid-template-columns:1fr}.account-trigger-name{display:none}.topbar-context{min-width:0}.topbar-context small{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
@media(max-width:640px){.valve-search-screen .order-filters>.filters:first-child{grid-template-columns:1fr}.customer-tabs{flex-wrap:wrap}.valve-context strong{overflow-wrap:anywhere}}

/* Overhaul state is always accompanied by a symbol and localized text. */
.overhaul-panel { margin:1rem 0;padding:1.25rem;border:1px solid var(--border-subtle);border-radius:var(--radius-card,.8rem);background:var(--surface); }
.overhaul-date-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }
.overhaul-facts { display:grid;grid-template-columns:minmax(10rem,1fr) 1fr;gap:.5rem; }.overhaul-facts dd { margin:0; }
.overhaul-legend { list-style:none;padding:0;display:grid;gap:.7rem; }.overhaul-legend li { display:flex;align-items:center;gap:.7rem; }
.overhaul-dot { display:inline-block;width:.9rem;height:.9rem;flex-shrink:0;border-radius:50%;border:1px solid currentColor;background:var(--overhaul-color); }
.overhaul-overdue { --overhaul-color:#bd2828; }.overhaul-reminder,.overhaul-duetoday { --overhaul-color:#b57900; }.overhaul-scheduled { --overhaul-color:#19764d; }.overhaul-unscheduled { --overhaul-color:#627181; }
.vexve-map-marker[class*="overhaul-"] span { background:var(--overhaul-color);position:relative; }.vexve-map-marker small { position:absolute;right:-5px;top:-5px;min-width:17px;border:1px solid white;border-radius:50%;background:var(--overhaul-color);color:white;line-height:17px;font-size:12px; }
.overhaul-state { display:inline-flex;align-items:center;gap:.5rem; }.overhaul-state::before { content:"";width:.7rem;height:.7rem;border-radius:50%;background:var(--overhaul-color);flex-shrink:0; }
.overhaul-reminders { margin-top:1.5rem; }.overhaul-reminder-row { display:flex;align-items:center;gap:1rem;padding:1rem;border-bottom:1px solid var(--border-subtle); }.overhaul-reminder-row div { flex:1;min-width:0; }.overhaul-reminder-row p { margin:.3rem 0; }
@media(max-width:640px){.overhaul-date-fields{grid-template-columns:1fr}.overhaul-facts{grid-template-columns:1fr}.overhaul-facts dd{margin-bottom:.5rem}.overhaul-reminder-row{align-items:flex-start;flex-direction:column}}

.site-contacts { margin:1.25rem 0; }.site-contact-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:1rem; }.site-contact-grid .contact-card { margin:0 0 1rem; }.internal-customer-responsibilities { min-width:0; }
/* Compact shared context and confirmed-trip operational overview */
.customer-summary > header{display:flex;align-items:center;gap:1rem;margin-bottom:.75rem}
.customer-summary h3{margin:0}.customer-summary{margin-bottom:1rem}
.site-summary p{margin:.5rem 0;overflow-wrap:anywhere}.site-contact{font-size:.9rem}
.operational-kpis{grid-template-columns:repeat(6,minmax(0,1fr));gap:.65rem}
.operational-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:1rem}
.operational-block{border:1px solid var(--border-subtle);border-radius:16px;padding:1.2rem;background:var(--surface,#fff);min-width:0}
.operational-block>h3{display:flex;align-items:center;gap:.6rem;margin:0 0 1rem;font-size:1.1rem}
.operational-valves{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin-top:1rem}
.valve-summary-card{border:1px solid var(--border-subtle);border-radius:12px;padding:.8rem;min-width:0}
.valve-summary-card header{display:flex;align-items:center;justify-content:space-between;gap:.5rem}
.valve-summary-card p{font-size:.83rem;margin:.4rem 0;overflow-wrap:anywhere}
.open-point{display:flex;gap:.65rem;align-items:start;padding:.55rem 0;border-bottom:1px solid var(--border-subtle)}
.open-point small{display:block;color:var(--text-muted,#63748c);font-size:.78rem}
.approval-plan{display:flex;flex-wrap:wrap;gap:1rem;background:var(--surface-selected);padding:.8rem;border-radius:10px}
.phase-toggle{width:100%;text-align:left;font-weight:700;background:var(--surface-selected);padding:1rem}
.checklist-phase{margin:.8rem 0}.phase-toggle[aria-expanded=true]{border-bottom:3px solid var(--accent,#007ca9)}
.exact-serial-match{border-left:4px solid #c44;padding-left:.8rem}
.similar-build-match{border-left:4px solid var(--accent,#007ca9);padding-left:.8rem}
.success-notice{padding:.7rem;border-radius:8px;background:#ddf3e7;color:#145833}
@media(max-width:1100px){.operational-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.operational-grid{grid-template-columns:1fr}.operational-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.operational-valves{grid-template-columns:1fr}}

.operational-overview{padding:0;border:0;background:transparent;margin:0}.operational-block{margin:0}.operational-overview .page-heading{padding:0;border:0}.operational-kpis .metric-card{padding:.85rem}.operational-block .customer-logo-box{width:110px;height:64px}
.operational-overview .operational-cost{margin:.65rem 0}.operational-overview .metric-grid{margin-top:.5rem}.operational-valves .valve-summary-card{padding:.6rem}.operational-block .actions{gap:.6rem;margin-top:.7rem}.trip-detail:has(.operational-overview)>.entity-hero{padding:1rem;margin:.5rem 0}.operational-grid{align-items:start}.operational-block .button-link{font-size:.82rem}
.match-notice--similar{background:var(--surface-selected);border-left:3px solid var(--accent)}
.match-notice--exact{background:light-dark(#fff1da,#3c3020);border-left:4px solid light-dark(#a45100,#edb767)}
.match-kind{display:block;font-weight:700;font-size:.75rem;margin-bottom:.25rem}
.match-kind--exact{color:light-dark(#943900,#ffc577)}
.match-kind--similar{color:var(--accent)}
.match-notice .device{padding:.65rem;margin:.5rem 0;background:transparent}.match-notice .device p{font-size:.85rem;margin:.4rem 0}
.bulk-valve-row{display:flex;gap:1rem;justify-content:space-between;align-items:center;padding:.6rem 0;border-bottom:1px solid var(--border-subtle)}
.bulk-valve-identity{display:flex;flex-direction:column;gap:.2rem}.bulk-valve-identity>span{font-size:.83rem}
.bulk-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem}.bulk-submit{margin-top:1rem}
:root { --product-image-size: 56px; }
.product-image-box { width: var(--product-image-size); height: var(--product-image-size); min-width: var(--product-image-size); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-border); border-radius: 10px; background: var(--surface); overflow: hidden; vertical-align: middle; }
.product-image-box img { width: 100%; height: 100%; object-fit: contain; }
.product-image-box svg { width: 28px; height: 28px; }
.product-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.photo-progress-card { padding: 12px 16px; margin: 12px 0; border: 1px solid var(--color-border); border-radius: 12px; }
.progress-heading { display: flex; justify-content: space-between; gap: 12px; }
.photo-progress { width: 100%; height: 8px; accent-color: var(--color-accent); }
.photo-progress.state-photodocumentationcomplete { accent-color: #238452; }
.photo-progress-card p { margin: 6px 0; }
.lifecycle-menu { margin: 12px 0; }
.lifecycle-dialog { padding: 18px; border: 1px solid var(--color-border); border-radius: 12px; }
.lifecycle-notice,.status-onhold { background: #f8e6b3; color: #5a4309; padding: 8px 12px; border-radius: 8px; }
.danger-action,.status-cancelled { background: #f8dcdc; color: #852525; }

.photo-progress.progress-partial { accent-color: #236fa6; }
.photo-progress.progress-review { accent-color: var(--color-warning); }
.photo-progress.progress-complete { accent-color: var(--color-success); }
